diff --git a/public/assets/403-CcoghSKz.js b/public/assets/403-CcoghSKz.js deleted file mode 100644 index ab7a6b7..0000000 --- a/public/assets/403-CcoghSKz.js +++ /dev/null @@ -1 +0,0 @@ -import{Tr as e,t}from"./jsx-runtime-NwRKtVrk.js";import{t as n}from"./button-CM-rzMOH.js";import{t as r}from"./card-D7XvzVif.js";import{t as i}from"./result-C9ArRkbL.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`403`,title:`403`,subTitle:`Sorry, you are not authorized to access this page.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default}; \ No newline at end of file diff --git a/public/assets/403-Dob-WA64.js b/public/assets/403-Dob-WA64.js new file mode 100644 index 0000000..d75e8d6 --- /dev/null +++ b/public/assets/403-Dob-WA64.js @@ -0,0 +1 @@ +import"./rolldown-runtime-BgaNhQyE.js";import{Dr as e,t}from"./jsx-runtime-ADHq9IcL.js";import{t as n}from"./button-CcpWP-mq.js";import{t as r}from"./card-BFxeciPE.js";import{t as i}from"./result-XzmMluTH.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`403`,title:`403`,subTitle:`Sorry, you are not authorized to access this page.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default}; \ No newline at end of file diff --git a/public/assets/404-C24BjnyR.js b/public/assets/404-C24BjnyR.js deleted file mode 100644 index 456a647..0000000 --- a/public/assets/404-C24BjnyR.js +++ /dev/null @@ -1 +0,0 @@ -import{Tr as e,t}from"./jsx-runtime-NwRKtVrk.js";import{t as n}from"./button-CM-rzMOH.js";import{t as r}from"./card-D7XvzVif.js";import{t as i}from"./result-C9ArRkbL.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`404`,title:`404`,subTitle:`Sorry, the page you visited does not exist.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default}; \ No newline at end of file diff --git a/public/assets/404-DIW8STd8.js b/public/assets/404-DIW8STd8.js new file mode 100644 index 0000000..271ec2a --- /dev/null +++ b/public/assets/404-DIW8STd8.js @@ -0,0 +1 @@ +import"./rolldown-runtime-BgaNhQyE.js";import{Dr as e,t}from"./jsx-runtime-ADHq9IcL.js";import{t as n}from"./button-CcpWP-mq.js";import{t as r}from"./card-BFxeciPE.js";import{t as i}from"./result-XzmMluTH.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`404`,title:`404`,subTitle:`Sorry, the page you visited does not exist.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default}; \ No newline at end of file diff --git a/public/assets/500-CbygX2w1.js b/public/assets/500-CbygX2w1.js deleted file mode 100644 index ac79582..0000000 --- a/public/assets/500-CbygX2w1.js +++ /dev/null @@ -1 +0,0 @@ -import{Tr as e,t}from"./jsx-runtime-NwRKtVrk.js";import{t as n}from"./button-CM-rzMOH.js";import{t as r}from"./card-D7XvzVif.js";import{t as i}from"./result-C9ArRkbL.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`500`,title:`500`,subTitle:`Sorry, something went wrong.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default}; \ No newline at end of file diff --git a/public/assets/500-khIb72nh.js b/public/assets/500-khIb72nh.js new file mode 100644 index 0000000..36354e3 --- /dev/null +++ b/public/assets/500-khIb72nh.js @@ -0,0 +1 @@ +import"./rolldown-runtime-BgaNhQyE.js";import{Dr as e,t}from"./jsx-runtime-ADHq9IcL.js";import{t as n}from"./button-CcpWP-mq.js";import{t as r}from"./card-BFxeciPE.js";import{t as i}from"./result-XzmMluTH.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`500`,title:`500`,subTitle:`Sorry, something went wrong.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default}; \ No newline at end of file diff --git a/public/assets/ArrowDownOutlined-CH5xWTUL.js b/public/assets/ArrowDownOutlined-CH5xWTUL.js new file mode 100644 index 0000000..3cd6bc7 --- /dev/null +++ b/public/assets/ArrowDownOutlined-CH5xWTUL.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z`}}]},name:`arrow-down`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/ArrowUpOutlined-BqDvHB4K.js b/public/assets/ArrowUpOutlined-BqDvHB4K.js new file mode 100644 index 0000000..8f5bddb --- /dev/null +++ b/public/assets/ArrowUpOutlined-BqDvHB4K.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z`}}]},name:`arrow-up`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/AuthButton-MNxRWjhj.js b/public/assets/AuthButton-MNxRWjhj.js deleted file mode 100644 index 7e52427..0000000 --- a/public/assets/AuthButton-MNxRWjhj.js +++ /dev/null @@ -1 +0,0 @@ -import{Or as e,Tr as t,t as n}from"./jsx-runtime-NwRKtVrk.js";import{c as r}from"./index-B7MUL4ct.js";var i=e(t(),1),a=n(),o=({auth:e,children:t})=>{let n=r(e=>e.access);return(0,i.useMemo)(()=>e?n.includes(e):!0,[n,e])?(0,a.jsx)(a.Fragment,{children:t}):null};export{o as t}; \ No newline at end of file diff --git a/public/assets/AuthButton-ZAAWoGLQ.js b/public/assets/AuthButton-ZAAWoGLQ.js new file mode 100644 index 0000000..0b95290 --- /dev/null +++ b/public/assets/AuthButton-ZAAWoGLQ.js @@ -0,0 +1 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,t as n}from"./jsx-runtime-ADHq9IcL.js";import{t as r}from"./user-DSO6CZPD.js";var i=e(t(),1),a=n(),o=({auth:e,children:t})=>{let n=r(e=>e.access);return(0,i.useMemo)(()=>!e||n.includes(e),[n,e])?(0,a.jsx)(a.Fragment,{children:t}):null};export{o as t}; \ No newline at end of file diff --git a/public/assets/BarsOutlined-UcCNWNvv.js b/public/assets/BarsOutlined-UcCNWNvv.js deleted file mode 100644 index 9a37a11..0000000 --- a/public/assets/BarsOutlined-UcCNWNvv.js +++ /dev/null @@ -1 +0,0 @@ -import{Er as e,Or as t,Tn as n,Tr as r}from"./jsx-runtime-NwRKtVrk.js";var i=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z`}}]},name:`down`,theme:`outlined`}})),a=t(r()),o=t(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(n,s({},e,{ref:t,icon:o.default}))),l=t(e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z`}}]},name:`left`,theme:`outlined`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(n,u({},e,{ref:t,icon:l.default}))),f=t(e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z`}}]},name:`bars`,theme:`outlined`}}))());function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(n,p({},e,{ref:t,icon:f.default})));export{d as n,c as r,m as t}; \ No newline at end of file diff --git a/public/assets/CaretDownFilled-bW_4H-tT.js b/public/assets/CaretDownFilled-bW_4H-tT.js new file mode 100644 index 0000000..533b7a6 --- /dev/null +++ b/public/assets/CaretDownFilled-bW_4H-tT.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z`}}]},name:`caret-down`,theme:`filled`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/CaretUpOutlined-CCtk1ukR.js b/public/assets/CaretUpOutlined-CCtk1ukR.js new file mode 100644 index 0000000..76b74ff --- /dev/null +++ b/public/assets/CaretUpOutlined-CCtk1ukR.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z`}}]},name:`filter`,theme:`filled`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default}))),l=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z`}}]},name:`folder-open`,theme:`outlined`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,u({},e,{ref:t,icon:l.default}))),f=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z`}}]},name:`folder`,theme:`outlined`}}))());function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,p({},e,{ref:t,icon:f.default}))),h=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z`}}]},name:`holder`,theme:`outlined`}}))());function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,g({},e,{ref:t,icon:h.default}))),v=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`minus-square`,theme:`outlined`}}))());function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,y({},e,{ref:t,icon:v.default}))),x=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`plus-square`,theme:`outlined`}}))());function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,S({},e,{ref:t,icon:x.default}))),w=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z`}}]},name:`caret-down`,theme:`outlined`}}))());function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,T({},e,{ref:t,icon:w.default}))),D=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z`}}]},name:`caret-up`,theme:`outlined`}}))());function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,O({},e,{ref:t,icon:D.default})));export{_ as a,c,b as i,E as n,m as o,C as r,d as s,k as t}; \ No newline at end of file diff --git a/public/assets/CheckCircleFilled-D9xa2k05.js b/public/assets/CheckCircleFilled-D9xa2k05.js new file mode 100644 index 0000000..c478472 --- /dev/null +++ b/public/assets/CheckCircleFilled-D9xa2k05.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z`}}]},name:`check-circle`,theme:`filled`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/CheckCircleOutlined-6-W2Vwzs.js b/public/assets/CheckCircleOutlined-6-W2Vwzs.js new file mode 100644 index 0000000..7f238bb --- /dev/null +++ b/public/assets/CheckCircleOutlined-6-W2Vwzs.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`check-circle`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/ClearOutlined-C3IuM4M9.js b/public/assets/ClearOutlined-C3IuM4M9.js new file mode 100644 index 0000000..824ee48 --- /dev/null +++ b/public/assets/ClearOutlined-C3IuM4M9.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M682 455V311l-76 76v68c-.1 50.7-42 92.1-94 92a95.8 95.8 0 01-52-15l-54 55c29.1 22.4 65.9 36 106 36 93.8 0 170-75.1 170-168z`}},{tag:`path`,attrs:{d:`M833 446h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254-63 0-120.7-23-165-61l-54 54a334.01 334.01 0 00179 81v102H326c-13.9 0-24.9 14.3-25 32v36c.1 4.4 2.9 8 6 8h408c3.2 0 6-3.6 6-8v-36c0-17.7-11-32-25-32H547V782c165.3-17.9 294-157.9 294-328 0-4.4-3.6-8-8-8zm13.1-377.7l-43.5-41.9a8 8 0 00-11.2.1l-129 129C634.3 101.2 577 64 511 64c-93.9 0-170 75.3-170 168v224c0 6.7.4 13.3 1.2 19.8l-68 68A252.33 252.33 0 01258 454c-.2-4.4-3.8-8-8-8h-60c-4.4 0-8 3.6-8 8 0 53 12.5 103 34.6 147.4l-137 137a8.03 8.03 0 000 11.3l42.7 42.7c3.1 3.1 8.2 3.1 11.3 0L846.2 79.8l.1-.1c3.1-3.2 3-8.3-.2-11.4zM417 401V232c0-50.6 41.9-92 94-92 46 0 84.1 32.3 92.3 74.7L417 401z`}}]},name:`audio-muted`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default}))),l=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z`}}]},name:`audio`,theme:`outlined`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,u({},e,{ref:t,icon:l.default}))),f=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z`}}]},name:`clear`,theme:`outlined`}}))());function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,p({},e,{ref:t,icon:f.default})));export{d as n,c as r,m as t}; \ No newline at end of file diff --git a/public/assets/ClockCircleOutlined-Cn57q4yS.js b/public/assets/ClockCircleOutlined-Cn57q4yS.js new file mode 100644 index 0000000..4b86f6f --- /dev/null +++ b/public/assets/ClockCircleOutlined-Cn57q4yS.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z`}}]},name:`clock-circle`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/CloseCircleFilled-BARdd-Ff.js b/public/assets/CloseCircleFilled-BARdd-Ff.js new file mode 100644 index 0000000..7b06da8 --- /dev/null +++ b/public/assets/CloseCircleFilled-BARdd-Ff.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z`}}]},name:`close-circle`,theme:`filled`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/CloseCircleOutlined-CFrRsJ54.js b/public/assets/CloseCircleOutlined-CFrRsJ54.js new file mode 100644 index 0000000..b8b13b8 --- /dev/null +++ b/public/assets/CloseCircleOutlined-CFrRsJ54.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z`}}]},name:`close-circle`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/ColorPresets-BBbJffTn.js b/public/assets/ColorPresets-BBbJffTn.js deleted file mode 100644 index cae0530..0000000 --- a/public/assets/ColorPresets-BBbJffTn.js +++ /dev/null @@ -1,8 +0,0 @@ -import{$t as e,Bn as t,Bt as n,Gn as r,Jn as i,Ln as a,Mn as o,N as s,Or as c,P as l,Qn as u,R as d,Rn as f,Sn as p,Sr as m,St as h,Tr as g,Vn as _,Y as v,Z as y,Zt as b,an as x,ar as S,bn as C,bt as w,cn as T,dn as E,en as D,fn as O,hr as k,jn as A,k as j,pt as M,rr as N,sn as P,st as F,tr as I,ur as L,vn as ee,wt as R,xt as z,z as B}from"./jsx-runtime-NwRKtVrk.js";var V=c(g()),H=w(`Wave`,e=>{let{componentCls:t,colorPrimary:n,motionDurationSlow:r,motionEaseInOut:i,motionEaseOutCirc:a,antCls:o}=e,[,s]=z(o,`wave`);return{[t]:{position:`absolute`,background:`transparent`,pointerEvents:`none`,boxSizing:`border-box`,color:s(`color`,n),boxShadow:`0 0 0 0 currentcolor`,opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s`,`opacity 2s`].map(e=>`${e} ${a}`).join(`,`),"&-active":{boxShadow:`0 0 0 6px currentcolor`,opacity:0},"&.wave-quick":{transition:[`box-shadow`,`opacity`].map(e=>`${e} ${r} ${i}`).join(`,`)}}}}}),U=`ant-wave-target`,W=e=>e?ee(e)&&e!==`#fff`&&e!==`#ffffff`&&e!==`rgb(255, 255, 255)`&&e!==`rgba(255, 255, 255, 1)`&&!/rgba\((?:\d*, ){3}0\)/i.test(e)&&!/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i.test(e)&&e!==`transparent`&&e!==`canvastext`:!1;function G(e,t=null){let n=getComputedStyle(e),{borderTopColor:r,borderColor:i,backgroundColor:a}=n;return t&&W(n[t])?n[t]:[r,i,a].find(W)??null}function K(e){return Number.isNaN(e)?0:e}var q=e=>{let{className:t,target:n,component:r,colorSource:i}=e,a=V.useRef(null),{getPrefixCls:s}=V.useContext(P),[c]=z(s(),`wave`),[l,u]=V.useState(null),[d,h]=V.useState([]),[g,_]=V.useState(0),[v,y]=V.useState(0),[b,x]=V.useState(0),[S,w]=V.useState(0),[T,E]=V.useState(!1),D={left:g,top:v,width:b,height:S,borderRadius:d.map(e=>`${e}px`).join(` `)};l&&(D[c(`color`)]=l);function O(){let e=getComputedStyle(n);u(G(n,i));let t=e.position===`static`,{borderLeftWidth:r,borderTopWidth:a}=e;_(t?n.offsetLeft:K(-Number.parseFloat(r))),y(t?n.offsetTop:K(-Number.parseFloat(a))),x(n.offsetWidth),w(n.offsetHeight);let{borderTopLeftRadius:o,borderTopRightRadius:s,borderBottomLeftRadius:c,borderBottomRightRadius:l}=e;h([o,s,l,c].map(e=>K(Number.parseFloat(e))))}if(V.useEffect(()=>{if(n){let e=f(()=>{O(),E(!0)}),t;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(O),t.observe(n)),()=>{f.cancel(e),t?.disconnect()}}},[n]),!T)return null;let k=(r===`Checkbox`||r===`Radio`)&&n?.classList.contains(U);return V.createElement(p,{visible:!0,motionAppear:!0,motionName:`wave-motion`,motionDeadline:5e3,onAppearEnd:(e,t)=>{if(t.deadline||C(t)&&t.propertyName===`opacity`){let e=a.current?.parentElement;o(e).then(()=>{e?.remove()})}return!1}},({className:e},n)=>V.createElement(`div`,{ref:I(a,n),className:m(t,e,{"wave-quick":k}),style:D}))},te=(e,t)=>{let{component:n}=t;if(n===`Checkbox`&&!e.querySelector(`input`)?.checked)return;let r=document.createElement(`div`);r.style.position=`absolute`,r.style.left=`0px`,r.style.top=`0px`,e?.insertBefore(r,e?.firstChild),A(V.createElement(q,{...t,target:e}),r)},ne=(e,t,n,r)=>{let{wave:i}=V.useContext(P),[,a,o]=R(),s=k(s=>{let c=e.current;if(i?.disabled||!c)return;let l=c.querySelector(`.${U}`)||c,{showEffect:u}=i||{};(u||te)(l,{className:t,token:a,component:n,event:s,hashId:o,colorSource:r})}),c=V.useRef(null);return V.useEffect(()=>()=>{f.cancel(c.current)},[]),e=>{f.cancel(c.current),c.current=f(()=>{s(e)})}},J={click:`click`,mousedown:`mousedown`,mouseup:`mouseup`,pointerdown:`pointerdown`,pointerup:`pointerup`},re=e=>{let{children:t,disabled:n,component:r,colorSource:i}=e,{getPrefixCls:a,wave:o}=(0,V.useContext)(P),s=(0,V.useRef)(null),c=a(`wave`),l=ne(s,m(c,H(c)),r,i);return V.useEffect(()=>{let e=s.current;if(!e||e.nodeType!==window.Node.ELEMENT_NODE||n)return;let t=t=>{!u(t.target)||!e.getAttribute||e.getAttribute(`disabled`)||e.disabled||e.className.includes(`disabled`)&&!e.className.includes(`disabled:`)||e.getAttribute(`aria-disabled`)===`true`||e.className.includes(`-leave`)||l(t)},r=o?.triggerType,i=r&&r in J?J[r]:`click`;return e.addEventListener(i,t,!0),()=>{e.removeEventListener(i,t,!0)}},[n,o?.triggerType]),V.isValidElement(t)?F(t,{ref:S(t)?I(N(t),s):s}):t??null},Y=e=>{let{componentCls:t,antCls:n,motionDurationMid:r,motionEaseInOut:i}=e;return{[t]:{[`${n}-motion-collapse-legacy`]:{overflow:`hidden`,"&-active":{transition:`${[`height`,`opacity`].map(e=>`${e} ${r} ${i}`).join(`, `)} !important`}},[`${n}-motion-collapse`]:{overflow:`hidden`,transition:`${[`height`,`opacity`].map(e=>`${e} ${r} ${i}`).join(`, `)} !important`}}}},ie=V.forwardRef((e,t)=>{let{prefixCls:n,forceRender:r,className:i,style:a,children:o,isActive:s,role:c,classNames:l,styles:u}=e,[d,f]=V.useState(s||r);return V.useEffect(()=>{(r||s)&&f(!0)},[r,s]),d?V.createElement(`div`,{ref:t,className:m(`${n}-panel`,{[`${n}-panel-active`]:s,[`${n}-panel-inactive`]:!s},i),style:a,role:c},V.createElement(`div`,{className:m(`${n}-body`,l?.body),style:u?.body},o)):null}),X=V.forwardRef((e,t)=>{let{showArrow:n=!0,headerClass:r,isActive:a,onItemClick:o,forceRender:c,className:l,classNames:u={},styles:d={},prefixCls:f,collapsible:h,accordion:g,panelKey:_,extra:v,header:y,expandIcon:b,openMotion:x,destroyOnHidden:S,children:C,...w}=e,T=h===`disabled`,E=v!=null&&typeof v!=`boolean`,D={onClick:()=>{o?.(_)},onKeyDown:e=>{(e.key===`Enter`||e.keyCode===i.ENTER||e.which===i.ENTER)&&o?.(_)},role:g?`tab`:`button`,"aria-expanded":a,"aria-disabled":T,tabIndex:T?-1:0},O=typeof b==`function`?b(e):V.createElement(`i`,{className:`arrow`}),k=O&&V.createElement(`div`,s({className:m(`${f}-expand-icon`,u?.icon),style:d?.icon},[`header`,`icon`].includes(h)?D:{}),O),A=m(`${f}-item`,{[`${f}-item-active`]:a,[`${f}-item-disabled`]:T},l),j={className:m(r,`${f}-header`,{[`${f}-collapsible-${h}`]:!!h},u?.header),style:d?.header,...[`header`,`icon`].includes(h)?{}:D};return V.createElement(`div`,s({},w,{ref:t,className:A}),V.createElement(`div`,j,n&&k,V.createElement(`span`,s({className:m(`${f}-title`,u?.title),style:d?.title},h===`header`?D:{}),y),E&&V.createElement(`div`,{className:`${f}-extra`},v)),V.createElement(p,s({visible:a,leavedClassName:`${f}-panel-hidden`},x,{forceRender:c,removeOnLeave:S}),({className:e,style:t},n)=>V.createElement(ie,{ref:n,prefixCls:f,className:e,classNames:u,style:t,styles:d,isActive:a,forceRender:c,role:g?`tabpanel`:void 0},C)))});function Z(e,t,n){if(!e||!t)return e||t;let r=Array.from(new Set([...Object.keys(e),...Object.keys(t)])),i={};return r.forEach(r=>{i[r]=n(e[r],t[r])}),i}function ae(e,t){return Z(e,t,(e,t)=>m(e,t))}function oe(e,t){return Z(e,t,(e,t)=>({...e,...t}))}var se=(e,t)=>{let{prefixCls:n,accordion:r,collapsible:i,destroyOnHidden:a,onItemClick:o,activeKey:c,openMotion:l,expandIcon:u,classNames:d,styles:f}=t;return e.map((e,t)=>{let{children:p,label:m,key:h,collapsible:g,onItemClick:_,destroyOnHidden:v,classNames:y,styles:b,...x}=e,S=String(h??t),C=g??i,w=v??a,T=e=>{C!==`disabled`&&(o(e),_?.(e))},E=!1;return E=r?c[0]===S:c.indexOf(S)>-1,V.createElement(X,s({},x,{classNames:ae(d,y),styles:oe(f,b),prefixCls:n,key:S,panelKey:S,isActive:E,accordion:r,openMotion:l,expandIcon:u,header:m,collapsible:C,onItemClick:T,destroyOnHidden:w}),p)})},ce=(e,t,n)=>{if(!e)return null;let{prefixCls:r,accordion:i,collapsible:a,destroyOnHidden:o,onItemClick:s,activeKey:c,openMotion:l,expandIcon:u,classNames:d,styles:f}=n,p=e.key||String(t),{header:m,headerClass:h,destroyOnHidden:g,collapsible:_,onItemClick:v}=e.props,y=!1;y=i?c[0]===p:c.indexOf(p)>-1;let b=_??a,x={key:p,panelKey:p,header:m,headerClass:h,classNames:d,styles:f,isActive:y,prefixCls:r,destroyOnHidden:g??o,openMotion:l,accordion:i,children:e.props.children,onItemClick:e=>{b!==`disabled`&&(s(e),v?.(e))},expandIcon:u,collapsible:b};return typeof e.type==`string`?e:(Object.keys(x).forEach(e=>{x[e]===void 0&&delete x[e]}),V.cloneElement(e,x))};function le(e,t,n){return Array.isArray(e)?se(e,n):a(t).map((e,t)=>ce(e,t,n))}function Q(e){let t=e;if(!Array.isArray(t)){let e=typeof t;t=e===`number`||e===`string`?[t]:[]}return t.map(e=>String(e))}var $=Object.assign(V.forwardRef((e,n)=>{let{prefixCls:i=`rc-collapse`,destroyOnHidden:a=!1,style:o,accordion:c,className:l,children:u,collapsible:d,openMotion:f,expandIcon:p,activeKey:h,defaultActiveKey:g,onChange:_,items:v,classNames:y,styles:b}=e,x=m(i,l),[S,C]=L(g,h),w=Q(S),T=k(e=>{let t=Q(e);C(t),_?.(t)}),E=e=>{T(c?w[0]===e?[]:[e]:w.includes(e)?w.filter(t=>t!==e):[...w,e])};r(!u,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");let D=le(v,u,{prefixCls:i,accordion:c,openMotion:f,expandIcon:p,collapsible:d,destroyOnHidden:a,onItemClick:E,activeKey:w,classNames:y,styles:b});return V.createElement(`div`,s({ref:n,className:x,style:o,role:c?`tablist`:void 0},t(e,{aria:!0,data:!0})),D)}),{Panel:X}),ue=$,{Panel:de}=$,fe=V.forwardRef((e,t)=>{let{getPrefixCls:n}=V.useContext(P),{prefixCls:r,className:i,showArrow:a=!0}=e,o=n(`collapse`,r),s=m({[`${o}-no-arrow`]:!a},i);return V.createElement(ue.Panel,{ref:t,...e,prefixCls:o,className:s})}),pe=t=>{let{componentCls:n,contentBg:r,padding:i,headerBg:a,headerPadding:o,collapseHeaderPaddingSM:s,collapseHeaderPaddingLG:c,collapsePanelBorderRadius:l,lineWidth:u,lineType:d,colorBorder:f,colorText:p,colorTextHeading:m,colorTextDisabled:h,fontSizeLG:g,lineHeight:_,lineHeightLG:v,marginSM:y,paddingSM:S,paddingLG:C,paddingXS:w,motionDurationSlow:T,fontSizeIcon:E,contentPadding:O,fontHeight:k,fontHeightLG:A}=t,j=`${x(u)} ${d} ${f}`;return{[n]:{...e(t),backgroundColor:a,border:j,borderRadius:l,"&-rtl":{direction:`rtl`},[`& > ${n}-item`]:{borderBottom:j,"&:first-child":{[` - &, - & > ${n}-header`]:{borderRadius:`${x(l)} ${x(l)} 0 0`}},"&:last-child":{[` - &, - & > ${n}-header`]:{borderRadius:`0 0 ${x(l)} ${x(l)}`}},[`> ${n}-header`]:{position:`relative`,display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,padding:o,color:m,lineHeight:_,cursor:`pointer`,transition:`all ${T}, visibility 0s`,...b(t),[`> ${n}-title`]:{flex:`auto`},[`${n}-expand-icon`]:{height:k,display:`flex`,alignItems:`center`,marginInlineEnd:y},[`${n}-arrow`]:{...D(),fontSize:E,transition:`transform ${T}`,svg:{transition:`transform ${T}`}},[`${n}-title`]:{marginInlineEnd:`auto`}},[`${n}-collapsible-header`]:{cursor:`default`,[`${n}-title`]:{flex:`none`,cursor:`pointer`},[`${n}-expand-icon`]:{cursor:`pointer`}},[`${n}-collapsible-icon`]:{cursor:`unset`,[`${n}-expand-icon`]:{cursor:`pointer`}}},[`${n}-panel`]:{color:p,backgroundColor:r,borderTop:j,[`& > ${n}-body`]:{padding:O},"&-hidden":{display:`none`}},"&-small":{[`> ${n}-item`]:{[`> ${n}-header`]:{padding:s,paddingInlineStart:w,[`> ${n}-expand-icon`]:{marginInlineStart:t.calc(S).sub(w).equal()}},[`> ${n}-panel > ${n}-body`]:{padding:S}}},"&-large":{[`> ${n}-item`]:{fontSize:g,lineHeight:v,[`> ${n}-header`]:{padding:c,paddingInlineStart:i,[`> ${n}-expand-icon`]:{height:A,marginInlineStart:t.calc(C).sub(i).equal()}},[`> ${n}-panel > ${n}-body`]:{padding:C}}},[`${n}-item:last-child`]:{borderBottom:0,[`> ${n}-panel`]:{borderRadius:`0 0 ${x(l)} ${x(l)}`}},[`& ${n}-item-disabled > ${n}-header`]:{"&, & > .arrow":{color:h,cursor:`not-allowed`}},[`&${n}-icon-placement-end`]:{[`& > ${n}-item`]:{[`> ${n}-header`]:{[`${n}-expand-icon`]:{order:1,marginInlineEnd:0,marginInlineStart:y}}}}}}},me=e=>{let{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[n]:{transform:`rotate(180deg)`}}}},he=e=>{let{componentCls:t,headerBg:n,borderlessContentPadding:r,borderlessContentBg:i,colorBorder:a}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${a}`},[` - > ${t}-item:last-child, - > ${t}-item:last-child ${t}-header - `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-panel`]:{backgroundColor:i,borderTop:0},[`> ${t}-item > ${t}-panel > ${t}-body`]:{padding:r}}}},ge=e=>{let{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:`transparent`,border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-panel`]:{backgroundColor:`transparent`,border:0,[`> ${t}-body`]:{paddingBlock:n}}}}}},_e=h(`Collapse`,e=>{let t=n(e,{collapseHeaderPaddingSM:`${x(e.paddingXS)} ${x(e.paddingSM)}`,collapseHeaderPaddingLG:`${x(e.padding)} ${x(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[pe(t),he(t),ge(t),me(t),Y(t)]},e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer,borderlessContentPadding:`${e.paddingXXS}px 16px ${e.padding}px`,borderlessContentBg:`transparent`})),ve=Object.assign(V.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,expandIcon:i,className:o,style:s,classNames:c,styles:u}=T(`collapse`),{prefixCls:d,className:f,rootClassName:p,style:h,bordered:g=!0,ghost:b,size:x,expandIconPlacement:S,expandIconPosition:C,children:w,destroyInactivePanel:D,destroyOnHidden:k,expandIcon:A,classNames:j,styles:M}=e,N=v(e=>x??e??`middle`),P=n(`collapse`,d),I=n(),[L,ee]=_e(P),R=S??C??`start`,z={...e,size:N,bordered:g,expandIconPlacement:R},[B,H]=E([c,j],[u,M],{props:z}),U=A??i,W=V.useCallback((e={})=>F(O(U)?U(e):V.createElement(l,{rotate:e.isActive?r===`rtl`?-90:90:void 0,"aria-label":e.isActive?`expanded`:`collapsed`}),e=>({className:m(e.className,`${P}-arrow`)})),[U,P,r]),G=m(`${P}-icon-placement-${R}`,{[`${P}-borderless`]:!g,[`${P}-rtl`]:r===`rtl`,[`${P}-ghost`]:!!b,[`${P}-large`]:N===`large`,[`${P}-small`]:N===`small`},o,f,p,L,ee,B.root),K=V.useMemo(()=>({...y(I),motionAppear:!1,leavedClassName:`${P}-panel-hidden`}),[I,P]),q=V.useMemo(()=>w?a(w).map(e=>e):null,[w]);return V.createElement(ue,{ref:t,openMotion:K,..._(e,[`rootClassName`]),expandIcon:W,prefixCls:P,className:G,style:{...H.root,...s,...h},classNames:B,styles:H,destroyOnHidden:k??D},q)}),{Panel:fe}),ye=e=>e.map(e=>(e.colors=e.colors.map(j),e)),be=(e,t)=>{let{r:n,g:r,b:i,a}=e.toRgb(),o=new B(e.toRgbString()).onBackground(t).toHsv();return a<=.5?o.v>.5:n*.299+r*.587+i*.114>192},xe=(e,t)=>`panel-${e.key??t}`,Se=({prefixCls:e,presets:t,value:n,onChange:r})=>{let[i]=M(`ColorPicker`),[,a]=R(),o=(0,V.useMemo)(()=>ye(t),[t]),s=`${e}-presets`,c=(0,V.useMemo)(()=>o.reduce((e,t,n)=>{let{defaultOpen:r=!0}=t;return r&&e.push(xe(t,n)),e},[]),[o]),l=e=>{r?.(e)},u=o.map((t,r)=>({key:xe(t,r),label:V.createElement(`div`,{className:`${s}-label`},t?.label),children:V.createElement(`div`,{className:`${s}-items`},Array.isArray(t?.colors)&&t.colors?.length>0?t.colors.map((t,r)=>{let i=j(t);return V.createElement(d,{key:`preset-${r}-${t.toHexString()}`,color:i.toCssString(),prefixCls:e,className:m(`${s}-color`,{[`${s}-color-checked`]:t.toCssString()===n?.toCssString(),[`${s}-color-bright`]:be(t,a.colorBgElevated)}),onClick:()=>l(t)})}):V.createElement(`span`,{className:`${s}-empty`},i.presetEmpty))}));return V.createElement(`div`,{className:s},V.createElement(ve,{defaultActiveKey:c,ghost:!0,items:u}))};export{U as a,re as i,be as n,Y as r,Se as t}; \ No newline at end of file diff --git a/public/assets/ColorPresets-wH0crouI.js b/public/assets/ColorPresets-wH0crouI.js new file mode 100644 index 0000000..2b66daf --- /dev/null +++ b/public/assets/ColorPresets-wH0crouI.js @@ -0,0 +1,8 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Ct as t,Dr as n,Ht as r,Jn as i,Jt as a,L as o,Ln as s,M as c,Mt as l,N as u,O as d,Pn as f,Q as p,Qt as m,R as h,St as g,Un as _,Ut as v,Vn as y,Wn as b,Wt as x,Xn as S,Yn as C,Zn as w,Zt as T,en as E,et as D,fr as O,ir as k,jt as A,kt as j,mr as M,pt as N,sr as P,st as ee,tr as F,ur as I,wr as L,xn as R,xt as te,yr as z,zn as ne}from"./jsx-runtime-ADHq9IcL.js";var B=e(n()),V=r(`Wave`,e=>{let{componentCls:t,colorPrimary:n,motionDurationSlow:r,motionEaseInOut:i,motionEaseOutCirc:a,antCls:o}=e,[,s]=v(o,`wave`);return{[t]:{position:`absolute`,background:`transparent`,pointerEvents:`none`,boxSizing:`border-box`,color:s(`color`,n),boxShadow:`0 0 0 0 currentcolor`,opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s`,`opacity 2s`].map(e=>`${e} ${a}`).join(`,`),"&-active":{boxShadow:`0 0 0 6px currentcolor`,opacity:0},"&.wave-quick":{transition:[`box-shadow`,`opacity`].map(e=>`${e} ${r} ${i}`).join(`,`)}}}}}),H=`ant-wave-target`,U=e=>e?j(e)&&e!==`#fff`&&e!==`#ffffff`&&e!==`rgb(255, 255, 255)`&&e!==`rgba(255, 255, 255, 1)`&&!/rgba\((?:\d*, ){3}0\)/i.test(e)&&!/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i.test(e)&&e!==`transparent`&&e!==`canvastext`:!1;function W(e,t=null){let n=getComputedStyle(e),{borderTopColor:r,borderColor:i,backgroundColor:a}=n;return t&&U(n[t])?n[t]:[r,i,a].find(U)??null}function G(e){return Number.isNaN(e)?0:e}var K=e=>{let{className:t,target:n,component:r,colorSource:i}=e,a=B.useRef(null),{getPrefixCls:o}=B.useContext(s),[c]=v(o(),`wave`),[u,d]=B.useState(null),[f,p]=B.useState([]),[m,h]=B.useState(0),[g,_]=B.useState(0),[x,S]=B.useState(0),[w,T]=B.useState(0),[E,D]=B.useState(!1),O={left:m,top:g,width:x,height:w,borderRadius:f.map(e=>`${e}px`).join(` `)};u&&(O[c(`color`)]=u);function k(){let e=getComputedStyle(n);d(W(n,i));let t=e.position===`static`,{borderLeftWidth:r,borderTopWidth:a}=e;h(t?n.offsetLeft:G(-Number.parseFloat(r))),_(t?n.offsetTop:G(-Number.parseFloat(a))),S(n.offsetWidth),T(n.offsetHeight);let{borderTopLeftRadius:o,borderTopRightRadius:s,borderBottomLeftRadius:c,borderBottomRightRadius:l}=e;p([o,s,l,c].map(e=>G(Number.parseFloat(e))))}if(B.useEffect(()=>{if(n){let e=C(()=>{k(),D(!0)}),t;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(k),t.observe(n)),()=>{C.cancel(e),t?.disconnect()}}},[n]),!E)return null;let j=(r===`Checkbox`||r===`Radio`)&&n?.classList.contains(H);return B.createElement(l,{visible:!0,motionAppear:!0,motionName:`wave-motion`,motionDeadline:5e3,onAppearEnd:(e,t)=>{if(t.deadline||A(t)&&t.propertyName===`opacity`){let e=a.current?.parentElement;b(e).then(()=>{e?.remove()})}return!1}},({className:e},n)=>B.createElement(`div`,{ref:I(a,n),className:y(t,e,{"wave-quick":j}),style:O}))},q=(e,t)=>{let{component:n}=t;if(n===`Checkbox`&&!e.querySelector(`input`)?.checked)return;let r=document.createElement(`div`);r.style.position=`absolute`,r.style.left=`0px`,r.style.top=`0px`,e?.insertBefore(r,e?.firstChild),_(B.createElement(K,{...t,target:e}),r)},J=(e,t,n,r)=>{let{wave:i}=B.useContext(s),[,a,o]=E(),c=L(s=>{let c=e.current;if(i?.disabled||!c)return;let l=c.querySelector(`.${H}`)||c,{showEffect:u}=i||{};(u||q)(l,{className:t,token:a,component:n,event:s,hashId:o,colorSource:r})}),l=B.useRef(null);return B.useEffect(()=>()=>{C.cancel(l.current)},[]),e=>{C.cancel(l.current),l.current=C(()=>{c(e)})}},Y={click:`click`,mousedown:`mousedown`,mouseup:`mouseup`,pointerdown:`pointerdown`,pointerup:`pointerup`},re=e=>{let{children:t,disabled:n,component:r,colorSource:i}=e,{getPrefixCls:a,wave:o}=(0,B.useContext)(s),c=(0,B.useRef)(null),l=a(`wave`),u=J(c,y(l,V(l)),r,i);return B.useEffect(()=>{let e=c.current;if(!e||e.nodeType!==window.Node.ELEMENT_NODE||n)return;let t=t=>{!P(t.target)||!e.getAttribute||e.getAttribute(`disabled`)||e.disabled||e.className.includes(`disabled`)&&!e.className.includes(`disabled:`)||e.getAttribute(`aria-disabled`)===`true`||e.className.includes(`-leave`)||u(t)},r=o?.triggerType,i=r&&r in Y?Y[r]:`click`;return e.addEventListener(i,t,!0),()=>{e.removeEventListener(i,t,!0)}},[n,o?.triggerType]),B.isValidElement(t)?ee(t,{ref:M(t)?I(O(t),c):c}):t??null},X=e=>{let{componentCls:t,antCls:n,motionDurationMid:r,motionEaseInOut:i}=e;return{[t]:{[`${n}-motion-collapse-legacy`]:{overflow:`hidden`,"&-active":{transition:`${[`height`,`opacity`].map(e=>`${e} ${r} ${i}`).join(`, `)} !important`}},[`${n}-motion-collapse`]:{overflow:`hidden`,transition:`${[`height`,`opacity`].map(e=>`${e} ${r} ${i}`).join(`, `)} !important`}}}},ie=B.forwardRef((e,t)=>{let{prefixCls:n,forceRender:r,className:i,style:a,children:o,isActive:s,role:c,classNames:l,styles:u}=e,[d,f]=B.useState(s||r);return B.useEffect(()=>{(r||s)&&f(!0)},[r,s]),d?B.createElement(`div`,{ref:t,className:y(`${n}-panel`,{[`${n}-panel-active`]:s,[`${n}-panel-inactive`]:!s},i),style:a,role:c},B.createElement(`div`,{className:y(`${n}-body`,l?.body),style:u?.body},o)):null}),Z=B.forwardRef((e,t)=>{let{showArrow:n=!0,headerClass:r,isActive:i,onItemClick:a,forceRender:o,className:s,classNames:u={},styles:d={},prefixCls:f,collapsible:p,accordion:m,panelKey:h,extra:g,header:_,expandIcon:v,openMotion:b,destroyOnHidden:x,children:S,...C}=e,w=p===`disabled`,T=g!=null&&typeof g!=`boolean`,E={onClick:()=>{a?.(h)},onKeyDown:e=>{(e.key===`Enter`||e.keyCode===k.ENTER||e.which===k.ENTER)&&a?.(h)},role:m?`tab`:`button`,"aria-expanded":i,"aria-disabled":w,tabIndex:w?-1:0},D=typeof v==`function`?v(e):B.createElement(`i`,{className:`arrow`}),O=D&&B.createElement(`div`,c({className:y(`${f}-expand-icon`,u?.icon),style:d?.icon},[`header`,`icon`].includes(p)?E:{}),D),A=y(`${f}-item`,{[`${f}-item-active`]:i,[`${f}-item-disabled`]:w},s),j={className:y(r,`${f}-header`,{[`${f}-collapsible-${p}`]:!!p},u?.header),style:d?.header,...[`header`,`icon`].includes(p)?{}:E};return B.createElement(`div`,c({},C,{ref:t,className:A}),B.createElement(`div`,j,n&&O,B.createElement(`span`,c({className:y(`${f}-title`,u?.title),style:d?.title},p===`header`?E:{}),_),T&&B.createElement(`div`,{className:`${f}-extra`},g)),B.createElement(l,c({visible:i,leavedClassName:`${f}-panel-hidden`},b,{forceRender:o,removeOnLeave:x}),({className:e,style:t},n)=>B.createElement(ie,{ref:n,prefixCls:f,className:e,classNames:u,style:t,styles:d,isActive:i,forceRender:o,role:m?`tabpanel`:void 0},S)))});function Q(e,t,n){if(!e||!t)return e||t;let r=Array.from(new Set([...Object.keys(e),...Object.keys(t)])),i={};return r.forEach(r=>{i[r]=n(e[r],t[r])}),i}function ae(e,t){return Q(e,t,(e,t)=>y(e,t))}function oe(e,t){return Q(e,t,(e,t)=>({...e,...t}))}var se=(e,t)=>{let{prefixCls:n,accordion:r,collapsible:i,destroyOnHidden:a,onItemClick:o,activeKey:s,openMotion:l,expandIcon:u,classNames:d,styles:f}=t;return e.map((e,t)=>{let{children:p,label:m,key:h,collapsible:g,onItemClick:_,destroyOnHidden:v,classNames:y,styles:b,...x}=e,S=String(h??t),C=g??i,w=v??a,T=e=>{C!==`disabled`&&(o(e),_?.(e))},E=!1;return E=r?s[0]===S:s.indexOf(S)>-1,B.createElement(Z,c({},x,{classNames:ae(d,y),styles:oe(f,b),prefixCls:n,key:S,panelKey:S,isActive:E,accordion:r,openMotion:l,expandIcon:u,header:m,collapsible:C,onItemClick:T,destroyOnHidden:w}),p)})},ce=(e,t,n)=>{if(!e)return null;let{prefixCls:r,accordion:i,collapsible:a,destroyOnHidden:o,onItemClick:s,activeKey:c,openMotion:l,expandIcon:u,classNames:d,styles:f}=n,p=e.key||String(t),{header:m,headerClass:h,destroyOnHidden:g,collapsible:_,onItemClick:v}=e.props,y=!1;y=i?c[0]===p:c.indexOf(p)>-1;let b=_??a,x={key:p,panelKey:p,header:m,headerClass:h,classNames:d,styles:f,isActive:y,prefixCls:r,destroyOnHidden:g??o,openMotion:l,accordion:i,children:e.props.children,onItemClick:e=>{b!==`disabled`&&(s(e),v?.(e))},expandIcon:u,collapsible:b};return typeof e.type==`string`?e:(Object.keys(x).forEach(e=>{x[e]===void 0&&delete x[e]}),B.cloneElement(e,x))};function le(e,t,n){return Array.isArray(e)?se(e,n):i(t).map((e,t)=>ce(e,t,n))}function $(e){let t=e;if(!Array.isArray(t)){let e=typeof t;t=e===`number`||e===`string`?[t]:[]}return t.map(e=>String(e))}var ue=Object.assign(B.forwardRef((e,t)=>{let{prefixCls:n=`rc-collapse`,destroyOnHidden:r=!1,style:i,accordion:a,className:o,children:s,collapsible:l,openMotion:u,expandIcon:d,activeKey:f,defaultActiveKey:p,onChange:m,items:h,classNames:g,styles:_}=e,v=y(n,o),[b,x]=z(p,f),C=$(b),w=L(e=>{let t=$(e);x(t),m?.(t)}),T=e=>{w(a?C[0]===e?[]:[e]:C.includes(e)?C.filter(t=>t!==e):[...C,e])};F(!s,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");let E=le(h,s,{prefixCls:n,accordion:a,openMotion:u,expandIcon:d,collapsible:l,destroyOnHidden:r,onItemClick:T,activeKey:C,classNames:g,styles:_});return B.createElement(`div`,c({ref:t,className:v,style:i,role:a?`tablist`:void 0},S(e,{aria:!0,data:!0})),E)}),{Panel:Z}),de=ue,{Panel:fe}=ue,pe=B.forwardRef((e,t)=>{let{getPrefixCls:n}=B.useContext(s),{prefixCls:r,className:i,showArrow:a=!0}=e,o=n(`collapse`,r),c=y({[`${o}-no-arrow`]:!a},i);return B.createElement(de.Panel,{ref:t,...e,prefixCls:o,className:c})}),me=e=>{let{componentCls:t,contentBg:n,padding:r,headerBg:i,headerPadding:o,headerPaddingSM:s,headerPaddingLG:c,collapsePanelBorderRadius:l,lineWidth:u,lineType:d,colorBorder:p,colorText:h,colorTextHeading:g,colorTextDisabled:_,fontSizeLG:v,lineHeight:y,lineHeightLG:b,marginSM:x,paddingSM:S,paddingLG:C,paddingXS:w,motionDurationSlow:E,fontSizeIcon:D,contentPadding:O,contentPaddingSM:k,contentPaddingLG:A,fontHeight:j,fontHeightLG:M}=e,N=`${f(u)} ${d} ${p}`;return{[t]:{...T(e),backgroundColor:i,border:N,borderRadius:l,"&-rtl":{direction:`rtl`},[`& > ${t}-item`]:{borderBottom:N,"&:first-child":{[` + &, + & > ${t}-header`]:{borderRadius:`${f(l)} ${f(l)} 0 0`}},"&:last-child":{[` + &, + & > ${t}-header`]:{borderRadius:`0 0 ${f(l)} ${f(l)}`}},[`> ${t}-header`]:{position:`relative`,display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,padding:o,color:g,lineHeight:y,cursor:`pointer`,transition:`all ${E}, visibility 0s`,...a(e),[`> ${t}-title`]:{flex:`auto`},[`${t}-expand-icon`]:{height:j,display:`flex`,alignItems:`center`,marginInlineEnd:x},[`${t}-arrow`]:{...m(),fontSize:D,transition:`transform ${E}`,svg:{transition:`transform ${E}`}},[`${t}-title`]:{marginInlineEnd:`auto`}},[`${t}-collapsible-header`]:{cursor:`default`,[`${t}-title`]:{flex:`none`,cursor:`pointer`},[`${t}-expand-icon`]:{cursor:`pointer`}},[`${t}-collapsible-icon`]:{cursor:`unset`,[`${t}-expand-icon`]:{cursor:`pointer`}}},[`${t}-panel`]:{color:h,backgroundColor:n,borderTop:N,[`& > ${t}-body`]:{padding:O},"&-hidden":{display:`none`}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:s,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(S).sub(w).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:k}}},"&-large":{[`> ${t}-item`]:{fontSize:v,lineHeight:b,[`> ${t}-header`]:{padding:c,[`> ${t}-expand-icon`]:{height:M,marginInlineStart:e.calc(C).sub(r).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:A}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-panel`]:{borderRadius:`0 0 ${f(l)} ${f(l)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"&, & > .arrow":{color:_,cursor:`not-allowed`}},[`&${t}-icon-placement-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,marginInlineEnd:0,marginInlineStart:x}}}}}}},he=e=>{let{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[n]:{transform:`rotate(180deg)`}}}},ge=e=>{let{componentCls:t,headerBg:n,borderlessContentPadding:r,borderlessContentBg:i,colorBorder:a}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${a}`},[` + > ${t}-item:last-child, + > ${t}-item:last-child ${t}-header + `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-panel`]:{backgroundColor:i,borderTop:0},[`> ${t}-item > ${t}-panel > ${t}-body`]:{padding:r}}}},_e=e=>{let{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:`transparent`,border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-panel`]:{backgroundColor:`transparent`,border:0,[`> ${t}-body`]:{paddingBlock:n}}}}}},ve=x(`Collapse`,e=>{let t=R(e,{collapsePanelBorderRadius:e.borderRadiusLG});return[me(t),ge(t),_e(t),he(t),X(t)]},e=>({headerPadding:`${f(e.paddingSM)} ${f(e.padding)}`,headerPaddingSM:`${f(e.paddingXS)} ${f(e.paddingSM)} ${f(e.paddingXS)} ${f(e.paddingXS)}`,headerPaddingLG:`${f(e.padding)} ${f(e.paddingLG)} ${f(e.padding)} ${f(e.padding)}`,headerBg:e.colorFillAlter,contentPadding:`${f(e.padding)} ${f(16)}`,contentPaddingSM:e.paddingSM,contentPaddingLG:e.paddingLG,contentBg:e.colorBgContainer,borderlessContentPadding:`${f(e.paddingXXS)} ${f(16)} ${f(e.padding)}`,borderlessContentBg:`transparent`})),ye=Object.assign(B.forwardRef((e,n)=>{let{getPrefixCls:r,direction:a,expandIcon:o,className:s,style:c,classNames:l,styles:d}=ne(`collapse`),{prefixCls:f,className:m,rootClassName:h,style:_,bordered:v=!0,ghost:b,size:x,expandIconPlacement:S,expandIconPosition:C,children:T,destroyInactivePanel:E,destroyOnHidden:O,expandIcon:k,classNames:A,styles:j}=e,M=p(e=>x??e??`middle`),N=r(`collapse`,f),P=r(),[F,I]=ve(N),L=S??C??`start`,R={...e,size:M,bordered:v,expandIconPlacement:L},z=g(c),V=g(_),[H,U]=te([l,A],[d,z,j,V],{props:R}),W=k??o,G=B.useCallback((e={})=>ee(t(W)?W(e):B.createElement(u,{rotate:e.isActive?a===`rtl`?-90:90:void 0,"aria-label":e.isActive?`expanded`:`collapsed`}),e=>({className:y(e.className,`${N}-arrow`)})),[W,N,a]),K=y(`${N}-icon-placement-${L}`,{[`${N}-borderless`]:!v,[`${N}-rtl`]:a===`rtl`,[`${N}-ghost`]:!!b,[`${N}-large`]:M===`large`,[`${N}-small`]:M===`small`},s,m,h,F,I,H.root),q=B.useMemo(()=>({...D(P),motionAppear:!1,leavedClassName:`${N}-panel-hidden`}),[P,N]),J=B.useMemo(()=>T?i(T).map(e=>e):null,[T]);return B.createElement(de,{ref:n,openMotion:q,...w(e,[`rootClassName`]),expandIcon:G,prefixCls:N,className:K,style:U.root,classNames:H,styles:U,destroyOnHidden:O??E},J)}),{Panel:pe}),be=e=>e.map(e=>(e.colors=e.colors.map(d),e)),xe=(e,t)=>{let{r:n,g:r,b:i,a}=e.toRgb(),o=new h(e.toRgbString()).onBackground(t).toHsv();return a<=.5?o.v>.5:n*.299+r*.587+i*.114>192},Se=(e,t)=>`panel-${e.key??t}`,Ce=({prefixCls:e,presets:t,value:n,onChange:r})=>{let[i]=N(`ColorPicker`),[,a]=E(),s=(0,B.useMemo)(()=>be(t),[t]),c=`${e}-presets`,l=(0,B.useMemo)(()=>s.reduce((e,t,n)=>{let{defaultOpen:r=!0}=t;return r&&e.push(Se(t,n)),e},[]),[s]),u=e=>{r?.(e)},f=s.map((t,r)=>({key:Se(t,r),label:B.createElement(`div`,{className:`${c}-label`},t?.label),children:B.createElement(`div`,{className:`${c}-items`},Array.isArray(t?.colors)&&t.colors?.length>0?t.colors.map((t,r)=>{let i=d(t);return B.createElement(o,{key:`preset-${r}-${t.toHexString()}`,color:i.toCssString(),prefixCls:e,className:y(`${c}-color`,{[`${c}-color-checked`]:t.toCssString()===n?.toCssString(),[`${c}-color-bright`]:xe(t,a.colorBgElevated)}),onClick:()=>u(t)})}):B.createElement(`span`,{className:`${c}-empty`},i.presetEmpty))}));return B.createElement(`div`,{className:c},B.createElement(ye,{defaultActiveKey:l,ghost:!0,items:f}))};export{H as a,re as i,xe as n,X as r,Ce as t}; \ No newline at end of file diff --git a/public/assets/CopyOutlined-BfEUU2AX.js b/public/assets/CopyOutlined-BfEUU2AX.js new file mode 100644 index 0000000..e2834c6 --- /dev/null +++ b/public/assets/CopyOutlined-BfEUU2AX.js @@ -0,0 +1,4 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Ct as n,Dr as r,Ft as i,Q as ee,St as a,Vn as o,Wt as s,Z as c,ar as l,at as u,p as te,u as ne,xn as d,xt as re,yt as ie,zn as ae}from"./jsx-runtime-ADHq9IcL.js";import{f as oe,p as f}from"./tooltip-CRuv8UNz.js";import{m as p,o as m,p as h}from"./style-Der9vtsK.js";import{n as g,r as _}from"./es-DtKsFKpZ.js";var v=e(r()),y=e=>{let{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:`100%`,height:`auto`,minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:`bottom`,transition:`all ${e.motionDurationSlow}`,resize:`vertical`,[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:`auto`},[r]:{position:`relative`,"&-show-count":{[`${t}-data-count`]:{position:`absolute`,bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:`nowrap`,pointerEvents:`none`}},[` + &-allow-clear > ${t}, + &-affix-wrapper${r}-has-feedback ${t} + `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:`inherit`,border:`none`,outline:`none`,background:`transparent`,minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:`none !important`}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:`absolute`,insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:`absolute`,top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:`inline-flex`,alignItems:`center`,margin:`auto`,pointerEvents:`none`}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:`ltr`,insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},se=s([`Input`,`TextArea`],e=>y(d(e,p(e))),h,{resetFont:!1}),b=(0,v.forwardRef)((e,t)=>{let{prefixCls:r,bordered:i=!0,size:s,disabled:d,status:p,allowClear:h,classNames:y,rootClassName:b,className:x,style:S,styles:C,variant:w,showCount:T,onMouseDown:E,onResize:D,...O}=e,{getPrefixCls:k,direction:A,allowClear:j,autoComplete:M,className:N,style:P,classNames:F,styles:I}=ae(`textArea`),L=v.useContext(u),R=d??L,{status:z,hasFeedback:B,feedbackIcon:V}=v.useContext(te),ce=oe(z,p),H=a(P),U=a(S),[W,G]=re([F,y],[I,H,C,U],{props:e}),K=v.useRef(null);v.useImperativeHandle(t,()=>({resizableTextArea:K.current?.resizableTextArea,focus:e=>{l(K.current?.resizableTextArea?.textArea,e)},blur:()=>K.current?.blur(),nativeElement:K.current?.nativeElement||null}));let q=k(`input`,r),J=ie(q),[Y,le]=m(q,b);se(q,J);let{compactSize:ue,compactItemClassnames:de}=c(q,A),X=ee(e=>s??ue??e),[fe,pe]=ne(`textArea`,w,i),me=_({allowClear:h,contextAllowClear:j,componentName:`TextArea`}),[Z,Q]=v.useState(!1),[he,ge]=v.useState(!1),$=e=>{Q(!0),E?.(e);let t=()=>{Q(!1),document.removeEventListener(`mouseup`,t)};document.addEventListener(`mouseup`,t)},_e=e=>{if(D?.(e),Z&&n(getComputedStyle)){let e=K.current?.nativeElement?.querySelector(`textarea`);e&&getComputedStyle(e).resize===`both`&&ge(!0)}};return v.createElement(g,{autoComplete:M,...O,style:G.root,styles:G,disabled:R,allowClear:me,className:o(le,J,x,b,de,N,W.root,{[`${q}-textarea-affix-wrapper-resize-dirty`]:he}),classNames:{...W,textarea:o({[`${q}-sm`]:X===`small`,[`${q}-lg`]:X===`large`},Y,W.textarea,Z&&`${q}-mouse-active`),variant:o({[`${q}-${fe}`]:pe},f(q,ce)),affixWrapper:o(`${q}-textarea-affix-wrapper`,{[`${q}-affix-wrapper-rtl`]:A===`rtl`,[`${q}-affix-wrapper-sm`]:X===`small`,[`${q}-affix-wrapper-lg`]:X===`large`,[`${q}-textarea-show-count`]:T||e.count?.show},Y)},prefixCls:q,suffix:B&&v.createElement(`span`,{className:`${q}-textarea-suffix`},V),showCount:T,ref:K,onResize:_e,onMouseDown:$})}),x=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z`}}]},name:`edit`,theme:`outlined`}}))());function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;tv.createElement(i,S({},e,{ref:t,icon:x.default}))),w=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z`}}]},name:`enter`,theme:`outlined`}}))());function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;tv.createElement(i,T({},e,{ref:t,icon:w.default}))),D=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z`}}]},name:`copy`,theme:`outlined`}}))());function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;tv.createElement(i,O({},e,{ref:t,icon:D.default})));export{b as i,E as n,C as r,k as t}; \ No newline at end of file diff --git a/public/assets/CopyOutlined-bJLUKQgS.js b/public/assets/CopyOutlined-bJLUKQgS.js deleted file mode 100644 index 3ced8b5..0000000 --- a/public/assets/CopyOutlined-bJLUKQgS.js +++ /dev/null @@ -1,14 +0,0 @@ -import{$t as e,Bt as t,D as n,Er as r,Or as i,St as a,Tn as o,Tr as s,Xt as c,Yt as l,an as u}from"./jsx-runtime-NwRKtVrk.js";var d=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`info-circle`,theme:`filled`}})),f=i(s()),p=i(d());function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(o,m({},e,{ref:t,icon:p.default})));function g(...e){return e.find(e=>e!==void 0)}var _=i(r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z`}}]},name:`check`,theme:`outlined`}}))());function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(o,v({},e,{ref:t,icon:_.default})));function b(e){return t(e,{inputAffixPadding:e.paddingXXS})}var x=e=>{let{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:a,controlHeightLG:o,fontSizeLG:s,lineHeightLG:c,paddingSM:l,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:h,controlOutline:g,colorErrorOutline:_,colorWarningOutline:v,colorBgContainer:y,inputFontSize:b,inputFontSizeLG:x,inputFontSizeSM:S}=e,C=b||n,w=S||C,T=x||s,E=Math.round((t-C*r)/2*10)/10-i,D=Math.round((a-w*r)/2*10)/10-i,O=Math.ceil((o-T*c)/2*10)/10-i;return{paddingBlock:Math.max(E,0),paddingBlockSM:Math.max(D,0),paddingBlockLG:Math.max(O,0),paddingInline:l-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${h}px ${g}`,errorActiveShadow:`0 0 0 ${h}px ${_}`,warningActiveShadow:`0 0 0 ${h}px ${v}`,hoverBg:y,activeBg:y,inputFontSize:C,inputFontSizeLG:T,inputFontSizeSM:w}},S=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),C=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:`none`,cursor:`not-allowed`,opacity:1,"input[disabled], textarea[disabled]":{cursor:`not-allowed`},"&:hover:not([disabled])":{...S(t(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),w=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),T=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...w(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),E=(e,t)=>({"&-outlined":{...w(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...C(e)},...T(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...T(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),D=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),O=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${u(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...D(e,{status:`error`,addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...D(e,{status:`warning`,addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...C(e)}}}}),k=(e,t)=>{let{componentCls:n}=e;return{"&-borderless":{background:`transparent`,border:`none`,paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${n}-sm, &${n}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${n}-lg, &${n}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&:focus, &:focus-within":{outline:`none`},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError},[`${n}-prefix, ${n}-suffix`]:{color:e.colorErrorAffix}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning},[`${n}-prefix, ${n}-suffix`]:{color:e.colorWarningAffix}},...t}}},A=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:`transparent`,"input&, & input, textarea&, & textarea":{color:t?.inputColor??`unset`},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),j=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...A(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),M=(e,t)=>({"&-filled":{...A(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...C(e)},...j(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorErrorAffix}),...j(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarningAffix}),...t}}),N=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),P=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:`static`}},...N(e,{status:`error`,addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...N(e,{status:`warning`,addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${u(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${u(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${u(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${u(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${u(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${u(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),F=(e,t)=>({background:e.colorBgContainer,borderWidth:`${u(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),I=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...F(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),L=(e,t)=>({"&-underlined":{...F(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:`none`,cursor:`not-allowed`,"&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:`not-allowed`},...I(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...I(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),R=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:`none`},"&:placeholder-shown":{textOverflow:`ellipsis`}}),z=e=>{let{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${u(t)} ${u(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},B=e=>({padding:`${u(e.paddingBlockSM)} ${u(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),V=(e,t={})=>({position:`relative`,display:`inline-block`,width:`100%`,minWidth:0,padding:`${u(e.paddingBlock)} ${u(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...R(e.colorTextPlaceholder),"&-lg":{...z(e),...t.largeStyle},"&-sm":{...B(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:`rtl`}}),H=e=>{let{componentCls:t,antCls:n}=e;return{position:`relative`,display:`table`,width:`100%`,borderCollapse:`separate`,borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:{...z(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...B(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:`table-cell`,"&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:`table-cell`,width:1,whiteSpace:`nowrap`,verticalAlign:`middle`,"&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:`block !important`},"&-addon":{position:`relative`,padding:`0 ${u(e.paddingInline)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.inputFontSize,textAlign:`center`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${u(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${u(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:`inherit`,border:`${u(e.lineWidth)} ${e.lineType} transparent`,boxShadow:`none`}},[`${n}-cascader-picker`]:{margin:`-9px ${u(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:`transparent`,[`${n}-cascader-input`]:{textAlign:`start`,border:0,boxShadow:`none`}}}},[t]:{width:`100%`,marginBottom:0,textAlign:`inherit`,"&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:`block`,...l(),[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:`inline-flex`,float:`none`,verticalAlign:`top`,borderRadius:0},[` - & > ${t}-affix-wrapper, - & > ${t}-number-affix-wrapper, - & > ${n}-picker-range - `]:{display:`inline-flex`},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:`none`},[`& > ${n}-select, - & > ${n}-select-auto-complete ${t}, - & > ${n}-cascader-picker ${t}, - & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child, - & > ${n}-select:first-child, - & > ${n}-select-auto-complete:first-child ${t}, - & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child, - & > ${n}-select:last-child, - & > ${n}-cascader-picker:last-child ${t}, - & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:`top`},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},U=t=>{let{componentCls:n,controlHeightSM:r,lineWidth:i,calc:a}=t,o=a(r).sub(a(i).mul(2)).sub(16).div(2).equal();return{[n]:{...e(t),...V(t),...E(t),...M(t),...k(t),...L(t),'&[type="color"]':{height:t.controlHeight,[`&${n}-lg`]:{height:t.controlHeightLG},[`&${n}-sm`]:{height:r,paddingTop:o,paddingBottom:o}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:`none`}}}},W=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:`pointer`,transition:`color ${e.motionDurationSlow}`,border:`none`,outline:`none`,backgroundColor:`transparent`,"&:hover":{color:e.colorIcon},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...c(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:`hidden`},"&-has-suffix":{margin:`0 ${u(e.inputAffixPadding)}`}}}},G=e=>{let{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:a,colorIconHover:o}=e,s=`${t}-affix-wrapper`,c=`${t}-affix-wrapper-disabled`;return{[s]:{...V(e),display:`inline-flex`,"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:`inherit`,border:`none`,borderRadius:0,outline:`none`,background:`transparent`,color:`inherit`,"&::-ms-reveal":{display:`none`},"&:focus":{boxShadow:`none !important`}},"&::before":{display:`inline-block`,width:0,visibility:`hidden`,content:`"\\a0"`},[t]:{"&-prefix, &-suffix":{display:`flex`,flex:`none`,alignItems:`center`,"> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:`ltr`},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n},"&-password-icon":{display:`inline-flex`,color:a,cursor:`pointer`,transition:`all ${i}`,"&:hover":{color:o}}},...W(e)},[`${t}-underlined`]:{borderRadius:0},[c]:{[`${t}-password-icon`]:{color:a,cursor:`not-allowed`,"&:hover":{color:a}}}}},K=t=>{let{componentCls:n,borderRadiusLG:r,borderRadiusSM:i}=t;return{[`${n}-group`]:{...e(t),...H(t),"&-rtl":{direction:`rtl`},"&-wrapper":{display:`inline-block`,width:`100%`,textAlign:`start`,verticalAlign:`top`,"&-rtl":{direction:`rtl`},"&-lg":{[`${n}-group-addon`]:{borderRadius:r,fontSize:t.inputFontSizeLG}},"&-sm":{[`${n}-group-addon`]:{borderRadius:i}},...O(t),...P(t),[`&:not(${n}-compact-first-item):not(${n}-compact-last-item)${n}-compact-item`]:{[`${n}, ${n}-group-addon`]:{borderRadius:0}},[`&:not(${n}-compact-last-item)${n}-compact-first-item`]:{[`${n}, ${n}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${n}-compact-first-item)${n}-compact-last-item`]:{[`${n}, ${n}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${n}-compact-last-item)${n}-compact-item`]:{[`${n}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${n}-compact-first-item)${n}-compact-item`]:{[`${n}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},q=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},J=a([`Input`,`Shared`],e=>{let n=t(e,b(e));return[U(n),G(n)]},x,{resetFont:!1}),Y=a([`Input`,`Component`],e=>{let r=t(e,b(e));return[K(r),q(r),n(r,{focus:!0,focusElCls:`${r.componentCls}-affix-wrapper-focused`})]},x,{resetFont:!1}),X=i(r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z`}}]},name:`edit`,theme:`outlined`}}))());function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(o,Z({},e,{ref:t,icon:X.default}))),te=i(r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z`}}]},name:`enter`,theme:`outlined`}}))());function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(o,Q({},e,{ref:t,icon:te.default}))),re=i(r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z`}}]},name:`copy`,theme:`outlined`}}))());function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(o,$({},e,{ref:t,icon:re.default})));export{b as _,z as a,h as b,Y as c,k as d,C as f,x as g,L as h,V as i,J as l,E as m,ne as n,B as o,M as p,ee as r,R as s,ie as t,w as u,y as v,g as y}; \ No newline at end of file diff --git a/public/assets/DeleteOutlined-D3Fhpkuo.js b/public/assets/DeleteOutlined-D3Fhpkuo.js new file mode 100644 index 0000000..c1bccee --- /dev/null +++ b/public/assets/DeleteOutlined-D3Fhpkuo.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z`}}]},name:`delete`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/DoubleRightOutlined-BDFzD9z5.js b/public/assets/DoubleRightOutlined-BDFzD9z5.js new file mode 100644 index 0000000..d537b37 --- /dev/null +++ b/public/assets/DoubleRightOutlined-BDFzD9z5.js @@ -0,0 +1,15 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{$ as n,$t as r,B as i,Dr as a,E as o,Er as s,Ft as c,Hn as l,Jn as u,K as d,Ln as f,Pn as p,Q as m,Qt as h,St as g,Ut as _,V as v,Vn as y,Wt as b,Xn as x,Yn as S,Z as C,Zn as w,Zt as T,at as E,cr as D,d as O,en as k,gr as A,ir as j,nt as M,p as N,q as P,tr as F,u as I,ur as ee,ut as te,vr as L,wr as ne,xn as R,xr as z,xt as B,yr as V,yt as re,z as ie,zn as ae}from"./jsx-runtime-ADHq9IcL.js";import{f as oe,m as se,p as ce,y as le}from"./tooltip-CRuv8UNz.js";import{t as H}from"./CloseCircleFilled-BARdd-Ff.js";import{r as ue}from"./PlusOutlined-W6xCIIXs.js";import{g as U,h as W}from"./style-Der9vtsK.js";import{n as de}from"./LeftOutlined-DolIAuof.js";import{t as fe}from"./PurePanel-CKFVxwoF.js";import{t as G}from"./empty-oL0hNsAh.js";import{t as pe}from"./DownOutlined-DUvTsWMS.js";import{t as me}from"./SearchOutlined-B7X5pgf4.js";var K=e(a()),he=(e,t,n,r,i=!1,a,o)=>{let s=(0,K.useMemo)(()=>typeof n==`boolean`?{allowClear:n}:n&&typeof n==`object`?n:{allowClear:!1},[n]);return(0,K.useMemo)(()=>{let e=!i&&s.allowClear!==!1&&(t.length||a)&&!(o===`combobox`&&a===``);return{allowClear:e,clearIcon:e?s.clearIcon||r||`×`:null}},[s,r,i,t.length,a,o])},ge=K.createContext(null);function q(){return K.useContext(ge)}function _e(e=250){let t=K.useRef(null),n=K.useRef(null);K.useEffect(()=>()=>{window.clearTimeout(n.current)},[]);function r(r){(r||t.current===null)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current=null},e)}return[()=>t.current,r]}function ve(e,t){return e.filter(e=>e).some(e=>e.contains(t)||e===t)}function ye(e,t,n,r){let i=ne(i=>{if(r)return;let a=i.target;a.shadowRoot&&i.composed&&(a=i.composedPath()[0]||a),i._ori_target&&(a=i._ori_target),t&&!ve(e(),a)&&n(!1)});K.useEffect(()=>(window.addEventListener(`mousedown`,i),()=>window.removeEventListener(`mousedown`,i)),[i])}function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let t=e===!0?0:1;return{bottomLeft:{points:[`tl`,`bl`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},bottomRight:{points:[`tr`,`br`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topLeft:{points:[`bl`,`tl`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topRight:{points:[`br`,`tr`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`}}},be=K.forwardRef((e,t)=>{let{prefixCls:n,disabled:r,visible:i,children:a,popupElement:o,animation:s,transitionName:c,popupStyle:l,popupClassName:u,direction:d=`ltr`,placement:f,builtinPlacements:p,popupMatchSelectWidth:m,popupRender:h,popupAlign:g,getPopupContainer:_,empty:v,onPopupVisibleChange:b,onPopupMouseEnter:x,onPopupMouseDown:S,onPopupBlur:C,...w}=e,T=`${n}-dropdown`,E=o;h&&(E=h(o));let D=K.useMemo(()=>p||Y(m),[p,m]),O=s?`${T}-${s}`:c,k=typeof m==`number`,A=K.useMemo(()=>m===!1||k?`minWidth`:`width`,[m,k]),j=l;k&&(j={...l,width:m});let M=K.useRef(null);return K.useImperativeHandle(t,()=>({getPopupElement:()=>M.current?.popupElement})),K.createElement(te,J({},w,{showAction:b?[`click`]:[],hideAction:b?[`click`]:[],popupPlacement:f||(d===`rtl`?`bottomRight`:`bottomLeft`),builtinPlacements:D,prefixCls:T,popupMotion:{motionName:O},popup:K.createElement(`div`,{onMouseEnter:x,onMouseDown:S,onBlur:C},E),ref:M,stretch:A,popupAlign:g,popupVisible:i,getPopupContainer:_,popupClassName:y(u,{[`${T}-empty`]:v}),popupStyle:j,onPopupVisibleChange:b}),a)});function xe(e,t){let{key:n}=e,r;return`value`in e&&({value:r}=e),n??(r===void 0?`rc-index-key-${t}`:r)}function Se(e){return e!==void 0&&!Number.isNaN(e)}function Ce(e,t){let{label:n,value:r,options:i,groupLabel:a}=e||{},o=n||(t?`children`:`label`);return{label:o,value:r||`value`,options:i||`options`,groupLabel:a||o}}function we(e,{fieldNames:t,childrenAsData:n}={}){let r=[],{label:i,value:a,options:o,groupLabel:s}=Ce(t,!1);function c(e,t){Array.isArray(e)&&e.forEach(e=>{if(t||!(o in e)){let n=e[a];r.push({key:xe(e,r.length),groupOption:t,data:e,label:e[i],value:n})}else{let t=e[s];t===void 0&&n&&(t=e.label),r.push({key:xe(e,r.length),group:!0,data:e,label:t}),c(e[o],!0)}})}return c(e,!1),r}function Te(e){let t={...e};return`props`in t||Object.defineProperty(t,"props",{get(){return F(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var X=(e,t,n)=>{if(!t||!t.length)return null;let r=!1,i=(e,[t,...n])=>{if(!t)return[e];let a=e.split(t);return r||=a.length>1,a.reduce((e,t)=>[...e,...i(t,n)],[]).filter(Boolean)},a=i(e,t);return r?n===void 0?a:a.slice(0,n):null};function Ee(e){let{visible:t,values:n}=e;return t?K.createElement(`span`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`${n.slice(0,50).map(({label:e,value:t})=>[`number`,`string`].includes(typeof e)?e:t).join(`, `)}`,n.length>50?`, ...`:null):null}var De=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},Oe=(e,t=1)=>{if(t<=0){e();return}De(()=>{Oe(e,t-1)})};function ke(e,t,n,r){let[i,a]=(0,K.useState)(!1);(0,K.useEffect)(()=>{a(!0)},[]);let[o,s]=V(e,t),[c,l]=(0,K.useState)(!1),u=i?o:!1,d=r(u),f=(0,K.useRef)(0),p=ne(e=>{n&&d!==e&&n(e),s(e)});return[u,d,ne((e,t={})=>{let{cancelFun:n}=t;f.current+=1;let r=f.current,i=typeof e==`boolean`?e:!d;l(!i);function a(){r===f.current&&!n?.()&&(p(i),l(!1))}i?a():Oe(()=>{a()})}),c]}function Z(e){let{children:t,...n}=e;return t?K.createElement(`div`,n,t):null}var Ae=K.createContext(null);function je(){return K.useContext(Ae)}var Me=K.forwardRef((e,t)=>{let{onChange:n,onKeyDown:r,onBlur:i,style:a,syncWidth:o,value:s,className:c,autoComplete:l,...u}=e,{prefixCls:d,mode:f,onSearch:p,onSearchSubmit:m,onInputBlur:h,autoFocus:g,tokenWithEnter:_,placeholder:v,components:{input:b=`input`}}=je(),{id:x,classNames:S,styles:C,open:w,activeDescendantId:T,role:E,disabled:D}=q()||{},O=y(`${d}-input`,S?.input,c),k=K.useRef(!1),A=K.useRef(null),j=K.useRef(null);K.useImperativeHandle(t,()=>j.current);let M=e=>{let{value:t}=e.target;if(_&&A.current&&/[\r\n]/.test(A.current)){let e=A.current.replace(/[\r\n]+$/,``).replace(/\r\n/g,` `).replace(/[\r\n]/g,` `);t=t.replace(e,A.current)}A.current=null,p&&p(t,!0,k.current),n?.(e)},N=e=>{let{key:t}=e,{value:n}=e.currentTarget;t===`Enter`&&f===`tags`&&!w&&!k.current&&m&&m(n),r?.(e)},P=e=>{h?.(),i?.(e)},F=()=>{k.current=!0},I=e=>{if(k.current=!1,f!==`combobox`){let{value:t}=e.currentTarget;p?.(t,!0,!1)}},te=e=>{let{clipboardData:t}=e,n=t?.getData(`text`);A.current=n||``},[L,ne]=K.useState(void 0);z(()=>{let e=j.current;if(o&&e){e.style.width=`0px`;let t=e.scrollWidth;ne(t),e.style.width=``}},[o,s]);let R={id:x,type:`text`,...u,ref:j,style:{...C?.input,...a,"--select-input-width":L},autoFocus:g,autoComplete:l||`new-password`,className:O,disabled:D,value:s||``,onChange:M,onKeyDown:N,onBlur:P,onPaste:te,onCompositionStart:F,onCompositionEnd:I,role:E||`combobox`,"aria-expanded":w||!1,"aria-haspopup":`listbox`,"aria-owns":w?`${x}_list`:void 0,"aria-autocomplete":`list`,"aria-controls":w?`${x}_list`:void 0,"aria-activedescendant":w?T:void 0};if(K.isValidElement(b)){let t=b.props||{},n={placeholder:e.placeholder||v,...R,...t};return Object.keys(t).forEach(e=>{let r=t[e];typeof r==`function`&&(n[e]=(...t)=>{r(...t),R[e]?.(...t)})}),n.ref=ee(b.ref,R.ref),K.cloneElement(b,n)}let B=b;return K.createElement(B,R)});function Q(e){let{prefixCls:t,placeholder:n,displayValues:r}=je(),{classNames:i,styles:a}=q(),{show:o=!0}=e;return r.length?null:K.createElement(`div`,{className:y(`${t}-placeholder`,i?.placeholder),style:{visibility:o?`visible`:`hidden`,...a?.placeholder}},n)}var $=K.createContext(null);function Ne(e){return Array.isArray(e)?e:e===void 0?[]:[e]}typeof window<`u`&&window.document&&window.document.documentElement;function Pe(e){return e!=null}function Fe(e){return!e&&e!==0}function Ie(e){return[`string`,`number`].includes(typeof e)}function Le(e){let t;return e&&(Ie(e.title)?t=e.title.toString():Ie(e.label)&&(t=e.label.toString())),t}function Re(){return Re=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,searchValue:r,activeValue:i,displayValues:a,maxLength:o,mode:s,components:c}=je(),{triggerOpen:l,title:u,showSearch:d,classNames:f,styles:p}=q(),m=K.useContext($),[h,g]=K.useState(!1),_=s===`combobox`,v=a[0],b=K.useMemo(()=>_&&i&&!h&&l?i:d?r:``,[_,i,h,l,r,d]),[x,S,C,w]=K.useMemo(()=>{let e,t,n;if(v&&m?.flattenOptions){let r=m.flattenOptions.find(e=>e.value===v.value);r?.data&&(e=r.data.className,t=r.data.style,n=Le(r.data))}return v&&!n&&(n=Le(v)),u!==void 0&&(n=u),[e,t,n,!!e||!!t]},[v,m?.flattenOptions,u]);K.useEffect(()=>{_&&g(!1)},[_,i]);let T=v&&v.label!==null&&v.label!==void 0&&String(v.label).trim()!==``,E=_&&c?.input?null:v?w?K.createElement(`div`,{className:y(`${n}-content-value`,x),style:{...b?{visibility:`hidden`}:{},...S},title:C},v.label):v.label:K.createElement(Q,{show:!b});return K.createElement(`div`,{className:y(`${n}-content`,T&&`${n}-content-has-value`,b&&`${n}-content-has-search-value`,w&&`${n}-content-has-option-style`,f?.content),style:p?.content,title:w?void 0:C},E,K.createElement(Me,Re({ref:t},e,{value:b,maxLength:s===`combobox`?o:void 0,onChange:t=>{g(!0),e.onChange?.(t)}})))}),Be=e=>{let{className:t,style:n,customizeIcon:r,customizeIconProps:i,children:a,onMouseDown:o,onClick:s}=e,c=typeof r==`function`?r(i):r;return K.createElement(`span`,{className:t,onMouseDown:e=>{e.preventDefault(),o?.(e)},style:{userSelect:`none`,WebkitUserSelect:`none`,...n},unselectable:`on`,onClick:s,"aria-hidden":!0},c===void 0?K.createElement(`span`,{className:y(t.split(/\s+/).map(e=>`${e}-icon`))},a):c)};function Ve(){return Ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e.preventDefault(),e.stopPropagation()},We=K.forwardRef(function({inputProps:e},t){let{prefixCls:n,displayValues:r,searchValue:i,mode:a,onSelectorRemove:o,removeIcon:s}=je(),{disabled:c,showSearch:l,triggerOpen:u,rawOpen:d,toggleOpen:f,autoClearSearchValue:p,tagRender:m,maxTagPlaceholder:h,maxTagTextLength:g,maxTagCount:_,classNames:v,styles:b}=q(),x=`${n}-selection-item`,S=i;!d&&a===`multiple`&&p!==!1&&(S=``);let C=l&&S||``,w=l&&!c,T=s??`×`,E=h??(e=>`+ ${e.length} ...`),D=m,k=e=>{f(e)},A=e=>{o?.(e)},j=(e,t,n,r,i)=>K.createElement(`span`,{title:Le(e),className:y(x,{[`${x}-disabled`]:n},v?.item),style:b?.item},K.createElement(`span`,{className:y(`${x}-content`,v?.itemContent),style:b?.itemContent},t),r&&K.createElement(Be,{className:y(`${x}-remove`,v?.itemRemove),style:b?.itemRemove,onMouseDown:Ue,onClick:i,customizeIcon:T},`×`)),M=(e,t,n,r,i,a,o)=>K.createElement(`span`,{onMouseDown:e=>{Ue(e),k(!u)}},D({label:t,value:e,index:o?.index,disabled:n,closable:r,onClose:i,isMaxTag:!!a}));return K.createElement(O,{prefixCls:`${n}-content`,className:v?.content,style:b?.content,prefix:!r.length&&!C&&K.createElement(Q,null),data:r,renderItem:(e,t)=>{let{disabled:n,label:r,value:i}=e,a=!c&&!n,o=r;if(typeof g==`number`&&(typeof r==`string`||typeof r==`number`)){let e=String(o);e.length>g&&(o=`${e.slice(0,g)}...`)}let s=t=>{t&&t.stopPropagation(),A(e)};return typeof D==`function`?M(i,o,n,a,s,void 0,t):j(e,o,n,a,s)},renderRest:e=>{if(!r.length)return null;let t=typeof E==`function`?E(e):E;return typeof D==`function`?M(void 0,t,!1,!1,void 0,!0):j({title:t},t,!1)},suffix:K.createElement(Me,Ve({ref:t,disabled:c,readOnly:!w},e,{value:C||``,syncWidth:!0})),itemKey:He,maxCount:_})}),Ge=K.forwardRef(function(e,t){let{multiple:n,onInputKeyDown:r,tabIndex:i}=je(),a=q(),{showSearch:o}=a,s={...x(a,{aria:!0}),onKeyDown:r,readOnly:!o,tabIndex:i};return n?K.createElement(We,{ref:t,inputProps:s}):K.createElement(ze,{ref:t,inputProps:s})});function Ke(e){return e&&![j.ESC,j.SHIFT,j.BACKSPACE,j.TAB,j.WIN_KEY,j.ALT,j.META,j.WIN_KEY_RIGHT,j.CTRL,j.SEMICOLON,j.EQUALS,j.CAPS_LOCK,j.CONTEXT_MENU,j.UP,j.LEFT,j.RIGHT,j.F1,j.F2,j.F3,j.F4,j.F5,j.F6,j.F7,j.F8,j.F9,j.F10,j.F11,j.F12].includes(e)}function qe(){return qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{which:t}=e,n=R.current instanceof HTMLTextAreaElement;!n&&A&&(t===j.UP||t===j.DOWN)&&e.preventDefault(),C&&C(e),!(n&&!A&&~[j.UP,j.DOWN,j.LEFT,j.RIGHT].indexOf(t))&&!(e.ctrlKey||e.altKey||e.metaKey)&&Ke(t)&&M(!0)});K.useImperativeHandle(t,()=>({focus:e=>{(R.current||L.current).focus?.(e)},blur:()=>{(R.current||L.current).blur?.()},nativeElement:D(L.current)}));let B=ne(e=>{if(!P){let t=D(R.current);e.nativeEvent._ori_target=t;let n=t===e.target||t?.contains(e.target);t&&!n&&e.preventDefault();let r=A&&!l&&(f===`combobox`||N)||A&&l&&n;e.nativeEvent._select_lazy?A&&!l&&M(!1):(R.current?.focus(),r||M())}b?.(e)}),{root:V}=O,re=w(k,Je),ie=x(re,{aria:!0}),ae=Object.keys(ie),oe={...e,onInputKeyDown:z};if(V){let e=V.props||{},t={...e,...re};return Object.keys(e).forEach(n=>{let r=e[n],i=re[n];typeof r==`function`&&typeof i==`function`&&(t[n]=(...e)=>{i(...e),r(...e)})}),K.isValidElement(V)?K.cloneElement(V,{...t,ref:ee(V.ref,L)}):K.createElement(V,qe({},t,{ref:L}))}return K.createElement(Ae.Provider,{value:oe},K.createElement(`div`,qe({},w(re,ae),{ref:L,className:r,style:i,onMouseDown:B}),K.createElement(Z,{className:y(`${n}-prefix`,I?.prefix),style:te?.prefix},a),K.createElement(Ge,{ref:R}),K.createElement(Z,{className:y(`${n}-suffix`,{[`${n}-suffix-loading`]:F},I?.suffix),style:te?.suffix},o),s&&K.createElement(Z,{className:y(`${n}-clear`,I?.clear),style:te?.clear,onMouseDown:e=>{e.nativeEvent._select_lazy=!0,S?.(e)}},s),c))});function Xe(e,t,n){return K.useMemo(()=>{let{root:r,input:i}=e||{};return n&&(r=n()),t&&(i=t()),{root:r,input:i}},[e,t,n])}function Ze(){return Ze=Object.assign?Object.assign.bind():function(e){for(var t=1;te===`tags`||e===`multiple`,$e=K.forwardRef((e,t)=>{let{id:n,prefixCls:r,className:i,styles:a,classNames:o,showSearch:s,tagRender:c,showScrollBar:l=`optional`,direction:u,omitDomProps:d,displayValues:f,onDisplayValuesChange:p,emptyOptions:m,notFoundContent:h=`Not Found`,onClear:g,maxCount:_,placeholder:v,mode:b,disabled:x,loading:S,getInputElement:C,getRawInputElement:w,open:T,defaultOpen:E,onPopupVisibleChange:O,activeValue:k,onActiveValueChange:A,activeDescendantId:j,searchValue:M,autoClearSearchValue:N,onSearch:P,onSearchSplit:F,tokenSeparators:I,allowClear:ee,prefix:te,suffix:L,suffixIcon:R,clearIcon:z,OptionList:B,animation:V,transitionName:re,popupStyle:ie,popupClassName:ae,popupMatchSelectWidth:oe,popupRender:se,popupAlign:ce,placement:le,builtinPlacements:H,getPopupContainer:ue,showAction:U=[],onFocus:W,onBlur:de,onKeyUp:fe,onKeyDown:G,onMouseDown:pe,components:me,...q}=e,J=Qe(b),Y=K.useRef(null),xe=K.useRef(null),Ce=K.useRef(null),[we,Te]=K.useState(!1);K.useImperativeHandle(t,()=>({focus:Y.current?.focus,blur:Y.current?.blur,scrollTo:e=>Ce.current?.scrollTo(e),nativeElement:D(Y.current)}));let De=Xe(me,C,w),Z=K.useMemo(()=>{if(b!==`combobox`)return M;let e=f[0]?.value;return typeof e==`string`||typeof e==`number`?String(e):``},[M,b,f]),Ae=b===`combobox`&&typeof C==`function`&&C()||null,je=!h&&m,[Me,Q,$,Ne]=ke(E||!1,T,O,e=>x||je?!1:e),Pe=K.useMemo(()=>typeof I==`function`||(I||[]).some(e=>[` +`,`\r +`].includes(e)),[I]),Fe=K.useMemo(()=>typeof I==`function`?(e,t)=>{let n=I(e),r=Array.isArray(n)&&n.length===1&&n[0]===e;return!Array.isArray(n)||!n.length||r?null:t===void 0?n:n.slice(0,t)}:(e,t)=>X(e,I,t),[I]),Ie=(e,t,n)=>{if(J&&Se(_)&&f.length>=_)return;let r=!0,i=e;A?.(null);let a=Se(_)?_-f.length:void 0,o=n?null:Fe(e,a);return b!==`combobox`&&o&&(i=``,F?.(o),$(!1),r=!1),P&&Z!==i&&P(i,{source:t?`typing`:`effect`}),e&&t&&r&&$(!0),r},Le=e=>{!e||!e.trim()||P(e,{source:`submit`})};K.useEffect(()=>{!Me&&!J&&b!==`combobox`&&Ie(``,!1,!1)},[Me]),K.useEffect(()=>{x&&($(!1),Te(!1))},[x,Q]);let[Re,ze]=_e(),Be=K.useRef(!1),Ve=e=>{let t=Re(),{key:n}=e,r=n===`Enter`,i=n===` `;if(r||i){let t=b===`combobox`;(i&&!(t||s)||r&&!t)&&e.preventDefault(),Q||$(!0)}if(ze(!!Z),n===`Backspace`&&!t&&J&&!Z&&f.length){let e=[...f],t=null;for(let n=e.length-1;n>=0;--n){let r=e[n];if(!r.disabled){e.splice(n,1),t=r;break}}t&&p(e,{type:`remove`,values:[t]})}Q&&(!r||!Be.current)&&!i&&(r&&(Be.current=!0),Ce.current?.onKeyDown(e)),G?.(e)},He=(e,...t)=>{Q&&Ce.current?.onKeyUp(e,...t),e.key===`Enter`&&(Be.current=!1),fe?.(e,...t)},Ue=ne(e=>{let t=f.filter(t=>t!==e);p(t,{type:`remove`,values:[e]})}),We=()=>{Be.current=!1},Ge=()=>[D(Y.current),xe.current?.getPopupElement()];ye(Ge,Q,$,!!De.root);let Ke=K.useRef(!1),qe=e=>{Te(!0),x||(U.includes(`focus`)&&$(!0),W?.(e))},Je=()=>{Q&&!Ke.current&&$(!1,{cancelFun:()=>ve(Ge(),document.activeElement)})},$e=e=>{Te(!1),Z&&(b===`tags`?P(Z,{source:`submit`}):b===`multiple`&&P(``,{source:`blur`})),Je(),x||de?.(e)},et=(e,...t)=>{let{target:n}=e;(xe.current?.getPopupElement())?.contains(n)&&$&&$(!0),pe?.(e,...t),Ke.current=!0,Oe(()=>{Ke.current=!1})},[,tt]=K.useState({});function nt(){tt({})}let rt;De.root&&(rt=e=>{$(e)});let it=K.useMemo(()=>({...e,notFoundContent:h,open:Q,triggerOpen:Q,rawOpen:Me,id:n,showSearch:s,multiple:J,toggleOpen:$,showScrollBar:l,styles:a,classNames:o,lockOptions:Ne}),[e,h,$,n,s,J,Q,Me,l,a,o,Ne]),at=K.useMemo(()=>{let e=L??R;return typeof e==`function`?e({searchValue:Z,open:Q,focused:we,showSearch:s,loading:S}):e},[L,R,Z,Q,we,s,S]),ot=()=>{g?.(),Y.current?.focus(),p([],{type:`clear`,values:f}),Ie(``,!1,!1)},{allowClear:st,clearIcon:ct}=he(r,f,ee,z,x,Z,b),lt=K.createElement(B,{ref:Ce}),ut=y(r,i,{[`${r}-focused`]:we,[`${r}-multiple`]:J,[`${r}-single`]:!J,[`${r}-allow-clear`]:st,[`${r}-show-arrow`]:at!=null,[`${r}-disabled`]:x,[`${r}-loading`]:S,[`${r}-open`]:Q,[`${r}-customize-input`]:Ae,[`${r}-show-search`]:s}),dt=K.createElement(Ye,Ze({},q,{ref:Y,prefixCls:r,className:ut,focused:we,prefix:te,suffix:at,clearIcon:ct,multiple:J,mode:b,displayValues:f,placeholder:v,searchValue:Z,activeValue:k,onSearch:Ie,onSearchSubmit:Le,onInputBlur:We,onFocus:qe,onBlur:$e,onClearMouseDown:ot,onKeyDown:Ve,onKeyUp:He,onSelectorRemove:Ue,tokenWithEnter:Pe,onMouseDown:et,components:De}));return dt=K.createElement(be,{ref:xe,disabled:x,prefixCls:r,visible:Q,popupElement:lt,animation:V,transitionName:re,popupStyle:ie,popupClassName:ae,direction:u,popupMatchSelectWidth:oe,popupRender:se,popupAlign:ce,placement:le,builtinPlacements:H,getPopupContainer:ue,empty:m,onPopupVisibleChange:rt,onPopupMouseEnter:nt,onPopupMouseDown:et,onPopupBlur:Je},dt),K.createElement(ge.Provider,{value:it},K.createElement(Ee,{visible:we&&!Q,values:f}),dt)}),et=()=>null;et.isSelectOptGroup=!0;var tt=()=>null;tt.isSelectOption=!0;var nt=e(s());function rt(){return rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let d={},f={display:`flex`,flexDirection:`column`};return t!==void 0&&(d={height:e,position:`relative`,overflow:`hidden`},f={...f,transform:`translateY(${t}px)`,[s?`marginRight`:`marginLeft`]:-n,position:`absolute`,left:0,right:0,top:0}),K.createElement(`div`,{style:d},K.createElement(l,{onResize:({offsetHeight:e})=>{e&&a&&a()}},K.createElement(`div`,rt({style:f,className:y({[`${i}-holder-inner`]:i}),ref:u},o),r,c)))});it.displayName=`Filler`;function at({children:e,setRef:t}){let n=K.useCallback(e=>{t(e)},[t]);return K.cloneElement(e,{ref:n})}function ot(e,t,n,r,i,a,o,{getKey:s}){return e.slice(t,n+1).map((e,n)=>{let c=o(e,t+n,{style:{width:r},offsetX:i}),l=s(e);return K.createElement(at,{key:l,setRef:t=>a(e,t)},c)})}function st(e,t,n){let r=e.length,i=t.length,a,o;if(r===0&&i===0)return null;r{let a=st(r||[],e||[],t);a?.index!==void 0&&(n?.(a.index),o(e[a.index])),i(e)},[e]),[a]}var lt=typeof navigator==`object`&&/Firefox/i.test(navigator.userAgent),ut=((e,t,n,r)=>{let i=(0,K.useRef)(!1),a=(0,K.useRef)(null);function o(){clearTimeout(a.current),i.current=!0,a.current=setTimeout(()=>{i.current=!1},50)}let s=(0,K.useRef)({top:e,bottom:t,left:n,right:r});return s.current.top=e,s.current.bottom=t,s.current.left=n,s.current.right=r,(e,t,n=!1)=>{let r=e?t<0&&s.current.left||t>0&&s.current.right:t<0&&s.current.top||t>0&&s.current.bottom;return n&&r?(clearTimeout(a.current),i.current=!1):(!r||i.current)&&o(),!i.current&&r}});function dt(e,t,n,r,i,a,o){let s=(0,K.useRef)(0),c=(0,K.useRef)(null),l=(0,K.useRef)(null),u=(0,K.useRef)(!1),d=ut(t,n,r,i);function f(e,t){if(S.cancel(c.current),d(!1,t))return;let n=e;if(!n._virtualHandled)n._virtualHandled=!0;else return;s.current+=t,l.current=t,lt||n.preventDefault(),c.current=S(()=>{let e=u.current?10:1;o(s.current*e,!1),s.current=0})}function p(e,t){o(t,!0),lt||e.preventDefault()}let m=(0,K.useRef)(null),h=(0,K.useRef)(null);function g(t){if(!e)return;S.cancel(h.current),h.current=S(()=>{m.current=null},2);let{deltaX:n,deltaY:r,shiftKey:i}=t,o=n,s=r;(m.current===`sx`||!m.current&&i&&r&&!n)&&(o=r,s=0,m.current=`sx`);let c=Math.abs(o),l=Math.abs(s);m.current===null&&(m.current=a&&c>l?`x`:`y`),m.current===`y`?f(t,s):p(t,o)}function _(t){e&&(u.current=t.detail===l.current)}return[g,_]}function ft(e,t,n,r){let[i,a]=K.useMemo(()=>[new Map,[]],[e,n.id,r]);return(o,s=o)=>{let c=i.get(o),l=i.get(s);if(c===void 0||l===void 0){let u=e.length;for(let d=a.length;d{let e=!1;a.current.forEach((t,n)=>{if(t&&t.offsetParent){let{offsetHeight:r}=t,{marginTop:i,marginBottom:a}=getComputedStyle(t),s=mt(i),c=mt(a),l=r+s+c;o.current.get(n)!==l&&(o.current.set(n,l),e=!0)}}),e&&i(e=>e+1)};if(e)t();else{s.current+=1;let e=s.current;Promise.resolve().then(()=>{e===s.current&&t()})}}function u(r,i){let o=e(r),s=a.current.get(o);i?(a.current.set(o,i),l()):a.current.delete(o),!s!=!i&&(i?t?.(r):n?.(r))}return(0,K.useEffect)(()=>c,[]),[u,l,o.current,r]}var gt=14/15;function _t(e,t,n){let r=(0,K.useRef)(!1),i=(0,K.useRef)(0),a=(0,K.useRef)(0),o=(0,K.useRef)(null),s=(0,K.useRef)(null),c,l=e=>{if(r.current){let t=Math.ceil(e.touches[0].pageX),r=Math.ceil(e.touches[0].pageY),o=i.current-t,c=a.current-r,l=Math.abs(o)>Math.abs(c);l?i.current=t:a.current=r;let u=n(l,l?o:c,!1,e);u&&e.preventDefault(),clearInterval(s.current),u&&(s.current=setInterval(()=>{l?o*=gt:c*=gt;let e=Math.floor(l?o:c);(!n(l,e,!0)||Math.abs(e)<=.1)&&clearInterval(s.current)},16))}},u=()=>{r.current=!1,c()},d=e=>{c(),e.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(e.touches[0].pageX),a.current=Math.ceil(e.touches[0].pageY),o.current=e.target,o.current.addEventListener(`touchmove`,l,{passive:!1}),o.current.addEventListener(`touchend`,u,{passive:!0}))};c=()=>{o.current&&(o.current.removeEventListener(`touchmove`,l),o.current.removeEventListener(`touchend`,u))},z(()=>(e&&t.current.addEventListener(`touchstart`,d,{passive:!0}),()=>{t.current?.removeEventListener(`touchstart`,d),c(),clearInterval(s.current)}),[e])}function vt(e){return Math.floor(e**.5)}function yt(e,t){return(`touches`in e?e.touches[0]:e)[t?`pageX`:`pageY`]-window[t?`scrollX`:`scrollY`]}function bt(e,t,n){K.useEffect(()=>{let r=t.current;if(e&&r){let e=!1,t,i,a=()=>{S.cancel(t)},o=()=>{a(),t=S(()=>{n(i),o()})},s=()=>{e=!1,a()},c=t=>{if(t.target.draggable||t.button!==0)return;let n=t;n._virtualHandled||(n._virtualHandled=!0,e=!0)},l=t=>{if(e){let e=yt(t,!1),{top:n,bottom:s}=r.getBoundingClientRect();e<=n?(i=-vt(n-e),o()):e>=s?(i=vt(e-s),o()):a()}};return r.addEventListener(`mousedown`,c),r.ownerDocument.addEventListener(`mouseup`,s),r.ownerDocument.addEventListener(`mousemove`,l),r.ownerDocument.addEventListener(`dragend`,s),()=>{r.removeEventListener(`mousedown`,c),r.ownerDocument.removeEventListener(`mouseup`,s),r.ownerDocument.removeEventListener(`mousemove`,l),r.ownerDocument.removeEventListener(`dragend`,s),a()}}},[e])}var xt=10;function St(e,t){let n=typeof e==`function`?e(t):e;return Number.isFinite(n)?n:0}function Ct(e,t,n,r,i,a,o,s,c){let l=K.useRef(void 0),[u,d]=K.useState(null);return z(()=>{if(u&&u.times({...e}));return}o();let{targetAlign:c,originAlign:l,index:f,offset:p}=u,m=St(p,{getSize:a}),h=e.current.clientHeight,g=!1,_=c,v=null;if(h){let a=c||l,o=0,d=0,p=0,y=Math.min(t.length-1,f);for(let e=0;e<=y;e+=1){let a=i(t[e]);d=o;let s=n.get(a);p=d+(s===void 0?r:s),o=p}let b=a===`top`?m:h-m;for(let e=y;e>=0;--e){let r=i(t[e]),a=n.get(r);if(a===void 0){g=!0;break}if(b-=a,b<=0)break}switch(a){case`top`:v=d-m;break;case`bottom`:v=p-h+m;break;default:{let{scrollTop:t}=e.current,n=t+h;dn&&(_=`bottom`)}}v!==null&&s(v),v!==u.lastTop&&(g=!0)}g&&d({...u,times:u.times+1,targetAlign:_,lastTop:v})}},[u,e.current]),e=>{if(e==null){c();return}if(S.cancel(l.current),typeof e==`number`)s(e);else if(e&&typeof e==`object`){let n,{align:r}=e;`index`in e?{index:n}=e:n=t.findIndex(t=>i(t)===e.key);let{offset:a=0}=e;d({times:0,index:n,offset:a,originAlign:r})}}}function wt(e,t,n){if(t<=0||n<=0)return 0;let r=Math.max(Math.min(e,n),0)/n,i=Math.ceil(r*t);return i=Math.max(i,0),i=Math.min(i,t),i}var Tt=K.forwardRef((e,t)=>{let{prefixCls:n,rtl:r,scrollOffset:i,scrollRange:a,onStartMove:o,onStopMove:s,onScroll:c,horizontal:l,spinSize:u,containerSize:d,style:f,thumbStyle:p,showScrollBar:m}=e,[h,g]=K.useState(!1),[_,v]=K.useState(null),[b,x]=K.useState(null),C=!r,w=K.useRef(null),T=K.useRef(null),[E,D]=K.useState(m),O=K.useRef(void 0),k=()=>{m===!0||m===!1||(clearTimeout(O.current),D(!0),O.current=setTimeout(()=>{D(!1)},3e3))},A=a-d||0,j=d-u||0,M=K.useMemo(()=>i===0||A===0?0:i/A*j,[i,A,j]),N=e=>!!e&&T.current?.contains(e),P=e=>{let t=w.current;if(!t)return;let n=t.getBoundingClientRect(),r=yt(e,l),i;if(Number.isFinite(r)){if(l){let e=C?n.left:n.right;if(!Number.isFinite(e))return;i=(C?r-e:e-r)-u/2}else{if(!Number.isFinite(n.top))return;i=r-n.top-u/2}c(wt(i,A,j),l)}},F=e=>{e.stopPropagation(),e.preventDefault(),!(e.button!==0||N(e.target))&&P(e)},I=K.useRef({top:M,dragging:h,pageY:_,startTop:b});I.current={top:M,dragging:h,pageY:_,startTop:b};let ee=ne(e=>{g(!0),v(yt(e,l)),x(I.current.top),o(),e.stopPropagation(),e.preventDefault()});K.useEffect(()=>{let e=e=>{e.preventDefault()},t=w.current,n=T.current;return t.addEventListener(`touchstart`,e,{passive:!1}),n.addEventListener(`touchstart`,ee,{passive:!1}),()=>{t.removeEventListener(`touchstart`,e),n.removeEventListener(`touchstart`,ee)}},[ee]);let te=K.useRef(void 0);te.current=A;let L=K.useRef(void 0);L.current=j,K.useEffect(()=>{if(h){let e,t=t=>{let{dragging:n,pageY:r,startTop:i}=I.current;S.cancel(e);let a=w.current.getBoundingClientRect(),o=d/(l?a.width:a.height);if(n){let n=(yt(t,l)-r)*o,a=i;!C&&l?a-=n:a+=n;let s=te.current,u=L.current,d=wt(a,s,u);e=S(()=>{c(d,l)})}},n=()=>{g(!1),s()};return window.addEventListener(`mousemove`,t,{passive:!0}),window.addEventListener(`touchmove`,t,{passive:!0}),window.addEventListener(`mouseup`,n,{passive:!0}),window.addEventListener(`touchend`,n,{passive:!0}),()=>{window.removeEventListener(`mousemove`,t),window.removeEventListener(`touchmove`,t),window.removeEventListener(`mouseup`,n),window.removeEventListener(`touchend`,n),S.cancel(e)}}},[h]),K.useEffect(()=>(k(),()=>{clearTimeout(O.current)}),[i]),K.useImperativeHandle(t,()=>({delayHidden:k}));let R=`${n}-scrollbar`,z={position:`absolute`,visibility:E?null:`hidden`},B={position:`absolute`,borderRadius:99,background:`var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))`,cursor:`pointer`,userSelect:`none`};return l?(Object.assign(z,{height:8,left:0,right:0,bottom:0}),Object.assign(B,{height:`100%`,width:u,[C?`left`:`right`]:M})):(Object.assign(z,{width:8,top:0,bottom:0,[C?`right`:`left`]:0}),Object.assign(B,{width:`100%`,height:u,top:M})),K.createElement(`div`,{ref:w,className:y(R,{[`${R}-horizontal`]:l,[`${R}-vertical`]:!l,[`${R}-visible`]:E}),style:{...z,...f},onMouseDown:F,onMouseMove:k},K.createElement(`div`,{ref:T,className:y(`${R}-thumb`,{[`${R}-thumb-moving`]:h}),style:{...B,...p},onMouseDown:ee}))}),Et=20;function Dt(e=0,t=0){let n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,Et),Math.floor(n)}function Ot(){return Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;ttypeof d==`function`?d(e):e?.[d],[d]),[E,D,O,k]=ht(T,null,null),A=!!(f!==!1&&i&&a),j=K.useMemo(()=>Object.values(O.maps).reduce((e,t)=>e+t,0),[O.id,O.maps]),M=A&&c&&(Math.max(a*c.length,j)>i||!!m),N=p===`rtl`,P=y(n,{[`${n}-rtl`]:N},r),F=c||kt,I=(0,K.useRef)(null),ee=(0,K.useRef)(null),te=(0,K.useRef)(null),[L,R]=(0,K.useState)(0),[B,V]=(0,K.useState)(0),[re,ie]=(0,K.useState)(!1),ae=()=>{ie(!0)},oe=()=>{ie(!1)},se={getKey:T};function ce(e){R(t=>{let n;n=typeof e==`function`?e(t):e;let r=J(n);return I.current.scrollTop=r,r})}let le=(0,K.useRef)({start:0,end:F.length}),H=(0,K.useRef)(void 0),[ue]=ct(F,T);H.current=ue;let{scrollHeight:U,start:W,end:de,offset:fe}=K.useMemo(()=>{if(!A)return{scrollHeight:void 0,start:0,end:F.length-1,offset:void 0};if(!M)return{scrollHeight:ee.current?.offsetHeight||0,start:0,end:F.length-1,offset:void 0};let e=0,t,n,r,o=F.length;for(let s=0;s=L&&t===void 0&&(t=s,n=e),u>L+i&&r===void 0&&(r=s),e=u}return t===void 0&&(t=0,n=0,r=Math.ceil(i/a)),r===void 0&&(r=F.length-1),r=Math.min(r+1,F.length-1),{scrollHeight:e,start:t,end:r,offset:n}},[M,A,L,F,k,i]);le.current.start=W,le.current.end=de,K.useLayoutEffect(()=>{let e=O.getRecord();if(e.size===1){let t=Array.from(e.keys())[0],n=e.get(t),r=F[W];if(r&&n===void 0&&T(r)===t){let e=O.get(t)-a;ce(t=>t+e)}}O.resetRecord()},[U]);let[G,pe]=K.useState({width:0,height:i}),me=e=>{pe({width:e.offsetWidth,height:e.offsetHeight})},he=(0,K.useRef)(null),ge=(0,K.useRef)(null),q=K.useMemo(()=>Dt(G.width,m),[G.width,m]),_e=K.useMemo(()=>Dt(G.height,U),[G.height,U]),ve=U-i,ye=(0,K.useRef)(ve);ye.current=ve;function J(e){let t=e;return Number.isNaN(ye.current)||(t=Math.min(t,ye.current)),t=Math.max(t,0),t}let Y=L<=0,be=L>=ve,xe=B<=0,Se=B>=m,Ce=ut(Y,be,xe,Se),we=()=>({x:N?-B:B,y:L}),Te=(0,K.useRef)(we()),X=ne(e=>{if(_){let t={...we(),...e};(Te.current.x!==t.x||Te.current.y!==t.y)&&(_(t),Te.current=t)}});function Ee(e,t){let n=e;t?((0,nt.flushSync)(()=>{V(n)}),X()):ce(n)}function De(e){let{scrollTop:t}=e.currentTarget;t!==L&&ce(t),g?.(e),X()}let Oe=e=>{let t=e,n=m?m-G.width:0;return t=Math.max(t,0),t=Math.min(t,n),t},ke=ne((e,t)=>{t?((0,nt.flushSync)(()=>{V(t=>{let n=t+(N?-e:e);return Oe(n)})}),X()):ce(t=>t+e)}),[Z,Ae]=dt(A,Y,be,xe,Se,!!m,ke);_t(A,I,(e,t,n,r)=>{let i=r;return Ce(e,t,n)?!1:!i||!i._virtualHandled?(i&&(i._virtualHandled=!0),Z({preventDefault(){},deltaX:e?t:0,deltaY:e?0:t}),!0):!1}),bt(M,I,e=>{ce(t=>t+e)}),z(()=>{function e(e){let t=Y&&e.detail<0,n=be&&e.detail>0;A&&!t&&!n&&e.preventDefault()}let t=I.current;return t.addEventListener(`wheel`,Z,{passive:!1}),t.addEventListener(`DOMMouseScroll`,Ae,{passive:!0}),t.addEventListener(`MozMousePixelScroll`,e,{passive:!1}),()=>{t.removeEventListener(`wheel`,Z),t.removeEventListener(`DOMMouseScroll`,Ae),t.removeEventListener(`MozMousePixelScroll`,e)}},[A,Y,be]),z(()=>{if(m){let e=Oe(B);V(e),X({x:e})}},[G.width,m]);let je=()=>{he.current?.delayHidden(),ge.current?.delayHidden()},Me=ft(F,T,O,a),Q=Ct(I,F,O,a,T,Me,()=>D(!0),ce,je);K.useImperativeHandle(t,()=>({nativeElement:te.current,getScrollInfo:we,scrollTo:e=>{function t(e){return e&&typeof e==`object`&&(`left`in e||`top`in e)}t(e)?(e.left!==void 0&&V(Oe(e.left)),Q(e.top)):Q(e)}})),z(()=>{if(v){let e=F.slice(W,de+1);v(e,F)}},[W,de,F]);let $=x?.({start:W,end:de,virtual:M,offsetX:B,scrollTop:L,offsetY:fe,rtl:N,getSize:Me}),Ne=ot(F,W,de,m,B,E,u,se),Pe=null;i&&(Pe={[o?`height`:`maxHeight`]:i,...At},A&&(Pe.overflowY=`hidden`,m&&(Pe.overflowX=`hidden`),re&&(Pe.pointerEvents=`none`)));let Fe={};return N&&(Fe.dir=`rtl`),K.createElement(`div`,Ot({ref:te,style:{...s,position:`relative`},className:P},Fe,w),K.createElement(l,{onResize:me},K.createElement(h,{className:`${n}-holder`,style:Pe,ref:I,onScroll:De,onMouseEnter:je},K.createElement(it,{prefixCls:n,height:U,offsetX:B,offsetY:fe,scrollWidth:m,onInnerResize:D,ref:ee,innerProps:b,rtl:N,extra:$},Ne))),M&&U>i&&K.createElement(Tt,{ref:he,prefixCls:n,scrollOffset:L,scrollRange:U,rtl:N,onScroll:Ee,onStartMove:ae,onStopMove:oe,spinSize:_e,containerSize:G.height,style:S?.verticalScrollBar,thumbStyle:S?.verticalScrollBarThumb,showScrollBar:C}),M&&m>G.width&&K.createElement(Tt,{ref:ge,prefixCls:n,scrollOffset:B,scrollRange:m,rtl:N,onScroll:Ee,onStartMove:ae,onStopMove:oe,spinSize:q,containerSize:G.width,horizontal:!0,style:S?.horizontalScrollBar,thumbStyle:S?.horizontalScrollBarThumb,showScrollBar:C}))}var Mt=K.forwardRef(jt);Mt.displayName=`List`;var Nt=K.forwardRef((e,t)=>jt({...e,virtual:!1},t));Nt.displayName=`List`;var Pt=Mt;function Ft(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}function It(){return It=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,id:r,open:i,multiple:a,mode:o,searchValue:s,toggleOpen:c,notFoundContent:l,onPopupScroll:u,showScrollBar:d,lockOptions:f}=q(),{maxCount:p,flattenOptions:m,onActiveValue:h,defaultActiveFirstOption:g,onSelect:_,menuItemSelectedIcon:v,rawValues:b,fieldNames:S,virtual:C,direction:T,listHeight:E,listItemHeight:D,optionRender:O,classNames:k,styles:M}=K.useContext($),N=`${n}-item`,P=A(()=>m,[i,f],(e,t)=>t[0]&&!t[1]),F=K.useRef(null),I=K.useMemo(()=>a&&Se(p)&&b?.size>=p,[a,p,b?.size]),ee=e=>{e.preventDefault()},te=e=>{F.current?.scrollTo(typeof e==`number`?{index:e}:e)},L=K.useCallback(e=>o!==`combobox`&&b.has(e),[o,[...b].toString(),b.size]),ne=(e,t=1)=>{let n=P.length;for(let r=0;rne(0)),B=(e,t=!1)=>{z(e);let n={source:t?`keyboard`:`mouse`},r=P[e];if(!r){h(null,-1,n);return}h(r.value,e,n)};(0,K.useEffect)(()=>{B(g===!1?-1:ne(0))},[P.length,s]);let V=K.useCallback(e=>o===`combobox`?String(e).toLowerCase()===s.toLowerCase():b.has(e),[o,s,[...b].toString(),b.size]);(0,K.useEffect)(()=>{let e;if(!a&&i&&b.size===1){let t=Array.from(b)[0],n=P.findIndex(({data:e})=>s?String(e.value).startsWith(s):e.value===t);n!==-1&&(B(n),e=setTimeout(()=>{te(n)}))}return i&&F.current?.scrollTo(void 0),()=>clearTimeout(e)},[i,s]);let re=e=>{e!==void 0&&_(e,{selected:!b.has(e)}),a||c(!1)};if(K.useImperativeHandle(t,()=>({onKeyDown:e=>{let{which:t,ctrlKey:n}=e;switch(t){case j.N:case j.P:case j.UP:case j.DOWN:{let e=0;if(t===j.UP?e=-1:t===j.DOWN?e=1:Ft()&&n&&(t===j.N?e=1:t===j.P&&(e=-1)),e!==0){let t=ne(R+e,e);te(t),B(t,!0)}break}case j.TAB:case j.ENTER:{let t=P[R];if(!t||t.data.disabled)return re(void 0);!I||b.has(t.value)?re(t.value):re(void 0),i&&e.preventDefault();break}case j.ESC:c(!1),i&&e.stopPropagation()}},onKeyUp:()=>{},scrollTo:e=>{te(e)}})),P.length===0)return K.createElement(`div`,{role:`listbox`,id:`${r}_list`,className:`${N}-empty`,onMouseDown:ee},l);let ie=Object.keys(S).map(e=>S[e]),ae=e=>e.label;function oe(e,t){let{group:n}=e;return{role:n?`presentation`:`option`,id:`${r}_list_${t}`}}let se=e=>{let t=P[e];if(!t)return null;let n=t.data||{},{value:r,disabled:i}=n,{group:a}=t,o=x(n,!0),s=ae(t);return t?K.createElement(`div`,It({"aria-label":typeof s==`string`&&!a?s:null},o,{key:e},oe(t,e),{"aria-selected":V(r),"aria-disabled":i}),r):null},ce={role:`listbox`,id:`${r}_list`};return K.createElement(K.Fragment,null,C&&K.createElement(`div`,It({},ce,{style:{height:0,width:0,overflow:`hidden`}}),se(R-1),se(R),se(R+1)),K.createElement(Pt,{itemKey:`key`,ref:F,data:P,height:E,itemHeight:D,fullHeight:!1,onMouseDown:ee,onScroll:u,virtual:C,direction:T,innerProps:C?null:ce,showScrollBar:d,className:k?.popup?.list,style:M?.popup?.list},(e,t)=>{let{group:n,groupOption:r,data:i,label:a,value:o}=e,{key:s}=i;if(n){let e=i.title??(Lt(a)?a.toString():void 0);return K.createElement(`div`,{className:y(N,`${N}-group`,i.className),title:e},a===void 0?s:a)}let{disabled:c,title:l,children:u,style:d,className:f,...p}=i,m=w(p,ie),h=L(o),g=c||!h&&I,_=`${N}-option`,b=y(N,_,f,k?.popup?.listItem,{[`${_}-grouped`]:r,[`${_}-active`]:R===t&&!g,[`${_}-disabled`]:g,[`${_}-selected`]:h}),S=ae(e),T=!v||typeof v==`function`||h,E=typeof S==`number`?S:S||o,D=Lt(E)?E.toString():void 0;return l!==void 0&&(D=l),K.createElement(`div`,It({},x(m),C?{}:oe(e,t),{"aria-selected":C?void 0:V(o),"aria-disabled":g,className:b,title:D,onMouseMove:()=>{R===t||g||B(t)},onClick:()=>{g||re(o)},style:{...M?.popup?.listItem,...d}}),K.createElement(`div`,{className:`${_}-content`},typeof O==`function`?O(e,{index:t}):E),K.isValidElement(v)||h,T&&K.createElement(Be,{className:`${N}-option-state`,customizeIcon:v,customizeIconProps:{value:o,disabled:g,isSelected:h}},h?`✓`:null))}))}),zt=((e,t)=>{let n=K.useRef({values:new Map,options:new Map});return[K.useMemo(()=>{let{values:r,options:i}=n.current,a=e.map(e=>e.label===void 0?{...e,label:r.get(e.value)?.label}:e),o=new Map,s=new Map;return a.forEach(e=>{o.set(e.value,e),s.set(e.value,t.get(e.value)||i.get(e.value))}),n.current.values=o,n.current.options=s,a},[e,t]),K.useCallback(e=>t.get(e)||n.current.options.get(e),[t])]});function Bt(e,t){return Ne(e).join(``).toUpperCase().includes(t)}var Vt=((e,t,n,r,i)=>K.useMemo(()=>{if(!n||r===!1)return e;let{options:a,label:o,value:s}=t,c=[],l=typeof r==`function`,u=n.toUpperCase(),d=l?r:(e,t)=>i&&i.length?i.some(e=>Bt(t[e],u)):t[a]?Bt(t[o===`children`?`label`:o],u):Bt(t[s],u),f=l?e=>Te(e):e=>e;return e.forEach(e=>{if(e[a]){if(d(n,f(e)))c.push(e);else{let t=e[a].filter(e=>d(n,f(e)));t.length&&c.push({...e,[a]:t})}return}d(n,f(e))&&c.push(e)}),c},[e,r,i,n,t]));function Ht(e){let{key:t,props:{children:n,value:r,...i}}=e;return{key:t,value:r===void 0?t:r,children:n,...i}}function Ut(e,t=!1){return u(e).map((e,n)=>{if(!K.isValidElement(e)||!e.type)return null;let{type:{isSelectOptGroup:r},key:i,props:{children:a,...o}}=e;return t||!r?Ht(e):{key:`__RC_SELECT_GRP__${i===null?n:i}__`,label:i,...o,options:Ut(a)}}).filter(e=>e)}var Wt=(e,t,n,r,i)=>K.useMemo(()=>{let a=e;e||(a=Ut(t));let o=new Map,s=new Map,c=(e,t,n)=>{n&&typeof n==`string`&&e.set(t[n],t)},l=(e,t=!1)=>{for(let a=0;a{c(s,u,e)}),c(s,u,i)):l(u[n.options],!0)}};return l(a),{options:a,valueOptions:o,labelOptions:s}},[e,t,n,r,i]);function Gt(e){let t=K.useRef();return t.current=e,K.useCallback((...e)=>t.current(...e),[])}function Kt(e,t,n){let{filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c}=t;return K.useMemo(()=>{let t=typeof e==`object`,l={filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c,...t?e:{}};return[t||n===`combobox`||n===`tags`||n===`multiple`&&e===void 0?!0:e,l]},[n,e,r,i,a,o,s,c])}function qt(){return qt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,mode:r,prefixCls:i=`rc-select`,backfill:a,fieldNames:o,showSearch:s,searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p,onSelect:m,onDeselect:h,onActive:g,popupMatchSelectWidth:_=!0,optionLabelProp:v,options:y,optionRender:b,children:x,defaultActiveFirstOption:S,menuItemSelectedIcon:C,virtual:w,direction:T,listHeight:E=200,listItemHeight:D=20,labelRender:O,value:k,defaultValue:A,labelInValue:j,onChange:M,maxCount:N,classNames:P,styles:F,...I}=e,[ee,te]=Kt(s,{searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p},r),{filterOption:ne,searchValue:R,optionFilterProp:z,filterSort:B,onSearch:re,autoClearSearchValue:ie=!0}=te,ae=K.useMemo(()=>z?Array.isArray(z)?z:[z]:[],[z]),oe=L(n),se=Qe(r),ce=!!(!y&&x),le=K.useMemo(()=>ne===void 0&&r===`combobox`?!1:ne,[ne,r]),H=K.useMemo(()=>Ce(o,ce),[JSON.stringify(o),ce]),[ue,U]=V(``,R),W=ue||``,de=Wt(y,x,H,ae,v),{valueOptions:fe,labelOptions:G,options:pe}=de,me=K.useCallback(e=>Ne(e).map(e=>{let t,n,r,i;Yt(e)?t=e:(n=e.label,t=e.value);let a=fe.get(t);return a&&(n===void 0&&(n=a?.[v||H.label]),r=a?.disabled,i=a?.title),{label:n,value:t,key:t,disabled:r,title:i}}),[H,v,fe]),[he,ge]=V(A,k),[q,_e]=zt(K.useMemo(()=>{let e=me(se&&he===null?[]:he);return r===`combobox`&&Fe(e[0]?.value)?[]:e},[he,me,r,se]),fe),ve=K.useMemo(()=>{if(!r&&q.length===1){let e=q[0];if(e.value===null&&(e.label===null||e.label===void 0))return[]}return q.map(e=>({...e,label:(typeof O==`function`?O(e):e.label)??e.value}))},[r,q,O]),ye=K.useMemo(()=>new Set(q.map(e=>e.value)),[q]);K.useEffect(()=>{if(r===`combobox`){let e=q[0]?.value;U(Pe(e)?String(e):``)}},[q]);let J=Gt((e,t)=>{let n=t??e;return{[H.value]:e,[H.label]:n}}),Y=Vt(K.useMemo(()=>{if(r!==`tags`)return pe;let e=[...pe],t=e=>fe.has(e);return[...q].sort((e,t)=>e.value{let r=n.value;t(r)||e.push(J(r,n.label))}),e},[J,pe,fe,q,r]),H,W,le,ae),be=K.useMemo(()=>{let e=e=>ae.length?ae.some(t=>e?.[t]===W):e?.value===W;return r!==`tags`||!W||Y.some(t=>e(t))||Y.some(e=>e[H.value]===W)||fe.get(W)?.disabled?Y:[J(W),...Y]},[J,ae,r,Y,W,H,fe]),xe=e=>[...e].sort((e,t)=>B(e,t,{searchValue:W})).map(e=>Array.isArray(e.options)?{...e,options:e.options.length>0?xe(e.options):e.options}:e),Se=K.useMemo(()=>B?xe(be):be,[be,B,W]),X=K.useMemo(()=>we(Se,{fieldNames:H,childrenAsData:ce}),[Se,H,ce]),Ee=e=>{let t=me(e);if(ge(t),M&&(t.length!==q.length||t.some((e,t)=>q[t]?.value!==e?.value))){let e=j?t.map(({label:e,value:t})=>({label:e,value:t})):t.map(e=>e.value),n=t.map(e=>Te(_e(e.value)));M(se?e:e[0],se?n:n[0])}},[De,Oe]=K.useState(null),[ke,Z]=K.useState(0),Ae=S===void 0?r!==`combobox`:S,je=K.useRef(),Me=K.useCallback((e,t,{source:n=`keyboard`}={})=>{Z(t),a&&r===`combobox`&&e!==null&&n===`keyboard`&&Oe(String(e));let i=Promise.resolve().then(()=>{je.current===i&&g?.(e)});je.current=i},[a,r,g]),Q=(e,t,n)=>{let r=()=>{let t=_e(e);return[j?{label:t?.[H.label],value:e}:e,Te(t)]};if(t&&m){let[e,t]=r();m(e,t)}else if(!t&&h&&n!==`clear`){let[e,t]=r();h(e,t)}},Ie=Gt((e,t)=>{let n,i=!se||t.selected;n=i?se?[...q,e]:[e]:q.filter(t=>t.value!==e),Ee(n),Q(e,i),r===`combobox`?Oe(``):(!Qe||ie)&&(U(``),Oe(``))}),Le=(e,t)=>{Ee(e);let{type:n,values:r}=t;(n===`remove`||n===`clear`)&&r.forEach(e=>{Q(e.value,!1,n)})},Re=(e,t)=>{if(U(e),Oe(null),t.source===`submit`){let t=(e||``).trim();if(t){if(fe.get(t)?.disabled){U(``);return}let e=Array.from(new Set([...ye,t]));Ee(e),Q(t,!0),U(``)}return}t.source!==`blur`&&(r===`combobox`&&Ee(e),re?.(e))},ze=e=>{let t=e;r!==`tags`&&(t=e.map(e=>G.get(e)?.value).filter(e=>e!==void 0)),r===`tags`&&(t=t.filter(e=>!fe.get(e)?.disabled));let n=Array.from(new Set([...ye,...t]));Ee(n),n.forEach(e=>{Q(e,!0)})},Be=K.useMemo(()=>{let e=w!==!1&&_!==!1;return{...de,flattenOptions:X,onActiveValue:Me,defaultActiveFirstOption:Ae,onSelect:Ie,menuItemSelectedIcon:C,rawValues:ye,fieldNames:H,virtual:e,direction:T,listHeight:E,listItemHeight:D,childrenAsData:ce,maxCount:N,optionRender:b,classNames:P,styles:F}},[N,de,X,Me,Ae,Ie,C,ye,H,w,_,T,E,D,ce,b,P,F]);return K.createElement($.Provider,{value:Be},K.createElement($e,qt({},I,{id:oe,prefixCls:i,ref:t,omitDomProps:Jt,mode:r,classNames:P,styles:F,displayValues:ve,onDisplayValuesChange:Le,maxCount:N,direction:T,showSearch:ee,searchValue:W,onSearch:Re,autoClearSearchValue:ie,onSearchSplit:ze,popupMatchSelectWidth:_,OptionList:Rt,emptyOptions:!X.length,activeValue:De,activeDescendantId:`${oe}_list_${ke}`})))});Xt.Option=tt,Xt.OptGroup=et;var Zt=Xt;function Qt(e,t,n){return e===!1?null:e===!0?n:e&&e[t]!==void 0?e[t]:n}var $t=e=>{let{componentName:t}=e,{getPrefixCls:n}=(0,K.useContext)(f),r=n(`empty`);switch(t){case`Table`:case`List`:return K.createElement(G,{image:G.PRESENTED_IMAGE_SIMPLE});case`Select`:case`TreeSelect`:case`Cascader`:case`Transfer`:case`Mentions`:return K.createElement(G,{image:G.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case`Table.filter`:return null;default:return K.createElement(G,null)}},en=e=>{let t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e===`scroll`?`scroll`:`visible`,dynamicInset:!0};return{bottomLeft:{...t,points:[`tl`,`bl`],offset:[0,4]},bottomRight:{...t,points:[`tr`,`br`],offset:[0,4]},topLeft:{...t,points:[`bl`,`tl`],offset:[0,-4]},topRight:{...t,points:[`br`,`tr`],offset:[0,-4]}}};function tn(e,t){return e||en(t)}var nn=e=>{let{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:i}=e;return{position:`relative`,display:`block`,minHeight:t,padding:i,color:e.colorText,fontWeight:`normal`,fontSize:n,lineHeight:r,boxSizing:`border-box`}},rn=e=>{let{antCls:t,componentCls:n}=e,a=`${n}-item`,o=`&${t}-slide-up-enter${t}-slide-up-enter-active`,s=`&${t}-slide-up-appear${t}-slide-up-appear-active`,c=`&${t}-slide-up-leave${t}-slide-up-leave-active`,l=`${n}-dropdown-placement-`,u=`${a}-option-selected`;return[{[`${n}-dropdown`]:{...T(e),position:`absolute`,top:-9999,zIndex:e.zIndexPopup,boxSizing:`border-box`,padding:e.paddingXXS,overflow:`hidden`,fontSize:e.fontSize,fontVariant:`initial`,backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,[` + ${o}${l}bottomLeft, + ${s}${l}bottomLeft + `]:{animationName:d},[` + ${o}${l}topLeft, + ${s}${l}topLeft, + ${o}${l}topRight, + ${s}${l}topRight + `]:{animationName:i},[`${c}${l}bottomLeft`]:{animationName:P},[` + ${c}${l}topLeft, + ${c}${l}topRight + `]:{animationName:v},"&-hidden":{display:`none`},[a]:{...nn(e),cursor:`pointer`,transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:`default`},"&-option":{display:`flex`,"&-content":{flex:`auto`,...r},"&-state":{flex:`none`,display:`flex`,alignItems:`center`},[`&-selected:not(${a}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${a}-option-state`]:{color:e.colorPrimary}},[`&-active:not(${a}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected${a}-option-active:not(${a}-option-disabled)`]:{backgroundColor:e.controlItemBgActiveHover},"&-disabled":{[`&${a}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:`not-allowed`},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{...nn(e),color:e.colorTextDisabled}},[`${u}:has(+ ${u})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${u}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:`rtl`}}},ie(e,`slide-up`),ie(e,`slide-down`),de(e,`move-up`),de(e,`move-down`)]},an=e=>{let{antCls:t,componentCls:n}=e,r={background:`transparent`},i=[`> input[disabled]`,`> textarea[disabled]`,`> ${n}-input`,`> ${t}-input-affix-wrapper-disabled`,`> ${t}-input-search`].join(`, `);return{[`&${n}-customize`]:{border:0,padding:0,fontSize:`inherit`,lineHeight:`inherit`,[`${n}-placeholder`]:{display:`none`},[`${n}-content`]:{margin:0,padding:0,"&-value":{display:`none`}},[`&${n}-disabled ${n}-content`]:{[i]:r,"input[disabled], textarea[disabled]":r}}}},on=4,sn=e=>{let{componentCls:t,calc:n,iconCls:i,paddingXS:a,paddingXXS:o,INTERNAL_FIXED_ITEM_MARGIN:s,lineWidth:c,colorIcon:l,colorIconHover:u,inputPaddingHorizontalBase:d,antCls:f}=e,[p,m]=_(f,`select`);return{"&-multiple":{[p(`multi-item-background`)]:e.multipleItemBg,[p(`multi-item-border-color`)]:`transparent`,[p(`multi-item-border-radius`)]:e.borderRadiusSM,[p(`multi-item-height`)]:e.multipleItemHeight,[p(`multi-padding-base`)]:`calc((${m(`height`)} - ${m(`multi-item-height`)}) / 2)`,[p(`multi-padding-vertical`)]:`calc(${m(`multi-padding-base`)} - ${s} - ${c})`,[p(`multi-item-padding-horizontal`)]:`calc(${d} - ${m(`multi-padding-vertical`)} - ${c} * 2)`,paddingBlock:m(`multi-padding-vertical`),paddingInlineStart:`calc(${m(`multi-padding-base`)} - ${c})`,[`${t}-prefix`]:{marginInlineStart:m(`multi-item-padding-horizontal`)},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:`absolute`,lineHeight:m(`line-height`),insetInlineStart:m(`multi-item-padding-horizontal`),width:`calc(100% - ${m(`multi-item-padding-horizontal`)})`,top:`50%`,transform:`translateY(-50%)`},[`${t}-content`]:{flexWrap:`wrap`,alignItems:`center`,lineHeight:1,"&-item-prefix":{height:m(`font-size`)},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${on}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix, + ${t}-content-item-suffix:first-child`]:{marginInlineStart:m(`multi-item-padding-horizontal`)},[`${t}-selection-item`]:{lineHeight:`calc(${m(`multi-item-height`)} - ${c} * 2)`,border:`${c} solid ${m(`multi-item-border-color`)}`,display:`flex`,marginBlock:s,marginInlineEnd:n(s).mul(2).equal(),background:m(`multi-item-background`),borderRadius:m(`multi-item-border-radius`),paddingInlineStart:a,paddingInlineEnd:o,transition:[`height`,`line-height`,`padding`].map(t=>`${t} ${e.motionDurationSlow}`).join(`,`),"&-content":{...r,marginInlineEnd:o},"&-remove":{...h(),display:`inline-flex`,alignItems:`center`,color:l,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${i}`]:{verticalAlign:`-0.2em`},"&:hover":{color:u}}},[`${t}-input`]:{lineHeight:n(s).mul(2).add(m(`multi-item-height`)).equal(),width:`calc(var(--select-input-width, 0) * 1px)`,minWidth:on,maxWidth:`100%`,transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[p(`multi-item-height`)]:e.multipleItemHeightSM,[p(`multi-item-border-radius`)]:e.borderRadiusXS},[`&${t}-lg`]:{[p(`multi-item-height`)]:e.multipleItemHeightLG,[p(`multi-item-border-radius`)]:e.borderRadius},[`&${t}-filled`]:{[p(`multi-item-border-color`)]:e.colorSplit,[p(`multi-item-background`)]:e.colorBgContainer,[`&${t}-disabled`]:{[p(`multi-item-border-color`)]:`transparent`}}}}},cn=(e,t)=>{let{componentCls:n,antCls:r}=e,[i]=_(r,`select`),{border:a,borderHover:o,borderActive:s,borderOutline:c}=t,l=t.background||e.selectorBg||e.colorBgContainer;return{[i(`border-color`)]:a,[i(`background-color`)]:l,[i(`affix-color`)]:t.affixColor,[`&:not(${n}-disabled)`]:{"&:hover":{[i(`border-color`)]:o,[i(`background-color`)]:t.backgroundHover||l},[`&${n}-focused`]:{[i(`border-color`)]:s,[i(`background-color`)]:t.backgroundActive||l,boxShadow:`0 0 0 ${p(e.controlOutlineWidth)} ${c}`}},[`&${n}-disabled`]:{[i(`border-color`)]:t.borderDisabled||t.border,[i(`background-color`)]:t.backgroundDisabled||t.background}}},ln=(e,t,n,r,i,a)=>{let{componentCls:o}=e;return{[`&${o}-${t}`]:[cn(e,n),{[`&${o}-status-error`]:cn(e,{...n,...r}),[`&${o}-status-warning`]:cn(e,{...n,...i})},a]}},un=(e,t)=>({outline:`${p(e.lineWidth)} ${e.lineType} ${t}`,outlineOffset:p(e.calc(e.lineWidth).mul(-1).equal()),transition:[`outline-offset`,`outline`].map(e=>`${e} 0s`).join(`, `)}),dn=e=>{let{componentCls:t,fontHeight:n,controlHeight:i,fontSizeIcon:a,showArrowPaddingInlineEnd:o,iconCls:s,antCls:c,max:l,calc:u}=e,[d,f]=_(c,`select`),p=l(u(o).sub(a).equal(),0);return{[t]:[{[d(`border-radius`)]:e.borderRadius,[d(`border-color`)]:`#000`,[d(`border-size`)]:e.lineWidth,[d(`background-color`)]:e.colorBgContainer,[d(`font-size`)]:e.fontSize,[d(`line-height`)]:e.lineHeight,[d(`font-height`)]:n,[d(`color`)]:e.colorText,[d(`affix-color`)]:e.colorText,[d(`height`)]:i,[d(`padding-horizontal`)]:u(e.paddingSM).sub(e.lineWidth).equal(),[d(`padding-vertical`)]:`calc((${f(`height`)} - ${f(`font-height`)}) / 2 - ${f(`border-size`)})`,...T(e),display:`inline-flex`,flexWrap:`nowrap`,position:`relative`,transition:`all ${e.motionDurationSlow}`,alignItems:`flex-start`,outline:0,cursor:`pointer`,borderRadius:f(`border-radius`),borderWidth:f(`border-size`),borderStyle:e.lineType,borderColor:f(`border-color`),background:f(`background-color`),fontSize:f(`font-size`),lineHeight:f(`line-height`),color:f(`color`),paddingInline:f(`padding-horizontal`),paddingBlock:f(`padding-vertical`),[`${t}-prefix`]:{color:f(`affix-color`),flex:`none`,lineHeight:1},[`${t}-placeholder`]:{...r,color:e.colorTextPlaceholder,pointerEvents:`none`,zIndex:1},[`${t}-content`]:{flex:`auto`,minWidth:0,position:`relative`,display:`flex`,marginInlineEnd:p,"&:before":{content:`"\\a0"`,width:0,overflow:`hidden`},"&-value":{visibility:`inherit`},"input[readonly]":{cursor:`inherit`,caretColor:`transparent`}},[`${t}-suffix`]:{flex:`none`,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:`center`,[s]:{verticalAlign:`top`}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:`not-allowed`,input:{cursor:`not-allowed`}},"&-sm":{[d(`height`)]:e.controlHeightSM,[d(`padding-horizontal`)]:u(e.paddingXS).sub(e.lineWidth).equal(),[d(`border-radius`)]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:f(`padding-horizontal`)}},"&-lg":{[d(`height`)]:e.controlHeightLG,[d(`font-size`)]:e.fontSizeLG,[d(`line-height`)]:e.lineHeightLG,[d(`font-height`)]:e.fontHeightLG,[d(`border-radius`)]:e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:`none`,background:`transparent`,appearance:`none`,border:0,margin:0,padding:0,color:f(`color`),fontFamily:`inherit`,fontSize:`inherit`,"&::-webkit-search-cancel-button":{display:`none`,appearance:`none`}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:`absolute`,inset:0,lineHeight:`inherit`},[`${t}-content`]:{...r,alignSelf:`center`,"&-has-value":{display:`block`,"&:before":{display:`none`}},"&-has-search-value":{color:`transparent`,[`> *:not(${t}-input)`]:{opacity:0}},"&-value":{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1,opacity:1}},[`&${t}-open ${t}-content`]:{"&-has-value":{opacity:.25},"&-has-search-value":{opacity:1,transition:`opacity ${e.motionDurationMid} ${e.motionEaseInOut}`,color:`transparent`,[`> *:not(${t}-input)`]:{opacity:0}}}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:`text`}},sn(e),ln(e,`outlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorBorderHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline,affixColor:e.colorErrorAffix},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline,affixColor:e.colorWarningAffix}),ln(e,`filled`,{border:`transparent`,borderHover:`transparent`,borderActive:e.activeBorderColor,borderOutline:`transparent`,borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{color:e.colorErrorText,background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),ln(e,`borderless`,{border:`transparent`,borderHover:`transparent`,borderActive:`transparent`,borderOutline:`transparent`,background:`transparent`},{},{},{[`&:not(${t}-disabled):has(input:focus-visible), &:not(${t}-disabled):has(textarea:focus-visible)`]:un(e,e.activeBorderColor),[`&${t}-status-error:not(${t}-disabled):has(input:focus-visible), &${t}-status-error:not(${t}-disabled):has(textarea:focus-visible)`]:un(e,e.colorError),[`&${t}-status-warning:not(${t}-disabled):has(input:focus-visible), &${t}-status-warning:not(${t}-disabled):has(textarea:focus-visible)`]:un(e,e.colorWarning)}),ln(e,`underlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:`transparent`},{border:e.colorError,borderHover:e.colorErrorBorderHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:`transparent`,borderInlineColor:`transparent`}),an(e)]}},fn=e=>{let{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:a,controlHeightLG:o,paddingXXS:s,controlPaddingHorizontal:c,zIndexPopupBase:l,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:h,colorBgContainerDisabled:g,colorTextDisabled:_,colorPrimaryHover:v,colorPrimary:y,controlOutline:b}=e,x=s*2,S=r*2,C=Math.min(i-x,i-S),w=Math.min(a-x,a-S),T=Math.min(o-x,o-S);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:l+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(i-t*n)/2}px ${c}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:m,clearBg:m,singleItemHeightLG:o,multipleItemBg:h,multipleItemBorderColor:`transparent`,multipleItemHeight:C,multipleItemHeightSM:w,multipleItemHeightLG:T,multipleSelectorBgDisabled:g,multipleItemColorDisabled:_,multipleItemBorderColorDisabled:`transparent`,showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:v,activeBorderColor:y,activeOutlineColor:b,selectAffixPadding:s}},pn=e=>{let{antCls:t,componentCls:n,motionDurationMid:i,inputPaddingHorizontalBase:a}=e,o={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:`50%`}};return{[n]:{...T(e),[`${n}-selection-item`]:{flex:1,fontWeight:`normal`,position:`relative`,userSelect:`none`,...r,[`> ${t}-typography`]:{display:`inline`}},[`${n}-prefix`]:{flex:`none`,marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:`absolute`,top:`50%`,insetInlineStart:`auto`,insetInlineEnd:a,zIndex:1,display:`inline-block`,width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,cursor:`pointer`,opacity:0,transition:[`color`,`opacity`].map(e=>`${e} ${i} ease`).join(`, `),textRendering:`auto`,transform:`translateZ(0)`,"&:before":{display:`block`},"&:hover":{color:e.colorIcon}},"@media(hover:none)":o,"&:hover":o},[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(a).add(e.fontSize).add(e.paddingXS).equal()}}}}}},mn=e=>{let{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:`100%`}}},pn(e),rn(e),{[`${t}-rtl`]:{direction:`rtl`}},o(e,{focusElCls:`${t}-focused`})]},hn=b(`Select`,(e,{rootPrefixCls:t})=>{let n=R(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[mn(n),dn(n)]},fn,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});function gn({suffixIcon:e,contextSuffixIcon:t,clearIcon:n,contextClearIcon:r,menuItemSelectedIcon:i,contextMenuItemSelectedIcon:a,removeIcon:o,contextRemoveIcon:s,loading:c,loadingIcon:l,contextLoadingIcon:u,searchIcon:d,contextSearchIcon:f,multiple:p,hasFeedback:m,showSuffixIcon:h,feedbackIcon:g,showArrow:_,componentName:v}){return K.useMemo(()=>{let v=U(n,r,K.createElement(H,null)),y=t=>e===null&&!m&&!_?null:K.createElement(K.Fragment,null,h!==!1&&t,m&&g),b=null;b=e===void 0?c?y(U(l,u,K.createElement(M,{spin:!0}))):({open:e,showSearch:n})=>y(e&&n?U(d,f,K.createElement(me,null)):U(t,K.createElement(pe,null))):y(e);let x=U(i,a,p?K.createElement(W,null):null),S=U(o,s,K.createElement(ue,null));return{clearIcon:v,suffixIcon:b,itemIcon:x,removeIcon:S}},[e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_])}function _n(e){return K.useMemo(()=>{if(e)return(...t)=>K.createElement(se,{space:!0},e.apply(void 0,t))},[e])}function vn(e,t){return t===void 0?e!==null:t}var yn=`SECRET_COMBOBOX_MODE_DO_NOT_USE`,bn=K.forwardRef((e,t)=>{let{prefixCls:r,bordered:i,className:a,rootClassName:o,getPopupContainer:s,popupClassName:c,dropdownClassName:l,listHeight:u=256,placement:d,listItemHeight:p,size:h,disabled:_,notFoundContent:v,status:b,builtinPlacements:x,dropdownMatchSelectWidth:S,popupMatchSelectWidth:T,direction:D,style:O,allowClear:A,variant:j,popupStyle:M,dropdownStyle:P,transitionName:F,tagRender:ee,maxCount:te,prefix:L,dropdownRender:ne,popupRender:R,onDropdownVisibleChange:z,onOpenChange:V,styles:ie,classNames:se,clearIcon:H,showSearch:ue,...U}=e,{getPopupContainer:W,getPrefixCls:de,renderEmpty:fe,direction:G,virtual:pe,popupMatchSelectWidth:me,popupOverflow:he}=K.useContext(f),{showSearch:ge,allowClear:q,style:_e,styles:ve,className:ye,classNames:J,clearIcon:Y,loadingIcon:be,menuItemSelectedIcon:xe,removeIcon:Se,suffixIcon:Ce}=ae(`select`),[,we]=k(),Te=p??we?.controlHeight,X=de(`select`,r),Ee=de(),De=D??G,{compactSize:Oe,compactItemClassnames:ke}=C(X,De),[Z,Ae]=I(`select`,j,i),je=re(X),[Me,Q]=hn(X,je),$=K.useMemo(()=>{let{mode:t}=e;if(t!==`combobox`)return t===yn?`combobox`:t},[e.mode]),Ne=$===`multiple`||$===`tags`,Pe=vn(e.suffixIcon,e.showArrow),Fe=T??S??me,Ie=_n(R||ne),Le=V||z,{status:Re,hasFeedback:ze,isFormItemInput:Be,feedbackIcon:Ve}=K.useContext(N),He=oe(Re,b),Ue;Ue=v===void 0?$===`combobox`?null:fe?.(`Select`)||K.createElement($t,{componentName:`Select`}):v;let{suffixIcon:We,itemIcon:Ge,removeIcon:Ke,clearIcon:qe}=gn({...U,multiple:Ne,hasFeedback:ze,feedbackIcon:Ve,showSuffixIcon:Pe,prefixCls:X,componentName:`Select`,clearIcon:H,searchIcon:Qt(ue,`searchIcon`),contextClearIcon:Y,contextLoadingIcon:be,contextMenuItemSelectedIcon:xe,contextRemoveIcon:Se,contextSearchIcon:Qt(ge,`searchIcon`),contextSuffixIcon:Ce}),Je=A??q,Ye=Je===!0?{clearIcon:qe}:Je,Xe=ue??ge,Ze=w(U,[`suffixIcon`,`itemIcon`]),Qe=m(e=>h??Oe??e),$e=K.useContext(E),et=_??$e,tt={...e,variant:Z,status:He,disabled:et,size:Qe},nt=g(_e),rt=g(O),[it,at]=B([J,se],[ve,nt,ie,rt],{props:tt},{popup:{_default:`root`}}),ot=y(it.popup.root,c,l,{[`${X}-dropdown-${De}`]:De===`rtl`},o,Q,je,Me),st={...at.popup?.root,...M??P},ct=y({[`${X}-lg`]:Qe===`large`,[`${X}-sm`]:Qe===`small`,[`${X}-rtl`]:De===`rtl`,[`${X}-${Z}`]:Ae,[`${X}-in-form-item`]:Be},ce(X,He,ze),ke,ye,a,it.root,o,Q,je,Me),lt=K.useMemo(()=>d===void 0?De===`rtl`?`bottomRight`:`bottomLeft`:d,[d,De]),[ut]=le(`SelectLike`,at.popup.root?.zIndex??st.zIndex);return K.createElement(Zt,{ref:t,virtual:pe,classNames:it,styles:at,showSearch:Xe,...Ze,style:at.root,popupMatchSelectWidth:Fe,transitionName:n(Ee,`slide-up`,F),builtinPlacements:tn(x,he),listHeight:u,listItemHeight:Te,mode:$,prefixCls:X,placement:lt,direction:De,prefix:L,suffixIcon:We,menuItemSelectedIcon:Ge,removeIcon:Ke,allowClear:Ye,notFoundContent:Ue,className:ct,getPopupContainer:s||W,popupClassName:ot,disabled:et,popupStyle:{...at.popup.root,...st,zIndex:ut},maxCount:Ne?te:void 0,tagRender:Ne?ee:void 0,popupRender:Ie,onPopupVisibleChange:Le})}),xn=fe(bn,`popupAlign`);bn.SECRET_COMBOBOX_MODE_DO_NOT_USE=yn,bn.Option=tt,bn.OptGroup=et,bn._InternalPanelDoNotUseOrYouWillBeFired=xn;var Sn=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z`}}]},name:`double-left`,theme:`outlined`}}))());function Cn(){return Cn=Object.assign?Object.assign.bind():function(e){for(var t=1;tK.createElement(c,Cn({},e,{ref:t,icon:Sn.default}))),Tn=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z`}}]},name:`double-right`,theme:`outlined`}}))());function En(){return En=Object.assign?Object.assign.bind():function(e){for(var t=1;tK.createElement(c,En({},e,{ref:t,icon:Tn.default})));export{_n as a,tn as c,$e as d,q as f,vn as i,$t as l,wn as n,gn as o,bn as r,hn as s,Dn as t,Pt as u}; \ No newline at end of file diff --git a/public/assets/DownOutlined-DUvTsWMS.js b/public/assets/DownOutlined-DUvTsWMS.js new file mode 100644 index 0000000..3a27b98 --- /dev/null +++ b/public/assets/DownOutlined-DUvTsWMS.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z`}}]},name:`down`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/DownloadOutlined-CA51LTon.js b/public/assets/DownloadOutlined-CA51LTon.js new file mode 100644 index 0000000..6e5c0c5 --- /dev/null +++ b/public/assets/DownloadOutlined-CA51LTon.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`download`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/EnvironmentOutlined-HLlZltIr.js b/public/assets/EnvironmentOutlined-HLlZltIr.js new file mode 100644 index 0000000..00c06b5 --- /dev/null +++ b/public/assets/EnvironmentOutlined-HLlZltIr.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 289.1a362.49 362.49 0 00-79.9-115.7 370.83 370.83 0 00-118.2-77.8C610.7 76.6 562.1 67 512 67c-50.1 0-98.7 9.6-144.5 28.5-44.3 18.3-84 44.5-118.2 77.8A363.6 363.6 0 00169.4 289c-19.5 45-29.4 92.8-29.4 142 0 70.6 16.9 140.9 50.1 208.7 26.7 54.5 64 107.6 111 158.1 80.3 86.2 164.5 138.9 188.4 153a43.9 43.9 0 0022.4 6.1c7.8 0 15.5-2 22.4-6.1 23.9-14.1 108.1-66.8 188.4-153 47-50.4 84.3-103.6 111-158.1C867.1 572 884 501.8 884 431.1c0-49.2-9.9-97-29.4-142zM512 880.2c-65.9-41.9-300-207.8-300-449.1 0-77.9 31.1-151.1 87.6-206.3C356.3 169.5 431.7 139 512 139s155.7 30.5 212.4 85.9C780.9 280 812 353.2 812 431.1c0 241.3-234.1 407.2-300 449.1zm0-617.2c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 551c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 439c0-29.9 11.7-58 32.8-79.2C454 338.6 482.1 327 512 327c29.9 0 58 11.6 79.2 32.8C612.4 381 624 409.1 624 439c0 29.9-11.6 58-32.8 79.2z`}}]},name:`environment`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/ExclamationCircleFilled-BF18pnJ8.js b/public/assets/ExclamationCircleFilled-BF18pnJ8.js new file mode 100644 index 0000000..aa28bbb --- /dev/null +++ b/public/assets/ExclamationCircleFilled-BF18pnJ8.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`exclamation-circle`,theme:`filled`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/ExclamationCircleFilled-gmOeErIU.js b/public/assets/ExclamationCircleFilled-gmOeErIU.js deleted file mode 100644 index 2db2cad..0000000 --- a/public/assets/ExclamationCircleFilled-gmOeErIU.js +++ /dev/null @@ -1 +0,0 @@ -import{Er as e,Or as t,Tn as n,Tr as r}from"./jsx-runtime-NwRKtVrk.js";var i=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z`}}]},name:`check-circle`,theme:`filled`}})),a=t(r()),o=t(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(n,s({},e,{ref:t,icon:o.default}))),l=t(e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z`}}]},name:`close-circle`,theme:`filled`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(n,u({},e,{ref:t,icon:l.default}))),f=t(e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`exclamation-circle`,theme:`filled`}}))());function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(n,p({},e,{ref:t,icon:f.default})));export{d as n,c as r,m as t}; \ No newline at end of file diff --git a/public/assets/EyeOutlined-DUuSYbtj.js b/public/assets/EyeOutlined-DUuSYbtj.js new file mode 100644 index 0000000..488c288 --- /dev/null +++ b/public/assets/EyeOutlined-DUuSYbtj.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z`}}]},name:`eye`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/FileDoneOutlined-CuI9m5l0.js b/public/assets/FileDoneOutlined-CuI9m5l0.js new file mode 100644 index 0000000..fe3f5ab --- /dev/null +++ b/public/assets/FileDoneOutlined-CuI9m5l0.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z`}}]},name:`audit`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default}))),l=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z`}}]},name:`export`,theme:`outlined`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,u({},e,{ref:t,icon:l.default}))),f=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zm-392 88c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm376 116c-119.3 0-216 96.7-216 216s96.7 216 216 216 216-96.7 216-216-96.7-216-216-216zm107.5 323.5C750.8 868.2 712.6 884 672 884s-78.8-15.8-107.5-44.5C535.8 810.8 520 772.6 520 732s15.8-78.8 44.5-107.5C593.2 595.8 631.4 580 672 580s78.8 15.8 107.5 44.5C808.2 653.2 824 691.4 824 732s-15.8 78.8-44.5 107.5zM761 656h-44.3c-2.6 0-5 1.2-6.5 3.3l-63.5 87.8-23.1-31.9a7.92 7.92 0 00-6.5-3.3H573c-6.5 0-10.3 7.4-6.5 12.7l73.8 102.1c3.2 4.4 9.7 4.4 12.9 0l114.2-158c3.9-5.3.1-12.7-6.4-12.7zM440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z`}}]},name:`file-done`,theme:`outlined`}}))());function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,p({},e,{ref:t,icon:f.default})));export{d as n,c as r,m as t}; \ No newline at end of file diff --git a/public/assets/FileOutlined-e-Jre-Gv.js b/public/assets/FileOutlined-e-Jre-Gv.js new file mode 100644 index 0000000..f48344e --- /dev/null +++ b/public/assets/FileOutlined-e-Jre-Gv.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/ImageUploader-CHryWmjJ.js b/public/assets/ImageUploader-CHryWmjJ.js deleted file mode 100644 index 8ca9e54..0000000 --- a/public/assets/ImageUploader-CHryWmjJ.js +++ /dev/null @@ -1,81 +0,0 @@ -import{Er as e,It as t,Or as n,Tr as r,n as i,t as a}from"./jsx-runtime-NwRKtVrk.js";import{t as o}from"./button-CM-rzMOH.js";import{t as s}from"./upload-CV7KMHYr.js";import{b as c,k as l,s as u,y as d}from"./index-B7MUL4ct.js";import{a as f,n as p,r as m,t as h}from"./tslib.es6-5i5FW2KX.js";var g=e(((e,t)=>{var n=!1,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;function v(){if(!n){n=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),v=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(m=/\b(iPhone|iP[ao]d)/.exec(e),h=/\b(iP[ao]d)/.exec(e),f=/Android/i.exec(e),g=/FBAN\/\w+;/i.exec(e),_=/Mobile/i.exec(e),p=!!/Win64/.exec(e),t){r=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,r&&document&&document.documentMode&&(r=document.documentMode);var y=/(?:Trident\/(\d+.\d+))/.exec(e);c=y?parseFloat(y[1])+4:r,i=t[2]?parseFloat(t[2]):NaN,a=t[3]?parseFloat(t[3]):NaN,o=t[4]?parseFloat(t[4]):NaN,o?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),s=t&&t[1]?parseFloat(t[1]):NaN):s=NaN}else r=i=a=s=o=NaN;if(v){if(v[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);l=b?parseFloat(b[1].replace(`_`,`.`)):!0}else l=!1;u=!!v[2],d=!!v[3]}else l=u=d=!1}}var y={ie:function(){return v()||r},ieCompatibilityMode:function(){return v()||c>r},ie64:function(){return y.ie()&&p},firefox:function(){return v()||i},opera:function(){return v()||a},webkit:function(){return v()||o},safari:function(){return y.webkit()},chrome:function(){return v()||s},windows:function(){return v()||u},osx:function(){return v()||l},linux:function(){return v()||d},iphone:function(){return v()||m},mobile:function(){return v()||m||h||f||_},nativeApp:function(){return v()||g},android:function(){return v()||f},ipad:function(){return v()||h}};t.exports=y})),_=e(((e,t)=>{var n=!!(typeof window<`u`&&window.document&&window.document.createElement);t.exports={canUseDOM:n,canUseWorkers:typeof Worker<`u`,canUseEventListeners:n&&!!(window.addEventListener||window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n}})),v=e(((e,t)=>{var n=_(),r;n.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature(``,``)!==!0);function i(e,t){if(!n.canUseDOM||t&&!(`addEventListener`in document))return!1;var i=`on`+e,a=i in document;if(!a){var o=document.createElement(`div`);o.setAttribute(i,`return;`),a=typeof o[i]==`function`}return!a&&r&&e===`wheel`&&(a=document.implementation.hasFeature(`Events.wheel`,`3.0`)),a}t.exports=i})),y=e(((e,t)=>{var n=g(),r=v(),i=10,a=40,o=800;function s(e){var t=0,n=0,r=0,s=0;return`detail`in e&&(n=e.detail),`wheelDelta`in e&&(n=-e.wheelDelta/120),`wheelDeltaY`in e&&(n=-e.wheelDeltaY/120),`wheelDeltaX`in e&&(t=-e.wheelDeltaX/120),`axis`in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=t*i,s=n*i,`deltaY`in e&&(s=e.deltaY),`deltaX`in e&&(r=e.deltaX),(r||s)&&e.deltaMode&&(e.deltaMode==1?(r*=a,s*=a):(r*=o,s*=o)),r&&!t&&(t=r<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:s}}s.getEventType=function(){return n.firefox()?`DOMMouseScroll`:r(`wheel`)?`wheel`:`mousewheel`},t.exports=s})),b=e(((e,t)=>{t.exports=y()})),x=a(),S=n(r(),1),C=n(b(),1);function w(e,t,n,r,i,a){a===void 0&&(a=0);var o=R(e,t,a),s=o.width,c=o.height,l=Math.min(s,n),u=Math.min(c,r);return l>u*i?{width:u*i,height:u}:{width:l,height:l/i}}function T(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function E(e,t,n,r,i){i===void 0&&(i=0);var a=R(t.width,t.height,i),o=a.width,s=a.height;return{x:D(e.x,o,n.width,r),y:D(e.y,s,n.height,r)}}function D(e,t,n,r){var i=Math.abs(t*r/2-n/2);return z(e,-i,i)}function O(e,t){return Math.sqrt((e.y-t.y)**2+(e.x-t.x)**2)}function k(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function A(e,t,n,r,i,a,o){a===void 0&&(a=0),o===void 0&&(o=!0);var s=o?j:M,c=R(t.width,t.height,a),l=R(t.naturalWidth,t.naturalHeight,a),u={x:s(100,((c.width-n.width/i)/2-e.x/i)/c.width*100),y:s(100,((c.height-n.height/i)/2-e.y/i)/c.height*100),width:s(100,n.width/c.width*100/i),height:s(100,n.height/c.height*100/i)},d=Math.round(s(l.width,u.width*l.width/100)),f=Math.round(s(l.height,u.height*l.height/100)),p=l.width>=l.height*r?{width:Math.round(f*r),height:f}:{width:d,height:Math.round(d/r)};return{croppedAreaPercentages:u,croppedAreaPixels:h(h({},p),{x:Math.round(s(l.width-p.width,u.x*l.width/100)),y:Math.round(s(l.height-p.height,u.y*l.height/100))})}}function j(e,t){return Math.min(e,Math.max(0,t))}function M(e,t){return t}function N(e,t,n,r,i,a){var o=R(t.width,t.height,n),s=z(r.width/o.width*(100/e.width),i,a);return{crop:{x:s*o.width/2-r.width/2-o.width*s*(e.x/100),y:s*o.height/2-r.height/2-o.height*s*(e.y/100)},zoom:s}}function P(e,t,n){var r=T(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}function F(e,t,n,r,i,a){n===void 0&&(n=0);var o=R(t.naturalWidth,t.naturalHeight,n),s=z(P(e,t,r),i,a),c=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((o.width-e.width)/2-e.x)*c,y:((o.height-e.height)/2-e.y)*c},zoom:s}}function I(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function L(e){return e*Math.PI/180}function R(e,t,n){var r=L(n);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function z(e,t,n){return Math.min(Math.max(e,t),n)}function B(){return[...arguments].filter(function(e){return typeof e==`string`&&e.length>0}).join(` `).trim()}var V=`.reactEasyCrop_Container { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - overflow: hidden; - user-select: none; - touch-action: none; - cursor: move; - display: flex; - justify-content: center; - align-items: center; -} - -.reactEasyCrop_Image, -.reactEasyCrop_Video { - will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */ -} - -.reactEasyCrop_Contain { - max-width: 100%; - max-height: 100%; - margin: auto; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; -} -.reactEasyCrop_Cover_Horizontal { - width: 100%; - height: auto; -} -.reactEasyCrop_Cover_Vertical { - width: auto; - height: 100%; -} - -.reactEasyCrop_CropArea { - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - border: 1px solid rgba(255, 255, 255, 0.5); - box-sizing: border-box; - box-shadow: 0 0 0 9999em; - color: rgba(0, 0, 0, 0.5); - overflow: hidden; -} - -.reactEasyCrop_CropAreaRound { - border-radius: 50%; -} - -.reactEasyCrop_CropAreaGrid::before { - content: ' '; - box-sizing: border-box; - position: absolute; - border: 1px solid rgba(255, 255, 255, 0.5); - top: 0; - bottom: 0; - left: 33.33%; - right: 33.33%; - border-top: 0; - border-bottom: 0; -} - -.reactEasyCrop_CropAreaGrid::after { - content: ' '; - box-sizing: border-box; - position: absolute; - border: 1px solid rgba(255, 255, 255, 0.5); - top: 33.33%; - bottom: 33.33%; - left: 0; - right: 0; - border-left: 0; - border-right: 0; -} -`,H=1,U=3,W=1,G=function(e){m(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cropperRef=S.createRef(),n.imageRef=S.createRef(),n.videoRef=S.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document<`u`?document:null,n.currentWindow=typeof window<`u`?window:null,n.resizeObserver=null,n.previousCropSize=null,n.isInitialized=!1,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(!(window.ResizeObserver===void 0||!n.containerRef)){var e=!0;n.resizeObserver=new window.ResizeObserver(function(t){if(e){e=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener(`mousemove`,n.onMouseMove),n.currentDoc.removeEventListener(`mouseup`,n.onDragStopped),n.currentDoc.removeEventListener(`touchmove`,n.onTouchMove),n.currentDoc.removeEventListener(`touchend`,n.onDragStopped),n.currentDoc.removeEventListener(`gesturechange`,n.onGestureChange),n.currentDoc.removeEventListener(`gestureend`,n.onGestureEnd),n.currentDoc.removeEventListener(`scroll`,n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener(`wheel`,n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.previousCropSize=e,n.emitCropData(),n.setInitialCrop(e),n.isInitialized=!0),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=N(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,i=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(i)}else if(n.props.initialCroppedAreaPixels){var a=F(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=a.crop,i=a.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(i)}},n.computeSizes=function(){var e=n.imageRef.current||n.videoRef.current;if(e&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var t=n.containerRect.width/n.containerRect.height,r=n.imageRef.current?.naturalWidth||n.videoRef.current?.videoWidth||0,i=n.imageRef.current?.naturalHeight||n.videoRef.current?.videoHeight||0,a=e.offsetWidtho?{width:n.containerRect.height*o,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/o};break;case`horizontal-cover`:s={width:n.containerRect.width,height:n.containerRect.width/o};break;case`vertical-cover`:s={width:n.containerRect.height*o,height:n.containerRect.height};break}else s={width:e.offsetWidth,height:e.offsetHeight};n.mediaSize=h(h({},s),{naturalWidth:r,naturalHeight:i}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var c=n.props.cropSize?n.props.cropSize:w(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(n.state.cropSize?.height!==c.height||n.state.cropSize?.width!==c.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(c),n.setState({cropSize:c},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(c),c}},n.saveContainerPosition=function(){if(n.containerRef){var e=n.containerRef.getBoundingClientRect();n.containerPosition={x:e.left,y:e.top}}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener(`mousemove`,n.onMouseMove),n.currentDoc.addEventListener(`mouseup`,n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onScroll=function(e){n.currentDoc&&(e.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(e))&&(n.currentDoc.addEventListener(`touchmove`,n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener(`touchend`,n.onDragStopped),n.saveContainerPosition(),e.touches.length===2?n.onPinchStart(e):e.touches.length===1&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),e.touches.length===2?n.onPinchMove(e):e.touches.length===1&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener(`gesturechange`,n.onGestureChange),n.currentDoc.addEventListener(`gestureend`,n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureChange=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),i=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(i,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var a=n.gestureRotationStart+e.rotation;n.props.onRotationChange(a)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,r;n.dragStartPosition={x:e.x,y:e.y},n.dragStartCrop=h({},n.props.crop),(r=(t=n.props).onInteractionStart)==null||r.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(t===void 0||r===void 0)){var e=t-n.dragStartPosition.x,i=r-n.dragStartPosition.y,a={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+i},o=n.props.restrictPosition?E(a,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):a;n.props.onCropChange(o)}}))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(t=(e=n.props).onInteractionEnd)==null||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(e))){e.preventDefault();var r=t.getMousePoint(e),i=(0,C.default)(e).pixelY,a=n.props.zoom-i*n.props.zoomSpeed/200;n.setNewZoom(a,r,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var e;return(e=n.props).onInteractionStart?.call(e)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var e;return(e=n.props).onInteractionEnd?.call(e)})},250)}},n.getPointOnContainer=function(e,t){var r=e.x,i=e.y;if(!n.containerRect)throw Error(`The Cropper is not mounted`);return{x:n.containerRect.width/2-(r-t.x),y:n.containerRect.height/2-(i-t.y)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,i=n.props,a=i.crop,o=i.zoom;return{x:(t+a.x)/o,y:(r+a.y)/o}},n.setNewZoom=function(e,t,r){var i=(r===void 0?{}:r).shouldUpdatePosition,a=i===void 0?!0:i;if(!(!n.state.cropSize||!n.props.onZoomChange)){var o=z(e,n.props.minZoom,n.props.maxZoom);if(a){var s=n.getPointOnContainer(t,n.containerPosition),c=n.getPointOnMedia(s),l={x:c.x*o-s.x,y:c.y*o-s.y},u=n.props.restrictPosition?E(l,n.mediaSize,n.state.cropSize,o,n.props.rotation):l;n.props.onCropChange(u)}n.props.onZoomChange(o)}},n.getCropData=function(){return n.state.cropSize?A(n.props.restrictPosition?E(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.crop;if(n.isInitialized&&n.previousCropSize?.width&&n.previousCropSize?.height&&(Math.abs(n.previousCropSize.width-n.state.cropSize.width)>1e-6||Math.abs(n.previousCropSize.height-n.state.cropSize.height)>1e-6)){var t=n.state.cropSize.width/n.previousCropSize.width,r=n.state.cropSize.height/n.previousCropSize.height;e={x:n.props.crop.x*t,y:n.props.crop.y*r}}var i=n.props.restrictPosition?E(e,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):e;n.previousCropSize=n.state.cropSize,n.props.onCropChange(i),n.emitCropData()}},n.onKeyDown=function(e){var t,r,i=n.props,a=i.crop,o=i.onCropChange,s=i.keyboardStep,c=i.zoom,l=i.rotation,u=s;if(n.state.cropSize){e.shiftKey&&(u*=.2);var d=h({},a);switch(e.key){case`ArrowUp`:d.y-=u,e.preventDefault();break;case`ArrowDown`:d.y+=u,e.preventDefault();break;case`ArrowLeft`:d.x-=u,e.preventDefault();break;case`ArrowRight`:d.x+=u,e.preventDefault();break;default:return}n.props.restrictPosition&&(d=E(d,n.mediaSize,n.state.cropSize,c,l)),e.repeat||(r=(t=n.props).onInteractionStart)==null||r.call(t),o(d)}},n.onKeyUp=function(e){var t,r;switch(e.key){case`ArrowUp`:case`ArrowDown`:case`ArrowLeft`:case`ArrowRight`:e.preventDefault();break;default:return}n.emitCropData(),(r=(t=n.props).onInteractionEnd)==null||r.call(t)},n}return t.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),window.ResizeObserver===void 0&&this.currentWindow.addEventListener(`resize`,this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener(`wheel`,this.onWheel,{passive:!1}),this.containerRef.addEventListener(`gesturestart`,this.onGestureStart)),this.currentDoc.addEventListener(`scroll`,this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement(`style`),this.styleRef.setAttribute(`type`,`text/css`),this.props.nonce&&this.styleRef.setAttribute(`nonce`,this.props.nonce),this.styleRef.innerHTML=V,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var e,t;!this.currentDoc||!this.currentWindow||(window.ResizeObserver===void 0&&this.currentWindow.removeEventListener(`resize`,this.computeSizes),(e=this.resizeObserver)==null||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener(`gesturestart`,this.preventZoomSafari),this.styleRef&&((t=this.styleRef.parentNode)==null||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t;e.rotation===this.props.rotation?e.aspect===this.props.aspect&&e.objectFit===this.props.objectFit?e.zoom===this.props.zoom?e.cropSize?.height!==this.props.cropSize?.height||e.cropSize?.width!==this.props.cropSize?.width?this.computeSizes():(e.crop?.x!==this.props.crop?.x||e.crop?.y!==this.props.crop?.y)&&this.emitCropAreaChange():this.recomputeCropPosition():this.computeSizes():(this.computeSizes(),this.recomputeCropPosition()),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener(`wheel`,this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&((t=this.videoRef.current)==null||t.load());var n=this.getObjectFit();n!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:n},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.getObjectFit=function(){if(this.props.objectFit===`cover`){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var e=this.containerRect.width/this.containerRect.height;return(this.imageRef.current?.naturalWidth||this.videoRef.current?.videoWidth||0)/(this.imageRef.current?.naturalHeight||this.videoRef.current?.videoHeight||0){let{cropperRef:n,zoomSlider:r,rotationSlider:i,aspectSlider:a,showReset:s,resetBtnText:c,modalImage:u,aspect:d,minZoom:f,maxZoom:p,minAspect:m,maxAspect:h,cropShape:g,showGrid:_,cropperProps:v}=e,[y,b]=(0,S.useState)({x:0,y:0}),[C,w]=(0,S.useState)(q),[T,E]=(0,S.useState)(Y),[D,O]=(0,S.useState)(d),k=(0,S.useRef)({width:0,height:0,x:0,y:0}),A=(0,S.useCallback)((e,t)=>{k.current=t},[]),j=(0,S.useRef)(d);j.current!==d&&(j.current=d,O(d));let M=C!==q||T!==Y||D!==d,N=()=>{w(q),E(Y),O(d)};(0,S.useImperativeHandle)(t,()=>({rotation:T,cropPixelsRef:k,onReset:N}));let P=`[display:flex] [align-items:center] [width:60%] [margin-inline:auto]`,F=`[display:flex] [align-items:center] [justify-content:center] [height:32px] [width:32px] [background:transparent] [border:0] [font-family:inherit] [font-size:18px] [cursor:pointer] disabled:[opacity:20%] disabled:[cursor:default]`,I=`[flex:1]`;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(G,Object.assign({},v,{ref:n,image:u,crop:y,zoom:C,rotation:T,aspect:D,minZoom:f,maxZoom:p,zoomWithScroll:r,cropShape:g,showGrid:_,onCropChange:b,onZoomChange:w,onRotationChange:E,onCropComplete:A,classes:{containerClassName:`${K}-container ![position:relative] [width:100%] [height:40vh] [&~section:first-of-type]:[margin-top:16px] [&~section:last-of-type]:[margin-bottom:16px]`,mediaClassName:`${K}-media`}})),r&&(0,x.jsxs)(`section`,{className:`${K}-control ${K}-control-zoom ${P}`,children:[(0,x.jsx)(`button`,{className:F,onClick:()=>w(+(C-J).toFixed(1)),disabled:C-Jw(+(C+J).toFixed(1)),disabled:C+J>p,children:`+`})]}),i&&(0,x.jsxs)(`section`,{className:`${K}-control ${K}-control-rotation ${P}`,children:[(0,x.jsx)(`button`,{className:`${F} [font-size:16px]`,onClick:()=>E(T-Q),disabled:T===X,children:`↺`}),(0,x.jsx)(l,{className:I,min:X,max:Z,step:Q,value:T,onChange:E}),(0,x.jsx)(`button`,{className:`${F} [font-size:16px]`,onClick:()=>E(T+Q),disabled:T===Z,children:`↻`})]}),a&&(0,x.jsxs)(`section`,{className:`${K}-control ${K}-control-aspect ${P}`,children:[(0,x.jsx)(`button`,{className:F,onClick:()=>O(+(D-$).toFixed(2)),disabled:D-$O(+(D+$).toFixed(2)),disabled:D+$>h,children:`↔`})]}),s&&(r||i||a)&&(0,x.jsx)(o,{className:`[position:absolute] [bottom:20px]`,style:M?{}:{opacity:.3,pointerEvents:`none`},onClick:N,children:c})]})})),te=`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */.visible{visibility:visible}.\\!\\[position\\:relative\\]{position:relative!important}.\\[position\\:absolute\\]{position:absolute}.\\[bottom\\:20px\\]{bottom:20px}.container{width:100%}.\\[margin-inline\\:auto\\]{margin-inline:auto}.\\[display\\:flex\\]{display:flex}.grid{display:grid}.\\[height\\:32px\\]{height:32px}.\\[height\\:40vh\\]{height:40vh}.\\[width\\:32px\\]{width:32px}.\\[width\\:60\\%\\]{width:60%}.\\[width\\:100\\%\\]{width:100%}.\\[flex\\:1\\]{flex:1}.\\[cursor\\:pointer\\]{cursor:pointer}.\\[align-items\\:center\\]{align-items:center}.\\[justify-content\\:center\\]{justify-content:center}.\\[font-family\\:inherit\\]{font-family:inherit}.\\[font-size\\:16px\\]{font-size:16px}.\\[font-size\\:18px\\]{font-size:18px}.\\[background\\:transparent\\]{background:transparent}.\\[border\\:0\\]{border:0}.disabled\\:\\[cursor\\:default\\]{&:disabled{cursor:default}}.disabled\\:\\[opacity\\:20\\%\\]{&:disabled{opacity:20%}}.\\[\\&\\~section\\:first-of-type\\]\\:\\[margin-top\\:16px\\]{&~section:first-of-type{margin-top:16px}}.\\[\\&\\~section\\:last-of-type\\]\\:\\[margin-bottom\\:16px\\]{&~section:last-of-type{margin-bottom:16px}}`;(function(){if(typeof document>`u`)return;let e=document.createElement(`style`),t=document.querySelector(`meta[name="csp-nonce"]`);t&&t.content&&e.setAttribute(`nonce`,t.content),e.textContent=te,document.head.appendChild(e)})();var ne=(e,t)=>{let n=e.split(`.`).map(Number),r=t.split(`.`).map(Number),i=Math.max(n.length,r.length);for(let e=0;ei)return!0;if(t{let{quality:r=.4,fillColor:i=`white`,zoomSlider:a=!0,rotationSlider:o=!1,aspectSlider:c=!1,showReset:l=!1,resetText:u,aspect:m=1,minZoom:h=1,maxZoom:g=3,minAspect:_=.5,maxAspect:v=2,cropShape:y=`rect`,showGrid:b=!1,cropperProps:C,modalClassName:w,modalTitle:T,modalWidth:E,modalOk:D,modalCancel:O,onModalOk:k,onModalCancel:A,modalProps:j,beforeCrop:M,children:N}=e,P=(0,S.useRef)({});P.current.onModalOk=k,P.current.onModalCancel=A,P.current.beforeCrop=M;let F=(0,S.useRef)(null),I=(0,S.useCallback)(e=>{let t=document.createElement(`canvas`),n=t.getContext(`2d`),r=((e?.getRootNode)?.call(e)||document).querySelector(`.${K}-media`),{width:a,height:s,x:c,y:l}=F.current.cropPixelsRef.current;if(o&&F.current.rotation!==Y){let{naturalWidth:e,naturalHeight:o}=r,u=F.current.rotation*(Math.PI/180),d=Math.abs(Math.sin(u)),f=Math.abs(Math.cos(u)),p=e*f+o*d,m=o*f+e*d;t.width=p,t.height=m,n.fillStyle=i,n.fillRect(0,0,p,m);let h=p/2,g=m/2;n.translate(h,g),n.rotate(u),n.translate(-h,-g);let _=(p-e)/2,v=(m-o)/2;n.drawImage(r,0,0,e,o,_,v,e,o);let y=n.getImageData(0,0,p,m);t.width=a,t.height=s,n.putImageData(y,-c,-l)}else t.width=a,t.height=s,n.fillStyle=i,n.fillRect(0,0,a,s),n.drawImage(r,c,l,a,s,0,0,a,s);return t},[i,o]),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(``),V=(0,S.useRef)(void 0),H=(0,S.useRef)(void 0),U=(0,S.useCallback)(e=>p(void 0,[e],void 0,function*({beforeUpload:e,file:t,resolve:n,reject:r}){let i=t;if(typeof e!=`function`){n(i);return}try{let r=yield e(t,[t]);n(r===!1?!1:r!==!0&&r||i)}catch(e){r(e)}}),[]),W=(0,S.useCallback)(e=>((t,n)=>new Promise((i,a)=>p(void 0,void 0,void 0,function*(){let o=t;if(typeof P.current.beforeCrop==`function`)try{let r=yield P.current.beforeCrop(t,n);if(r===!1)return U({beforeUpload:e,file:t,resolve:i,reject:a});r!==!0&&(o=r||t)}catch{return U({beforeUpload:e,file:t,resolve:i,reject:a})}let c=new FileReader;c.addEventListener(`load`,()=>{typeof c.result==`string`&&(R(!0),setTimeout(()=>{B(c.result)},10))}),c.readAsDataURL(o),V.current=()=>{var e,t;R(!1),B(``),F.current.onReset();let n=!1;(t=(e=P.current).onModalCancel)==null||t.call(e,e=>{i(e),n=!0}),n||i(s.LIST_IGNORE)},H.current=t=>p(void 0,void 0,void 0,function*(){R(!1),B(``),F.current.onReset();let n=I(t.target),{type:s,name:c,uid:l}=o;n.toBlob(t=>p(void 0,void 0,void 0,function*(){let n=new File([t],c,{type:s});Object.assign(n,{uid:l}),U({beforeUpload:e,file:n,resolve:e=>{var t,n;i(e),(n=(t=P.current).onModalOk)==null||n.call(t,e)},reject:e=>{var t,n;a(e),(n=(t=P.current).onModalOk)==null||n.call(t,e)}})}),s,r)})}))),[I,r,U]),G=(0,S.useCallback)(e=>{let t=Array.isArray(e)?e[0]:e,n=t.props,{beforeUpload:r,accept:i}=n,a=f(n,[`beforeUpload`,`accept`]);return Object.assign(Object.assign({},t),{props:Object.assign(Object.assign({},a),{accept:i||`image/*`,beforeUpload:W(r)})})},[W]),q=(0,S.useMemo)(()=>{let e={};return E!==void 0&&(e.width=E),D!==void 0&&(e.okText=D),O!==void 0&&(e.cancelText=O),e},[O,D,E]),J=`${K}-modal${w?` ${w}`:``}`,X=(typeof window>`u`?``:window.navigator.language)===`zh-CN`,Z=T||(X?`编辑图片`:`Edit image`),Q=u||(X?`重置`:`Reset`);return(0,x.jsxs)(x.Fragment,{children:[G(N),(0,x.jsx)(d,Object.assign({},j,q,{open:L,title:Z,onCancel:V.current,onOk:H.current,wrapClassName:J,destroyOnHidden:!0},ne(t,`6.3.1`)?{mask:{closable:!1}}:{maskClosable:!0},{children:(0,x.jsx)(ee,{ref:F,cropperRef:n,zoomSlider:a,rotationSlider:o,aspectSlider:c,showReset:l,resetBtnText:Q,modalImage:z,aspect:m,minZoom:h,maxZoom:g,minAspect:_,maxAspect:v,cropShape:y,showGrid:b,cropperProps:C})}))]})}),ie=({action:e,value:t,onChange:n,mode:r=`single`,disabled:a=!1,maxCount:o,maxWidth:l=1920,maxHeight:d=1080,maxSize:f=5,croppable:p=!1,cropperOptions:m})=>{let{t:h}=u(),[g,_]=(0,S.useState)([]),v=(0,S.useMemo)(()=>o||(r===`single`?1:9),[r,o]),y=e=>({uid:e.id?.toString()||`${e.id}`,name:e.file_name||`image-${e.id}`,status:`done`,url:e.preview_url,response:{success:!0,data:e,message:`Upload success`}});(0,S.useEffect)(()=>{if(!t){_([]);return}_((Array.isArray(t)?t:[t]).map(y))},[t]);let b=(0,S.useCallback)(e=>new Promise((t,n)=>{if(!e.type.startsWith(`image/`)){c.error(h(`xin.form.imageUploader.error.notImage`)),n(!1);return}if(!(e.size/1024/1024{let r=document.createElement(`img`);r.src=e.target?.result,r.onload=()=>{let e=r.width<=l,i=r.height<=d;if(!e||!i){c.error(h(`xin.form.imageUploader.error.dimensionExceeded`,{maxWidth:l,maxHeight:d})),n(!1);return}t(!0)},r.onerror=()=>{c.error(h(`xin.form.imageUploader.error.loadFailed`)),n(!1)}},r.onerror=()=>{c.error(h(`xin.form.imageUploader.error.readFailed`)),n(!1)}}),[f,l,d]),C=({fileList:e})=>{if(e.length!==0&&(_(e),e.every(e=>e.status===`done`||e.status===`error`))){let t=e.filter(e=>e.status===`done`&&e.response).map(e=>e.response.data);r===`single`?n?.(t[0]):n?.(t);let i=e.filter(e=>e.status===`error`);_([...t.map(y),...i])}},w=(0,S.useMemo)(()=>(0,x.jsxs)(`button`,{style:{border:0,background:`none`},type:`button`,children:[(0,x.jsx)(i,{}),(0,x.jsx)(`div`,{style:{marginTop:8},children:h(`xin.form.imageUploader.uploadText`)})]}),[h]),T=(0,x.jsx)(s,{listType:`picture-card`,name:`file`,fileList:g,beforeUpload:b,onChange:C,disabled:a,maxCount:v,multiple:r===`multiple`,headers:{Authorization:`Bearer ${localStorage.getItem(`token`)}`},onRemove:e=>{_(g.filter(t=>t.uid!=e.uid))},action:`/index.php`+e,accept:`image/*`,children:g.length>=v?null:w});return(0,x.jsx)(x.Fragment,{children:p&&r===`single`?(0,x.jsx)(re,{...m,children:T}):T})};export{ie as t}; \ No newline at end of file diff --git a/public/assets/ImageUploader-D1JVFGhR.js b/public/assets/ImageUploader-D1JVFGhR.js new file mode 100644 index 0000000..f322345 --- /dev/null +++ b/public/assets/ImageUploader-D1JVFGhR.js @@ -0,0 +1,81 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,_n as r,t as i}from"./jsx-runtime-ADHq9IcL.js";import{t as a}from"./PlusOutlined-W6xCIIXs.js";import{t as o}from"./button-CcpWP-mq.js";import{n as s,t as c}from"./modal-4LQWu5vA.js";import{r as l}from"./PictureOutlined-5m8FAlCn.js";import{t as u}from"./upload-ShUC-jzR.js";import{t as d}from"./useTranslation-DIuTqE8W.js";import{a as f,n as p,r as m,t as h}from"./tslib.es6-5i5FW2KX.js";var g=t(((e,t)=>{var n=!1,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;function v(){if(!n){n=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),v=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(m=/\b(iPhone|iP[ao]d)/.exec(e),h=/\b(iP[ao]d)/.exec(e),f=/Android/i.exec(e),g=/FBAN\/\w+;/i.exec(e),_=/Mobile/i.exec(e),p=!!/Win64/.exec(e),t){r=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,r&&document&&document.documentMode&&(r=document.documentMode);var y=/(?:Trident\/(\d+.\d+))/.exec(e);c=y?parseFloat(y[1])+4:r,i=t[2]?parseFloat(t[2]):NaN,a=t[3]?parseFloat(t[3]):NaN,o=t[4]?parseFloat(t[4]):NaN,o?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),s=t&&t[1]?parseFloat(t[1]):NaN):s=NaN}else r=i=a=s=o=NaN;if(v){if(v[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);l=!b||parseFloat(b[1].replace(`_`,`.`))}else l=!1;u=!!v[2],d=!!v[3]}else l=u=d=!1}}var y={ie:function(){return v()||r},ieCompatibilityMode:function(){return v()||c>r},ie64:function(){return y.ie()&&p},firefox:function(){return v()||i},opera:function(){return v()||a},webkit:function(){return v()||o},safari:function(){return y.webkit()},chrome:function(){return v()||s},windows:function(){return v()||u},osx:function(){return v()||l},linux:function(){return v()||d},iphone:function(){return v()||m},mobile:function(){return v()||m||h||f||_},nativeApp:function(){return v()||g},android:function(){return v()||f},ipad:function(){return v()||h}};t.exports=y})),_=t(((e,t)=>{var n=!!(typeof window<`u`&&window.document&&window.document.createElement);t.exports={canUseDOM:n,canUseWorkers:typeof Worker<`u`,canUseEventListeners:n&&!!(window.addEventListener||window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n}})),v=t(((e,t)=>{var n=_(),r;n.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature(``,``)!==!0);function i(e,t){if(!n.canUseDOM||t&&!(`addEventListener`in document))return!1;var i=`on`+e,a=i in document;if(!a){var o=document.createElement(`div`);o.setAttribute(i,`return;`),a=typeof o[i]==`function`}return!a&&r&&e===`wheel`&&(a=document.implementation.hasFeature(`Events.wheel`,`3.0`)),a}t.exports=i})),y=t(((e,t)=>{var n=g(),r=v(),i=10,a=40,o=800;function s(e){var t=0,n=0,r=0,s=0;return`detail`in e&&(n=e.detail),`wheelDelta`in e&&(n=-e.wheelDelta/120),`wheelDeltaY`in e&&(n=-e.wheelDeltaY/120),`wheelDeltaX`in e&&(t=-e.wheelDeltaX/120),`axis`in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=t*i,s=n*i,`deltaY`in e&&(s=e.deltaY),`deltaX`in e&&(r=e.deltaX),(r||s)&&e.deltaMode&&(e.deltaMode==1?(r*=a,s*=a):(r*=o,s*=o)),r&&!t&&(t=r<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:s}}s.getEventType=function(){return n.firefox()?`DOMMouseScroll`:r(`wheel`)?`wheel`:`mousewheel`},t.exports=s})),b=t(((e,t)=>{t.exports=y()})),x=i(),S=e(n(),1),C=e(b(),1);function w(e,t,n,r,i,a){a===void 0&&(a=0);var o=R(e,t,a),s=o.width,c=o.height,l=Math.min(s,n),u=Math.min(c,r);return l>u*i?{width:u*i,height:u}:{width:l,height:l/i}}function T(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function E(e,t,n,r,i){i===void 0&&(i=0);var a=R(t.width,t.height,i),o=a.width,s=a.height;return{x:D(e.x,o,n.width,r),y:D(e.y,s,n.height,r)}}function D(e,t,n,r){var i=Math.abs(t*r/2-n/2);return z(e,-i,i)}function O(e,t){return Math.sqrt((e.y-t.y)**2+(e.x-t.x)**2)}function k(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function A(e,t,n,r,i,a,o){a===void 0&&(a=0),o===void 0&&(o=!0);var s=o?j:M,c=R(t.width,t.height,a),l=R(t.naturalWidth,t.naturalHeight,a),u={x:s(100,((c.width-n.width/i)/2-e.x/i)/c.width*100),y:s(100,((c.height-n.height/i)/2-e.y/i)/c.height*100),width:s(100,n.width/c.width*100/i),height:s(100,n.height/c.height*100/i)},d=Math.round(s(l.width,u.width*l.width/100)),f=Math.round(s(l.height,u.height*l.height/100)),p=l.width>=l.height*r?{width:Math.round(f*r),height:f}:{width:d,height:Math.round(d/r)};return{croppedAreaPercentages:u,croppedAreaPixels:h(h({},p),{x:Math.round(s(l.width-p.width,u.x*l.width/100)),y:Math.round(s(l.height-p.height,u.y*l.height/100))})}}function j(e,t){return Math.min(e,Math.max(0,t))}function M(e,t){return t}function N(e,t,n,r,i,a){var o=R(t.width,t.height,n),s=z(r.width/o.width*(100/e.width),i,a);return{crop:{x:s*o.width/2-r.width/2-o.width*s*(e.x/100),y:s*o.height/2-r.height/2-o.height*s*(e.y/100)},zoom:s}}function P(e,t,n){var r=T(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}function F(e,t,n,r,i,a){n===void 0&&(n=0);var o=R(t.naturalWidth,t.naturalHeight,n),s=z(P(e,t,r),i,a),c=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((o.width-e.width)/2-e.x)*c,y:((o.height-e.height)/2-e.y)*c},zoom:s}}function I(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function L(e){return e*Math.PI/180}function R(e,t,n){var r=L(n);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function z(e,t,n){return Math.min(Math.max(e,t),n)}function B(){return[...arguments].filter(function(e){return typeof e==`string`&&e.length>0}).join(` `).trim()}var V=`.reactEasyCrop_Container { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + overflow: hidden; + user-select: none; + touch-action: none; + cursor: move; + display: flex; + justify-content: center; + align-items: center; +} + +.reactEasyCrop_Image, +.reactEasyCrop_Video { + will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */ +} + +.reactEasyCrop_Contain { + max-width: 100%; + max-height: 100%; + margin: auto; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; +} +.reactEasyCrop_Cover_Horizontal { + width: 100%; + height: auto; +} +.reactEasyCrop_Cover_Vertical { + width: auto; + height: 100%; +} + +.reactEasyCrop_CropArea { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + border: 1px solid rgba(255, 255, 255, 0.5); + box-sizing: border-box; + box-shadow: 0 0 0 9999em; + color: rgba(0, 0, 0, 0.5); + overflow: hidden; +} + +.reactEasyCrop_CropAreaRound { + border-radius: 50%; +} + +.reactEasyCrop_CropAreaGrid::before { + content: ' '; + box-sizing: border-box; + position: absolute; + border: 1px solid rgba(255, 255, 255, 0.5); + top: 0; + bottom: 0; + left: 33.33%; + right: 33.33%; + border-top: 0; + border-bottom: 0; +} + +.reactEasyCrop_CropAreaGrid::after { + content: ' '; + box-sizing: border-box; + position: absolute; + border: 1px solid rgba(255, 255, 255, 0.5); + top: 33.33%; + bottom: 33.33%; + left: 0; + right: 0; + border-left: 0; + border-right: 0; +} +`,H=1,U=3,W=1,G=function(e){m(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cropperRef=S.createRef(),n.imageRef=S.createRef(),n.videoRef=S.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document<`u`?document:null,n.currentWindow=typeof window<`u`?window:null,n.resizeObserver=null,n.previousCropSize=null,n.isInitialized=!1,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(!(window.ResizeObserver===void 0||!n.containerRef)){var e=!0;n.resizeObserver=new window.ResizeObserver(function(t){if(e){e=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener(`mousemove`,n.onMouseMove),n.currentDoc.removeEventListener(`mouseup`,n.onDragStopped),n.currentDoc.removeEventListener(`touchmove`,n.onTouchMove),n.currentDoc.removeEventListener(`touchend`,n.onDragStopped),n.currentDoc.removeEventListener(`gesturechange`,n.onGestureChange),n.currentDoc.removeEventListener(`gestureend`,n.onGestureEnd),n.currentDoc.removeEventListener(`scroll`,n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener(`wheel`,n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.previousCropSize=e,n.emitCropData(),n.setInitialCrop(e),n.isInitialized=!0),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=N(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,i=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(i)}else if(n.props.initialCroppedAreaPixels){var a=F(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=a.crop,i=a.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(i)}},n.computeSizes=function(){var e=n.imageRef.current||n.videoRef.current;if(e&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var t=n.containerRect.width/n.containerRect.height,r=n.imageRef.current?.naturalWidth||n.videoRef.current?.videoWidth||0,i=n.imageRef.current?.naturalHeight||n.videoRef.current?.videoHeight||0,a=e.offsetWidtho?{width:n.containerRect.height*o,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/o};break;case`horizontal-cover`:s={width:n.containerRect.width,height:n.containerRect.width/o};break;case`vertical-cover`:s={width:n.containerRect.height*o,height:n.containerRect.height};break}else s={width:e.offsetWidth,height:e.offsetHeight};n.mediaSize=h(h({},s),{naturalWidth:r,naturalHeight:i}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var c=n.props.cropSize?n.props.cropSize:w(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(n.state.cropSize?.height!==c.height||n.state.cropSize?.width!==c.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(c),n.setState({cropSize:c},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(c),c}},n.saveContainerPosition=function(){if(n.containerRef){var e=n.containerRef.getBoundingClientRect();n.containerPosition={x:e.left,y:e.top}}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener(`mousemove`,n.onMouseMove),n.currentDoc.addEventListener(`mouseup`,n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onScroll=function(e){n.currentDoc&&(e.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(e))&&(n.currentDoc.addEventListener(`touchmove`,n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener(`touchend`,n.onDragStopped),n.saveContainerPosition(),e.touches.length===2?n.onPinchStart(e):e.touches.length===1&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),e.touches.length===2?n.onPinchMove(e):e.touches.length===1&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener(`gesturechange`,n.onGestureChange),n.currentDoc.addEventListener(`gestureend`,n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureChange=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),i=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(i,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var a=n.gestureRotationStart+e.rotation;n.props.onRotationChange(a)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,r;n.dragStartPosition={x:e.x,y:e.y},n.dragStartCrop=h({},n.props.crop),(r=(t=n.props).onInteractionStart)==null||r.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(t===void 0||r===void 0)){var e=t-n.dragStartPosition.x,i=r-n.dragStartPosition.y,a={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+i},o=n.props.restrictPosition?E(a,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):a;n.props.onCropChange(o)}}))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(t=(e=n.props).onInteractionEnd)==null||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(e))){e.preventDefault();var r=t.getMousePoint(e),i=(0,C.default)(e).pixelY,a=n.props.zoom-i*n.props.zoomSpeed/200;n.setNewZoom(a,r,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var e;return(e=n.props).onInteractionStart?.call(e)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var e;return(e=n.props).onInteractionEnd?.call(e)})},250)}},n.getPointOnContainer=function(e,t){var r=e.x,i=e.y;if(!n.containerRect)throw Error(`The Cropper is not mounted`);return{x:n.containerRect.width/2-(r-t.x),y:n.containerRect.height/2-(i-t.y)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,i=n.props,a=i.crop,o=i.zoom;return{x:(t+a.x)/o,y:(r+a.y)/o}},n.setNewZoom=function(e,t,r){var i=(r===void 0?{}:r).shouldUpdatePosition,a=i===void 0||i;if(!(!n.state.cropSize||!n.props.onZoomChange)){var o=z(e,n.props.minZoom,n.props.maxZoom);if(a){var s=n.getPointOnContainer(t,n.containerPosition),c=n.getPointOnMedia(s),l={x:c.x*o-s.x,y:c.y*o-s.y},u=n.props.restrictPosition?E(l,n.mediaSize,n.state.cropSize,o,n.props.rotation):l;n.props.onCropChange(u)}n.props.onZoomChange(o)}},n.getCropData=function(){return n.state.cropSize?A(n.props.restrictPosition?E(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.crop;if(n.isInitialized&&n.previousCropSize?.width&&n.previousCropSize?.height&&(Math.abs(n.previousCropSize.width-n.state.cropSize.width)>1e-6||Math.abs(n.previousCropSize.height-n.state.cropSize.height)>1e-6)){var t=n.state.cropSize.width/n.previousCropSize.width,r=n.state.cropSize.height/n.previousCropSize.height;e={x:n.props.crop.x*t,y:n.props.crop.y*r}}var i=n.props.restrictPosition?E(e,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):e;n.previousCropSize=n.state.cropSize,n.props.onCropChange(i),n.emitCropData()}},n.onKeyDown=function(e){var t,r,i=n.props,a=i.crop,o=i.onCropChange,s=i.keyboardStep,c=i.zoom,l=i.rotation,u=s;if(n.state.cropSize){e.shiftKey&&(u*=.2);var d=h({},a);switch(e.key){case`ArrowUp`:d.y-=u,e.preventDefault();break;case`ArrowDown`:d.y+=u,e.preventDefault();break;case`ArrowLeft`:d.x-=u,e.preventDefault();break;case`ArrowRight`:d.x+=u,e.preventDefault();break;default:return}n.props.restrictPosition&&(d=E(d,n.mediaSize,n.state.cropSize,c,l)),e.repeat||(r=(t=n.props).onInteractionStart)==null||r.call(t),o(d)}},n.onKeyUp=function(e){var t,r;switch(e.key){case`ArrowUp`:case`ArrowDown`:case`ArrowLeft`:case`ArrowRight`:e.preventDefault();break;default:return}n.emitCropData(),(r=(t=n.props).onInteractionEnd)==null||r.call(t)},n}return t.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),window.ResizeObserver===void 0&&this.currentWindow.addEventListener(`resize`,this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener(`wheel`,this.onWheel,{passive:!1}),this.containerRef.addEventListener(`gesturestart`,this.onGestureStart)),this.currentDoc.addEventListener(`scroll`,this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement(`style`),this.styleRef.setAttribute(`type`,`text/css`),this.props.nonce&&this.styleRef.setAttribute(`nonce`,this.props.nonce),this.styleRef.innerHTML=V,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var e,t;!this.currentDoc||!this.currentWindow||(window.ResizeObserver===void 0&&this.currentWindow.removeEventListener(`resize`,this.computeSizes),(e=this.resizeObserver)==null||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener(`gesturestart`,this.preventZoomSafari),this.styleRef&&((t=this.styleRef.parentNode)==null||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t;e.rotation===this.props.rotation?e.aspect===this.props.aspect&&e.objectFit===this.props.objectFit?e.zoom===this.props.zoom?e.cropSize?.height!==this.props.cropSize?.height||e.cropSize?.width!==this.props.cropSize?.width?this.computeSizes():(e.crop?.x!==this.props.crop?.x||e.crop?.y!==this.props.crop?.y)&&this.emitCropAreaChange():this.recomputeCropPosition():this.computeSizes():(this.computeSizes(),this.recomputeCropPosition()),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener(`wheel`,this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&((t=this.videoRef.current)==null||t.load());var n=this.getObjectFit();n!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:n},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.getObjectFit=function(){if(this.props.objectFit===`cover`){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var e=this.containerRect.width/this.containerRect.height;return(this.imageRef.current?.naturalWidth||this.videoRef.current?.videoWidth||0)/(this.imageRef.current?.naturalHeight||this.videoRef.current?.videoHeight||0){let{cropperRef:n,zoomSlider:r,rotationSlider:i,aspectSlider:a,showReset:c,resetBtnText:l,modalImage:u,aspect:d,minZoom:f,maxZoom:p,minAspect:m,maxAspect:h,cropShape:g,showGrid:_,cropperProps:v}=e,[y,b]=(0,S.useState)({x:0,y:0}),[C,w]=(0,S.useState)(q),[T,E]=(0,S.useState)(Y),[D,O]=(0,S.useState)(d),k=(0,S.useRef)({width:0,height:0,x:0,y:0}),A=(0,S.useCallback)((e,t)=>{k.current=t},[]),j=(0,S.useRef)(d);j.current!==d&&(j.current=d,O(d));let M=C!==q||T!==Y||D!==d,N=()=>{w(q),E(Y),O(d)};(0,S.useImperativeHandle)(t,()=>({rotation:T,cropPixelsRef:k,onReset:N}));let P=`[display:flex] [align-items:center] [width:60%] [margin-inline:auto]`,F=`[display:flex] [align-items:center] [justify-content:center] [height:32px] [width:32px] [background:transparent] [border:0] [font-family:inherit] [font-size:18px] [cursor:pointer] disabled:[opacity:20%] disabled:[cursor:default]`,I=`[flex:1]`;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(G,Object.assign({},v,{ref:n,image:u,crop:y,zoom:C,rotation:T,aspect:D,minZoom:f,maxZoom:p,zoomWithScroll:r,cropShape:g,showGrid:_,onCropChange:b,onZoomChange:w,onRotationChange:E,onCropComplete:A,classes:{containerClassName:`${K}-container ![position:relative] [width:100%] [height:40vh] [&~section:first-of-type]:[margin-top:16px] [&~section:last-of-type]:[margin-bottom:16px]`,mediaClassName:`${K}-media`}})),r&&(0,x.jsxs)(`section`,{className:`${K}-control ${K}-control-zoom ${P}`,children:[(0,x.jsx)(`button`,{className:F,onClick:()=>w(+(C-J).toFixed(1)),disabled:C-Jw(+(C+J).toFixed(1)),disabled:C+J>p,children:`+`})]}),i&&(0,x.jsxs)(`section`,{className:`${K}-control ${K}-control-rotation ${P}`,children:[(0,x.jsx)(`button`,{className:`${F} [font-size:16px]`,onClick:()=>E(T-Q),disabled:T===X,children:`↺`}),(0,x.jsx)(s,{className:I,min:X,max:Z,step:Q,value:T,onChange:E}),(0,x.jsx)(`button`,{className:`${F} [font-size:16px]`,onClick:()=>E(T+Q),disabled:T===Z,children:`↻`})]}),a&&(0,x.jsxs)(`section`,{className:`${K}-control ${K}-control-aspect ${P}`,children:[(0,x.jsx)(`button`,{className:F,onClick:()=>O(+(D-$).toFixed(2)),disabled:D-$O(+(D+$).toFixed(2)),disabled:D+$>h,children:`↔`})]}),c&&(r||i||a)&&(0,x.jsx)(o,{className:`[position:absolute] [bottom:20px]`,style:M?{}:{opacity:.3,pointerEvents:`none`},onClick:N,children:l})]})})),te=`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */.visible{visibility:visible}.\\!\\[position\\:relative\\]{position:relative!important}.\\[position\\:absolute\\]{position:absolute}.\\[bottom\\:20px\\]{bottom:20px}.container{width:100%}.\\[margin-inline\\:auto\\]{margin-inline:auto}.\\[display\\:flex\\]{display:flex}.grid{display:grid}.\\[height\\:32px\\]{height:32px}.\\[height\\:40vh\\]{height:40vh}.\\[width\\:32px\\]{width:32px}.\\[width\\:60\\%\\]{width:60%}.\\[width\\:100\\%\\]{width:100%}.\\[flex\\:1\\]{flex:1}.\\[cursor\\:pointer\\]{cursor:pointer}.\\[align-items\\:center\\]{align-items:center}.\\[justify-content\\:center\\]{justify-content:center}.\\[font-family\\:inherit\\]{font-family:inherit}.\\[font-size\\:16px\\]{font-size:16px}.\\[font-size\\:18px\\]{font-size:18px}.\\[background\\:transparent\\]{background:transparent}.\\[border\\:0\\]{border:0}.disabled\\:\\[cursor\\:default\\]{&:disabled{cursor:default}}.disabled\\:\\[opacity\\:20\\%\\]{&:disabled{opacity:20%}}.\\[\\&\\~section\\:first-of-type\\]\\:\\[margin-top\\:16px\\]{&~section:first-of-type{margin-top:16px}}.\\[\\&\\~section\\:last-of-type\\]\\:\\[margin-bottom\\:16px\\]{&~section:last-of-type{margin-bottom:16px}}`;(function(){if(typeof document>`u`)return;let e=document.createElement(`style`),t=document.querySelector(`meta[name="csp-nonce"]`);t&&t.content&&e.setAttribute(`nonce`,t.content),e.textContent=te,document.head.appendChild(e)})();var ne=(e,t)=>{let n=e.split(`.`).map(Number),r=t.split(`.`).map(Number),i=Math.max(n.length,r.length);for(let e=0;ei)return!0;if(t{let{quality:n=.4,fillColor:i=`white`,zoomSlider:a=!0,rotationSlider:o=!1,aspectSlider:s=!1,showReset:l=!1,resetText:d,aspect:m=1,minZoom:h=1,maxZoom:g=3,minAspect:_=.5,maxAspect:v=2,cropShape:y=`rect`,showGrid:b=!1,cropperProps:C,modalClassName:w,modalTitle:T,modalWidth:E,modalOk:D,modalCancel:O,onModalOk:k,onModalCancel:A,modalProps:j,beforeCrop:M,children:N}=e,P=(0,S.useRef)({});P.current.onModalOk=k,P.current.onModalCancel=A,P.current.beforeCrop=M;let F=(0,S.useRef)(null),I=(0,S.useCallback)(e=>{let t=document.createElement(`canvas`),n=t.getContext(`2d`),r=((e?.getRootNode)?.call(e)||document).querySelector(`.${K}-media`),{width:a,height:s,x:c,y:l}=F.current.cropPixelsRef.current;if(o&&F.current.rotation!==Y){let{naturalWidth:e,naturalHeight:o}=r,u=F.current.rotation*(Math.PI/180),d=Math.abs(Math.sin(u)),f=Math.abs(Math.cos(u)),p=e*f+o*d,m=o*f+e*d;t.width=p,t.height=m,n.fillStyle=i,n.fillRect(0,0,p,m);let h=p/2,g=m/2;n.translate(h,g),n.rotate(u),n.translate(-h,-g);let _=(p-e)/2,v=(m-o)/2;n.drawImage(r,0,0,e,o,_,v,e,o);let y=n.getImageData(0,0,p,m);t.width=a,t.height=s,n.putImageData(y,-c,-l)}else t.width=a,t.height=s,n.fillStyle=i,n.fillRect(0,0,a,s),n.drawImage(r,c,l,a,s,0,0,a,s);return t},[i,o]),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(``),V=(0,S.useRef)(void 0),H=(0,S.useRef)(void 0),U=(0,S.useCallback)(e=>p(void 0,[e],void 0,function*({beforeUpload:e,file:t,resolve:n,reject:r}){let i=t;if(typeof e!=`function`){n(i);return}try{let r=yield e(t,[t]);n(r===!1?!1:r!==!0&&r||i)}catch(e){r(e)}}),[]),W=(0,S.useCallback)(e=>((t,r)=>new Promise((i,a)=>p(void 0,void 0,void 0,function*(){let o=t;if(typeof P.current.beforeCrop==`function`)try{let n=yield P.current.beforeCrop(t,r);if(n===!1)return U({beforeUpload:e,file:t,resolve:i,reject:a});n!==!0&&(o=n||t)}catch{return U({beforeUpload:e,file:t,resolve:i,reject:a})}let s=new FileReader;s.addEventListener(`load`,()=>{typeof s.result==`string`&&(R(!0),setTimeout(()=>{B(s.result)},10))}),s.readAsDataURL(o),V.current=()=>{var e,t;R(!1),B(``),F.current.onReset();let n=!1;(t=(e=P.current).onModalCancel)==null||t.call(e,e=>{i(e),n=!0}),n||i(u.LIST_IGNORE)},H.current=t=>p(void 0,void 0,void 0,function*(){R(!1),B(``),F.current.onReset();let r=I(t.target),{type:s,name:c,uid:l}=o;r.toBlob(t=>p(void 0,void 0,void 0,function*(){let n=new File([t],c,{type:s});Object.assign(n,{uid:l}),U({beforeUpload:e,file:n,resolve:e=>{var t,n;i(e),(n=(t=P.current).onModalOk)==null||n.call(t,e)},reject:e=>{var t,n;a(e),(n=(t=P.current).onModalOk)==null||n.call(t,e)}})}),s,n)})}))),[I,n,U]),G=(0,S.useCallback)(e=>{let t=Array.isArray(e)?e[0]:e,n=t.props,{beforeUpload:r,accept:i}=n,a=f(n,[`beforeUpload`,`accept`]);return Object.assign(Object.assign({},t),{props:Object.assign(Object.assign({},a),{accept:i||`image/*`,beforeUpload:W(r)})})},[W]),q=(0,S.useMemo)(()=>{let e={};return E!==void 0&&(e.width=E),D!==void 0&&(e.okText=D),O!==void 0&&(e.cancelText=O),e},[O,D,E]),J=`${K}-modal${w?` ${w}`:``}`,X=(typeof window>`u`?``:window.navigator.language)===`zh-CN`,Z=T||(X?`编辑图片`:`Edit image`),Q=d||(X?`重置`:`Reset`);return(0,x.jsxs)(x.Fragment,{children:[G(N),(0,x.jsx)(c,Object.assign({},j,q,{open:L,title:Z,onCancel:V.current,onOk:H.current,wrapClassName:J,destroyOnHidden:!0},ne(r,`6.3.1`)?{mask:{closable:!1}}:{maskClosable:!0},{children:(0,x.jsx)(ee,{ref:F,cropperRef:t,zoomSlider:a,rotationSlider:o,aspectSlider:s,showReset:l,resetBtnText:Q,modalImage:z,aspect:m,minZoom:h,maxZoom:g,minAspect:_,maxAspect:v,cropShape:y,showGrid:b,cropperProps:C})}))]})}),ie=({action:e,value:t,changeType:n,onChange:r,mode:i=`single`,disabled:o=!1,maxCount:s,maxWidth:c=1920,maxHeight:f=1080,maxSize:p=5,croppable:m=!1,cropperOptions:h})=>{let{t:g}=d(),[_,v]=(0,S.useState)([]),y=(0,S.useMemo)(()=>s||(i===`single`?1:9),[i,s]),b=e=>({uid:e.id?.toString()||`${e.id}`,name:e.file_name||`image-${e.id}`,status:`done`,url:e.preview_url,response:{success:!0,data:e,message:`Upload success`}});(0,S.useEffect)(()=>{if(!t){v([]);return}let e=(Array.isArray(t)?t:[t]).map(b);v(e)},[t]);let C=(0,S.useCallback)(e=>new Promise((t,n)=>{if(!e.type.startsWith(`image/`)){l.error(g(`xin.form.imageUploader.error.notImage`)),n(!1);return}if(!(e.size/1024/1024{let r=document.createElement(`img`);r.src=e.target?.result,r.onload=()=>{let e=r.width<=c,i=r.height<=f;if(!e||!i){l.error(g(`xin.form.imageUploader.error.dimensionExceeded`,{maxWidth:c,maxHeight:f})),n(!1);return}t(!0)},r.onerror=()=>{l.error(g(`xin.form.imageUploader.error.loadFailed`)),n(!1)}},r.onerror=()=>{l.error(g(`xin.form.imageUploader.error.readFailed`)),n(!1)}}),[p,c,f]),w=({fileList:e})=>{if(e.length!==0&&(v(e),e.every(e=>e.status===`done`||e.status===`error`))){let t=e.filter(e=>e.status===`done`&&e.response).map(e=>e.response.data);i===`single`?n===`id`?r?.(t[0].id):r?.(t[0]):n===`id`?r?.(t.map(e=>e.id)):r?.(t);let a=e.filter(e=>e.status===`error`);v([...t.map(b),...a])}},T=(0,S.useMemo)(()=>(0,x.jsxs)(`button`,{style:{border:0,background:`none`},type:`button`,children:[(0,x.jsx)(a,{}),(0,x.jsx)(`div`,{style:{marginTop:8},children:g(`xin.form.imageUploader.uploadText`)})]}),[g]),E=(0,x.jsx)(u,{listType:`picture-card`,name:`file`,fileList:_,beforeUpload:C,onChange:w,disabled:o,maxCount:y,multiple:i===`multiple`,headers:{Authorization:`Bearer ${localStorage.getItem(`token`)}`},onRemove:e=>{v(_.filter(t=>t.uid!=e.uid))},action:`/index.php`+e,accept:`image/*`,children:_.length>=y?null:T});return(0,x.jsx)(x.Fragment,{children:m&&i===`single`?(0,x.jsx)(re,{...h,children:E}):E})};export{ie as t}; \ No newline at end of file diff --git a/public/assets/InfoCircleOutlined-DBx8dOxc.js b/public/assets/InfoCircleOutlined-DBx8dOxc.js new file mode 100644 index 0000000..c8aaec5 --- /dev/null +++ b/public/assets/InfoCircleOutlined-DBx8dOxc.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z`}}]},name:`github`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default}))),l=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z`}}]},name:`history`,theme:`outlined`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,u({},e,{ref:t,icon:l.default}))),f=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z`}}]},name:`info-circle`,theme:`outlined`}}))());function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,p({},e,{ref:t,icon:f.default})));export{d as n,c as r,m as t}; \ No newline at end of file diff --git a/public/assets/Input-Bn-0ViX7.js b/public/assets/Input-Bn-0ViX7.js new file mode 100644 index 0000000..cdb7695 --- /dev/null +++ b/public/assets/Input-Bn-0ViX7.js @@ -0,0 +1 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,Q as n,St as r,Vn as i,Z as a,at as o,p as ee,u as te,ur as ne,xt as s,yt as c,zn as l}from"./jsx-runtime-ADHq9IcL.js";import{f as u,m as d,p as f}from"./tooltip-CRuv8UNz.js";import{a as p,o as m}from"./style-Der9vtsK.js";import{r as re,t as ie}from"./es-DtKsFKpZ.js";var h=e(t());function g(e,t){let n=(0,h.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,h.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),r}function ae(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var _=(0,h.forwardRef)((e,t)=>{let{prefixCls:_,bordered:oe=!0,status:se,size:ce,disabled:le,onBlur:ue,onFocus:v,suffix:y,allowClear:b,addonAfter:x,addonBefore:S,className:C,style:w,styles:T,rootClassName:E,onChange:D,classNames:O,variant:k,...A}=e,{getPrefixCls:j,direction:M,allowClear:N,autoComplete:P,className:F,style:I,classNames:L,styles:R}=l(`input`),z=j(`input`,_),B=(0,h.useRef)(null),V=c(z),[H,U]=m(z,E);p(z,V);let{compactSize:de,compactItemClassnames:fe}=a(z,M),W=n(e=>ce??de??e),pe=h.useContext(o),G=le??pe,me={...e,size:W,disabled:G},he=r(I),ge=r(w),[K,q]=s([L,O],[R,he,T,ge],{props:me}),{status:_e,hasFeedback:J,feedbackIcon:ve}=(0,h.useContext)(ee),Y=u(_e,se);(0,h.useRef)(ae(e)||!!J);let X=g(B,!0),Z=e=>{X(),ue?.(e)},ye=e=>{X(),v?.(e)},be=e=>{X(),D?.(e)},xe=(J||y)&&h.createElement(h.Fragment,null,y,J&&ve),Se=re({allowClear:b,contextAllowClear:N,componentName:`Input`}),[Q,$]=te(`input`,k,oe);return h.createElement(ie,{ref:ne(t,B),prefixCls:z,autoComplete:P,...A,disabled:G,onBlur:Z,onFocus:ye,style:q.root,styles:q,suffix:xe,allowClear:Se,className:i(C,E,U,V,fe,F,K.root),onChange:be,addonBefore:S&&h.createElement(d,{form:!0,space:!0},S),addonAfter:x&&h.createElement(d,{form:!0,space:!0},x),classNames:{...K,input:i({[`${z}-sm`]:W===`small`,[`${z}-lg`]:W===`large`,[`${z}-rtl`]:M===`rtl`},K.input,H),variant:i({[`${z}-${Q}`]:$},f(z,Y)),affixWrapper:i({[`${z}-affix-wrapper-sm`]:W===`small`,[`${z}-affix-wrapper-lg`]:W===`large`,[`${z}-affix-wrapper-rtl`]:M===`rtl`},H),wrapper:i({[`${z}-group-rtl`]:M===`rtl`},H),groupWrapper:i({[`${z}-group-wrapper-sm`]:W===`small`,[`${z}-group-wrapper-lg`]:W===`large`,[`${z}-group-wrapper-rtl`]:M===`rtl`,[`${z}-group-wrapper-${Q}`]:$},f(`${z}-group-wrapper`,Y,J),H)}})});export{g as n,_ as t}; \ No newline at end of file diff --git a/public/assets/Input-yLjViSX8.js b/public/assets/Input-yLjViSX8.js deleted file mode 100644 index 55e69ac..0000000 --- a/public/assets/Input-yLjViSX8.js +++ /dev/null @@ -1,12 +0,0 @@ -import{J as e,Or as t,Rn as n,Sr as r,Tr as i,Vn as a,Xn as o,Y as s,cn as c,dn as l,dt as u,et as d,fr as f,hn as p,it as m,m as h,r as g,tr as _,ur as v}from"./jsx-runtime-NwRKtVrk.js";import{n as y}from"./ExclamationCircleFilled-gmOeErIU.js";import{c as b,l as x,y as S}from"./CopyOutlined-bJLUKQgS.js";import{m as C,n as w,t as T}from"./statusUtils-G17j4Ng-.js";var E=t(i()),D=e=>{let{allowClear:t,clearIcon:n,contextAllowClear:r,contextClearIcon:i,defaultAllowClear:a,componentName:o}=e;return(0,E.useMemo)(()=>t??r??a?{clearIcon:S(p(t)?t?.clearIcon:n,p(r)?r?.clearIcon:i,E.createElement(y,null)),disabled:(p(t)?t?.disabled:void 0)??(p(r)?r?.disabled:void 0)}:!1,[t,n,r,i,a])};function O(e){return!!(e.addonBefore||e.addonAfter)}function k(e){return!!(e.prefix||e.suffix||e.allowClear)}function A(e,t,n){let r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...e)=>{t.setSelectionRange(...e)},i}function j(e,t,n,r){if(!n)return;let i=t;if(t.type===`click`){i=A(t,e,``),n(i);return}if(e.type!==`file`&&r!==void 0){i=A(t,e,r),n(i);return}n(i)}function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{inputElement:n,children:i,prefixCls:a,prefix:o,suffix:s,addonBefore:c,addonAfter:l,className:u,style:d,disabled:f,readOnly:p,focused:m,triggerFocus:h,allowClear:g,value:_,handleReset:v,hidden:y,classes:b,classNames:x,dataAttrs:S,styles:C,components:w,onClear:T}=e,D=i??n,A=w?.affixWrapper||`span`,j=w?.groupWrapper||`span`,N=w?.wrapper||`span`,P=w?.groupAddon||`span`,F=(0,E.useRef)(null),I=e=>{F.current?.contains(e.target)&&h?.()},L=k(e),R=(0,E.cloneElement)(D,{value:_,className:r(D.props?.className,!L&&x?.variant)||null}),z=(0,E.useRef)(null);if(E.useImperativeHandle(t,()=>({nativeElement:z.current||F.current})),L){let e=null;if(g){let t=!f&&!p&&_&&!(typeof g==`object`&&g.disabled),n=`${a}-clear-icon`,i=typeof g==`object`&&g?.clearIcon?g.clearIcon:`✖`;e=E.createElement(`button`,{type:`button`,onClick:e=>{v?.(e),T?.()},onMouseDown:e=>e.preventDefault(),className:r(n,{[`${n}-hidden`]:!t,[`${n}-has-suffix`]:!!s},x?.clear),style:C?.clear},i)}let t=`${a}-affix-wrapper`,n=r(t,{[`${a}-disabled`]:f,[`${t}-disabled`]:f,[`${t}-focused`]:m,[`${t}-readonly`]:p,[`${t}-input-with-clear-btn`]:s&&g&&_},b?.affixWrapper,x?.affixWrapper,x?.variant),i=(s||g)&&E.createElement(`span`,{className:r(`${a}-suffix`,x?.suffix),style:C?.suffix},e,s);R=E.createElement(A,M({className:n,style:C?.affixWrapper,onClick:I},S?.affixWrapper,{ref:F}),o&&E.createElement(`span`,{className:r(`${a}-prefix`,x?.prefix),style:C?.prefix},o),R,i)}if(O(e)){let e=`${a}-group`,t=`${e}-addon`,n=`${e}-wrapper`,i=r(`${a}-wrapper`,e,b?.wrapper,x?.wrapper),o=r(n,{[`${n}-disabled`]:f},b?.group,x?.groupWrapper);R=E.createElement(j,{className:o,ref:z},E.createElement(N,{className:i},c&&E.createElement(P,{className:t},c),R,l&&E.createElement(P,{className:t},l)))}return E.cloneElement(R,{className:r(R.props?.className,u)||null,style:{...R.props?.style,...d},hidden:y})});function P(e,t){return E.useMemo(()=>{let n={};t&&(n.show=typeof t==`object`&&t.formatter?t.formatter:!!t),n={...n,...e};let{show:r,...i}=n;return{...i,show:!!r,showFormatter:typeof r==`function`?r:void 0,strategy:i.strategy||(e=>e.length)}},[e,t])}function F({countConfig:e,value:t,maxLength:n}){return E.useMemo(()=>{let r=e.max??n,i=e.strategy(t),a=!!r&&i>r,o=Number(r)>0;return{mergedMax:r,isOutOfRange:a,dataCount:e.show?e.showFormatter?e.showFormatter({value:t,count:i,maxLength:r}):`${i}${o?` / ${r}`:``}`:void 0}},[e,n,t])}function I({countConfig:e,getTarget:t}){let[n,r]=E.useState(null),i=E.useRef(t);return E.useEffect(()=>{i.current=t},[t]),E.useEffect(()=>{n&&(i.current()?.setSelectionRange(...n),r(null))},[n]),E.useCallback((t,n)=>{let a=t;return!n&&e.exceedFormatter&&e.max&&e.strategy(t)>e.max&&(a=e.exceedFormatter(t,{max:e.max}),t!==a&&r([i.current()?.selectionStart||0,i.current()?.selectionEnd||0])),a},[e])}function L(e,t){let[n,r]=v(e,t);return{value:n,setValue:r,formatValue:n==null?``:String(n)}}function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{autoComplete:n,onChange:i,onFocus:s,onBlur:c,onPressEnter:l,onKeyDown:u,onKeyUp:d,prefixCls:f=`rc-input`,disabled:p,htmlSize:m,className:h,maxLength:g,suffix:_,showCount:v,count:y,type:b=`text`,classes:x,classNames:S,styles:C,onCompositionStart:w,onCompositionEnd:T,...D}=e,[O,k]=(0,E.useState)(!1),A=(0,E.useRef)(!1),M=(0,E.useRef)(!1),z=(0,E.useRef)(null),B=(0,E.useRef)(null),V=e=>{z.current&&o(z.current,e)},{setValue:H,formatValue:U}=L(e.defaultValue,e.value),W=P(y,v),{isOutOfRange:G,dataCount:K}=F({countConfig:W,value:U,maxLength:g}),q=I({countConfig:W,getTarget:()=>z.current});(0,E.useImperativeHandle)(t,()=>({focus:V,blur:()=>{z.current?.blur()},setSelectionRange:(e,t,n)=>{z.current?.setSelectionRange(e,t,n)},select:()=>{z.current?.select()},input:z.current,nativeElement:B.current?.nativeElement||z.current})),(0,E.useEffect)(()=>{M.current&&=!1,k(e=>e&&p?!1:e)},[p]);let J=(e,t,n)=>{let r=q(t,A.current);n.source===`compositionEnd`&&t===r||(H(r),z.current&&j(z.current,e,i,r))},Y=e=>{J(e,e.target.value,{source:`change`})},ee=e=>{A.current=!1,J(e,e.currentTarget.value,{source:`compositionEnd`}),T?.(e)},X=e=>{l&&e.key===`Enter`&&!M.current&&!e.nativeEvent.isComposing&&(M.current=!0,l(e)),u?.(e)},Z=e=>{e.key===`Enter`&&(M.current=!1),d?.(e)},te=e=>{k(!0),s?.(e)},ne=e=>{M.current&&=!1,k(!1),c?.(e)},re=e=>{H(``),V(),z.current&&j(z.current,e,i)},Q=G&&`${f}-out-of-range`;return E.createElement(N,R({},D,{prefixCls:f,className:r(h,Q),handleReset:re,value:U,focused:O,triggerFocus:V,suffix:_||W.show?E.createElement(E.Fragment,null,W.show&&E.createElement(`span`,{className:r(`${f}-show-count-suffix`,{[`${f}-show-count-has-suffix`]:!!_},S?.count),style:{...C?.count}},K),_):null,disabled:p,classes:x,classNames:S,styles:C,ref:B}),(()=>{let t=a(e,[`prefixCls`,`onPressEnter`,`addonBefore`,`addonAfter`,`prefix`,`suffix`,`allowClear`,`defaultValue`,`showCount`,`count`,`classes`,`htmlSize`,`styles`,`classNames`,`onClear`]);return E.createElement(`input`,R({autoComplete:n},t,{onChange:Y,onFocus:te,onBlur:ne,onKeyDown:X,onKeyUp:Z,className:r(f,{[`${f}-disabled`]:p},S?.input),style:C?.input,ref:z,size:m,type:b,onCompositionStart:e=>{A.current=!0,w?.(e)},onCompositionEnd:ee}))})())}),B=` - min-height:0 !important; - max-height:none !important; - height:0 !important; - visibility:hidden !important; - overflow:hidden !important; - position:absolute !important; - z-index:-1000 !important; - top:0 !important; - right:0 !important; - pointer-events: none !important; -`,V=[`letter-spacing`,`line-height`,`padding-top`,`padding-bottom`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`padding-left`,`padding-right`,`border-width`,`box-sizing`,`word-break`,`white-space`],H={},U;function W(e,t=!1){let n=e.getAttribute(`id`)||e.getAttribute(`data-reactid`)||e.getAttribute(`name`);if(t&&H[n])return H[n];let r=window.getComputedStyle(e),i=r.getPropertyValue(`box-sizing`)||r.getPropertyValue(`-moz-box-sizing`)||r.getPropertyValue(`-webkit-box-sizing`),a=parseFloat(r.getPropertyValue(`padding-bottom`))+parseFloat(r.getPropertyValue(`padding-top`)),o=parseFloat(r.getPropertyValue(`border-bottom-width`))+parseFloat(r.getPropertyValue(`border-top-width`)),s={sizingStyle:V.map(e=>`${e}:${r.getPropertyValue(e)}`).join(`;`),paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(H[n]=s),s}function G(e,t=!1,n=null,r=null){U||(U=document.createElement(`textarea`),U.setAttribute(`tab-index`,`-1`),U.setAttribute(`aria-hidden`,`true`),U.setAttribute(`name`,`hiddenTextarea`),document.body.appendChild(U)),e.getAttribute(`wrap`)?U.setAttribute(`wrap`,e.getAttribute(`wrap`)):U.removeAttribute(`wrap`);let{paddingSize:i,borderSize:a,boxSizing:o,sizingStyle:s}=W(e,t);U.setAttribute(`style`,`${s};${B}`),U.value=e.value||e.placeholder||``;let c,l,u,d=U.scrollHeight;if(o===`border-box`?d+=a:o===`content-box`&&(d-=i),n!==null||r!==null){U.value=` `;let e=U.scrollHeight-i;n!==null&&(c=e*n,o===`border-box`&&(c=c+i+a),d=Math.max(c,d)),r!==null&&(l=e*r,o===`border-box`&&(l=l+i+a),u=d>l?void 0:`hidden`,d=Math.min(l,d))}let f={height:d,overflowY:u,resize:`none`};return c&&(f.minHeight=c),l&&(f.maxHeight=l),f}function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:i,defaultValue:a,value:o,autoSize:s,onResize:c,className:l,style:d,disabled:p,onChange:m,onInternalAutoSize:h,...g}=e,[_,y]=v(a,o),b=_??``,x=e=>{y(e.target.value),m?.(e)},S=E.useRef(null);E.useImperativeHandle(t,()=>({textArea:S.current}));let[C,w]=E.useMemo(()=>s&&typeof s==`object`?[s.minRows,s.maxRows]:[],[s]),T=!!s,[D,O]=E.useState(Y),[k,A]=E.useState(),j=()=>{O(q)};f(()=>{T&&j()},[o,C,w,T]),f(()=>{if(D===q)O(J);else if(D===J){let e=G(S.current,!1,C,w);O(Y),A(e)}},[D]);let M=E.useRef(void 0),N=()=>{M.current!==void 0&&n.cancel(M.current)},P=e=>{D===Y&&(c?.(e),s&&(N(),M.current=n(()=>{j()})))};E.useEffect(()=>N,[]);let F=T?k:null,I={...d,...F};return(D===q||D===J)&&(I.overflowY=`hidden`,I.overflowX=`hidden`),E.createElement(u,{onResize:P,disabled:!(s||c)},E.createElement(`textarea`,K({},g,{ref:S,style:I,className:r(i,l,{[`${i}-disabled`]:p}),disabled:p,value:b,onChange:x})))});function X(){return X=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[k,A]=E.useState(!1),M=E.useRef(!1),[R,z]=E.useState(null),B=(0,E.useRef)(null),V=(0,E.useRef)(null),H=()=>V.current?.textArea||null,{setValue:U,formatValue:W}=L(e,t),G=P(p,f),{isOutOfRange:K,dataCount:q}=F({countConfig:G,value:W,maxLength:s}),J=I({countConfig:G,getTarget:()=>V.current?.textArea||null}),Y=()=>{H()?.focus()};(0,E.useImperativeHandle)(O,()=>({resizableTextArea:V.current,focus:Y,blur:()=>{H()?.blur()},nativeElement:B.current?.nativeElement||H()})),(0,E.useEffect)(()=>{A(e=>!g&&e)},[g]);let Z=(e,t)=>{let n=J(t,M.current);U(n),j(e.currentTarget,e,a,n)},te=e=>{M.current=!0,c?.(e)},ne=e=>{M.current=!1,Z(e,e.currentTarget.value),l?.(e)},re=e=>{Z(e,e.target.value)},Q=e=>{e.key===`Enter`&&S&&!e.nativeEvent.isComposing&&S(e),T?.(e)},ie=e=>{A(!0),n?.(e)},ae=e=>{A(!1),i?.(e)},oe=e=>{U(``),Y();let t=H();t&&j(t,e,a)},$=u;G.show&&($=E.createElement(E.Fragment,null,$,E.createElement(`span`,{className:r(`${d}-data-count`,v?.count),style:y?.count},q)));let se=e=>{b?.(e),H()?.style.height&&z(!0)},ce=!w&&!f&&!o;return E.createElement(N,{ref:B,value:W,allowClear:o,handleReset:oe,suffix:$,prefixCls:d,classNames:{...v,affixWrapper:r(v?.affixWrapper,{[`${d}-show-count`]:f,[`${d}-textarea-allow-clear`]:o})},disabled:g,focused:k,className:r(m,K&&`${d}-out-of-range`),style:{...h,...R&&!ce?{height:`auto`}:{}},dataAttrs:typeof q==`string`?{affixWrapper:{"data-count":q}}:void 0,styles:y,hidden:_,readOnly:C,onClear:x},E.createElement(ee,X({},D,{autoSize:w,maxLength:s,onKeyDown:Q,onChange:re,onFocus:ie,onBlur:ae,onCompositionStart:te,onCompositionEnd:ne,className:r(v?.textarea),style:{resize:h?.resize,...y?.textarea},disabled:g,prefixCls:d,onResize:se,ref:V,readOnly:C})))}),te=z;function ne(e,t){let n=(0,E.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,E.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),r}function re(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var Q=(0,E.forwardRef)((t,n)=>{let{prefixCls:i,bordered:a=!0,status:o,size:u,disabled:f,onBlur:p,onFocus:v,suffix:y,allowClear:S,addonAfter:O,addonBefore:k,className:A,style:j,styles:M,rootClassName:N,onChange:P,classNames:F,variant:I,...L}=t,{getPrefixCls:R,direction:z,allowClear:B,autoComplete:V,className:H,style:U,classNames:W,styles:G}=c(`input`),K=R(`input`,i),q=(0,E.useRef)(null),J=d(K),[Y,ee]=x(K,N);b(K,J);let{compactSize:X,compactItemClassnames:Z}=e(K,z),Q=s(e=>u??X??e),ie=E.useContext(m),ae=f??ie,oe={...t,size:Q,disabled:ae},[$,se]=l([W,F],[G,M],{props:oe}),{status:ce,hasFeedback:le,feedbackIcon:ue}=(0,E.useContext)(h),de=T(ce,o);(0,E.useRef)(re(t)||!!le);let fe=ne(q,!0),pe=e=>{fe(),p?.(e)},me=e=>{fe(),v?.(e)},he=e=>{fe(),P?.(e)},ge=(le||y)&&E.createElement(E.Fragment,null,y,le&&ue),_e=D({allowClear:S,contextAllowClear:B,componentName:`Input`}),[ve,ye]=g(`input`,I,a);return E.createElement(te,{ref:_(n,q),prefixCls:K,autoComplete:V,...L,disabled:ae,onBlur:pe,onFocus:me,style:{...se.root,...U,...j},styles:se,suffix:ge,allowClear:_e,className:r(A,N,ee,J,Z,H,$.root),onChange:he,addonBefore:k&&E.createElement(C,{form:!0,space:!0},k),addonAfter:O&&E.createElement(C,{form:!0,space:!0},O),classNames:{...$,input:r({[`${K}-sm`]:Q===`small`,[`${K}-lg`]:Q===`large`,[`${K}-rtl`]:z===`rtl`},$.input,Y),variant:r({[`${K}-${ve}`]:ye},w(K,de)),affixWrapper:r({[`${K}-affix-wrapper-sm`]:Q===`small`,[`${K}-affix-wrapper-lg`]:Q===`large`,[`${K}-affix-wrapper-rtl`]:z===`rtl`},Y),wrapper:r({[`${K}-group-rtl`]:z===`rtl`},Y),groupWrapper:r({[`${K}-group-wrapper-sm`]:Q===`small`,[`${K}-group-wrapper-lg`]:Q===`large`,[`${K}-group-wrapper-rtl`]:z===`rtl`,[`${K}-group-wrapper-${ve}`]:ye},w(`${K}-group-wrapper`,de,le),Y)}})});export{D as i,ne as n,Z as r,Q as t}; \ No newline at end of file diff --git a/public/assets/LeftOutlined-DolIAuof.js b/public/assets/LeftOutlined-DolIAuof.js new file mode 100644 index 0000000..68c6d3f --- /dev/null +++ b/public/assets/LeftOutlined-DolIAuof.js @@ -0,0 +1,4 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{An as n,Dr as r,Ft as i,J as a}from"./jsx-runtime-ADHq9IcL.js";var o=new n(`antMoveDownIn`,{"0%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),s=new n(`antMoveDownOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0}}),c=new n(`antMoveLeftIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),l=new n(`antMoveLeftOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),u=new n(`antMoveRightIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),d=new n(`antMoveRightOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),f={"move-up":{inKeyframes:new n(`antMoveUpIn`,{"0%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),outKeyframes:new n(`antMoveUpOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0}})},"move-down":{inKeyframes:o,outKeyframes:s},"move-left":{inKeyframes:c,outKeyframes:l},"move-right":{inKeyframes:u,outKeyframes:d}},p=(e,t)=>{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:o}=f[t];return[a(r,i,o,e.motionDurationMid),{[` + ${r}-enter, + ${r}-appear + `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},m=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z`}}]},name:`left`,theme:`outlined`}})),h=e(r()),g=e(m());function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;th.createElement(i,_({},e,{ref:t,icon:g.default})));export{p as n,v as t}; \ No newline at end of file diff --git a/public/assets/LikeOutlined-BXSS7iVR.js b/public/assets/LikeOutlined-BXSS7iVR.js new file mode 100644 index 0000000..b825df9 --- /dev/null +++ b/public/assets/LikeOutlined-BXSS7iVR.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z`}}]},name:`like`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/LinkOutlined-B4oKj2q7.js b/public/assets/LinkOutlined-B4oKj2q7.js new file mode 100644 index 0000000..902a9a0 --- /dev/null +++ b/public/assets/LinkOutlined-B4oKj2q7.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z`}}]},name:`file-text`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default}))),l=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z`}}]},name:`link`,theme:`outlined`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,u({},e,{ref:t,icon:l.default})));export{c as n,d as t}; \ No newline at end of file diff --git a/public/assets/LockOutlined-rb6chlKx.js b/public/assets/LockOutlined-rb6chlKx.js new file mode 100644 index 0000000..a24c64b --- /dev/null +++ b/public/assets/LockOutlined-rb6chlKx.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z`}}]},name:`lock`,theme:`outlined`}})),o=e(n()),s=e(a());function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;to.createElement(r,c({},e,{ref:t,icon:s.default})));export{i as n,l as t}; \ No newline at end of file diff --git a/public/assets/PictureOutlined-5m8FAlCn.js b/public/assets/PictureOutlined-5m8FAlCn.js new file mode 100644 index 0000000..555200e --- /dev/null +++ b/public/assets/PictureOutlined-5m8FAlCn.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Bn as n,Dr as r,Ft as i,Ln as a,Un as o,Vn as s,yt as c,zn as l}from"./jsx-runtime-ADHq9IcL.js";import{n as u,t as d}from"./config-provider-BFg4S-AS.js";import{a as f,c as p,h as m,i as h,o as g,r as _,s as v,t as y}from"./context-o-GHk4GQ.js";var b=e(r()),x=e=>{let{items:t,classNames:n,style:r}=e,{getPrefixCls:i}=l(`message`),a=i(`message`),o=c(a),[u,d]=p(a,o),f=`${a}-notice`,h=t.map(e=>{let{content:t,duration:n,key:r,type:i}=e,o=i?`${f}-icon-${i}`:void 0;return{key:r,duration:n,icon:v(i),title:t,className:`${f}-${i}`,classNames:{wrapper:`${a}-${i}`,icon:o}}});return b.createElement(m,{prefixCls:a,placement:`top`,configList:h,className:s(u,d,o),classNames:{...n,wrapper:n?.wrapper,title:n?.title},style:r,stack:!1})},S=null,C=e=>e(),w=[],T={};function E(){let{getContainer:e,duration:t,rtl:n,maxCount:r,top:i,stack:a}=T,o=e?.()||document.body;return{getContainer:()=>o,duration:t,rtl:n,maxCount:r,top:i,stack:a}}var D=b.forwardRef((e,t)=>{let{messageConfig:n,sync:r}=e,{getPrefixCls:i}=(0,b.useContext)(a),o=T.prefixCls||i(`message`),s=(0,b.useContext)(y),[c,l]=_({...n,prefixCls:o,...s.message});return b.useImperativeHandle(t,()=>{let e={...c};return Object.keys(e).forEach(t=>{e[t]=(...e)=>(r(),c[t].apply(c,e))}),{instance:e,sync:r}}),l}),O=b.forwardRef((e,t)=>{let[n,r]=b.useState(E),i=()=>{r(E)};b.useEffect(i,[]);let a=u(),o=a.getRootPrefixCls(),s=a.getIconPrefixCls(),c=a.getTheme(),l=b.createElement(D,{ref:t,sync:i,messageConfig:n});return b.createElement(d,{prefixCls:o,iconPrefixCls:s,theme:c},a.holderRender?a.holderRender(l):l)}),k=()=>{if(!S){let e=document.createDocumentFragment(),t={fragment:e};S=t,C(()=>{o(b.createElement(O,{ref:e=>{let{instance:n,sync:r}=e||{};Promise.resolve().then(()=>{!t.instance&&n&&(t.instance=n,t.sync=r,k())})}}),e)});return}S.instance&&(w.forEach(e=>{let{type:t,skipped:r}=e;if(!r)switch(t){case`open`:C(()=>{let t=S.instance.open({...T,...e.config});t?.then(e.resolve),e.setCloseFn(t)});break;case`destroy`:C(()=>{S?.instance.destroy(e.key)});break;default:C(()=>{var r;let i=(r=S.instance)[t].apply(r,n(e.args));i?.then(e.resolve),e.setCloseFn(i)})}}),w=[])};function A(e){T={...T,...e},C(()=>{S?.sync?.()})}function j(e){let t=f(t=>{let n,r={type:`open`,config:e,resolve:t,setCloseFn:e=>{n=e}};return w.push(r),()=>{n?C(()=>{n()}):r.skipped=!0}});return k(),t}function M(e,t){u();let n=f(n=>{let r,i={type:e,args:t,resolve:n,setCloseFn:e=>{r=e}};return w.push(i),()=>{r?C(()=>{r()}):i.skipped=!0}});return k(),n}var N=e=>{w.push({type:`destroy`,key:e}),k()},P=[`success`,`info`,`warning`,`error`,`loading`],F={open:j,destroy:N,config:A,useMessage:h,_InternalPanelDoNotUseOrYouWillBeFired:g,_InternalListDoNotUseOrYouWillBeFired:x};P.forEach(e=>{F[e]=(...t)=>M(e,t)});var I=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z`}}]},name:`paper-clip`,theme:`outlined`}}))());function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;tb.createElement(i,L({},e,{ref:t,icon:I.default}))),z=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z`}}]},name:`picture`,theme:`outlined`}}))());function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;tb.createElement(i,B({},e,{ref:t,icon:z.default})));export{R as n,F as r,V as t}; \ No newline at end of file diff --git a/public/assets/PlusOutlined-W6xCIIXs.js b/public/assets/PlusOutlined-W6xCIIXs.js new file mode 100644 index 0000000..38eb710 --- /dev/null +++ b/public/assets/PlusOutlined-W6xCIIXs.js @@ -0,0 +1,9 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{An as n,Dr as r,Et as i,Ft as a,Ln as o,Pn as s,Q as c,St as l,Tt as u,Vn as d,Wt as f,xn as p,xt as m,zn as h}from"./jsx-runtime-ADHq9IcL.js";var g=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z`}}]},name:`close`,theme:`outlined`}})),_=e(r()),v=e(g());function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t_.createElement(a,y({},e,{ref:t,icon:v.default}))),x=e=>{let{prefixCls:t,className:n,style:r,size:i,shape:a}=e,o=d({[`${t}-lg`]:i===`large`,[`${t}-sm`]:i===`small`}),s=d({[`${t}-circle`]:a===`circle`,[`${t}-square`]:a===`square`,[`${t}-round`]:a===`round`}),c=_.useMemo(()=>u(i)?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return _.createElement(`span`,{className:d(t,o,s,n),style:{...c,...r}})},S=new n(`ant-skeleton-loading`,{"0%":{backgroundPosition:`100% 50%`},"100%":{backgroundPosition:`0 50%`}}),C=e=>({height:e,lineHeight:s(e)}),w=e=>({width:e,...C(e)}),T=e=>({background:e.skeletonLoadingBackground,backgroundSize:`400% 100%`,animationName:S,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:`ease`,animationIterationCount:`infinite`}),E=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...C(e)}),D=e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:i,controlHeightSM:a}=e;return{[t]:{display:`inline-block`,verticalAlign:`top`,background:n,...w(r)},[`${t}${t}-circle`]:{borderRadius:`50%`},[`${t}${t}-lg`]:{...w(i)},[`${t}${t}-sm`]:{...w(a)}}},O=e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:i,controlHeightSM:a,gradientFromColor:o,calc:s}=e;return{[r]:{display:`inline-block`,verticalAlign:`top`,background:o,borderRadius:n,...E(t,s)},[`${r}-lg`]:{...E(i,s)},[`${r}-sm`]:{...E(a,s)}}},k=e=>{let{gradientFromColor:t,borderRadiusSM:n,imageSizeBase:r,calc:i}=e;return{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,verticalAlign:`middle`,background:t,borderRadius:n,...w(i(r).mul(2).equal())}},A=e=>({[e.skeletonNodeCls]:{...k(e)}}),j=e=>{let{skeletonImageCls:t,imageSizeBase:n,calc:r}=e;return{[t]:{...k(e),[`${t}-path`]:{fill:`#bfbfbf`},[`${t}-svg`]:{...w(n),maxWidth:r(n).mul(4).equal(),maxHeight:r(n).mul(4).equal()},[`${t}-svg${t}-svg-circle`]:{borderRadius:`50%`}},[`${t}${t}-circle`]:{borderRadius:`50%`}}},M=(e,t,n)=>{let{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:`50%`},[`${n}${r}-round`]:{borderRadius:t}}},N=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...C(e)}),P=e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:i,controlHeightSM:a,gradientFromColor:o,calc:s}=e;return{[n]:{display:`inline-block`,verticalAlign:`top`,background:o,borderRadius:t,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal(),...N(r,s)},...M(e,r,n),[`${n}-lg`]:{...N(i,s)},...M(e,i,`${n}-lg`),[`${n}-sm`]:{...N(a,s)},...M(e,a,`${n}-sm`)}},F=e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:i,skeletonButtonCls:a,skeletonInputCls:o,skeletonNodeCls:s,skeletonImageCls:c,controlHeight:l,controlHeightLG:u,controlHeightSM:d,gradientFromColor:f,padding:p,marginSM:m,borderRadius:h,titleHeight:g,blockRadius:_,paragraphLiHeight:v,controlHeightXS:y,paragraphMarginTop:b}=e;return{[t]:{display:`table`,width:`100%`,[`${t}-header`]:{display:`table-cell`,paddingInlineEnd:p,verticalAlign:`top`,[n]:{display:`inline-block`,verticalAlign:`top`,background:f,...w(l)},[`${n}-circle`]:{borderRadius:`50%`},[`${n}-lg`]:{...w(u)},[`${n}-sm`]:{...w(d)}},[`${t}-section`]:{display:`table-cell`,width:`100%`,verticalAlign:`top`,[r]:{width:`100%`,height:g,background:f,borderRadius:_,[`+ ${i}`]:{marginBlockStart:d}},[i]:{padding:0,"> li":{width:`100%`,height:v,listStyle:`none`,background:f,borderRadius:_,"+ li":{marginBlockStart:y}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:`61%`}},[`&-round ${t}-section`]:{[`${r}, ${i} > li`]:{borderRadius:h}}},[`${t}-with-avatar ${t}-section`]:{[r]:{marginBlockStart:m,[`+ ${i}`]:{marginBlockStart:b}}},[`${t}${t}-element`]:{display:`inline-block`,width:`auto`,...P(e),...D(e),...O(e),...A(e),...j(e)},[`${t}${t}-block`]:{width:`100%`,[a]:{width:`100%`},[o]:{width:`100%`}},[`${t}${t}-active`]:{[` + ${r}, + ${i} > li, + ${n}, + ${a}, + ${o}, + ${s}, + ${c} + `]:{...T(e)}}}},I=f(`Skeleton`,e=>{let{componentCls:t,calc:n}=e;return F(p(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonNodeCls:`${t}-node`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:`1.4s`}))},e=>{let{colorFillContent:t,colorFill:n}=e,r=t,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[[`color`,`gradientFromColor`],[`colorGradientEnd`,`gradientToColor`]]}),L=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,active:a,style:s,styles:l,shape:u=`circle`,size:f,...p}=e,{getPrefixCls:m}=_.useContext(o),h=m(`skeleton`,t),[g,v]=I(h),y=c(e=>f??e),b=d(h,`${h}-element`,{[`${h}-active`]:a},r?.root,n,i,g,v);return _.createElement(`div`,{className:b,style:l?.root},_.createElement(x,{prefixCls:`${h}-avatar`,className:r?.content,style:{...l?.content,...s},shape:u,size:y,...p}))},R=e=>{let{prefixCls:t,className:n,rootClassName:r,classNames:i,active:a,style:s,styles:l,block:u=!1,size:f,...p}=e,{getPrefixCls:m}=_.useContext(o),h=m(`skeleton`,t),[g,v]=I(h),y=c(e=>f??e),b=d(h,`${h}-element`,{[`${h}-active`]:a,[`${h}-block`]:u},i?.root,n,r,g,v);return _.createElement(`div`,{className:b,style:l?.root},_.createElement(x,{prefixCls:`${h}-button`,className:i?.content,style:{...l?.content,...s},size:y,...p}))},z=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,internalClassName:a,style:s,styles:c,active:l,children:u}=e,{getPrefixCls:f}=_.useContext(o),p=f(`skeleton`,t),[m,h]=I(p),g=d(p,`${p}-element`,{[`${p}-active`]:l},m,r?.root,n,i,h);return _.createElement(`div`,{className:g,style:c?.root},_.createElement(`div`,{className:d(r?.content,a||`${p}-node`),style:{...c?.content,...s}},u))},B=e=>{let{getPrefixCls:t}=_.useContext(o),n=t(`skeleton`,e.prefixCls);return _.createElement(z,{...e,internalClassName:`${n}-image`},_.createElement(`svg`,{viewBox:`0 0 1098 1024`,xmlns:`http://www.w3.org/2000/svg`,className:`${n}-image-svg`},_.createElement(`title`,null,`Image placeholder`),_.createElement(`path`,{d:`M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6`,className:`${n}-image-path`})))},V=e=>{let{prefixCls:t,className:n,classNames:r,rootClassName:i,active:a,block:s,style:l,styles:u,size:f,...p}=e,{getPrefixCls:m}=_.useContext(o),h=m(`skeleton`,t),[g,v]=I(h),y=c(e=>f??e),b=d(h,`${h}-element`,{[`${h}-active`]:a,[`${h}-block`]:s},r?.root,n,i,g,v);return _.createElement(`div`,{className:b,style:u?.root},_.createElement(x,{prefixCls:`${h}-input`,className:r?.content,style:{...u?.content,...l},size:y,...p}))},H=(e,t)=>{let{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},U=e=>{let{prefixCls:t,className:n,style:r,rows:i=0}=e,a=Array.from({length:i}).map((t,n)=>_.createElement(`li`,{key:n,style:{width:H(n,e)}}));return _.createElement(`ul`,{className:d(t,n),style:r},a)},W=({prefixCls:e,className:t,width:n,style:r})=>_.createElement(`h3`,{className:d(e,t),style:{width:n,...r}});function G(e){return i(e)?e:{}}function K(e,t){return e&&!t?{size:`large`,shape:`square`}:{size:`large`,shape:`circle`}}function q(e,t){return!e&&t?{width:`38%`}:e&&t?{width:`50%`}:{}}function J(e,t){let n={};return(!e||!t)&&(n.width=`61%`),!e&&t?n.rows=3:n.rows=2,n}var Y=e=>{let{prefixCls:t,loading:n,className:r,rootClassName:i,classNames:a,style:o,styles:s,children:c,avatar:u=!1,title:f=!0,paragraph:p=!0,active:g,round:v}=e,{getPrefixCls:y,direction:b,className:S,style:C,classNames:w,styles:T}=h(`skeleton`),E=y(`skeleton`,t),[D,O]=I(E),k={...e,avatar:u,title:f,paragraph:p},A=l(C),j=l(o),[M,N]=m([w,a],[T,A,s,j],{props:k});if(n||!(`loading`in e)){let e=!!u,t=!!f,n=!!p,a;if(e){let e={className:M.avatar,prefixCls:`${E}-avatar`,...K(t,n),...G(u),style:N.avatar};a=_.createElement(`div`,{className:d(M.header,`${E}-header`),style:N.header},_.createElement(x,{...e}))}let o;if(t||n){let r;if(t){let t={className:M.title,prefixCls:`${E}-title`,...q(e,n),...G(f),style:N.title};r=_.createElement(W,{...t})}let i;if(n){let n={className:M.paragraph,prefixCls:`${E}-paragraph`,...J(e,t),...G(p),style:N.paragraph};i=_.createElement(U,{...n})}o=_.createElement(`div`,{className:d(M.section,`${E}-section`),style:N.section},r,i)}let s=d(E,{[`${E}-with-avatar`]:e,[`${E}-active`]:g,[`${E}-rtl`]:b===`rtl`,[`${E}-round`]:v},M.root,S,r,i,D,O);return _.createElement(`div`,{className:s,style:N.root},a,o)}return c??null};Y.Button=R,Y.Avatar=L,Y.Input=V,Y.Image=B,Y.Node=z;var X=Y,Z=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z`}},{tag:`path`,attrs:{d:`M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z`}}]},name:`plus`,theme:`outlined`}}))());function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t_.createElement(a,Q({},e,{ref:t,icon:Z.default})));export{X as n,b as r,$ as t}; \ No newline at end of file diff --git a/public/assets/PrinterOutlined-Bhc-_5gY.js b/public/assets/PrinterOutlined-Bhc-_5gY.js new file mode 100644 index 0000000..77c1c47 --- /dev/null +++ b/public/assets/PrinterOutlined-Bhc-_5gY.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M820 436h-40c-4.4 0-8 3.6-8 8v40c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-40c0-4.4-3.6-8-8-8zm32-104H732V120c0-4.4-3.6-8-8-8H300c-4.4 0-8 3.6-8 8v212H172c-44.2 0-80 35.8-80 80v328c0 17.7 14.3 32 32 32h168v132c0 4.4 3.6 8 8 8h424c4.4 0 8-3.6 8-8V772h168c17.7 0 32-14.3 32-32V412c0-44.2-35.8-80-80-80zM360 180h304v152H360V180zm304 664H360V568h304v276zm200-140H732V500H292v204H160V412c0-6.6 5.4-12 12-12h680c6.6 0 12 5.4 12 12v292z`}}]},name:`printer`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/PurePanel-BhXcm5Bt.js b/public/assets/PurePanel-BhXcm5Bt.js deleted file mode 100644 index 6ee52a1..0000000 --- a/public/assets/PurePanel-BhXcm5Bt.js +++ /dev/null @@ -1 +0,0 @@ -import{Or as e,Tr as t,sn as n,tt as r,ur as i}from"./jsx-runtime-NwRKtVrk.js";var a=e(t());function o(e){return t=>a.createElement(r,{theme:{token:{motion:!1,zIndexPopupBase:0}}},a.createElement(e,{...t}))}var s=(e,t,r,s,c)=>o(o=>{let{prefixCls:l,style:u}=o,d=a.useRef(null),[f,p]=a.useState(0),[m,h]=a.useState(0),[g,_]=i(!1,o.open),{getPrefixCls:v}=a.useContext(n),y=v(s||`select`,l);a.useEffect(()=>{if(_(!0),typeof ResizeObserver<`u`){let e=new ResizeObserver(e=>{let t=e[0].target;p(t.offsetHeight+8),h(t.offsetWidth)}),t=setInterval(()=>{let n=c?`.${c(y)}`:`.${y}-dropdown`,r=d.current?.querySelector(n);r&&(clearInterval(t),e.observe(r))},10);return()=>{clearInterval(t),e.disconnect()}}},[y]);let b={...o,style:{...u,margin:0},open:g,getPopupContainer:()=>d.current};r&&(b=r(b)),t&&(b={...b,[t]:{overflow:{adjustX:!1,adjustY:!1}}});let x={paddingBottom:f,position:`relative`,minWidth:m};return a.createElement(`div`,{ref:d,style:x},a.createElement(e,{...b}))});export{o as n,s as t}; \ No newline at end of file diff --git a/public/assets/PurePanel-CKFVxwoF.js b/public/assets/PurePanel-CKFVxwoF.js new file mode 100644 index 0000000..4ee5f2d --- /dev/null +++ b/public/assets/PurePanel-CKFVxwoF.js @@ -0,0 +1 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,Ln as n,yr as r}from"./jsx-runtime-ADHq9IcL.js";import{t as i}from"./config-provider-BFg4S-AS.js";var a=e(t());function o(e){return t=>a.createElement(i,{theme:{token:{motion:!1,zIndexPopupBase:0}}},a.createElement(e,{...t}))}var s=(e,t,i,s,c)=>o(o=>{let{prefixCls:l,style:u}=o,d=a.useRef(null),[f,p]=a.useState(0),[m,h]=a.useState(0),[g,_]=r(!1,o.open),{getPrefixCls:v}=a.useContext(n),y=v(s||`select`,l);a.useEffect(()=>{if(_(!0),typeof ResizeObserver<`u`){let e=new ResizeObserver(e=>{let t=e[0].target;p(t.offsetHeight+8),h(t.offsetWidth)}),t=setInterval(()=>{let n=c?`.${c(y)}`:`.${y}-dropdown`,r=d.current?.querySelector(n);r&&(clearInterval(t),e.observe(r))},10);return()=>{clearInterval(t),e.disconnect()}}},[y]);let b={...o,style:{...u,margin:0},open:g,getPopupContainer:()=>d.current};i&&(b=i(b)),t&&(b={...b,[t]:{overflow:{adjustX:!1,adjustY:!1}}});let x={paddingBottom:f,position:`relative`,minWidth:m};return a.createElement(`div`,{ref:d,style:x},a.createElement(e,{...b}))});export{o as n,s as t}; \ No newline at end of file diff --git a/public/assets/QqOutlined-BUFqYSFz.js b/public/assets/QqOutlined-BUFqYSFz.js new file mode 100644 index 0000000..cafe446 --- /dev/null +++ b/public/assets/QqOutlined-BUFqYSFz.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.8 613.2c-16-51.4-34.4-94.6-62.7-165.3C766.5 262.2 689.3 112 511.5 112 331.7 112 256.2 265.2 261 447.9c-28.4 70.8-46.7 113.7-62.7 165.3-34 109.5-23 154.8-14.6 155.8 18 2.2 70.1-82.4 70.1-82.4 0 49 25.2 112.9 79.8 159-26.4 8.1-85.7 29.9-71.6 53.8 11.4 19.3 196.2 12.3 249.5 6.3 53.3 6 238.1 13 249.5-6.3 14.1-23.8-45.3-45.7-71.6-53.8 54.6-46.2 79.8-110.1 79.8-159 0 0 52.1 84.6 70.1 82.4 8.5-1.1 19.5-46.4-14.5-155.8z`}}]},name:`qq`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/RiseOutlined-C6wo3ytm.js b/public/assets/RiseOutlined-C6wo3ytm.js new file mode 100644 index 0000000..066009c --- /dev/null +++ b/public/assets/RiseOutlined-C6wo3ytm.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M917 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z`}}]},name:`rise`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/SearchOutlined-B7X5pgf4.js b/public/assets/SearchOutlined-B7X5pgf4.js new file mode 100644 index 0000000..1157e98 --- /dev/null +++ b/public/assets/SearchOutlined-B7X5pgf4.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z`}}]},name:`search`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/ShoppingOutlined-FR5CTwva.js b/public/assets/ShoppingOutlined-FR5CTwva.js new file mode 100644 index 0000000..74d785a --- /dev/null +++ b/public/assets/ShoppingOutlined-FR5CTwva.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 312H696v-16c0-101.6-82.4-184-184-184s-184 82.4-184 184v16H192c-17.7 0-32 14.3-32 32v536c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V344c0-17.7-14.3-32-32-32zm-432-16c0-61.9 50.1-112 112-112s112 50.1 112 112v16H400v-16zm392 544H232V384h96v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h224v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h96v456z`}}]},name:`shopping`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/SmileOutlined-CZG5Mc5n.js b/public/assets/SmileOutlined-CZG5Mc5n.js new file mode 100644 index 0000000..57602af --- /dev/null +++ b/public/assets/SmileOutlined-CZG5Mc5n.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z`}}]},name:`appstore`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default}))),l=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z`}}]},name:`bell`,theme:`outlined`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,u({},e,{ref:t,icon:l.default}))),f=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z`}}]},name:`mail`,theme:`outlined`}}))());function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,p({},e,{ref:t,icon:f.default}))),h=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M877.1 238.7L770.6 132.3c-13-13-30.4-20.3-48.8-20.3s-35.8 7.2-48.8 20.3L558.3 246.8c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l89.6 89.7a405.46 405.46 0 01-86.4 127.3c-36.7 36.9-79.6 66-127.2 86.6l-89.6-89.7c-13-13-30.4-20.3-48.8-20.3a68.2 68.2 0 00-48.8 20.3L132.3 673c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l106.4 106.4c22.2 22.2 52.8 34.9 84.2 34.9 6.5 0 12.8-.5 19.2-1.6 132.4-21.8 263.8-92.3 369.9-198.3C818 606 888.4 474.6 910.4 342.1c6.3-37.6-6.3-76.3-33.3-103.4zm-37.6 91.5c-19.5 117.9-82.9 235.5-178.4 331s-213 158.9-330.9 178.4c-14.8 2.5-30-2.5-40.8-13.2L184.9 721.9 295.7 611l119.8 120 .9.9 21.6-8a481.29 481.29 0 00285.7-285.8l8-21.6-120.8-120.7 110.8-110.9 104.5 104.5c10.8 10.8 15.8 26 13.3 40.8z`}}]},name:`phone`,theme:`outlined`}}))());function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,g({},e,{ref:t,icon:h.default}))),v=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M280 752h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8zm192-280h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8zm192 72h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v256c0 4.4 3.6 8 8 8zm216-432H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]},name:`project`,theme:`outlined`}}))());function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,y({},e,{ref:t,icon:v.default}))),x=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M882 272.1V144c0-17.7-14.3-32-32-32H174c-17.7 0-32 14.3-32 32v128.1c-16.7 1-30 14.9-30 31.9v131.7a177 177 0 0014.4 70.4c4.3 10.2 9.6 19.8 15.6 28.9v345c0 17.6 14.3 32 32 32h676c17.7 0 32-14.3 32-32V535a175 175 0 0015.6-28.9c9.5-22.3 14.4-46 14.4-70.4V304c0-17-13.3-30.9-30-31.9zM214 184h596v88H214v-88zm362 656.1H448V736h128v104.1zm234 0H640V704c0-17.7-14.3-32-32-32H416c-17.7 0-32 14.3-32 32v136.1H214V597.9c2.9 1.4 5.9 2.8 9 4 22.3 9.4 46 14.1 70.4 14.1s48-4.7 70.4-14.1c13.8-5.8 26.8-13.2 38.7-22.1.2-.1.4-.1.6 0a180.4 180.4 0 0038.7 22.1c22.3 9.4 46 14.1 70.4 14.1 24.4 0 48-4.7 70.4-14.1 13.8-5.8 26.8-13.2 38.7-22.1.2-.1.4-.1.6 0a180.4 180.4 0 0038.7 22.1c22.3 9.4 46 14.1 70.4 14.1 24.4 0 48-4.7 70.4-14.1 3-1.3 6-2.6 9-4v242.2zm30-404.4c0 59.8-49 108.3-109.3 108.3-40.8 0-76.4-22.1-95.2-54.9-2.9-5-8.1-8.1-13.9-8.1h-.6c-5.7 0-11 3.1-13.9 8.1A109.24 109.24 0 01512 544c-40.7 0-76.2-22-95-54.7-3-5.1-8.4-8.3-14.3-8.3s-11.4 3.2-14.3 8.3a109.63 109.63 0 01-95.1 54.7C233 544 184 495.5 184 435.7v-91.2c0-.3.2-.5.5-.5h655c.3 0 .5.2.5.5v91.2z`}}]},name:`shop`,theme:`outlined`}}))());function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,S({},e,{ref:t,icon:x.default}))),w=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z`}}]},name:`smile`,theme:`outlined`}}))());function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,T({},e,{ref:t,icon:w.default})));export{m as a,_ as i,C as n,d as o,b as r,c as s,E as t}; \ No newline at end of file diff --git a/public/assets/TeamOutlined-CZDGTBQJ.js b/public/assets/TeamOutlined-CZDGTBQJ.js new file mode 100644 index 0000000..db0559b --- /dev/null +++ b/public/assets/TeamOutlined-CZDGTBQJ.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z`}}]},name:`team`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/TextArea-D4RcD0z1.js b/public/assets/TextArea-D4RcD0z1.js deleted file mode 100644 index 6e6d3f8..0000000 --- a/public/assets/TextArea-D4RcD0z1.js +++ /dev/null @@ -1,4 +0,0 @@ -import{Bt as e,J as t,Or as n,Sr as r,St as i,Tr as a,Xn as o,Y as s,cn as c,dn as ee,et as te,fn as l,it as u,m as d,mr as f,r as p}from"./jsx-runtime-NwRKtVrk.js";import{_ as m,g as h,l as g}from"./CopyOutlined-bJLUKQgS.js";import{n as _,t as ne}from"./statusUtils-G17j4Ng-.js";import{i as re,r as ie}from"./Input-yLjViSX8.js";var v=()=>f()&&window.document.documentElement,y=n(a()),b=e=>{let{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:`100%`,height:`auto`,minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:`bottom`,transition:`all ${e.motionDurationSlow}`,resize:`vertical`,[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:`auto`},[r]:{position:`relative`,"&-show-count":{[`${t}-data-count`]:{position:`absolute`,bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:`nowrap`,pointerEvents:`none`}},[` - &-allow-clear > ${t}, - &-affix-wrapper${r}-has-feedback ${t} - `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:`inherit`,border:`none`,outline:`none`,background:`transparent`,minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:`none !important`}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:`absolute`,insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:`absolute`,top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:`inline-flex`,alignItems:`center`,margin:`auto`,pointerEvents:`none`}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:`ltr`,insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},x=i([`Input`,`TextArea`],t=>b(e(t,m(t))),h,{resetFont:!1}),S=(0,y.forwardRef)((e,n)=>{let{prefixCls:i,bordered:a=!0,size:f,disabled:m,status:h,allowClear:v,classNames:b,rootClassName:S,className:C,style:w,styles:T,variant:E,showCount:D,onMouseDown:O,onResize:k,...A}=e,{getPrefixCls:j,direction:M,allowClear:N,autoComplete:P,className:F,style:I,classNames:L,styles:R}=c(`textArea`),z=y.useContext(u),ae=m??z,{status:B,hasFeedback:V,feedbackIcon:H}=y.useContext(d),U=ne(B,h),[W,G]=ee([L,b],[R,T],{props:e}),K=y.useRef(null);y.useImperativeHandle(n,()=>({resizableTextArea:K.current?.resizableTextArea,focus:e=>{o(K.current?.resizableTextArea?.textArea,e)},blur:()=>K.current?.blur(),nativeElement:K.current?.nativeElement||null}));let q=j(`input`,i),J=te(q),[Y,oe]=g(q,S);x(q,J);let{compactSize:se,compactItemClassnames:ce}=t(q,M),X=s(e=>f??se??e),[Z,le]=p(`textArea`,E,a),ue=re({allowClear:v,contextAllowClear:N,componentName:`TextArea`}),[Q,$]=y.useState(!1),[de,fe]=y.useState(!1),pe=e=>{$(!0),O?.(e);let t=()=>{$(!1),document.removeEventListener(`mouseup`,t)};document.addEventListener(`mouseup`,t)},me=e=>{if(k?.(e),Q&&l(getComputedStyle)){let e=K.current?.nativeElement?.querySelector(`textarea`);e&&getComputedStyle(e).resize===`both`&&fe(!0)}};return y.createElement(ie,{autoComplete:P,...A,style:{...G.root,...I,...w},styles:G,disabled:ae,allowClear:ue,className:r(oe,J,C,S,ce,F,W.root,{[`${q}-textarea-affix-wrapper-resize-dirty`]:de}),classNames:{...W,textarea:r({[`${q}-sm`]:X===`small`,[`${q}-lg`]:X===`large`},Y,W.textarea,Q&&`${q}-mouse-active`),variant:r({[`${q}-${Z}`]:le},_(q,U)),affixWrapper:r(`${q}-textarea-affix-wrapper`,{[`${q}-affix-wrapper-rtl`]:M===`rtl`,[`${q}-affix-wrapper-sm`]:X===`small`,[`${q}-affix-wrapper-lg`]:X===`large`,[`${q}-textarea-show-count`]:D||e.count?.show},Y)},prefixCls:q,suffix:V&&y.createElement(`span`,{className:`${q}-textarea-suffix`},H),showCount:D,ref:K,onResize:me,onMouseDown:pe})});export{v as n,S as t}; \ No newline at end of file diff --git a/public/assets/UploadOutlined-Cg0kzjdE.js b/public/assets/UploadOutlined-Cg0kzjdE.js new file mode 100644 index 0000000..3c2c2fb --- /dev/null +++ b/public/assets/UploadOutlined-Cg0kzjdE.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M956.9 845.1L896.4 632V168c0-17.7-14.3-32-32-32h-704c-17.7 0-32 14.3-32 32v464L67.9 845.1C60.4 866 75.8 888 98 888h828.8c22.2 0 37.6-22 30.1-42.9zM200.4 208h624v395h-624V208zm228.3 608l8.1-37h150.3l8.1 37H428.7zm224 0l-19.1-86.7c-.8-3.7-4.1-6.3-7.8-6.3H398.2c-3.8 0-7 2.6-7.8 6.3L371.3 816H151l42.3-149h638.2l42.3 149H652.7z`}}]},name:`laptop`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default}))),l=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 112H724V72c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v40H500V72c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v40H320c-17.7 0-32 14.3-32 32v120h-96c-17.7 0-32 14.3-32 32v632c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32v-96h96c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM664 888H232V336h218v174c0 22.1 17.9 40 40 40h174v338zm0-402H514V336h.2L664 485.8v.2zm128 274h-56V456L544 264H360v-80h68v32c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-32h152v32c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-32h68v576z`}}]},name:`snippets`,theme:`outlined`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,u({},e,{ref:t,icon:l.default}))),f=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`upload`,theme:`outlined`}}))());function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,p({},e,{ref:t,icon:f.default})));export{d as n,c as r,m as t}; \ No newline at end of file diff --git a/public/assets/UserOutlined-DjbONoy-.js b/public/assets/UserOutlined-DjbONoy-.js new file mode 100644 index 0000000..a500b37 --- /dev/null +++ b/public/assets/UserOutlined-DjbONoy-.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/WarningFilled-CsttfMOX.js b/public/assets/WarningFilled-CsttfMOX.js new file mode 100644 index 0000000..e6760df --- /dev/null +++ b/public/assets/WarningFilled-CsttfMOX.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`warning`,theme:`filled`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/WarningFilled-HhpRZ5xC.js b/public/assets/WarningFilled-HhpRZ5xC.js deleted file mode 100644 index 8aeb138..0000000 --- a/public/assets/WarningFilled-HhpRZ5xC.js +++ /dev/null @@ -1 +0,0 @@ -import{Er as e,Or as t,Tn as n,Tr as r}from"./jsx-runtime-NwRKtVrk.js";var i=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`warning`,theme:`filled`}})),a=t(r()),o=t(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(n,s({},e,{ref:t,icon:o.default})));export{c as t}; \ No newline at end of file diff --git a/public/assets/WeiboOutlined-DyyhlXM5.js b/public/assets/WeiboOutlined-DyyhlXM5.js new file mode 100644 index 0000000..50d6426 --- /dev/null +++ b/public/assets/WeiboOutlined-DyyhlXM5.js @@ -0,0 +1 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-ADHq9IcL.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M557.2 129a6.68 6.68 0 016.72 6.65V250.2h243.8a6.74 6.74 0 016.65 6.84c.02 23.92-6.05 54.69-19.85 54.69H563.94v81.1h166.18c7.69 0 13.8 6.51 13.25 14.18l-.11 1.51c-.7 90.2-30.63 180.64-79.52 259.65l8.71 3.82c77.3 33.48 162.15 60.85 267.15 64.14a21.08 21.08 0 0120.38 22.07l-.2 3.95c-3.34 59.57-20 132.85-79.85 132.85-8.8 0-17.29-.55-25.48-1.61-78.04-9.25-156.28-57.05-236.32-110.27l-17.33-11.57-13.15-8.83a480.83 480.83 0 01-69.99 57.25 192.8 192.8 0 01-19.57 11.08c-65.51 39.18-142.21 62.6-227.42 62.62-118.2 0-204.92-77.97-206.64-175.9l-.03-2.95.03-1.7c1.66-98.12 84.77-175.18 203-176.72l3.64-.03c102.92 0 186.66 33.54 270.48 73.14l.44.38 1.7-3.47c21.27-44.14 36.44-94.95 42.74-152.06h-324.8a6.64 6.64 0 01-6.63-6.62c-.04-21.86 6-54.91 19.85-54.91h162.1v-81.1H191.92a6.71 6.71 0 01-6.64-6.85c-.01-22.61 6.06-54.68 19.86-54.68h231.4v-64.85l.02-1.99c.9-30.93 23.72-54.36 120.64-54.36M256.9 619c-74.77 0-136.53 39.93-137.88 95.6l-.02 1.26.08 3.24a92.55 92.55 0 001.58 13.64c20.26 96.5 220.16 129.71 364.34-36.59l-8.03-4.72C405.95 650.11 332.94 619 256.9 619`}}]},name:`alipay`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,s({},e,{ref:t,icon:o.default}))),l=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z`}}]},name:`bulb`,theme:`outlined`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,u({},e,{ref:t,icon:l.default}))),f=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M168.5 273.7a68.7 68.7 0 10137.4 0 68.7 68.7 0 10-137.4 0zm730 79.2s-23.7-184.4-426.9-70.1c17.3-30 25.6-49.5 25.6-49.5L396.4 205s-40.6 132.6-113 194.4c0 0 70.1 40.6 69.4 39.4 20.1-20.1 38.2-40.6 53.7-60.4 16.1-7 31.5-13.6 46.7-19.8-18.6 33.5-48.7 83.8-78.8 115.6l42.4 37s28.8-27.7 60.4-61.2h36v61.8H372.9v49.5h140.3v118.5c-1.7 0-3.6 0-5.4-.2-15.4-.7-39.5-3.3-49-18.2-11.5-18.1-3-51.5-2.4-71.9h-97l-3.4 1.8s-35.5 159.1 102.3 155.5c129.1 3.6 203-36 238.6-63.1l14.2 52.6 79.6-33.2-53.9-131.9-64.6 20.1 12.1 45.2c-16.6 12.4-35.6 21.7-56.2 28.4V561.3h137.1v-49.5H628.1V450h137.6v-49.5H521.3c17.6-21.4 31.5-41.1 35-53.6l-42.5-11.6c182.8-65.5 284.5-54.2 283.6 53.2v282.8s10.8 97.1-100.4 90.1l-60.2-12.9-14.2 57.1S882.5 880 903.7 680.2c21.3-200-5.2-327.3-5.2-327.3zm-707.4 18.3l-45.4 69.7 83.6 52.1s56 28.5 29.4 81.9C233.8 625.5 112 736.3 112 736.3l109 68.1c75.4-163.7 70.5-142 89.5-200.7 19.5-60.1 23.7-105.9-9.4-139.1-42.4-42.6-47-46.6-110-93.4z`}}]},name:`taobao`,theme:`outlined`}}))());function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,p({},e,{ref:t,icon:f.default}))),h=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M140 188h584v164h76V144c0-17.7-14.3-32-32-32H96c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h544v-76H140V188z`}},{tag:`path`,attrs:{d:`M414.3 256h-60.6c-3.4 0-6.4 2.2-7.6 5.4L219 629.4c-.3.8-.4 1.7-.4 2.6 0 4.4 3.6 8 8 8h55.1c3.4 0 6.4-2.2 7.6-5.4L322 540h196.2L422 261.4a8.42 8.42 0 00-7.7-5.4zm12.4 228h-85.5L384 360.2 426.7 484zM936 528H800v-93c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v93H592c-13.3 0-24 10.7-24 24v176c0 13.3 10.7 24 24 24h136v152c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V752h136c13.3 0 24-10.7 24-24V552c0-13.3-10.7-24-24-24zM728 680h-88v-80h88v80zm160 0h-88v-80h88v80z`}}]},name:`translation`,theme:`outlined`}}))());function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,g({},e,{ref:t,icon:h.default}))),v=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z`}}]},name:`wechat`,theme:`outlined`}}))());function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,y({},e,{ref:t,icon:v.default}))),x=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M457.3 543c-68.1-17.7-145 16.2-174.6 76.2-30.1 61.2-1 129.1 67.8 151.3 71.2 23 155.2-12.2 184.4-78.3 28.7-64.6-7.2-131-77.6-149.2zm-52 156.2c-13.8 22.1-43.5 31.7-65.8 21.6-22-10-28.5-35.7-14.6-57.2 13.7-21.4 42.3-31 64.4-21.7 22.4 9.5 29.6 35 16 57.3zm45.5-58.5c-5 8.6-16.1 12.7-24.7 9.1-8.5-3.5-11.2-13.1-6.4-21.5 5-8.4 15.6-12.4 24.1-9.1 8.7 3.2 11.8 12.9 7 21.5zm334.5-197.2c15 4.8 31-3.4 35.9-18.3 11.8-36.6 4.4-78.4-23.2-109a111.39 111.39 0 00-106-34.3 28.45 28.45 0 00-21.9 33.8 28.39 28.39 0 0033.8 21.8c18.4-3.9 38.3 1.8 51.9 16.7a54.2 54.2 0 0111.3 53.3 28.45 28.45 0 0018.2 36zm99.8-206c-56.7-62.9-140.4-86.9-217.7-70.5a32.98 32.98 0 00-25.4 39.3 33.12 33.12 0 0039.3 25.5c55-11.7 114.4 5.4 154.8 50.1 40.3 44.7 51.2 105.7 34 159.1-5.6 17.4 3.9 36 21.3 41.7 17.4 5.6 36-3.9 41.6-21.2v-.1c24.1-75.4 8.9-161.1-47.9-223.9zM729 499c-12.2-3.6-20.5-6.1-14.1-22.1 13.8-34.7 15.2-64.7.3-86-28-40.1-104.8-37.9-192.8-1.1 0 0-27.6 12.1-20.6-9.8 13.5-43.5 11.5-79.9-9.6-101-47.7-47.8-174.6 1.8-283.5 110.6C127.3 471.1 80 557.5 80 632.2 80 775.1 263.2 862 442.5 862c235 0 391.3-136.5 391.3-245 0-65.5-55.2-102.6-104.8-118zM443 810.8c-143 14.1-266.5-50.5-275.8-144.5-9.3-93.9 99.2-181.5 242.2-195.6 143-14.2 266.5 50.5 275.8 144.4C694.4 709 586 796.6 443 810.8z`}}]},name:`weibo`,theme:`outlined`}}))());function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(r,S({},e,{ref:t,icon:x.default})));export{d as a,m as i,b as n,c as o,_ as r,C as t}; \ No newline at end of file diff --git a/public/assets/XinForm-CH1TH01p.js b/public/assets/XinForm-CH1TH01p.js new file mode 100644 index 0000000..b344dc9 --- /dev/null +++ b/public/assets/XinForm-CH1TH01p.js @@ -0,0 +1,23 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{$ as n,$t as r,B as i,Bn as a,Dr as o,E as s,Et as c,Gn as l,Hn as u,Ht as d,Jn as f,K as p,Ln as m,N as h,Pn as g,Q as _,Qt as v,Sr as y,St as b,Tt as x,Ut as S,V as C,Vn as w,Wt as T,Xn as E,Yn as D,Z as O,Zn as k,Zt as A,at as j,d as M,en as N,gr as P,gt as ee,ir as F,kt as I,mn as L,nt as R,p as z,pt as B,q as V,qt as H,sr as U,t as W,tr as G,u as te,ut as K,vr as ne,wr as q,wt as re,xn as J,xr as ie,xt as ae,yr as oe,yt as se,z as ce,zn as le}from"./jsx-runtime-ADHq9IcL.js";import{t as Y}from"./request-Vytbr90w.js";import{E as ue,F as de,I as fe,L as pe,N as me,P as he,n as ge,r as _e,t as X}from"./lodash-D-pgfsxw.js";import{f as ve,l as ye,m as Z,p as be,t as xe,u as Se,y as Ce}from"./tooltip-CRuv8UNz.js";import{a as we,c as Te,i as Ee,l as De,o as Oe,r as ke,s as Ae,t as je}from"./table-CG-GtmXj.js";import{t as Me}from"./space-BqavXZJj.js";import{c as Ne,d as Pe,f as Fe,i as Ie,m as Le,p as Re,u as ze}from"./style-Der9vtsK.js";import{r as Be}from"./es-DtKsFKpZ.js";import{n as Ve,t as He}from"./button-CcpWP-mq.js";import{n as Ue,t as We}from"./LeftOutlined-DolIAuof.js";import{t as Ge}from"./PurePanel-CKFVxwoF.js";import{a as Ke,c as qe,d as Je,f as Ye,i as Xe,l as Ze,o as Qe,r as $e,s as et}from"./DoubleRightOutlined-BDFzD9z5.js";import{n as tt}from"./LockOutlined-rb6chlKx.js";import{t as nt}from"./radio-CFTLacYu.js";import{n as rt}from"./card-BFxeciPE.js";import{n as it,t as at}from"./checkbox-DV1_nuDN.js";import{n as ot,t as st}from"./row-DQ81_S1d.js";import{n as ct,t as lt}from"./modal-4LQWu5vA.js";import{t as ut}from"./ClockCircleOutlined-Cn57q4yS.js";import{t as dt}from"./form-CNvo0lCF.js";import{t as ft}from"./input-De-xbsfR.js";import{t as pt}from"./switch-BWactV-h.js";import{t as mt}from"./tag-BMkLMUVK.js";import{t as ht}from"./useTranslation-DIuTqE8W.js";import{t as gt}from"./ImageUploader-D1JVFGhR.js";var _t=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekday=r()})(e,(function(){return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localeData=r()})(e,(function(){return function(e,t,n){var r=t.prototype,i=function(e){return e&&(e.indexOf?e:e.s)},a=function(e,t,n,r,a){var o=e.name?e:e.$locale(),s=i(o[t]),c=i(o[n]),l=s||c.map((function(e){return e.slice(0,r)}));if(!a)return l;var u=o.weekStart;return l.map((function(e,t){return l[(t+(u||0))%7]}))},o=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}(e.formats[t.toUpperCase()])},c=function(){var e=this;return{months:function(t){return t?t.format(`MMMM`):a(e,`months`)},monthsShort:function(t){return t?t.format(`MMM`):a(e,`monthsShort`,`months`,3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format(`dddd`):a(e,`weekdays`)},weekdaysMin:function(t){return t?t.format(`dd`):a(e,`weekdaysMin`,`weekdays`,2)},weekdaysShort:function(t){return t?t.format(`ddd`):a(e,`weekdaysShort`,`weekdays`,3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return c.bind(this)()},n.localeData=function(){var e=o();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return a(o(),`months`)},n.monthsShort=function(){return a(o(),`monthsShort`,`months`,3)},n.weekdays=function(e){return a(o(),`weekdays`,null,null,e)},n.weekdaysShort=function(e){return a(o(),`weekdaysShort`,`weekdays`,3,e)},n.weekdaysMin=function(e){return a(o(),`weekdaysMin`,`weekdays`,2,e)}}}))})),yt=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekOfYear=r()})(e,(function(){var e=`week`,t=`year`;return function(n,r,i){var a=r.prototype;a.week=function(n){if(n===void 0&&(n=null),n!==null)return this.add(7*(n-this.week()),`day`);var r=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var a=i(this).startOf(t).add(1,t).date(r),o=i(this).endOf(e);if(a.isBefore(o))return 1}var s=i(this).startOf(t).date(r).startOf(e).subtract(1,`millisecond`),c=this.diff(s,e,!0);return c<0?i(this).startOf(`week`).week():Math.ceil(c)},a.weeks=function(e){return e===void 0&&(e=null),this.week(e)}}}))})),bt=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekYear=r()})(e,(function(){return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return t===1&&e===11?n+1:e===0&&t>=52?n-1:n}}}))})),xt=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),St=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),Q=e(o()),Ct=e(tt()),wt=e(_t()),Tt=e(vt()),Et=e(yt()),Dt=e(bt()),Ot=e(xt()),kt=e(St());Ct.default.extend(kt.default),Ct.default.extend(Ot.default),Ct.default.extend(wt.default),Ct.default.extend(Tt.default),Ct.default.extend(Et.default),Ct.default.extend(Dt.default),Ct.default.extend((e,t)=>{let n=t.prototype,r=n.format;n.format=function(e){let t=(e||``).replace(`Wo`,`wo`);return r.bind(this)(t)}});var At={bn_BD:`bn-bd`,by_BY:`be`,en_GB:`en-gb`,en_US:`en`,fr_BE:`fr`,fr_CA:`fr-ca`,hy_AM:`hy-am`,kmr_IQ:`ku`,nl_BE:`nl-be`,pt_BR:`pt-br`,zh_CN:`zh-cn`,zh_HK:`zh-hk`,zh_TW:`zh-tw`},jt=e=>At[e]||e.split(`_`)[0],Mt=e=>!Ct.default.isDayjs(e)||e instanceof Ct.default?e:(0,Ct.default)(e.valueOf()),Nt={getNow:()=>{let e=(0,Ct.default)();return typeof e.tz==`function`?e.tz():e},getFixedDate:e=>(0,Ct.default)(e,[`YYYY-M-DD`,`YYYY-MM-DD`]),getEndDate:e=>Mt(e).endOf(`month`),getWeekDay:e=>{let t=Mt(e).locale(`en`);return t.weekday()+t.localeData().firstDayOfWeek()},getYear:e=>Mt(e).year(),getMonth:e=>Mt(e).month(),getDate:e=>Mt(e).date(),getHour:e=>Mt(e).hour(),getMinute:e=>Mt(e).minute(),getSecond:e=>Mt(e).second(),getMillisecond:e=>Mt(e).millisecond(),addYear:(e,t)=>Mt(e).add(t,`year`),addMonth:(e,t)=>Mt(e).add(t,`month`),addDate:(e,t)=>Mt(e).add(t,`day`),setYear:(e,t)=>Mt(e).year(t),setMonth:(e,t)=>Mt(e).month(t),setDate:(e,t)=>Mt(e).date(t),setHour:(e,t)=>Mt(e).hour(t),setMinute:(e,t)=>Mt(e).minute(t),setSecond:(e,t)=>Mt(e).second(t),setMillisecond:(e,t)=>Mt(e).millisecond(t),isAfter:(e,t)=>Mt(e).isAfter(Mt(t)),isValidate:e=>Mt(e).isValid(),locale:{getWeekFirstDay:e=>(0,Ct.default)().locale(jt(e)).localeData().firstDayOfWeek(),getWeekFirstDate:(e,t)=>Mt(t).locale(jt(e)).weekday(0),getWeek:(e,t)=>Mt(t).locale(jt(e)).week(),getShortWeekDays:e=>(0,Ct.default)().locale(jt(e)).localeData().weekdaysMin(),getShortMonths:e=>(0,Ct.default)().locale(jt(e)).localeData().monthsShort(),format:(e,t,n)=>Mt(t).locale(jt(e)).format(n),parse:(e,t,n)=>{let r=jt(e);for(let e=0;e{e||f()}},o)}function Rt(e,t,n=`0`){let r=String(e);for(;r.length{e[t]!==void 0&&(n[t]=e[t])}),n}function Ht(e,t,n){if(n)return n;switch(e){case`time`:return t.fieldTimeFormat;case`datetime`:return t.fieldDateTimeFormat;case`month`:return t.fieldMonthFormat;case`year`:return t.fieldYearFormat;case`quarter`:return t.fieldQuarterFormat;case`week`:return t.fieldWeekFormat;default:return t.fieldDateFormat}}function Ut(e,t,n){let r=n===void 0?t[t.length-1]:n,i=t.find(t=>e[t]);return r===i?void 0:e[i]}function Wt(e){return Vt(e,[`placement`,`builtinPlacements`,`popupAlign`,`getPopupContainer`,`transitionName`,`direction`])}function Gt(e,t,n,r){let i=Q.useMemo(()=>e||((e,r)=>{let i=e;return t&&r.type===`date`?t(i,r.today):n&&r.type===`month`?n(i,r.locale):r.originNode}),[e,n,t]);return Q.useCallback((e,t)=>i(e,{...t,range:r}),[i,r])}function Kt(e,t,n=[]){let[r,i]=Q.useState([!1,!1]);return[Q.useMemo(()=>r.map((r,i)=>{if(r)return!0;let a=e[i];return a?!!(!n[i]&&!a||a&&t(a,{activeIndex:i})):!1}),[e,r,t,n]),(e,t)=>{i(n=>Bt(n,t,e))}]}function qt(e,t,n,r,i){let a=``,o=[];return e&&o.push(i?`hh`:`HH`),t&&o.push(`mm`),n&&o.push(`ss`),a=o.join(`:`),r&&(a+=`.SSS`),i&&(a+=` A`),a}function Jt(e,t,n,r,i,a){let{fieldDateTimeFormat:o,fieldDateFormat:s,fieldTimeFormat:c,fieldMonthFormat:l,fieldYearFormat:u,fieldWeekFormat:d,fieldQuarterFormat:f,yearFormat:p,cellYearFormat:m,cellQuarterFormat:h,dayFormat:g,cellDateFormat:_}=e,v=qt(t,n,r,i,a);return{...e,fieldDateTimeFormat:o||`YYYY-MM-DD ${v}`,fieldDateFormat:s||`YYYY-MM-DD`,fieldTimeFormat:c||v,fieldMonthFormat:l||`YYYY-MM`,fieldYearFormat:u||`YYYY`,fieldWeekFormat:d||`gggg-wo`,fieldQuarterFormat:f||`YYYY-[Q]Q`,yearFormat:p||`YYYY`,cellYearFormat:m||`YYYY`,cellQuarterFormat:h||`[Q]Q`,cellDateFormat:_||g||`D`}}function Yt(e,t){let{showHour:n,showMinute:r,showSecond:i,showMillisecond:a,use12Hours:o}=t;return Q.useMemo(()=>Jt(e,n,r,i,a,o),[e,n,r,i,a,o])}function Xt(e,t,n){return n??t.some(t=>e.includes(t))}var Zt=[`showNow`,`showHour`,`showMinute`,`showSecond`,`showMillisecond`,`use12Hours`,`hourStep`,`minuteStep`,`secondStep`,`millisecondStep`,`hideDisabledOptions`,`defaultValue`,`disabledHours`,`disabledMinutes`,`disabledSeconds`,`disabledMilliseconds`,`disabledTime`,`changeOnScroll`,`defaultOpenValue`];function Qt(e){let t=Vt(e,Zt),{format:n,picker:r}=e,i=null;return n&&(i=n,Array.isArray(i)&&(i=i[0]),i=typeof i==`object`?i.format:i),r===`time`&&(t.format=i),[t,i]}function $t(e){return e&&typeof e==`string`}function en(e,t,n,r){return[e,t,n,r].some(e=>e!==void 0)}function tn(e,t,n,r,i){let a=t,o=n,s=r;if(!e&&!a&&!o&&!s&&!i)a=!0,o=!0,s=!0;else if(e){let e=[a,o,s].some(e=>e===!1),t=[a,o,s].some(e=>e===!0),n=e?!0:!t;a??=n,o??=n,s??=n}return[a,o,s,i]}function nn(e){let{showTime:t}=e,[n,r]=Qt(e),i=t&&typeof t==`object`?t:{},a={defaultOpenValue:i.defaultOpenValue||i.defaultValue,...n,...i},{showMillisecond:o}=a,{showHour:s,showMinute:c,showSecond:l}=a,u=en(s,c,l,o);return[s,c,l]=tn(u,s,c,l,o),[a,{...a,showHour:s,showMinute:c,showSecond:l,showMillisecond:o},a.format,r]}function rn(e,t,n,r,i){if(e===`datetime`||e===`time`){let a=r,o=Ht(e,i,null),s=[t,n];for(let e=0;eMath.floor(e.getYear(t)/10)===Math.floor(e.getYear(n)/10))}function cn(e,t,n){return on(t,n,()=>e.getYear(t)===e.getYear(n))}function ln(e,t){return Math.floor(e.getMonth(t)/3)+1}function un(e,t,n){return on(t,n,()=>cn(e,t,n)&&ln(e,t)===ln(e,n))}function dn(e,t,n){return on(t,n,()=>cn(e,t,n)&&e.getMonth(t)===e.getMonth(n))}function fn(e,t,n){return on(t,n,()=>cn(e,t,n)&&dn(e,t,n)&&e.getDate(t)===e.getDate(n))}function pn(e,t,n){return on(t,n,()=>e.getHour(t)===e.getHour(n)&&e.getMinute(t)===e.getMinute(n)&&e.getSecond(t)===e.getSecond(n))}function mn(e,t,n){return on(t,n,()=>fn(e,t,n)&&pn(e,t,n)&&e.getMillisecond(t)===e.getMillisecond(n))}function hn(e,t,n,r){return on(n,r,()=>cn(e,e.locale.getWeekFirstDate(t,n),e.locale.getWeekFirstDate(t,r))&&e.locale.getWeek(t,n)===e.locale.getWeek(t,r))}function gn(e,t,n,r,i){switch(i){case`date`:return fn(e,n,r);case`week`:return hn(e,t.locale,n,r);case`month`:return dn(e,n,r);case`quarter`:return un(e,n,r);case`year`:return cn(e,n,r);case`decade`:return sn(e,n,r);case`time`:return pn(e,n,r);default:return mn(e,n,r)}}function _n(e,t,n,r){return!t||!n||!r?!1:e.isAfter(r,t)&&e.isAfter(n,r)}function vn(e,t,n,r,i){return gn(e,t,n,r,i)?!0:e.isAfter(n,r)}function yn(e,t,n){let r=t.locale.getWeekFirstDay(e),i=t.setDate(n,1),a=t.getWeekDay(i),o=t.addDate(i,r-a);return t.getMonth(o)===t.getMonth(n)&&t.getDate(o)>1&&(o=t.addDate(o,-7)),o}function bn(e,{generateConfig:t,locale:n,format:r}){return e?typeof r==`function`?r(e):t.locale.format(n.locale,e,r):``}function xn(e,t,n){let r=t,i=[`getHour`,`getMinute`,`getSecond`,`getMillisecond`];return[`setHour`,`setMinute`,`setSecond`,`setMillisecond`].forEach((t,a)=>{r=n?e[t](r,e[i[a]](n)):e[t](r,0)}),r}function Sn(e,t,n,r,i){return q((a,o)=>!!(n&&n(a,o)||r&&e.isAfter(r,a)&&!gn(e,t,r,a,o.type)||i&&e.isAfter(a,i)&&!gn(e,t,i,a,o.type)))}function Cn(e,t,n){return Q.useMemo(()=>{let r=zt(Ht(e,t,n)),i=r[0],a=typeof i==`object`&&i.type===`mask`?i.format:null;return[r.map(e=>typeof e==`string`||typeof e==`function`?e:e.format),a]},[e,t,n])}function wn(e,t,n){return typeof e[0]==`function`||n?!0:t}function Tn(e,t,n,r){return q((i,a)=>{let o={type:t,...a};if(delete o.activeIndex,!e.isValidate(i)||n&&n(i,o))return!0;if((t===`date`||t===`time`)&&r){let t=a&&a.activeIndex===1?`end`:`start`,{disabledHours:n,disabledMinutes:s,disabledSeconds:c,disabledMilliseconds:l}=r.disabledTime?.(i,t,{from:o.from})||{},{disabledHours:u,disabledMinutes:d,disabledSeconds:f}=r,p=n||u,m=s||d,h=c||f,g=e.getHour(i),_=e.getMinute(i),v=e.getSecond(i),y=e.getMillisecond(i);if(p&&p().includes(g)||m&&m(g).includes(_)||h&&h(g,_).includes(v)||l&&l(g,_,v).includes(y))return!0}return!1})}function En(e,t=!1){return Q.useMemo(()=>{let n=e&&zt(e);return t&&n&&(n[1]=n[1]||n[0]),n},[e,t])}function Dn(e,t){let{generateConfig:n,locale:r,picker:i=`date`,prefixCls:a=`rc-picker`,previewValue:o=`hover`,styles:s={},classNames:c={},order:l=!0,components:u={},inputRender:d,allowClear:f,clearIcon:p,needConfirm:m,multiple:h,format:g,inputReadOnly:_,disabledDate:v,minDate:y,maxDate:b,showTime:x,value:S,defaultValue:C,pickerValue:w,defaultPickerValue:T}=e,E=En(S),D=En(C),O=En(w),k=En(T),A=i===`date`&&x?`datetime`:i,j=A===`time`||A===`datetime`,M=j||h,N=m??j,[P,ee,F,I]=nn(e),L=Yt(r,ee),R=Q.useMemo(()=>rn(A,F,I,P,L),[A,F,I,P,L]),z=Q.useMemo(()=>({...e,previewValue:o,prefixCls:a,locale:L,picker:i,styles:s,classNames:c,order:l,components:{input:d,...u},clearIcon:an(a,f,p),showTime:R,value:E,defaultValue:D,pickerValue:O,defaultPickerValue:k,...t?.()}),[e]),[B,V]=Cn(A,L,g),H=wn(B,_,h),U=Sn(n,r,v,y,b),W=Tn(n,i,U,R);return[Q.useMemo(()=>({...z,needConfirm:N,inputReadOnly:H,disabledDate:U}),[z,N,H,U]),A,M,B,V,W]}function On(e,t,n){let[r,i]=oe(t,e),[,a]=Q.useState({}),o=q(e=>{i(e),a({})}),s=Q.useRef(e),c=Q.useRef(),l=()=>{D.cancel(c.current)},u=q(()=>{o(s.current),n&&r!==s.current&&n(s.current)}),d=q((e,t)=>{l(),s.current=e,e||t?u():c.current=D(u)});return Q.useEffect(()=>l,[]),[r,d]}function kn(e,t,n=[],r){let[i,a]=On(!n.every(e=>e)&&e,t||!1,r);function o(e,t={}){(!t.inherit||i)&&a(e,t.force)}return[i,o]}function An(e){let t=Q.useRef();return Q.useImperativeHandle(e,()=>({nativeElement:t.current?.nativeElement,focus:e=>{t.current?.focus(e)},blur:()=>{t.current?.blur()}})),t}function jn(e,t){return Q.useMemo(()=>e||(t?(G(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.entries(t).map(([e,t])=>({label:e,value:t}))):[]),[e,t])}function Mn(e,t,n=1){let r=Q.useRef(t);r.current=t,y(()=>{if(e)r.current(e);else{let t=D(()=>{r.current(e)},n);return()=>{D.cancel(t)}}},[e])}function Nn(e,t=[],n=!1){let[r,i]=Q.useState(0),[a,o]=Q.useState(!1),s=Q.useRef([]),c=Q.useRef(null),l=Q.useRef(null),u=e=>{c.current=e};return Mn(a||n,()=>{a||(s.current=[],u(null))}),Q.useEffect(()=>{a&&s.current.push(r)},[a,r]),[a,e=>{o(e)},e=>(e&&(l.current=e),l.current),r,i,n=>{let r=s.current,i=new Set(r.filter(e=>n[e]||t[e])),a=+(r[r.length-1]===0);return i.size>=2||e[a]?null:a},s.current,u,e=>c.current===e]}function Pn(e,t,n,r,i,a){let o=n[n.length-1];return(s,c)=>{let[l,u]=e,d={...c,from:Ut(e,n)};return o===1&&t[0]&&l&&!gn(r,i,l,s,d.type)&&r.isAfter(l,s)||o===0&&t[1]&&u&&!gn(r,i,u,s,d.type)&&r.isAfter(s,u)?!0:a?.(s,d)}}function Fn(e,t,n,r){switch(t){case`date`:case`week`:return e.addMonth(n,r);case`month`:case`quarter`:return e.addYear(n,r);case`year`:return e.addYear(n,r*10);case`decade`:return e.addYear(n,r*100);default:return n}}var In=[];function Ln(e,t,n,r,i,a,o,s,c=In,l=In,u=In,d,f,p){let m=o===`time`,h=a||0,g=t=>{let r=e.getNow();return m&&(r=xn(e,r)),c[t]||n[t]||r},[_,v]=l,[y,b]=oe(()=>g(0),_),[x,S]=oe(()=>g(1),v),C=Q.useMemo(()=>{let t=[y,x][h];return m?t:xn(e,t,u[h])},[m,y,x,h,e,u]),w=(n,i=`panel`)=>{let a=[b,S][h];a(n);let s=[y,x];s[h]=n,d&&(!gn(e,t,y,s[0],o)||!gn(e,t,x,s[1],o))&&d(s,{source:i,range:h===1?`end`:`start`,mode:r})},T=(n,r)=>{if(s){let i={date:`month`,week:`month`,month:`year`,quarter:`year`}[o];if(i&&!gn(e,t,n,r,i)||o===`year`&&n&&Math.floor(e.getYear(n)/10)!==Math.floor(e.getYear(r)/10))return Fn(e,o,r,-1)}return r},E=Q.useRef(null);return ie(()=>{if(i&&!c[h]){let t=m?null:e.getNow();if(E.current!==null&&E.current!==h?t=[y,x][h^1]:n[h]?t=h===0?n[0]:T(n[0],n[1]):n[h^1]&&(t=n[h^1]),t){f&&e.isAfter(f,t)&&(t=f);let n=s?Fn(e,o,t,1):t;p&&e.isAfter(n,p)&&(t=s?Fn(e,o,p,-1):p),w(t,`reset`)}}},[i,h,n[h]]),Q.useEffect(()=>{i?E.current=h:E.current=null},[i,h]),ie(()=>{i&&c&&c[h]&&w(c[h],`reset`)},[i,h]),[C,w]}function Rn(e,t){let n=Q.useRef(e),[,r]=Q.useState({}),i=e=>e&&t!==void 0?t:n.current;return[i,e=>{n.current=e,r({})},i(!0)]}var zn=[];function Bn(e,t,n){return[r=>r.map(r=>bn(r,{generateConfig:e,locale:t,format:n[0]})),(t,n)=>{let r=Math.max(t.length,n.length),i=-1;for(let a=0;at.isAfter(e,n)?1:-1)}function Hn(e){let[t,n]=Rn(e),r=q(()=>{n(e)});return Q.useEffect(()=>{r()},[e]),[t,n]}function Un(e,t,n,r,i,a,o,s,c){let[l,u]=oe(a,o),d=l||zn,[f,p]=Hn(d),[m,h]=Bn(e,t,n);return[d,u,f,q(t=>{let n=[...t];if(r)for(let e=0;e<2;e+=1)n[e]=n[e]||null;else i&&(n=Vn(n.filter(e=>e),e));let[a,o]=h(f(),n);if(!a&&(p(n),s)){let e=m(n);s(n,e,{range:o?`end`:`start`})}}),()=>{c&&c(f())}]}function Wn(e,t,n,r,i,a,o,s,c,l){let{generateConfig:u,locale:d,picker:f,onChange:p,allowEmpty:m,order:h}=e,g=!a.some(e=>e)&&h,[_,v]=Bn(u,d,o),[y,b]=Rn(t),x=q(()=>{b(t)});Q.useEffect(()=>{x()},[t]);let S=q(e=>{let r=e===null,o=[...e||y()];if(r){let e=Math.max(a.length,o.length);for(let t=0;t!e);p(r&&e?null:o,e?null:_(o))}}return T}),C=q((e,t)=>{let n=Bt(y(),e,r()[e]);b(n),t&&S()}),w=!s&&!c;return Mn(!w,()=>{w&&(S(),i(t),x())},2),[C,S]}function Gn(e,t,n,r,i){return t!==`date`&&t!==`time`?!1:n===void 0?r===void 0?!i&&(e===`date`||e===`time`):r:n}function Kn(e,t,n,r,i,a){let o=e;function s(e,t,n){let r=a[e](o),i=n.find(e=>e.value===r);if(!i||i.disabled){let e=n.filter(e=>!e.disabled),i=[...e].reverse().find(e=>e.value<=r)||e[0];i&&(r=i.value,o=a[t](o,r))}return r}let c=s(`getHour`,`setHour`,t()),l=s(`getMinute`,`setMinute`,n(c));return s(`getMillisecond`,`setMillisecond`,i(c,l,s(`getSecond`,`setSecond`,r(c,l)))),o}function qn(){return[]}function Jn(e,t,n=1,r=!1,i=[],a=2){let o=[],s=n>=1?n|0:1;for(let n=e;n<=t;n+=s){let e=i.includes(n);(!e||!r)&&o.push({label:Rt(n,a),value:n,disabled:e})}return o}function Yn(e,t={},n){let{use12Hours:r,hourStep:i=1,minuteStep:a=1,secondStep:o=1,millisecondStep:s=100,hideDisabledOptions:c,disabledTime:l,disabledHours:u,disabledMinutes:d,disabledSeconds:f}=t||{},p=Q.useMemo(()=>n||e.getNow(),[n,e]),m=Q.useCallback(e=>{let t=l?.(e)||{};return[t.disabledHours||u||qn,t.disabledMinutes||d||qn,t.disabledSeconds||f||qn,t.disabledMilliseconds||qn]},[l,u,d,f]),[h,g,_,v]=Q.useMemo(()=>m(p),[p,m]),y=Q.useCallback((e,t,n,l)=>{let u=Jn(0,23,i,c,e());return[r?u.map(e=>({...e,label:Rt(e.value%12||12,2)})):u,e=>Jn(0,59,a,c,t(e)),(e,t)=>Jn(0,59,o,c,n(e,t)),(e,t,n)=>Jn(0,999,s,c,l(e,t,n),3)]},[c,i,r,s,a,o]),[b,x,S,C]=Q.useMemo(()=>y(h,g,_,v),[y,h,g,_,v]);return[(t,n)=>{let r=()=>b,i=x,a=S,o=C;if(n){let[e,t,s,c]=m(n),[l,u,d,f]=y(e,t,s,c);r=()=>l,i=u,a=d,o=f}return Kn(t,r,i,a,o,e)},b,x,S,C]}function Xn(e){let{mode:t,internalMode:n,renderExtraFooter:r,showNow:i,showTime:a,onSubmit:o,onNow:s,invalid:c,needConfirm:l,generateConfig:u,disabledDate:d}=e,{prefixCls:f,locale:p,button:m=`button`,classNames:h,styles:g}=Q.useContext(Ft),_=u.getNow(),[v]=Yn(u,a,_),y=r?.(t),b=d(_,{type:t}),x=()=>{if(!b){let e=v(_);s(e)}},S=`${f}-now`,C=`${S}-btn`,T=i&&Q.createElement(`li`,{className:S},Q.createElement(`a`,{className:w(C,b&&`${C}-disabled`),"aria-disabled":b,onClick:x},n===`date`?p.today:p.now)),E=l&&Q.createElement(`li`,{className:`${f}-ok`},Q.createElement(m,{disabled:c,onClick:o},p.ok)),D=(T||E)&&Q.createElement(`ul`,{className:`${f}-ranges`},T,E);return!y&&!D?null:Q.createElement(`div`,{className:w(`${f}-footer`,h.popup.footer),style:g.popup.footer},y&&Q.createElement(`div`,{className:`${f}-footer-extra`},y),D)}function Zn(e,t,n){function r(r,i){let a=r.findIndex(r=>gn(e,t,r,i,n));if(a===-1)return[...r,i];let o=[...r];return o.splice(a,1),o}return r}var Qn=Q.createContext(null),$n=Q.createContext(null);function er(){return Q.useContext($n)}function tr(e,t){let{prefixCls:n,generateConfig:r,locale:i,disabledDate:a,minDate:o,maxDate:s,cellRender:c,hoverValue:l,hoverRangeValue:u,onHover:d,values:f,pickerValue:p,onSelect:m,prevIcon:h,nextIcon:g,superPrevIcon:_,superNextIcon:v}=e,{classNames:y,styles:b}=Q.useContext(Qn),x=r.getNow();return[{now:x,values:f,pickerValue:p,prefixCls:n,classNames:y,styles:b,disabledDate:a,minDate:o,maxDate:s,cellRender:c,hoverValue:l,hoverRangeValue:u,onHover:d,locale:i,generateConfig:r,onSelect:m,panelType:t,prevIcon:h,nextIcon:g,superPrevIcon:_,superNextIcon:v},x]}var nr=Q.createContext({});function rr(e){let{rowNum:t,colNum:n,baseDate:r,getCellDate:i,prefixColumn:a,rowClassName:o,titleFormat:s,getCellText:c,getCellClassName:l,headerCells:u,cellSelection:d=!0,disabledDate:f}=e,{prefixCls:p,classNames:m,styles:h,panelType:g,now:_,disabledDate:v,cellRender:y,onHover:b,hoverValue:x,hoverRangeValue:S,generateConfig:C,values:T,locale:E,onSelect:D}=er(),O=f||v,k=`${p}-cell`,{onCellDblClick:A}=Q.useContext(nr),j=e=>T.some(t=>t&&gn(C,E,e,t,g)),M=[];for(let e=0;egn(C,E,f,e,g)),[`${k}-in-range`]:T&&!M&&!N,[`${k}-range-start`]:M,[`${k}-range-end`]:N,[`${p}-cell-selected`]:!S&&g!==`week`&&j(f),...l(f)}),style:h.item,onClick:()=>{v||D(f)},onDoubleClick:()=>{!v&&A&&A()},onMouseEnter:()=>{v||b?.(f)},onMouseLeave:()=>{v||b?.(null)}},y?y(f,{prefixCls:p,originNode:ee,today:_,type:g,locale:E}):ee))}M.push(Q.createElement(`tr`,{key:e,className:o?.(u)},t))}return Q.createElement(`div`,{className:w(`${p}-body`,m.body),style:h.body},Q.createElement(`table`,{className:w(`${p}-content`,m.content),style:h.content},u&&Q.createElement(`thead`,null,Q.createElement(`tr`,null,u)),Q.createElement(`tbody`,null,M)))}var ir={visibility:`hidden`};function ar(e){let{offset:t,superOffset:n,onChange:r,getStart:i,getEnd:a,children:o}=e,{prefixCls:s,classNames:c,styles:l,prevIcon:u=`‹`,nextIcon:d=`›`,superPrevIcon:f=`«`,superNextIcon:p=`»`,minDate:m,maxDate:h,generateConfig:g,locale:_,pickerValue:v,panelType:y}=er(),b=`${s}-header`,{hidePrev:x,hideNext:S,hideHeader:C}=Q.useContext(nr),T=Q.useMemo(()=>{if(!m||!t||!a)return!1;let e=a(t(-1,v));return!vn(g,_,e,m,y)},[m,t,v,a,g,_,y]),E=Q.useMemo(()=>{if(!m||!n||!a)return!1;let e=a(n(-1,v));return!vn(g,_,e,m,y)},[m,n,v,a,g,_,y]),D=Q.useMemo(()=>{if(!h||!t||!i)return!1;let e=i(t(1,v));return!vn(g,_,h,e,y)},[h,t,v,i,g,_,y]),O=Q.useMemo(()=>{if(!h||!n||!i)return!1;let e=i(n(1,v));return!vn(g,_,h,e,y)},[h,n,v,i,g,_,y]),k=e=>{t&&r(t(e,v))},A=e=>{n&&r(n(e,v))};if(C)return null;let j=`${b}-prev-btn`,M=`${b}-next-btn`,N=`${b}-super-prev-btn`,P=`${b}-super-next-btn`;return Q.createElement(`div`,{className:w(b,c.header),style:l.header},n&&Q.createElement(`button`,{type:`button`,"aria-label":_.previousYear,onClick:()=>A(-1),tabIndex:-1,className:w(N,E&&`${N}-disabled`),disabled:E,style:x?ir:{}},f),t&&Q.createElement(`button`,{type:`button`,"aria-label":_.previousMonth,onClick:()=>k(-1),tabIndex:-1,className:w(j,T&&`${j}-disabled`),disabled:T,style:x?ir:{}},u),Q.createElement(`div`,{className:`${b}-view`},o),t&&Q.createElement(`button`,{type:`button`,"aria-label":_.nextMonth,onClick:()=>k(1),tabIndex:-1,className:w(M,D&&`${M}-disabled`),disabled:D,style:S?ir:{}},d),n&&Q.createElement(`button`,{type:`button`,"aria-label":_.nextYear,onClick:()=>A(1),tabIndex:-1,className:w(P,O&&`${P}-disabled`),disabled:O,style:S?ir:{}},p))}function or(){return or=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let t=l?.(e,{type:`week`});return Q.createElement(`td`,{key:`week`,className:w(m,`${m}-week`,{[`${m}-disabled`]:t}),onClick:()=>{t||u(e)},onMouseEnter:()=>{t||d?.(e)},onMouseLeave:()=>{t||d?.(null)}},Q.createElement(`div`,{className:`${m}-inner`},i.locale.getWeek(r.locale,e)))}:null,C=[],T=r.shortWeekDays||(i.locale.getShortWeekDays?i.locale.getShortWeekDays(r.locale):[]);S&&C.push(Q.createElement(`th`,{key:`empty`},Q.createElement(`span`,{style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},r.week)));for(let e=0;e<7;e+=1)C.push(Q.createElement(`th`,{key:e},T[(e+v)%7]));let E=(e,t)=>i.addDate(e,t),D=e=>bn(e,{locale:r,format:r.cellDateFormat,generateConfig:i}),O=e=>({[`${t}-cell-in-view`]:dn(i,e,a),[`${t}-cell-today`]:fn(i,e,_)}),k=r.shortMonths||(i.locale.getShortMonths?i.locale.getShortMonths(r.locale):[]),A=Q.createElement(`button`,{type:`button`,"aria-label":r.yearSelect,key:`year`,onClick:()=>{s(`year`,a)},tabIndex:-1,className:`${t}-year-btn`},bn(a,{locale:r,format:r.yearFormat,generateConfig:i})),j=Q.createElement(`button`,{type:`button`,"aria-label":r.monthSelect,key:`month`,onClick:()=>{s(`month`,a)},tabIndex:-1,className:`${t}-month-btn`},r.monthFormat?bn(a,{locale:r,format:r.monthFormat,generateConfig:i}):k[x]),M=r.monthBeforeYear?[j,A]:[A,j];return Q.createElement($n.Provider,{value:g},Q.createElement(`div`,{className:w(p,f&&`${p}-show-week`)},Q.createElement(ar,{offset:e=>i.addMonth(a,e),superOffset:e=>i.addYear(a,e),onChange:o,getStart:e=>i.setDate(e,1),getEnd:e=>{let t=i.setDate(e,1);return t=i.addMonth(t,1),i.addDate(t,-1)}},M),Q.createElement(rr,or({titleFormat:r.fieldDateFormat},e,{colNum:7,rowNum:6,baseDate:b,headerCells:C,getCellDate:E,getCellText:D,getCellClassName:O,prefixColumn:S,cellSelection:!h}))))}var cr=1/3;function lr(e,t){let n=Q.useRef(!1),r=Q.useRef(null),i=Q.useRef(null),a=()=>n.current,o=()=>{D.cancel(r.current),n.current=!1},s=Q.useRef();return[q(()=>{let a=e.current;if(i.current=null,s.current=0,a){let e=a.querySelector(`[data-value="${t}"]`),c=a.querySelector(`li`),l=()=>{o(),n.current=!0,s.current+=1;let{scrollTop:t}=a,u=c.offsetTop,d=e.offsetTop,f=d-u;if(d===0&&e!==c||!U(a)){s.current<=5&&(r.current=D(l));return}let p=t+(f-t)*cr,m=Math.abs(f-p);if(i.current!==null&&i.current[e,t,n].join(`,`)).join(`;`)}function fr(e){let{units:t,value:n,optionalValue:r,type:i,onChange:a,onHover:o,onDblClick:s,changeOnScroll:c}=e,{prefixCls:l,cellRender:u,now:d,locale:f,classNames:p,styles:m}=er(),h=`${l}-time-panel`,g=`${l}-time-panel-cell`,_=Q.useRef(null),v=Q.useRef(),y=()=>{clearTimeout(v.current)},[b,x,S]=lr(_,n??r);ie(()=>(b(),y(),()=>{x(),y()}),[n,r,dr(t)]);let C=e=>{y();let n=e.target;!S()&&c&&(v.current=setTimeout(()=>{let e=_.current,r=e.querySelector(`li`).offsetTop,i=Array.from(e.querySelectorAll(`li`)).map(e=>e.offsetTop-r).map((e,r)=>t[r].disabled?2**53-1:Math.abs(e-n.scrollTop)),o=Math.min(...i),s=i.findIndex(e=>e===o),c=t[s];c&&!c.disabled&&a(c.value)},ur))},T=`${h}-column`;return Q.createElement(`ul`,{className:T,ref:_,"data-type":i,onScroll:C},t.map(({label:e,value:t,disabled:r})=>{let c=Q.createElement(`div`,{className:`${g}-inner`},e);return Q.createElement(`li`,{key:t,style:m.item,className:w(g,p.item,{[`${g}-selected`]:n===t,[`${g}-disabled`]:r}),onClick:()=>{r||a(t)},onDoubleClick:()=>{!r&&s&&s()},onMouseEnter:()=>{o(t)},onMouseLeave:()=>{o(null)},"data-value":t},u?u(t,{prefixCls:l,originNode:c,today:d,type:`time`,subType:i,locale:f}):c)}))}function pr(){return pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{},pickerValue:h}=er(),g=u?.[0]||null,{onCellDblClick:_}=Q.useContext(nr),[v,y,b,x,S]=Yn(d,e,g),C=e=>[g&&d[e](g),h&&d[e](h)],[T,E]=C(`getHour`),[D,O]=C(`getMinute`),[k,A]=C(`getSecond`),[j,M]=C(`getMillisecond`),N=T===null?null:mr(T)?`am`:`pm`,P=Q.useMemo(()=>a?mr(T)?y.filter(e=>mr(e.value)):y.filter(e=>!mr(e.value)):y,[T,y,a]),ee=(e,t)=>{let n=e.filter(e=>!e.disabled);return t??n?.[0]?.value},F=ee(y,T),I=Q.useMemo(()=>b(F),[b,F]),L=ee(I,D),R=Q.useMemo(()=>x(F,L),[x,F,L]),z=ee(R,k),B=Q.useMemo(()=>S(F,L,z),[S,F,L,z]),V=ee(B,j),H=Q.useMemo(()=>{if(!a)return[];let e=d.getNow(),t=d.setHour(e,9),n=d.setHour(e,15),r=(e,t)=>{let{cellMeridiemFormat:n}=f;return n?bn(e,{generateConfig:d,locale:f,format:n}):t};return[{label:r(t,`AM`),value:`am`,disabled:y.every(e=>e.disabled||!mr(e.value))},{label:r(n,`PM`),value:`pm`,disabled:y.every(e=>e.disabled||mr(e.value))}]},[y,a,d,f]),U=e=>{let t=v(e);p(t)},W=Q.useMemo(()=>{let e=g||h||d.getNow(),t=e=>e!=null;return t(T)?(e=d.setHour(e,T),e=d.setMinute(e,D),e=d.setSecond(e,k),e=d.setMillisecond(e,j)):t(E)?(e=d.setHour(e,E),e=d.setMinute(e,O),e=d.setSecond(e,A),e=d.setMillisecond(e,M)):t(F)&&(e=d.setHour(e,F),e=d.setMinute(e,L),e=d.setSecond(e,z),e=d.setMillisecond(e,V)),e},[g,h,T,D,k,j,F,L,z,V,E,O,A,M,d]),G=(e,t)=>e===null?null:d[t](W,e),te=e=>G(e,`setHour`),K=e=>G(e,`setMinute`),ne=e=>G(e,`setSecond`),q=e=>G(e,`setMillisecond`),re=e=>e===null?null:e===`am`&&!mr(T)?d.setHour(W,T-12):e===`pm`&&mr(T)?d.setHour(W,T+12):W,J=e=>{U(te(e))},ie=e=>{U(K(e))},ae=e=>{U(ne(e))},oe=e=>{U(q(e))},se=e=>{U(re(e))},ce=e=>{m(te(e))},le=e=>{m(K(e))},Y=e=>{m(ne(e))},ue=e=>{m(q(e))},de=e=>{m(re(e))},fe={onDblClick:_,changeOnScroll:o};return Q.createElement(`div`,{className:w(`${s}-content`,c.content),style:l.content},t&&Q.createElement(fr,pr({units:P,value:T,optionalValue:E,type:`hour`,onChange:J,onHover:ce},fe)),n&&Q.createElement(fr,pr({units:I,value:D,optionalValue:O,type:`minute`,onChange:ie,onHover:le},fe)),r&&Q.createElement(fr,pr({units:R,value:k,optionalValue:A,type:`second`,onChange:ae,onHover:Y},fe)),i&&Q.createElement(fr,pr({units:B,value:j,optionalValue:M,type:`millisecond`,onChange:oe,onHover:ue},fe)),a&&Q.createElement(fr,pr({units:H,value:N,type:`meridiem`,onChange:se,onHover:de},fe)))}function gr(e){let{prefixCls:t,value:n,locale:r,generateConfig:i,showTime:a}=e,{format:o}=a||{},s=`${t}-time-panel`,[c]=tr(e,`time`);return Q.createElement($n.Provider,{value:c},Q.createElement(`div`,{className:w(s)},Q.createElement(ar,null,n?bn(n,{locale:r,format:o,generateConfig:i}):`\xA0`),Q.createElement(hr,a)))}function _r(){return _r=Object.assign?Object.assign.bind():function(e){for(var t=1;ta?xn(n,e,a):xn(n,e,o);return Q.createElement(`div`,{className:c},Q.createElement(sr,_r({},e,{onSelect:e=>{let t=u(e);i(l(t,t))},onHover:e=>{s?.(e&&u(e))}})),Q.createElement(gr,e))}function yr(){return yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let t=Math.floor(r.getYear(e)/100)*100;return r.setYear(e,t)},u=e=>{let t=l(e);return r.addYear(t,99)},d=l(i),f=u(i),p=r.addYear(d,-10),m=(e,t)=>r.addYear(e,t*10),h=e=>{let t=n.cellYearFormat;return`${bn(e,{locale:n,format:t,generateConfig:r})}-${bn(r.addYear(e,9),{locale:n,format:t,generateConfig:r})}`},g=e=>({[`${t}-cell-in-view`]:sn(r,e,d)||sn(r,e,f)||_n(r,d,f,e)}),_=a?(e,t)=>{let n=r.setDate(e,1),i=r.setMonth(n,0),o=r.setYear(i,Math.floor(r.getYear(i)/10)*10),s=r.addYear(o,10),c=r.addDate(s,-1);return a(o,t)&&a(c,t)}:null,v=`${bn(d,{locale:n,format:n.yearFormat,generateConfig:r})}-${bn(f,{locale:n,format:n.yearFormat,generateConfig:r})}`;return Q.createElement($n.Provider,{value:c},Q.createElement(`div`,{className:s},Q.createElement(ar,{superOffset:e=>r.addYear(i,e*100),onChange:o,getStart:l,getEnd:u},v),Q.createElement(rr,yr({},e,{disabledDate:_,colNum:3,rowNum:4,baseDate:p,getCellDate:m,getCellText:h,getCellClassName:g}))))}function xr(){return xr=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.addMonth(e,t),p=e=>{let t=r.getMonth(e);return n.monthFormat?bn(e,{locale:n,format:n.monthFormat,generateConfig:r}):d[t]},m=()=>({[`${t}-cell-in-view`]:!0}),h=a?(e,t)=>{let n=r.setDate(e,1),i=r.setMonth(n,r.getMonth(n)+1),o=r.addDate(i,-1);return a(n,t)&&a(o,t)}:null,g=Q.createElement(`button`,{type:`button`,key:`year`,"aria-label":n.yearSelect,onClick:()=>{s(`year`)},tabIndex:-1,className:`${t}-year-btn`},bn(i,{locale:n,format:n.yearFormat,generateConfig:r}));return Q.createElement($n.Provider,{value:l},Q.createElement(`div`,{className:c},Q.createElement(ar,{superOffset:e=>r.addYear(i,e),onChange:o,getStart:e=>r.setMonth(e,0),getEnd:e=>r.setMonth(e,11)},g),Q.createElement(rr,xr({},e,{disabledDate:h,titleFormat:n.fieldMonthFormat,colNum:3,rowNum:4,baseDate:u,getCellDate:f,getCellText:p,getCellClassName:m}))))}function Cr(){return Cr=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.addMonth(e,t*3),d=e=>bn(e,{locale:n,format:n.cellQuarterFormat,generateConfig:r}),f=()=>({[`${t}-cell-in-view`]:!0}),p=Q.createElement(`button`,{type:`button`,key:`year`,"aria-label":n.yearSelect,onClick:()=>{o(`year`)},tabIndex:-1,className:`${t}-year-btn`},bn(i,{locale:n,format:n.yearFormat,generateConfig:r}));return Q.createElement($n.Provider,{value:c},Q.createElement(`div`,{className:s},Q.createElement(ar,{superOffset:e=>r.addYear(i,e),onChange:a,getStart:e=>r.setMonth(e,0),getEnd:e=>r.setMonth(e,11)},p),Q.createElement(rr,Cr({},e,{titleFormat:n.fieldQuarterFormat,colNum:4,rowNum:1,baseDate:l,getCellDate:u,getCellText:d,getCellClassName:f}))))}function Tr(){return Tr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let t={};if(o){let[r,i]=o,a=hn(n,s,r,e),l=hn(n,s,i,e);t[`${c}-range-start`]=a,t[`${c}-range-end`]=l,t[`${c}-range-hover`]=!a&&!l&&_n(n,r,i,e)}return a&&(t[`${c}-hover`]=a.some(t=>hn(n,s,e,t))),w(c,{[`${c}-selected`]:!o&&hn(n,s,i,e)},t)}}))}function Dr(){return Dr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let t=Math.floor(r.getYear(e)/10)*10;return r.setYear(e,t)},d=e=>{let t=u(e);return r.addYear(t,9)},f=u(i),p=d(i),m=r.addYear(f,-1),h=(e,t)=>r.addYear(e,t),g=e=>bn(e,{locale:n,format:n.cellYearFormat,generateConfig:r}),_=e=>({[`${t}-cell-in-view`]:cn(r,e,f)||cn(r,e,p)||_n(r,f,p,e)}),v=a?(e,t)=>{let n=r.setMonth(e,0),i=r.setDate(n,1),o=r.addYear(i,1),s=r.addDate(o,-1);return a(i,t)&&a(s,t)}:null,y=Q.createElement(`button`,{type:`button`,key:`decade`,"aria-label":n.decadeSelect,onClick:()=>{s(`decade`)},tabIndex:-1,className:`${t}-decade-btn`},bn(f,{locale:n,format:n.yearFormat,generateConfig:r}),`-`,bn(p,{locale:n,format:n.yearFormat,generateConfig:r}));return Q.createElement($n.Provider,{value:l},Q.createElement(`div`,{className:c},Q.createElement(ar,{superOffset:e=>r.addYear(i,e*10),onChange:o,getStart:u,getEnd:d},y),Q.createElement(rr,Dr({},e,{disabledDate:v,titleFormat:n.fieldYearFormat,colNum:3,rowNum:4,baseDate:m,getCellDate:h,getCellText:g,getCellClassName:_}))))}function kr(){return kr=Object.assign?Object.assign.bind():function(e){for(var t=1;t({nativeElement:N.current}));let[P,ee,F,I]=nn(e),L=Yt(i,ee),R=y===`date`&&b?`datetime`:y,z=Q.useMemo(()=>rn(R,F,I,P,L),[R,F,I,P,L]),B=a.getNow(),[V,H]=oe(y||`date`,_),U=V===`date`&&z?`datetime`:V,W=Zn(a,i,R),[G,te]=oe(u,d),K=Q.useMemo(()=>{let e=zt(G).filter(e=>e);return l?e:e.slice(0,1)},[G,l]),ne=q(e=>{te(e),f&&(e===null||K.length!==e.length||K.some((t,n)=>!gn(a,i,t,e[n],R)))&&f?.(l?e:e[0])}),re=q(e=>{if(p?.(e),V===y){let t=l?W(K,e):[e];ne(t)}}),[J,ie]=oe(m||K[0]||B,h);Q.useEffect(()=>{K[0]&&!h&&ie(K[0])},[K[0]]);let ae=(e,t)=>{v?.(e||h,t||V)},se=(e,t=!1)=>{ie(e),g?.(e),t&&ae(e)},ce=(e,t)=>{H(e),t&&se(t),ae(t,e)},le=e=>{if(re(e),se(e),V!==y){let t=[`decade`,`year`],n=[...t,`month`],r={quarter:[...t,`quarter`],week:[...n,`week`],date:[...n,`date`]}[y]||n,i=r[r.indexOf(V)+1];i&&ce(i,e)}},Y=Q.useMemo(()=>{let e,t;return Array.isArray(S)?[e,t]=S:e=S,!e&&!t?null:(e||=t,t||=e,a.isAfter(e,t)?[t,e]:[e,t])},[S,a]),ue=Gt(C,T,E),de=D[U]||Ar[U]||sr,fe=Q.useMemo(()=>({classNames:A?.popup??n??{},styles:j?.popup??r??{}}),[A,n,j,r]),pe=Q.useContext(nr),me=Q.useMemo(()=>({...pe,hideHeader:O}),[pe,O]),he=`${M}-panel`,ge=Vt(e,[`showWeek`,`prevIcon`,`nextIcon`,`superPrevIcon`,`superNextIcon`,`disabledDate`,`minDate`,`maxDate`,`onHover`]);return Q.createElement(Qn.Provider,{value:fe},Q.createElement(nr.Provider,{value:me},Q.createElement(`div`,{ref:N,tabIndex:c,className:w(he,{[`${he}-rtl`]:o===`rtl`})},Q.createElement(de,kr({},ge,{showTime:z,prefixCls:M,locale:L,generateConfig:a,onModeChange:ce,pickerValue:J,onPickerValueChange:e=>{se(e,!0)},value:K[0],onSelect:le,values:K,cellRender:ue,hoverRangeValue:Y,hoverValue:x})))))}var Mr=Q.memo(Q.forwardRef(jr));function Nr(){return Nr=Object.assign?Object.assign.bind():function(e){for(var t=1;tFn(u,t,e,n),[u,t]),f=Q.useMemo(()=>d(r,1),[r,d]),p=e=>{i(d(e,-1))},m={onCellDblClick:()=>{a&&o()}},h=t===`time`,g={...e,hoverValue:null,hoverRangeValue:null,hideHeader:h};return s?g.hoverRangeValue=c:g.hoverValue=c,n?Q.createElement(`div`,{className:`${l}-panels`},Q.createElement(nr.Provider,{value:{...m,hideNext:!0}},Q.createElement(Mr,g)),Q.createElement(nr.Provider,{value:{...m,hidePrev:!0}},Q.createElement(Mr,Nr({},g,{pickerValue:f,onPickerValueChange:p})))):Q.createElement(nr.Provider,{value:{...m}},Q.createElement(Mr,g))}function Fr(e){return typeof e==`function`?e():e}function Ir(e){let{prefixCls:t,presets:n,onClick:r,onHover:i}=e;return n.length?Q.createElement(`div`,{className:`${t}-presets`},Q.createElement(`ul`,null,n.map(({label:e,value:t},n)=>Q.createElement(`li`,{key:n,onClick:()=>{r(Fr(t))},onMouseEnter:()=>{i(Fr(t))},onMouseLeave:()=>{i(null)}},e)))):null}function Lr(){return Lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e.width&&j(e.width)},[I,L,R]=s,[z,B]=Q.useState(0);Q.useEffect(()=>{B(10)},[I]),Q.useEffect(()=>{if(a&&k.current){let e=O.current?.offsetWidth||0,t=k.current.getBoundingClientRect();if(!t.height||t.right<0){B(e=>Math.max(0,e-1));return}let n=(D?L-e:I)-t.left;if(ee(n),A&&Ae)}let H=Q.useMemo(()=>V(zt(g)),[g]),U=r===`time`&&!H.length,W=Q.useMemo(()=>U?V([y]):H,[U,H,y]),G=U?y:H,te=Q.useMemo(()=>!W.length||W.some(e=>v(e)),[W,v]),K=Q.createElement(`div`,{className:`${T}-panel-layout`},Q.createElement(Ir,{prefixCls:T,presets:c,onClick:d,onHover:l}),Q.createElement(`div`,null,Q.createElement(Pr,Lr({},e,{value:G})),Q.createElement(Xn,Lr({},e,{showNow:!o&&i,invalid:te,onSubmit:()=>{U&&_(y),b(),x()}}))));t&&(K=t(K));let ne=`${E}-container`,q=`marginLeft`,re=`marginRight`,J=Q.createElement(`div`,{onMouseDown:m,tabIndex:-1,className:w(ne,`${T}-${n}-panel-container`,S?.popup?.container),style:{[D?re:q]:M,[D?q:re]:`auto`,...C?.popup?.container},onFocus:f,onBlur:p},K);return a&&(J=Q.createElement(`div`,{onMouseDown:m,ref:k,className:w(`${T}-range-wrapper`,`${T}-${r}-range-wrapper`)},Q.createElement(`div`,{ref:O,className:`${T}-range-arrow`,style:{left:P}}),Q.createElement(u,{onResize:F},J))),J}function zr(e,t){let{format:n,maskFormat:r,generateConfig:i,locale:a,preserveInvalidOnBlur:o,inputReadOnly:s,required:c,"aria-required":l,onSubmit:u,onFocus:d,onBlur:f,onInputChange:p,onInvalid:m,open:h,onOpenChange:g,onKeyDown:_,onChange:v,activeHelp:y,name:b,autoComplete:x,id:S,value:C,invalid:w,placeholder:T,disabled:D,activeIndex:O,allHelp:k,picker:A}=e,j=(e,t)=>{let n=i.locale.parse(a.locale,e,[t]);return n&&i.isValidate(n)?n:null},M=n[0],N=Q.useCallback(e=>bn(e,{locale:a,format:M,generateConfig:i}),[a,i,M]),P=Q.useMemo(()=>C.map(N),[C,N]),ee=Q.useMemo(()=>{let e=A===`time`?8:10,t=typeof M==`function`?M(i.getNow()).length:M.length;return Math.max(e,t)+2},[M,A,i]),F=e=>{for(let t=0;t{function i(e){return n===void 0?e:e[n]}let a={...E(e,{aria:!0,data:!0}),format:r,validateFormat:e=>!!F(e),preserveInvalidOnBlur:o,readOnly:s,required:c,"aria-required":l,name:b,autoComplete:x,size:ee,id:i(S),value:i(P)||``,invalid:i(w),placeholder:i(T),active:O===n,helped:k||y&&O===n,disabled:i(D),onFocus:e=>{d(e,n)},onBlur:e=>{f(e,n)},onSubmit:u,onChange:e=>{p();let t=F(e);if(t){m(!1,n),v(t,n);return}m(!!e,n)},onHelp:()=>{g(!0,{index:n})},onKeyDown:e=>{let t=!1;if(_?.(e,()=>{t=!0}),!e.defaultPrevented&&!t)switch(e.key){case`Escape`:g(!1,{index:n});break;case`Enter`:h||g(!0);break}},...t?.({valueTexts:P})};return Object.keys(a).forEach(e=>{a[e]===void 0&&delete a[e]}),a},N]}var Br=[`onMouseEnter`,`onMouseLeave`];function Vr(e){return Q.useMemo(()=>Vt(e,Br),[e])}function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e.preventDefault()},onClick:e=>{e.stopPropagation(),t()}}),e)}var Kr=[`YYYY`,`MM`,`DD`,`HH`,`mm`,`ss`,`SSS`],qr=`顧`,Jr=class{format;maskFormat;cells;maskCells;constructor(e){this.format=e;let t=Kr.map(e=>`(${e})`).join(`|`),n=new RegExp(t,`g`);this.maskFormat=e.replace(n,e=>qr.repeat(e.length));let r=RegExp(`(${Kr.join(`|`)})`),i=(e.split(r)||[]).filter(e=>e),a=0;this.cells=i.map(e=>{let t=Kr.includes(e),n=a,r=a+e.length;return a=r,{text:e,mask:t,start:n,end:r}}),this.maskCells=this.cells.filter(e=>e.mask)}getSelection(e){let{start:t,end:n}=this.maskCells[e]||{};return[t||0,n||0]}match(e){for(let t=0;t=i&&e<=a)return r;let o=Math.min(Math.abs(e-i),Math.abs(e-a));o{let{className:n,active:r,showActiveCls:i=!0,suffixIcon:a,format:o,validateFormat:s,onChange:c,onInput:l,helped:u,onHelp:d,onSubmit:f,onKeyDown:p,preserveInvalidOnBlur:m=!1,invalid:h,clearIcon:g,..._}=e,{value:v,onFocus:y,onBlur:b,onMouseUp:x}=e,{prefixCls:S,input:C=`input`,classNames:T,styles:E}=Q.useContext(Ft),O=`${S}-input`,[k,A]=Q.useState(!1),[j,M]=Q.useState(v),[N,P]=Q.useState(``),[ee,F]=Q.useState(null),[I,L]=Q.useState(null),R=j||``;Q.useEffect(()=>{M(v)},[v]);let z=Q.useRef(null),B=Q.useRef(null),V=Q.useRef(!1);Q.useImperativeHandle(t,()=>({nativeElement:z.current,inputElement:B.current,focus:e=>{B.current.focus(e)},blur:()=>{B.current.blur()}}));let H=Q.useMemo(()=>new Jr(o||``),[o]),[U,W]=Q.useMemo(()=>u?[0,0]:H.getSelection(ee),[H,ee,u]),G=e=>{e&&e!==o&&e!==v&&d()},te=q(e=>{s(e)&&c(e),M(e),G(e)}),K=e=>{if(!o){let t=e.target.value;G(t),M(t),c(t)}},ne=e=>{if(V.current){e.preventDefault();return}let t=e.clipboardData.getData(`text`);s(t)&&te(t)},re=()=>{V.current=!0},J=e=>{let{selectionStart:t}=e.target,n=H.getMaskCellIndex(t);F(n),L({}),x?.(e),V.current=!1},ae=e=>{A(!0),F(0),P(``),y(e)},oe=e=>{b(e)},se=e=>{A(!1),oe(e)};Mn(r,()=>{!r&&!m&&M(v)});let ce=e=>{e.key===`Enter`&&s(R)&&f(),p?.(e)},le=e=>{if(V.current){e.preventDefault();return}ce(e);let{key:t}=e,n=null,r=null,i=W-U,a=o.slice(U,W),s=e=>{F(t=>{let n=t+e;return n=Math.max(n,0),n=Math.min(n,H.size()-1),n})},c=e=>{let[t,n,r]=Yr(a),i=R.slice(U,W),o=Number(i);if(isNaN(o))return String(r||(e>0?t:n));let s=o+e,c=n-t+1;return String(t+(c+s-t)%c)};switch(t){case`Backspace`:case`Delete`:n=``,r=a;break;case`ArrowLeft`:n=``,s(-1);break;case`ArrowRight`:n=``,s(1);break;case`ArrowUp`:n=``,r=c(1);break;case`ArrowDown`:n=``,r=c(-1);break;default:isNaN(Number(t))||(n=N+t,r=n);break}if(n!==null&&(P(n),n.length>=i&&(s(1),P(``))),r!==null){let e=R.slice(0,U)+Rt(r,i)+R.slice(W);te(e.slice(0,o.length))}L({})},Y=Q.useRef();ie(()=>{if(!(!k||!o||V.current)){if(!H.match(R)){te(o);return}return B.current.setSelectionRange(U,W),Y.current=D(()=>{B.current.setSelectionRange(U,W)}),()=>{D.cancel(Y.current)}}},[H,o,k,R,ee,U,W,I,te]);let ue=o?{onFocus:ae,onBlur:se,onKeyDown:le,onMouseDown:re,onMouseUp:J,onPaste:ne}:{};return Q.createElement(`div`,{ref:z,className:w(O,{[`${O}-active`]:r&&i,[`${O}-placeholder`]:u},n)},Q.createElement(C,Xr({ref:B,"aria-invalid":h,autoComplete:`off`},_,{onKeyDown:ce,onBlur:oe},ue,{value:R,onChange:K,className:T.input,style:E.input})),Q.createElement(Ur,{icon:a}),g)});function Qr(){return Qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(typeof n==`string`)return[n];let e=n||{};return[e.start,e.end]},[n]),ne=Q.useRef(),re=Q.useRef(),J=Q.useRef(),ie=e=>[re,J][e]?.current;Q.useImperativeHandle(t,()=>({nativeElement:ne.current,focus:e=>{if(typeof e==`object`){let{index:t=0,...n}=e||{};ie(t)?.focus(n)}else ie(e??0)?.focus()},blur:()=>{ie(0)?.blur(),ie(1)?.blur()}}));let ae=Vr(H),oe=Q.useMemo(()=>Array.isArray(_)?_:[_,_],[_]),[se]=zr({...e,id:K,placeholder:oe}),[ce,le]=Q.useState({position:`absolute`,width:0}),Y=q(()=>{let e=ie(s);if(e){let t=e.nativeElement.getBoundingClientRect(),n=ne.current.getBoundingClientRect(),r=t.left-n.left;le(e=>({...e,width:t.width,left:r})),F([t.left,t.right,n.width])}});Q.useEffect(()=>{Y()},[s]);let ue=i&&(S[0]&&!j[0]||S[1]&&!j[1]),de=B&&!j[0],fe=B&&!de&&!j[1];return Q.createElement(u,{onResize:Y},Q.createElement(`div`,Qr({},ae,{className:w(W,`${W}-range`,{[`${W}-focused`]:d,[`${W}-disabled`]:j.every(e=>e),[`${W}-invalid`]:M.some(e=>e),[`${W}-rtl`]:U},v),style:y,ref:ne,onClick:b,onMouseDown:e=>{let{target:t}=e;t!==re.current.inputElement&&t!==J.current.inputElement&&e.preventDefault(),L?.(e)}}),r&&Q.createElement(`div`,{className:w(`${W}-prefix`,G.prefix),style:te.prefix},r),Q.createElement(Zr,Qr({ref:re},se(0),{className:`${W}-input-start`,autoFocus:de,tabIndex:V,"date-range":`start`})),Q.createElement(`div`,{className:`${W}-range-separator`},o),Q.createElement(Zr,Qr({ref:J},se(1),{className:`${W}-input-end`,autoFocus:fe,tabIndex:V,"date-range":`end`})),Q.createElement(`div`,{className:`${W}-active-bar`,style:ce}),Q.createElement(Ur,{icon:a}),ue&&Q.createElement(Gr,{icon:i,onClear:x})))}var ei=Q.forwardRef($r);function ti(e,t){return(0,Q.useMemo)(()=>[{...e,popup:e?.popup||{}},{...t,popup:t?.popup||{}}],[e,t])}function ni(){return ni=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{disabled:t,allowEmpty:n}=e;return{disabled:ri(t,!1),allowEmpty:ri(n,!1)}}),{prefixCls:c,rootClassName:l,styles:u,classNames:d,previewValue:f,defaultValue:p,value:m,needConfirm:h,onClear:g,onKeyDown:_,disabled:v,allowEmpty:y,disabledDate:b,minDate:x,maxDate:S,defaultOpen:C,open:T,onOpenChange:D,locale:O,generateConfig:A,picker:j,showNow:M,showToday:N,showTime:P,mode:ee,onPanelChange:F,onCalendarChange:I,onOk:L,defaultPickerValue:R,pickerValue:z,onPickerValueChange:B,inputReadOnly:V,suffixIcon:H,onFocus:U,onBlur:W,presets:G,ranges:te,components:K,cellRender:ne,dateRender:re,monthCellRender:J,onClick:ae}=n,se=An(t),[ce,le]=ti(d,u),[Y,ue]=kn(T,C,v,D),de=(e,t)=>{(v.some(e=>!e)||!e)&&ue(e,t)},[fe,pe,me,he,ge]=Un(A,O,a,!0,!1,p,m,I,L),_e=me(),[X,ve,ye,Z,be,xe,Se,Ce,we]=Nn(v,y,Y),Te=(e,t)=>{ve(!0),U?.(e,{range:ii(t??Z)})},Ee=(e,t)=>{ve(!1),W?.(e,{range:ii(t??Z)})},De=Q.useMemo(()=>{if(!P)return null;let{disabledTime:e}=P,t=e?t=>{let n=ii(Z),r=Ut(_e,Se,Z);return e(t,n,{from:r})}:void 0;return{...P,disabledTime:t}},[P,Z,_e,Se]),[Oe,ke]=oe([j,j],ee),Ae=Oe[Z]||j,je=Ae===`date`&&De?`datetime`:Ae,Me=je===j&&je!==`time`,Ne=Gn(j,Ae,M,N,!0),[Pe,Fe]=Wn(n,fe,pe,me,he,v,a,X,Y,s),Ie=Pn(_e,v,Se,A,O,b),[Le,Re]=Kt(_e,s,y),[ze,Be]=Ln(A,O,_e,Oe,Y,Z,r,Me,R,z,De?.defaultOpenValue,B,x,S),Ve=q((e,t,n)=>{let r=Bt(Oe,Z,t);if((r[0]!==Oe[0]||r[1]!==Oe[1])&&ke(r),F&&n!==!1){let t=[..._e];e&&(t[Z]=e),F(t,r)}}),He=(e,t)=>Bt(_e,t,e),Ue=(e,t)=>{let n=_e;e&&(n=He(e,Z)),Ce(Z);let r=xe(n);he(n),Pe(Z,r===null),r===null?de(!1,{force:!0}):t||se.current.focus({index:r})},We=e=>{let t=e.target.getRootNode();if(!se.current.nativeElement.contains(t.activeElement??document.activeElement)){let e=v.findIndex(e=>!e);e>=0&&se.current.focus({index:e})}de(!0),ae?.(e)},Ge=()=>{Fe(null),de(!1,{force:!0}),g?.()},[Ke,qe]=Q.useState(null),[Je,Ye]=Q.useState(null),Xe=Q.useMemo(()=>Je||_e,[_e,Je]);Q.useEffect(()=>{Y||Ye(null)},[Y]);let[Ze,Qe]=Q.useState([0,0,0]),$e=(e,t)=>{f===`hover`&&(Ye(e),qe(t))},et=jn(G,te),tt=e=>{$e(e,`preset`)},nt=e=>{Fe(e)&&(ye(`preset-click`),de(!1,{force:!0}))},rt=e=>{Ue(e)},it=e=>{$e(e?He(e,Z):null,`cell`)},at=e=>{de(!0),Te(e)},ot=()=>{ye(`panel`)},st=e=>{let t=Bt(_e,Z,e);he(t),!h&&!i&&r===je&&Ue(e)},ct=()=>{de(!1)},lt=Gt(ne,re,J,ii(Z)),ut=_e[Z]||null,dt=q(e=>s(e,{activeIndex:Z})),ft=Q.useMemo(()=>{let e=E(n,!1);return k(n,[...Object.keys(e),`onChange`,`onCalendarChange`,`onClear`,`style`,`className`,`onPanelChange`,`disabledTime`,`classNames`,`styles`])},[n]),pt=Q.createElement(Rr,ni({},ft,{showNow:Ne,showTime:De,range:!0,multiplePanel:Me,activeInfo:Ze,disabledDate:Ie,onFocus:at,onBlur:Ee,onPanelMouseDown:ot,picker:j,mode:Ae,internalMode:je,onPanelChange:Ve,format:o,value:ut,isInvalid:dt,onChange:null,onSelect:st,pickerValue:ze,defaultOpenValue:zt(P?.defaultOpenValue)[Z],onPickerValueChange:Be,hoverValue:Xe,onHover:it,needConfirm:h,onSubmit:Ue,onOk:ge,presets:et,onPresetHover:tt,onPresetSubmit:nt,onNow:rt,cellRender:lt,classNames:ce,styles:le})),mt=(e,t)=>{let n=He(e,t);he(n)},ht=()=>{ye(`input`)},gt=(e,t)=>{let n=Se.length,r=Se[n-1];if(n&&r!==t&&h&&!y[r]&&!we(r)&&_e[r]){se.current.focus({index:r});return}ye(`input`),de(!0,{inherit:!0}),Z!==t&&Y&&!h&&i&&Ue(null,!0),be(t),Te(e,t)},_t=(e,t)=>{if(de(!1),!h&&ye()===`input`){let e=xe(_e);Pe(Z,e===null)}Ee(e,t)},vt=(e,t)=>{e.key===`Tab`&&Ue(null,!0),_?.(e,t)},yt=Q.useMemo(()=>({prefixCls:c,locale:O,generateConfig:A,button:K.button,input:K.input,classNames:ce,styles:le}),[c,O,A,K.button,K.input,ce,le]);return ie(()=>{Y&&Z!==void 0&&Ve(null,j,!1)},[Y,Z,j]),ie(()=>{let e=ye();!Y&&e===`input`&&(de(!1),Ue(null,!0)),!Y&&i&&!h&&e===`panel`&&(de(!0),Ue())},[Y]),Q.createElement(Ft.Provider,{value:yt},Q.createElement(Lt,ni({},Wt(n),{popupElement:pt,popupStyle:le.popup.root,popupClassName:w(l,ce.popup.root),visible:Y,onClose:ct,range:!0}),Q.createElement(ei,ni({},n,{ref:se,className:w(n.className,l,ce.root),style:{...le.root,...n.style},suffixIcon:H,activeIndex:X||Y?Z:null,activeHelp:!!Je,allHelp:!!Je&&Ke===`preset`,focused:X,onFocus:gt,onBlur:_t,onKeyDown:vt,onSubmit:Ue,value:Xe,maskFormat:o,onChange:mt,onInputChange:ht,format:a,inputReadOnly:V,disabled:v,open:Y,onOpenChange:de,onClick:We,onClear:Ge,invalid:Le,onInvalid:Re,onActiveInfo:Qe}))))}var oi=Q.forwardRef(ai);function si(e){let{prefixCls:t,value:n,onRemove:r,removeIcon:i=`×`,formatDate:a,disabled:o,maxTagCount:s,tagRender:c,placeholder:l}=e,u=`${t}-selector`,d=`${t}-selection`,f=`${d}-overflow`;function p(e,t){return Q.createElement(`span`,{className:w(`${d}-item`),title:typeof e==`string`?e:null},Q.createElement(`span`,{className:`${d}-item-content`},e),!o&&t&&Q.createElement(`span`,{onMouseDown:e=>{e.preventDefault()},onClick:t,className:`${d}-item-remove`},i))}function m(e){let t=a(e),n=!o,i=t=>{t&&t.stopPropagation(),o||r(e)};return c?c({label:t,value:e,disabled:!!o,closable:n,onClose:i}):p(t,i)}function h(e){return p(`+ ${e.length} ...`)}return Q.createElement(`div`,{className:u},Q.createElement(M,{prefixCls:f,data:n,renderItem:m,renderRest:h,itemKey:e=>a(e),maxCount:s}),!n.length&&Q.createElement(`span`,{className:`${t}-selection-placeholder`},l))}function ci(){return ci=Object.assign?Object.assign.bind():function(e){for(var t=1;t({nativeElement:ne.current,focus:e=>{q.current?.focus(e)},blur:()=>{q.current?.blur()}}));let re=Vr(U),J=e=>{S([e])},ie=e=>{let t=x.filter(t=>t&&!gn(m,p,t,e,b));S(t),r||C()},[ae,oe]=zr({...e,onChange:J},({valueTexts:e})=>({value:e[0]||``,active:l})),se=!!(a&&x.length&&!N),ce=E?Q.createElement(Q.Fragment,null,Q.createElement(si,{prefixCls:G,value:x,onRemove:ie,formatDate:oe,maxTagCount:D,tagRender:O,disabled:N,removeIcon:H,placeholder:h}),Q.createElement(`input`,{className:`${G}-multiple-input`,value:x.map(oe).join(`,`),ref:q,readOnly:!0,autoFocus:B,tabIndex:V}),Q.createElement(Ur,{icon:o}),se&&Q.createElement(Gr,{icon:a,onClear:y})):Q.createElement(Zr,ci({ref:q},ae(),{autoFocus:B,tabIndex:V,suffixIcon:o,clearIcon:se&&Q.createElement(Gr,{icon:a,onClear:y}),showActiveCls:!1}));return Q.createElement(`div`,ci({},re,{className:w(G,{[`${G}-multiple`]:E,[`${G}-focused`]:l,[`${G}-disabled`]:N,[`${G}-invalid`]:P,[`${G}-rtl`]:W},g),style:_,ref:ne,onClick:v,onMouseDown:e=>{let{target:t}=e;t!==q.current?.inputElement&&e.preventDefault(),L?.(e)}}),i&&Q.createElement(`div`,{className:w(`${G}-prefix`,te.prefix),style:K.prefix},i),ce)}var ui=Q.forwardRef(li);function di(){return di=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(L){let r={...n};delete r.range,L(ue(e),ue(t),r)}},e=>{R?.(ue(e))}),Z=X(),[be,xe,Se,Ce]=Nn([b]),we=e=>{xe(!0),K?.(e,{})},Te=e=>{xe(!1),ne?.(e,{})},[Ee,De]=oe(M,F),Oe=Ee===`date`&&ee?`datetime`:Ee,ke=Gn(M,Ee,N,P),Ae=_&&((e,t)=>{_(ue(e),ue(t))}),[,je]=Wn({...n,onChange:Ae},ge,_e,X,ve,[],a,be,me,s),[Me,Ne]=Kt(Z,s),Pe=Q.useMemo(()=>Me.some(e=>e),[Me]),[Fe,Ie]=Ln(j,A,Z,[Ee],me,Ce,r,!1,B,V,zt(ee?.defaultOpenValue),(e,t)=>{if(H){let n={...t,mode:t.mode[0]};delete n.range,H(e[0],n)}},S,C),Le=q((e,t,n)=>{if(De(t),I&&n!==!1){let n=e||Z[Z.length-1];I(n,t)}}),Re=()=>{je(X()),he(!1,{force:!0})},ze=e=>{!b&&!Y.current.nativeElement.contains(document.activeElement)&&Y.current.focus(),he(!0),le?.(e)},Be=()=>{je(null),he(!1,{force:!0}),Y.current.focus(),v?.()},[Ve,He]=Q.useState(null),[Ue,We]=Q.useState(null),Ge=Q.useMemo(()=>{let e=[Ue,...Z].filter(e=>e);return z?e:e.slice(0,1)},[Z,Ue,z]),Ke=Q.useMemo(()=>!z&&Ue?[Ue]:Z.filter(e=>e),[Z,Ue,z]);Q.useEffect(()=>{me||We(null)},[me]);let qe=(e,t)=>{f===`hover`&&(We(e),He(t))},Je=jn(re),Ye=e=>{qe(e,`preset`)},Xe=e=>{let t=z?de(X(),e):[e];je(t)&&!z&&he(!1,{force:!0})},Ze=e=>{Xe(e)},Qe=e=>{qe(e,`cell`)},$e=e=>{he(!0),we(e)},et=e=>{if(Se(`panel`),z&&Oe!==M)return;let t=z?de(X(),e):[e];ve(t),!g&&!i&&r===Oe&&Re()},tt=()=>{he(!1)},nt=Gt(ae,se,ce),rt=Q.useMemo(()=>{let e=E(n,!1);return{...k(n,[...Object.keys(e),`onChange`,`onCalendarChange`,`onClear`,`style`,`className`,`onPanelChange`,`classNames`,`styles`]),multiple:n.multiple}},[n]),it=Q.createElement(Rr,di({},rt,{showNow:ke,showTime:ee,disabledDate:x,onFocus:$e,onBlur:Te,picker:M,mode:Ee,internalMode:Oe,onPanelChange:Le,format:o,value:Z,isInvalid:s,onChange:null,onSelect:et,pickerValue:Fe,defaultOpenValue:ee?.defaultOpenValue,onPickerValueChange:Ie,hoverValue:Ge,onHover:Qe,needConfirm:g,onSubmit:Re,onOk:ye,presets:Je,onPresetHover:Ye,onPresetSubmit:Xe,onNow:Ze,cellRender:nt,classNames:fe,styles:pe})),at=e=>{ve(e)},ot=()=>{Se(`input`)},st=e=>{Se(`input`),he(!0,{inherit:!0}),we(e)},ct=e=>{he(!1),Te(e)},lt=(e,t)=>{e.key===`Tab`&&Re(),y?.(e,t)},ut=Q.useMemo(()=>({prefixCls:c,locale:A,generateConfig:j,button:J.button,input:J.input,classNames:fe,styles:pe}),[c,A,j,J.button,J.input,fe,pe]);return ie(()=>{me&&Ce!==void 0&&Le(null,M,!1)},[me,Ce,M]),ie(()=>{let e=Se();!me&&e===`input`&&(he(!1),Re()),!me&&i&&!g&&e===`panel`&&Re()},[me]),Q.createElement(Ft.Provider,{value:ut},Q.createElement(Lt,di({},Wt(n),{popupElement:it,popupStyle:pe.popup.root,popupClassName:w(l,fe.popup.root),visible:me,onClose:tt}),Q.createElement(ui,di({},n,{ref:Y,className:w(n.className,l,fe.root),style:{...pe.root,...n.style},suffixIcon:W,removeIcon:G,tagRender:te,activeHelp:!!Ue,allHelp:!!Ue&&Ve===`preset`,focused:be,onFocus:st,onBlur:ct,onKeyDown:lt,onSubmit:Re,value:Ke,maskFormat:o,onChange:at,onInputChange:ot,internalPicker:r,format:a,inputReadOnly:U,disabled:b,open:me,onOpenChange:he,onClick:ze,onClear:Be,invalid:Pe,onInvalid:e=>{Ne(e,0)}}))))}var pi=Q.forwardRef(fi),mi=e=>{let{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=e,a=e.max(e.calc(n).sub(r).equal(),0);return{basePadding:a,containerPadding:e.max(e.calc(a).sub(i).equal(),0),itemHeight:g(t),itemLineHeight:g(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},hi=e=>{let{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:a,multipleItemColorDisabled:o,multipleItemBorderColorDisabled:s,colorIcon:c,colorIconHover:l,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:`relative`,display:`flex`,flex:`auto`,flexWrap:`wrap`,maxWidth:`100%`,"&-item":{flex:`none`,alignSelf:`center`,maxWidth:`calc(100% - 4px)`,display:`inline-flex`},[`${t}-selection-item`]:{display:`flex`,alignSelf:`center`,flex:`none`,boxSizing:`border-box`,maxWidth:`100%`,marginBlock:u,borderRadius:r,cursor:`default`,transition:[`font-size`,`line-height`,`height`].map(e=>`${e} ${i}`).join(`, `),marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:a,paddingInlineEnd:e.calc(a).div(2).equal(),[`${t}-disabled&`]:{color:o,borderColor:s,cursor:`not-allowed`},"&-content":{display:`inline-block`,marginInlineEnd:e.calc(a).div(2).equal(),overflow:`hidden`,whiteSpace:`pre`,textOverflow:`ellipsis`},"&-remove":{...v(),display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${n}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}}}}}},gi=(e,t)=>{let{componentCls:n,controlHeight:r}=e,i=t?`${n}-${t}`:``,a=mi(e);return[{[`${n}-multiple${i}`]:{paddingBlock:a.containerPadding,paddingInlineStart:a.basePadding,minHeight:r,[`${n}-selection-item`]:{height:a.itemHeight,lineHeight:g(a.itemLineHeight)}}}]},_i=e=>{let{componentCls:t,calc:n,lineWidth:i}=e,a=J(e,{fontHeight:e.fontSize,selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS,controlHeight:e.controlHeightSM}),o=J(e,{fontHeight:n(e.multipleItemHeightLG).sub(n(i).mul(2).equal()).equal(),fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius,controlHeight:e.controlHeightLG});return[gi(a,`small`),gi(e),gi(o,`large`),{[`${t}${t}-multiple`]:{width:`100%`,cursor:`text`,[`${t}-selector`]:{flex:`auto`,padding:0,position:`relative`,"&:after":{margin:0},[`${t}-selection-placeholder`]:{position:`absolute`,top:`50%`,insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:0,transform:`translateY(-50%)`,transition:`all ${e.motionDurationSlow}`,flex:1,color:e.colorTextPlaceholder,pointerEvents:`none`,...r}},...hi(e),[`${t}-multiple-input`]:{width:0,height:0,border:0,visibility:`hidden`,position:`absolute`,zIndex:-1}}}]},vi=e=>{let{pickerCellCls:t,pickerCellInnerCls:n,cellHeight:r,borderRadiusSM:i,motionDurationMid:a,cellHoverBg:o,lineWidth:s,lineType:c,colorPrimary:l,cellActiveWithRangeBg:u,colorTextLightSolid:d,colorTextDisabled:f,cellBgDisabled:p,colorFillSecondary:m}=e;return{"&::before":{position:`absolute`,top:`50%`,insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:r,transform:`translateY(-50%)`,content:`""`,pointerEvents:`none`},[n]:{position:`relative`,zIndex:2,display:`inline-block`,minWidth:r,height:r,lineHeight:g(r),borderRadius:i,transition:`background-color ${a}`},[`&:hover:not(${t}-in-view):not(${t}-disabled), + &:hover:not(${t}-selected):not(${t}-range-start):not(${t}-range-end):not(${t}-disabled)`]:{[n]:{background:o}},[`&-in-view${t}-today ${n}`]:{"&::before":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${g(s)} ${c} ${l}`,borderRadius:i,content:`""`}},[`&-in-view${t}-in-range, + &-in-view${t}-range-start, + &-in-view${t}-range-end`]:{position:`relative`,[`&:not(${t}-disabled):before`]:{background:u}},[`&-in-view${t}-selected, + &-in-view${t}-range-start, + &-in-view${t}-range-end`]:{[`&:not(${t}-disabled) ${n}`]:{color:d,background:l},[`&${t}-disabled ${n}`]:{background:m}},[`&-in-view${t}-range-start:not(${t}-disabled):before`]:{insetInlineStart:`50%`},[`&-in-view${t}-range-end:not(${t}-disabled):before`]:{insetInlineEnd:`50%`},[`&-in-view${t}-range-start:not(${t}-range-end) ${n}`]:{borderStartStartRadius:i,borderEndStartRadius:i,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${t}-range-end:not(${t}-range-start) ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i},"&-disabled":{color:f,cursor:`not-allowed`,[n]:{background:`transparent`},"&::before":{background:p}},[`&-disabled${t}-today ${n}::before`]:{borderColor:f}}},yi=e=>{let{componentCls:t,pickerCellCls:n,pickerCellInnerCls:r,pickerYearMonthCellWidth:i,pickerControlIconSize:a,cellWidth:o,paddingSM:s,paddingXS:c,paddingXXS:l,colorBgContainer:u,lineWidth:d,lineType:f,borderRadiusLG:p,colorPrimary:m,colorTextHeading:h,colorSplit:_,pickerControlIconBorderWidth:v,colorIcon:y,textHeight:b,motionDurationMid:x,colorIconHover:S,fontWeightStrong:C,cellHeight:w,pickerCellPaddingVertical:T,colorTextDisabled:E,colorText:D,fontSize:O,motionDurationSlow:k,withoutTimeCellHeight:A,pickerQuarterPanelContentHeight:j,borderRadiusSM:M,colorTextLightSolid:N,cellHoverBg:P,timeColumnHeight:ee,timeColumnWidth:F,timeCellHeight:I,controlItemBgActive:R,marginXXS:z,pickerDatePanelPaddingHorizontal:B,pickerControlIconMargin:V}=e,H=e.calc(o).mul(7).add(e.calc(B).mul(2)).equal();return{[t]:{"&-panel":{display:`inline-flex`,flexDirection:`column`,textAlign:`center`,background:u,borderRadius:p,outline:`none`,"&-focused":{borderColor:m},"&-rtl":{[`${t}-prev-icon, + ${t}-super-prev-icon`]:{transform:`rotate(45deg)`},[`${t}-next-icon, + ${t}-super-next-icon`]:{transform:`rotate(-135deg)`},[`${t}-time-panel`]:{[`${t}-content`]:{direction:`ltr`,"> *":{direction:`rtl`}}}}},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel, &-week-panel, &-date-panel, &-time-panel":{display:`flex`,flexDirection:`column`,width:H},"&-header":{display:`flex`,padding:`0 ${g(c)}`,color:h,borderBottom:`${g(d)} ${f} ${_}`,"> *":{flex:`none`},button:{padding:0,color:y,lineHeight:g(b),background:`transparent`,border:0,cursor:`pointer`,transition:`color ${x}`,fontSize:`inherit`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,"&:empty":{display:`none`}},"> button":{minWidth:`1.6em`,fontSize:O,"&:hover":{color:S},"&:disabled":{opacity:.25,pointerEvents:`none`}},"&-view":{flex:`auto`,fontWeight:C,lineHeight:g(b),"> button":{color:`inherit`,fontWeight:`inherit`,verticalAlign:`top`,"&:not(:first-child)":{marginInlineStart:c},"&:hover":{color:m}}}},"&-prev-icon, &-next-icon, &-super-prev-icon, &-super-next-icon":{position:`relative`,width:a,height:a,"&::before":{position:`absolute`,top:0,insetInlineStart:0,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:v,borderInlineStartWidth:v,content:`""`}},"&-super-prev-icon, &-super-next-icon":{"&::after":{position:`absolute`,top:V,insetInlineStart:V,display:`inline-block`,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:v,borderInlineStartWidth:v,content:`""`}},"&-prev-icon, &-super-prev-icon":{transform:`rotate(-45deg)`},"&-next-icon, &-super-next-icon":{transform:`rotate(135deg)`},"&-content":{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`,"th, td":{position:`relative`,minWidth:w,fontWeight:`normal`},th:{height:e.calc(w).add(e.calc(T).mul(2)).equal(),color:D,verticalAlign:`middle`}},"&-cell":{padding:`${g(T)} 0`,color:E,cursor:`pointer`,"&-in-view":{color:D},...vi(e)},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel":{[`${t}-content`]:{height:e.calc(A).mul(4).equal()},[r]:{padding:`0 ${g(c)}`}},"&-quarter-panel":{[`${t}-content`]:{height:j}},"&-decade-panel":{[r]:{padding:`0 ${g(e.calc(c).div(2).equal())}`},[`${t}-cell::before`]:{display:`none`}},"&-year-panel, &-quarter-panel, &-month-panel":{[`${t}-body`]:{padding:`0 ${g(c)}`},[r]:{width:i}},"&-date-panel":{[`${t}-body`]:{padding:`${g(c)} ${g(B)}`},[`${t}-content th`]:{boxSizing:`border-box`,padding:0}},"&-week-panel-row":{td:{"&:before":{transition:`background-color ${x}`},"&:first-child:before":{borderStartStartRadius:M,borderEndStartRadius:M},"&:last-child:before":{borderStartEndRadius:M,borderEndEndRadius:M}},"&:hover td:before":{background:P},"&-range-start td, &-range-end td, &-selected td, &-hover td":{[`&${n}`]:{"&:before":{background:m},[`&${t}-cell-week`]:{color:new L(N).setA(.5).toHexString()},[r]:{color:N}}},"&-range-hover td:before":{background:R}},"&-week-panel, &-date-panel-show-week":{[`${t}-body`]:{padding:`${g(c)} ${g(s)}`},[`${t}-content th`]:{width:`auto`}},"&-datetime-panel":{display:`flex`,[`${t}-time-panel`]:{borderInlineStart:`${g(d)} ${f} ${_}`},[`${t}-date-panel, + ${t}-time-panel`]:{transition:`opacity ${k}`},"&-active":{[`${t}-date-panel, + ${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:`auto`,minWidth:`auto`,[`${t}-content`]:{display:`flex`,flex:`auto`,height:ee},"&-column":{flex:`1 0 auto`,width:F,margin:`${g(l)} 0`,padding:0,overflowY:`auto`,textAlign:`start`,listStyle:`none`,transition:`background-color ${x}`,overflowX:`hidden`,"&::-webkit-scrollbar":{width:8,backgroundColor:`transparent`},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:e.borderRadiusSM},"&":{scrollbarWidth:`thin`,scrollbarColor:`${e.colorTextTertiary} transparent`},"&::after":{display:`block`,height:`calc(100% - ${g(I)})`,content:`""`},"&:not(:first-child)":{borderInlineStart:`${g(d)} ${f} ${_}`},"&-active":{background:new L(R).setA(.2).toHexString()},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:z,[`${t}-time-panel-cell-inner`]:{display:`block`,width:e.calc(F).sub(e.calc(z).mul(2)).equal(),height:I,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:e.calc(F).sub(I).div(2).equal(),color:D,lineHeight:g(I),borderRadius:M,cursor:`pointer`,transition:`background-color ${x}`,"&:hover":{background:P}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:R}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:E,background:`transparent`,cursor:`not-allowed`}}}}}}}}},bi=e=>{let{componentCls:t,textHeight:n,lineWidth:r,paddingSM:i,antCls:a,colorPrimary:o,cellActiveWithRangeBg:s,colorPrimaryBorder:c,lineType:l,colorSplit:u}=e;return{[`${t}-dropdown`]:{[`${t}-footer`]:{borderTop:`${g(r)} ${l} ${u}`,"&-extra":{padding:`0 ${g(i)}`,lineHeight:g(e.calc(n).sub(e.calc(r).mul(2)).equal()),textAlign:`start`,"&:not(:last-child)":{borderBottom:`${g(r)} ${l} ${u}`}}},[`${t}-panels + ${t}-footer ${t}-ranges`]:{justifyContent:`space-between`},[`${t}-ranges`]:{marginBlock:0,paddingInline:g(i),overflow:`hidden`,textAlign:`start`,listStyle:`none`,display:`flex`,justifyContent:`center`,alignItems:`center`,"> li":{lineHeight:g(e.calc(n).sub(e.calc(r).mul(2)).equal()),display:`inline-block`},[`${t}-now-btn-disabled`]:{pointerEvents:`none`,color:e.colorTextDisabled},[`${t}-preset > ${a}-tag-blue`]:{color:o,background:s,borderColor:c,cursor:`pointer`},[`${t}-ok`]:{paddingBlock:e.calc(r).mul(2).equal(),marginInlineStart:`auto`}}}}},xi=e=>{let{componentCls:t,controlHeightLG:n,paddingXXS:r,padding:i}=e;return{pickerCellCls:`${t}-cell`,pickerCellInnerCls:`${t}-cell-inner`,pickerYearMonthCellWidth:e.calc(n).mul(1.5).equal(),pickerQuarterPanelContentHeight:e.calc(n).mul(1.4).equal(),pickerCellPaddingVertical:e.calc(r).add(e.calc(r).div(2)).equal(),pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconMargin:4,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:e.calc(i).add(e.calc(r).div(2)).equal()}},Si=e=>{let{colorBgContainerDisabled:t,controlHeight:n,controlHeightSM:r,controlHeightLG:i,paddingXXS:a,lineWidth:o}=e,s=a*2,c=o*2,l=Math.min(n-s,n-c),u=Math.min(r-s,r-c),d=Math.min(i-s,i-c);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(a/2),cellHoverBg:e.controlItemBgHover,cellActiveWithRangeBg:e.controlItemBgActive,cellHoverWithRangeBg:new L(e.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new L(e.colorPrimary).lighten(20).toHexString(),cellBgDisabled:t,timeColumnWidth:i*1.4,timeColumnHeight:224,timeCellHeight:28,cellWidth:r*1.5,cellHeight:r,textHeight:i,withoutTimeCellHeight:i*1.65,multipleItemBg:e.colorFillSecondary,multipleItemBorderColor:`transparent`,multipleItemHeight:l,multipleItemHeightSM:u,multipleItemHeightLG:d,multipleSelectorBgDisabled:t,multipleItemColorDisabled:e.colorTextDisabled,multipleItemBorderColorDisabled:`transparent`}},Ci=e=>({...Re(e),...Si(e),...Se(e),presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50}),wi=e=>{let{componentCls:t}=e;return{[t]:[{...Pe(e),...Fe(e),...ze(e),...Ne(e)},{"&-outlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${g(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-filled":{[`&${t}-multiple ${t}-selection-item`]:{background:e.colorBgContainer,border:`${g(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}},"&-borderless":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${g(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-underlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${g(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}}}]}},Ti=(e,t)=>({padding:`${g(e)} ${g(t)}`}),Ei=e=>{let{componentCls:t,colorError:n,colorWarning:r}=e,[i]=S(e.antCls,`date-picker`);return{[`${t}:not(${t}-disabled):not([disabled])`]:{[`&${t}-status-error`]:{[i(`affix-color`)]:e.colorErrorAffix,[`${t}-active-bar`]:{background:n}},[`&${t}-status-warning`]:{[i(`affix-color`)]:e.colorWarningAffix,[`${t}-active-bar`]:{background:r}}}}},Di=e=>{let{componentCls:t,antCls:n,paddingInline:a,lineWidth:o,lineType:s,colorBorder:c,borderRadius:l,motionDurationMid:u,colorTextDisabled:d,colorTextPlaceholder:f,colorTextQuaternary:m,fontSizeLG:h,inputFontSizeLG:_,fontSizeSM:v,inputFontSizeSM:y,controlHeightSM:b,paddingInlineSM:x,paddingXS:w,marginXS:T,colorIcon:E,lineWidthBold:D,colorPrimary:O,motionDurationSlow:k,zIndexPopup:j,paddingXXS:M,sizePopupArrow:N,colorBgElevated:P,borderRadiusLG:ee,boxShadowSecondary:F,borderRadiusSM:I,colorSplit:L,cellHoverBg:R,presetsWidth:z,presetsMaxWidth:B,boxShadowPopoverArrow:U,fontHeight:W,lineHeightLG:G}=e,[te,K]=S(n,`date-picker`);return[{[t]:{[te(`affix-color`)]:`inherit`,...A(e),...Ti(e.paddingBlock,e.paddingInline),position:`relative`,display:`inline-flex`,alignItems:`center`,lineHeight:1,borderRadius:l,transition:[`border`,`box-shadow`,`background-color`].map(e=>`${e} ${u}`).join(`, `),[`${t}-prefix`]:{color:K(`affix-color`),flex:`0 0 auto`,marginInlineEnd:e.inputAffixPadding},[`${t}-input`]:{position:`relative`,display:`inline-flex`,alignItems:`center`,width:`100%`,"> input":{position:`relative`,display:`inline-block`,width:`100%`,color:`inherit`,fontSize:e.inputFontSize??e.fontSize,lineHeight:e.lineHeight,transition:`all ${u}`,...Ie(f),flex:`auto`,minWidth:1,height:`auto`,padding:0,background:`transparent`,border:0,fontFamily:`inherit`,"&:focus":{boxShadow:`none`,outline:0},"&[disabled]":{background:`transparent`,color:d,cursor:`not-allowed`}},"&-placeholder":{"> input":{color:f}}},"&-large":{...Ti(e.paddingBlockLG,e.paddingInlineLG),borderRadius:e.borderRadiusLG,[`${t}-input > input`]:{fontSize:_??h,lineHeight:G}},"&-small":{...Ti(e.paddingBlockSM,e.paddingInlineSM),borderRadius:e.borderRadiusSM,[`${t}-input > input`]:{fontSize:y??v}},[`${t}-suffix`]:{display:`flex`,flex:`none`,alignSelf:`center`,marginInlineStart:e.calc(w).div(2).equal(),color:m,lineHeight:1,pointerEvents:`none`,transition:[`opacity`,`color`].map(e=>`${e} ${u}`).join(`, `),"> *":{verticalAlign:`top`,"&:not(:last-child)":{marginInlineEnd:T}}},[`${t}-clear`]:{position:`absolute`,top:`50%`,insetInlineEnd:0,color:m,lineHeight:1,padding:0,fontSize:`inherit`,fontFamily:`inherit`,background:`transparent`,border:0,appearance:`none`,transform:`translateY(-50%)`,cursor:`pointer`,opacity:0,pointerEvents:`none`,transition:[`opacity`,`color`].map(e=>`${e} ${u}`).join(`, `),"> *":{verticalAlign:`top`},"&:hover":{color:E},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...H(e)}},"&:hover, &:focus-within":{[`${t}-clear`]:{opacity:1,pointerEvents:`auto`},[`${t}-suffix:not(:last-child)`]:{opacity:0}},[`${t}-separator`]:{position:`relative`,display:`inline-block`,width:`1em`,height:h,color:m,fontSize:h,verticalAlign:`top`,cursor:`default`,[`${t}-focused &`]:{color:E},[`${t}-range-separator &`]:{[`${t}-disabled &`]:{cursor:`not-allowed`}}},"&-range":{position:`relative`,display:`inline-flex`,[`${t}-active-bar`]:{bottom:e.calc(o).mul(-1).equal(),height:D,background:O,opacity:0,transition:`all ${k} ease-out`,pointerEvents:`none`},[`&${t}-focused`]:{[`${t}-active-bar`]:{opacity:1}},[`${t}-range-separator`]:{alignItems:`center`,padding:`0 ${g(w)}`,lineHeight:1}},"&-range, &-multiple":{[`${t}-clear`]:{insetInlineEnd:a},[`&${t}-small`]:{[`${t}-clear`]:{insetInlineEnd:x}}},"&-dropdown":{...A(e),...yi(e),pointerEvents:`none`,position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:j,[`&${t}-dropdown-hidden`]:{display:`none`},"&-rtl":{direction:`rtl`},[`&${t}-dropdown-placement-bottomLeft, + &${t}-dropdown-placement-bottomRight`]:{[`${t}-range-arrow`]:{top:0,display:`block`,transform:`translateY(-100%)`}},[`&${t}-dropdown-placement-topLeft, + &${t}-dropdown-placement-topRight`]:{[`${t}-range-arrow`]:{bottom:0,display:`block`,transform:`translateY(100%) rotate(180deg)`}},[`&${n}-slide-up-appear, &${n}-slide-up-enter`]:{[`${t}-range-arrow${t}-range-arrow`]:{transition:`none`}},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topLeft, + &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topRight, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topLeft, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topRight`]:{animationName:i},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomRight, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomRight`]:{animationName:p},[`&${n}-slide-up-leave ${t}-panel-container`]:{pointerEvents:`none`},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topLeft, + &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topRight`]:{animationName:C},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]:{animationName:V},[`${t}-panel > ${t}-time-panel`]:{paddingTop:M},[`${t}-range-wrapper`]:{display:`flex`,position:`relative`},[`${t}-range-arrow`]:{position:`absolute`,zIndex:1,display:`none`,paddingInline:e.calc(a).mul(1.5).equal(),boxSizing:`content-box`,transition:`all ${k} ease-out`,...ye(e,P,U),"&:before":{insetInlineStart:e.calc(a).mul(1.5).equal()}},[`${t}-panel-container`]:{overflow:`hidden`,verticalAlign:`top`,background:P,borderRadius:ee,boxShadow:F,transition:`margin ${k}`,display:`inline-block`,pointerEvents:`auto`,[`${t}-panel-layout`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`stretch`},[`${t}-presets`]:{display:`flex`,flexDirection:`column`,minWidth:z,maxWidth:B,ul:{height:0,flex:`auto`,listStyle:`none`,overflow:`auto`,margin:0,padding:w,borderInlineEnd:`${g(o)} ${s} ${L}`,li:{...r,borderRadius:I,paddingInline:w,paddingBlock:e.calc(b).sub(W).div(2).equal(),cursor:`pointer`,transition:`all ${k}`,"+ li":{marginTop:T},"&:hover":{background:R}}}},[`${t}-panels`]:{display:`inline-flex`,flexWrap:`nowrap`,"&:last-child":{[`${t}-panel`]:{borderWidth:0}}},[`${t}-panel`]:{verticalAlign:`top`,background:`transparent`,borderRadius:0,borderWidth:0,[`${t}-content, table`]:{textAlign:`center`},"&-focused":{borderColor:c}}}},"&-dropdown-range":{padding:`${g(e.calc(N).mul(2).div(3).equal())} 0`,"&-hidden":{display:`none`}},"&-rtl":{direction:`rtl`,[`${t}-separator`]:{transform:`scale(-1, 1)`},[`${t}-footer`]:{"&-extra":{direction:`rtl`}}}}},ce(e,`slide-up`),ce(e,`slide-down`),Ue(e,`move-up`),Ue(e,`move-down`)]},Oi=T(`DatePicker`,e=>{let t=J(Le(e),xi(e),{inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[bi(t),Di(t),wi(t),Ei(t),_i(t),s(e,{focusElCls:`${e.componentCls}-focused`})]},Ci),ki=Q.createContext({}),Ai=`__rc_cascader_search_mark__`,ji=(e,t,{label:n=``})=>t.some(t=>String(t[n]).toLowerCase().includes(e.toLowerCase())),Mi=(e,t,n,r)=>t.map(e=>e[r.label]).join(` / `),Ni=(e,t,n,r,i,a)=>{let{filter:o=ji,render:s=Mi,limit:c=50,sort:l}=i;return Q.useMemo(()=>{let i=[];if(!e)return[];function u(t,d,f=!1){t.forEach(t=>{if(!l&&c!==!1&&c>0&&i.length>=c)return;let p=[...d,t],m=t[n.children],h=f||t.disabled;(!m||m.length===0||a)&&o(e,p,{label:n.label})&&i.push({...t,disabled:h,[n.label]:s(e,p,r,n),[Ai]:p,[n.children]:void 0}),m&&u(t[n.children],p,h)})}return u(t,[]),l&&i.sort((t,r)=>l(t[Ai],r[Ai],e,n)),c!==!1&&c>0?i.slice(0,c):i},[e,t,n,r,s,a,o,l,c])},Pi=`__RC_CASCADER_SPLIT__`,Fi=`SHOW_PARENT`,Ii=`SHOW_CHILD`;function Li(e){return e.join(Pi)}function Ri(e){return e.map(Li)}function zi(e){return e.split(Pi)}function Bi(e){let{label:t,value:n,children:r}=e||{},i=n||`value`;return{label:t||`label`,value:i,key:i,children:r||`children`}}function Vi(e,t){return e.isLeaf??!e[t.children]?.length}function Hi(e){let t=e.parentElement;if(!t)return;let n=e.offsetTop-t.offsetTop;n-t.scrollTop<0?t.scrollTo({top:n}):n+e.offsetHeight-t.scrollTop>t.offsetHeight&&t.scrollTo({top:n+e.offsetHeight-t.offsetHeight})}function Ui(e,t){return e.map(e=>e[Ai]?.map(e=>e[t.value]))}function Wi(e){return Array.isArray(e)&&Array.isArray(e[0])}function Gi(e){return e?Wi(e)?e:(e.length===0?[]:[e]).map(e=>Array.isArray(e)?e:[e]):[]}function Ki(e,t,n){let r=new Set(e),i=t();return e.filter(e=>{let t=i[e],a=t?t.parent:null,o=t?t.children:null;return t&&t.node.disabled?!0:n===`SHOW_CHILD`?!(o&&o.some(e=>e.key&&r.has(e.key))):!(a&&!a.node.disabled&&r.has(a.key))})}function qi(e,t,n,r=!1){let i=t,a=[];for(let t=0;t{let t=e[n.value];return r?String(t)===String(o):t===o}),c=s===-1?null:i?.[s];a.push({value:c?.[n.value]??o,index:s,option:c}),i=c?.[n.children]}return a}var Ji=((e,t,n,r,i)=>Q.useMemo(()=>{let a=i||(e=>{let t=r?e.slice(-1):e;return t.every(e=>[`string`,`number`].includes(typeof e))?t.join(` / `):t.reduce((e,t,n)=>{let r=Q.isValidElement(t)?Q.cloneElement(t,{key:n}):t;return n===0?[r]:[...e,` / `,r]},[])});return e.map(e=>{let r=qi(e,t,n),i=a(r.map(({option:e,value:t})=>e?.[n.label]??t),r.map(({option:e})=>e)),o=Li(e);return{label:i,value:o,key:o,valueCells:e,disabled:r[r.length-1]?.option?.disabled}})},[e,t,n,i,r]));function Yi(e,t){return Q.useCallback(n=>{let r=[],i=[];return n.forEach(n=>{qi(n,e,t).every(e=>e.option)?i.push(n):r.push(n)}),[i,r]},[e,t])}var Xi=((e,t)=>{let n=Q.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}});return Q.useCallback(()=>(n.current.options!==e&&(n.current.options=e,n.current.info=Te(e,{fieldNames:t,initWrapper:e=>({...e,pathKeyEntities:{}}),processEntity:(e,n)=>{let r=e.nodes.map(e=>e[t.value]).join(Pi);n.pathKeyEntities[r]=e,e.key=r}})),n.current.info.pathKeyEntities),[t,e])});function Zi(e,t){let n=Q.useMemo(()=>t||[],[t]),r=Xi(n,e);return[n,r,Q.useCallback(t=>{let n=r();return t.map(t=>{let{nodes:r}=n[t];return r.map(t=>t[e.value])})},[r,e])]}function Qi(e,t){let{autoClearSearchValue:n,searchValue:r,onSearch:i}=t;return Q.useMemo(()=>{if(!e)return[!1,{}];let t={matchInputWidth:!0,limit:50,autoClearSearchValue:n,searchValue:r,onSearch:i};return e&&typeof e==`object`&&(t={...t,...e}),t.limit<=0&&(t.limit=!1),[!0,t]},[e,n,r,i])}function $i(e,t,n,r,i,a,o,s){return c=>{if(!e)t(c);else{let e=Li(c),l=Ri(n),u=Ri(r),d=l.includes(e),f=i.some(t=>Li(t)===e),p=n,m=i;if(f&&!d)m=i.filter(t=>Li(t)!==e);else{let t=d?l.filter(t=>t!==e):[...l,e],n=a(),r;d?{checkedKeys:r}=Ae(t,{checked:!1,halfCheckedKeys:u},n):{checkedKeys:r}=Ae(t,!0,n),p=o(Ki(r,a,s))}t([...m,...p])}}}function ea(e,t,n,r,i){return Q.useMemo(()=>{let[a,o]=i(t);if(!e||!t.length)return[a,[],o];let{checkedKeys:s,halfCheckedKeys:c}=Ae(Ri(a),!0,n());return[r(s),r(c),o]},[e,t,n,r,i])}function ta({prefixCls:e,checked:t,halfChecked:n,disabled:r,onClick:i,disableCheckbox:a}){let{checkable:o}=Q.useContext(ki),s=typeof o==`boolean`?null:o;return Q.createElement(`span`,{className:w(`${e}`,{[`${e}-checked`]:t,[`${e}-indeterminate`]:!t&&n,[`${e}-disabled`]:r||a}),onClick:i},s)}function na(){return na=Object.assign?Object.assign.bind():function(e){for(var t=1;tf||e,k=Q.useMemo(()=>n.map(e=>{let{disabled:t,disableCheckbox:n}=e,r=e[Ai],a=e.__cascader_fix_label__??e[g.label],o=e[g.value],s=Vi(e,g),d=r?r.map(e=>e[g.value]):[...i,o],f=Li(d);return{disabled:t,label:a,value:o,isLeaf:s,isLoading:u.includes(f),checked:c.has(f),halfChecked:l.has(f),option:e,disableCheckbox:n,fullPath:d,fullPathKey:f}}),[n,c,g,l,u,i]);return Q.useEffect(()=>{if(h.current){let e=`.${m}-active`,t=h.current.querySelector(e);t&&Hi(t)}},[r,m]),Q.createElement(`ul`,{className:w(p,C?.popup?.list),style:T?.popup?.list,ref:h,role:`menu`},k.map(({disabled:n,label:i,value:c,isLeaf:l,isLoading:u,checked:f,halfChecked:p,option:h,fullPath:g,fullPathKey:v,disableCheckbox:k})=>{let A=E(h,{aria:!0,data:!0}),j=()=>{if(O(n))return;let e=[...g];D&&l&&e.pop(),s(e)},M=()=>{d(h)&&!O(n)&&o(g,l)},N;return typeof h.title==`string`?N=h.title:typeof i==`string`&&(N=i),Q.createElement(`li`,na({key:v},A,{className:w(m,C?.popup?.listItem,{[`${m}-expand`]:!l,[`${m}-active`]:r===c||r===v,[`${m}-disabled`]:O(n),[`${m}-loading`]:u}),style:{...x,...T?.popup?.listItem},role:`menuitemcheckbox`,title:N,"aria-checked":f,"data-path-key":v,onClick:()=>{j(),!k&&(!t||l)&&M()},onDoubleClick:()=>{_&&a(!1)},onMouseEnter:()=>{D&&j()},onMouseDown:e=>{e.preventDefault()}}),t&&Q.createElement(ta,{prefixCls:`${e}-checkbox`,checked:f,halfChecked:p,disabled:O(n)||k,disableCheckbox:k,onClick:e=>{k||(e.stopPropagation(),M())}}),Q.createElement(`div`,{className:`${m}-content`},S&&c!==`__EMPTY__`?S(h):i),!u&&y&&!l&&Q.createElement(`div`,{className:`${m}-expand-icon`},y),u&&b&&Q.createElement(`div`,{className:`${m}-loading-icon`},b))}))}var aa=(e,t)=>{let{values:n}=Q.useContext(ki),r=n[0],[i,a]=Q.useState([]);return Q.useEffect(()=>{e||a(r||[])},[t,r]),[i,a]},oa=((e,t,n,r,i,a,o)=>{let{direction:s,searchValue:c,toggleOpen:l,open:u}=o,d=s===`rtl`,[f,p,m,h]=Q.useMemo(()=>{let e=-1,i=t,a=[],o=[],s=r.length,c=Ui(t,n);for(let t=0;t(c[i]?Li(c[i]):e[n.value])===r[t]);if(s===-1)break;e=s,a.push(e),o.push(r[t]),i=i[e][n.children]}let l=t;for(let e=0;e{i(e)},_=e=>{let t=m.length,r=p;r===-1&&e<0&&(r=t);for(let i=0;i{if(f.length>1){let e=f.slice(0,-1);g(e)}else l(!1)},y=()=>{let e=(m[p]?.[n.children]||[]).find(e=>!e.disabled);if(e){let t=[...f,e[n.value]];g(t)}};Q.useImperativeHandle(e,()=>({onKeyDown:e=>{let{which:t}=e;switch(t){case F.UP:case F.DOWN:{let e=0;t===F.UP?e=-1:t===F.DOWN&&(e=1),e!==0&&_(e);break}case F.LEFT:if(c)break;d?y():v();break;case F.RIGHT:if(c)break;d?v():y();break;case F.BACKSPACE:c||v();break;case F.ENTER:if(f.length){let e=m[p]?.__rc_cascader_search_mark__||[];e.length?a(e.map(e=>e[n.value]),e[e.length-1]):a(f,m[p])}break;case F.ESC:l(!1),u&&e.stopPropagation()}},onKeyUp:()=>{}}))});function sa(){return sa=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,multiple:r,searchValue:i,toggleOpen:a,notFoundContent:o,direction:s,open:c,disabled:l,lockOptions:u=!1}=e,d=Q.useRef(null),f=s===`rtl`,{options:p,values:m,halfValues:h,fieldNames:g,changeOnSelect:_,onSelect:v,searchOptions:y,popupPrefixCls:b,loadData:x,expandTrigger:S}=Q.useContext(ki),C=b||n,[T,E]=Q.useState([]),D=e=>{if(!x||i)return;let t=qi(e,p,g).map(({option:e})=>e),n=t[t.length-1];if(n&&!Vi(n,g)){let n=Li(e);E(e=>[...e,n]),x(t)}};Q.useEffect(()=>{T.length&&T.forEach(e=>{let t=qi(zi(e),p,g,!0).map(({option:e})=>e),n=t[t.length-1];(!n||n[g.children]||Vi(n,g))&&E(t=>t.filter(t=>t!==e))})},[p,T,g]);let O=Q.useMemo(()=>new Set(Ri(m)),[m]),k=Q.useMemo(()=>new Set(Ri(h)),[h]),[A,j]=aa(r,c),M=e=>{j(e),D(e)},N=e=>{if(l)return!1;let{disabled:t}=e,n=Vi(e,g);return!t&&(n||_||r)},ee=(e,t,n=!1)=>{v(e),!r&&(t||_&&(S===`hover`||n))&&a(!1)},F=Q.useMemo(()=>i?y:p,[i,y,p]),I=P(()=>F,[c,u],(e,t)=>!!t[0]&&!t[1]),L=Q.useMemo(()=>{let e=[{options:I}],t=I,n=Ui(t,g);for(let r=0;r(n[t]?Li(n[t]):e[g.value])===i)?.[g.children];if(!a?.length)break;t=a,e.push({options:a})}return e},[I,A,g]);oa(t,I,g,A,M,(e,t)=>{N(t)&&ee(e,Vi(t,g),!0)},{direction:s,searchValue:i,toggleOpen:a,open:c}),Q.useEffect(()=>{if(!i)for(let e=0;e{let n=A.slice(0,t),r=A[t];return Q.createElement(ia,sa({key:t},B,{prefixCls:C,options:e.options,prevValuePath:n,activeValue:r}))});return Q.createElement(`div`,{className:w(`${C}-menus`,{[`${C}-menu-empty`]:R,[`${C}-rtl`]:f}),ref:d},V)});function la(){return la=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{lockOptions:n,...r}=Ye();return Q.createElement(ca,la({},e,r,{lockOptions:n,ref:t}))});function da(){}function fa(e){let{prefixCls:t=`rc-cascader`,style:n,className:r,options:i,checkable:a,defaultValue:o,value:s,fieldNames:c,changeOnSelect:l,onChange:u,showCheckedStrategy:d,loadData:f,expandTrigger:p,expandIcon:m=`>`,loadingIcon:h,direction:g,notFoundContent:_=`Not Found`,disabled:v,optionRender:y}=e,b=!!a,[x,S]=oe(o,s),C=Gi(x),T=Q.useMemo(()=>Bi(c),[JSON.stringify(c)]),[E,D,O]=Zi(T,i),[k,A,j]=ea(b,C,D,O,Yi(E,T)),M=$i(b,q(e=>{if(S(e),u){let t=Gi(e),n=t.map(e=>qi(e,E,T).map(e=>e.option)),r=b?t:t[0],i=b?n:n[0];u(r,i)}}),k,A,j,D,O,d),N=q(e=>{M(e)}),P=Q.useMemo(()=>({options:E,fieldNames:T,values:k,halfValues:A,changeOnSelect:l,onSelect:N,checkable:a,searchOptions:[],popupPrefixCls:void 0,loadData:f,expandTrigger:p,expandIcon:m,loadingIcon:h,popupMenuColumnStyle:void 0,optionRender:y}),[E,T,k,A,l,N,a,f,p,m,h,y]),ee=`${t}-panel`,F=!E.length;return Q.createElement(ki.Provider,{value:P},Q.createElement(`div`,{className:w(ee,{[`${ee}-rtl`]:g===`rtl`,[`${ee}-empty`]:F},r),style:n},F?_:Q.createElement(ca,{prefixCls:t,searchValue:``,multiple:b,toggleOpen:da,open:!0,direction:g,disabled:v})))}function pa(){return pa=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-cascader`,fieldNames:i,defaultValue:a,value:o,changeOnSelect:s,onChange:c,displayRender:l,checkable:u,showSearch:d,expandTrigger:f,options:p,popupPrefixCls:m,loadData:h,open:g,popupClassName:_,popupMenuColumnStyle:v,popupStyle:y,classNames:b,styles:x,placement:S,onPopupVisibleChange:C,expandIcon:w=`>`,loadingIcon:T,children:E,popupMatchSelectWidth:D=!1,showCheckedStrategy:O=Fi,optionRender:k,...A}=e,j=ne(n),M=!!u,[N,P]=oe(a,o),ee=Gi(N),F=Q.useMemo(()=>Bi(i),[JSON.stringify(i)]),[I,L,R]=Zi(F,p),[z,B]=Qi(d,e),{autoClearSearchValue:V=!0,searchValue:H,onSearch:U}=B,[W,G]=oe(``,H),te=W||``,K=(e,t)=>{G(e),t.source!==`blur`&&U&&U(e)},re=Ni(te,I,F,m||r,B,s||M),[J,ie,ae]=ea(M,ee,L,R,Yi(I,F)),se=Ji(Q.useMemo(()=>{let e=Ki(Ri(J),L,O);return[...ae,...R(e)]},[J,L,R,ae,O]),I,F,M,l),ce=q(e=>{if(P(e),c){let t=Gi(e),n=t.map(e=>qi(e,I,F).map(e=>e.option)),r=M?t:t[0],i=M?n:n[0];c(r,i)}}),le=$i(M,ce,J,ie,ae,L,R,O),Y=q(e=>{(!M||V)&&G(``),le(e)}),ue=(e,t)=>{if(t.type===`clear`){ce([]);return}let{valueCells:n}=t.values[0];Y(n)},de=e=>{C?.(e)},fe=Q.useMemo(()=>({classNames:b,styles:x,options:I,fieldNames:F,values:J,halfValues:ie,changeOnSelect:s,onSelect:Y,checkable:u,searchOptions:re,popupPrefixCls:m,loadData:h,expandTrigger:f,expandIcon:w,loadingIcon:T,popupMenuColumnStyle:v,optionRender:k}),[b,x,I,F,J,ie,s,Y,u,re,m,h,f,w,T,v,k]),pe=!(te?re:I).length,me=te&&B.matchInputWidth||pe?{}:{minWidth:`auto`};return Q.createElement(ki.Provider,{value:fe},Q.createElement(Je,pa({},A,{ref:t,id:j,prefixCls:r,autoClearSearchValue:V,popupMatchSelectWidth:D,classNames:b,styles:x,popupStyle:{...me,...y},displayValues:se,onDisplayValuesChange:ue,mode:M?`multiple`:void 0,searchValue:te,onSearch:K,showSearch:z,OptionList:ua,emptyOptions:pe,open:g,popupClassName:_,placement:S,onPopupVisibleChange:de,getRawInputElement:()=>E})))});ma.SHOW_PARENT=Fi,ma.SHOW_CHILD=Ii,ma.Panel=fa;var ha=ma;function ga(e,t){let{getPrefixCls:n,direction:r,renderEmpty:i}=Q.useContext(m),a=t||r;return[n(`select`,e),n(`cascader`,e),a,i]}function _a(e,t){return Q.useMemo(()=>t?Q.createElement(`span`,{className:`${e}-checkbox-inner`}):!1,[e,t])}var va=Q.createElement(R,{spin:!0}),ya=Q.createElement(h,null),ba=Q.createElement(We,null);function xa({contextExpandIcon:e,contextLoadingIcon:t,expandIcon:n,loadingIcon:r,isRtl:i}){return Q.useMemo(()=>({expandIcon:n??e??(i?ba:ya),loadingIcon:r??t??va}),[e,t,n,i,r])}var Sa=e=>{let{prefixCls:t,componentCls:n}=e,i=`${n}-menu-item`,a=` + &${i}-expand ${i}-expand-icon, + ${i}-loading-icon +`;return[it(`${t}-checkbox`,e),{[n]:{"&-checkbox":{top:0,marginInlineEnd:e.paddingXS,pointerEvents:`unset`},"&-menus":{display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,[`&${n}-menu-empty`]:{[`${n}-menu`]:{width:`100%`,height:`auto`,[i]:{color:e.colorTextDisabled}}}},"&-menu":{flexGrow:1,flexShrink:0,minWidth:e.controlItemWidth,height:e.dropdownHeight,margin:0,padding:e.menuPadding,overflow:`auto`,verticalAlign:`top`,listStyle:`none`,"-ms-overflow-style":`-ms-autohiding-scrollbar`,"&:not(:last-child)":{borderInlineEnd:`${g(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"&-item":{display:`flex`,maxWidth:400,flexWrap:`nowrap`,alignItems:`center`,padding:e.optionPadding,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,"&:hover":{background:e.controlItemBgHover},"&-disabled":{color:e.colorTextDisabled,cursor:`not-allowed`,"&:hover":{background:`transparent`},[a]:{color:e.colorTextDisabled}},[`&-active:not(${i}-disabled)`]:{"&, &:hover":{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg}},"&-content":{flex:`auto`,minWidth:0,...r},[a]:{marginInlineStart:e.paddingXXS,color:e.colorIcon,fontSize:e.fontSizeIcon},"&-keyword":{color:e.colorHighlight}}}}}]},Ca=e=>{let{componentCls:t,antCls:n}=e;return[{[t]:{width:e.controlWidth}},{[`${t}-dropdown`]:[{[`&${n}-select-dropdown`]:{padding:0}},Sa(e)]},{[`${t}-dropdown-rtl`]:{direction:`rtl`}},s(e)]},wa=e=>{let t=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:e.controlItemBgActive,optionSelectedFontWeight:e.fontWeightStrong,optionPadding:`${t}px ${e.paddingSM}px`,menuPadding:e.paddingXXS,optionSelectedColor:e.colorText}},Ta=T(`Cascader`,Ca,wa,{resetFont:!1,unitless:{optionSelectedFontWeight:!0}}),Ea=d([`Cascader`,`Panel`],e=>{let{componentCls:t}=e;return{[`${t}-panel`]:[Sa(e),{display:`inline-flex`,border:`${g(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,borderRadius:e.borderRadiusLG,overflowX:`auto`,maxWidth:`100%`,[`${t}-menus`]:{alignItems:`stretch`},[`${t}-menu`]:{height:`auto`},"&-empty":{padding:e.paddingXXS}}]}},wa,{resetFont:!1});function Da(e){let{prefixCls:t,className:n,multiple:r,rootClassName:i,notFoundContent:a,direction:o,expandIcon:s,loadingIcon:c,disabled:l}=e,{expandIcon:u,loadingIcon:d}=le(`cascader`),f=Q.useContext(j),p=l??f,[m,h,g,_]=ga(t,o),v=se(h),[y,b]=Ta(h,v);Ea(h);let{expandIcon:x,loadingIcon:S}=xa({contextExpandIcon:u,contextLoadingIcon:d,expandIcon:s,loadingIcon:c,isRtl:g===`rtl`}),C=a||_?.(`Cascader`)||Q.createElement(Ze,{componentName:`Cascader`}),T=_a(h,r);return Q.createElement(fa,{...e,checkable:T,prefixCls:h,className:w(n,y,i,b,v),notFoundContent:C,direction:g,expandIcon:x,loadingIcon:S,disabled:p})}var{SHOW_CHILD:Oa,SHOW_PARENT:ka}=ha,Aa=(e,t,n)=>{let r=e.toLowerCase().split(t).reduce((e,n,r)=>r===0?[n]:[].concat(a(e),[t,n]),[]),i=[],o=0;return r.forEach((t,r)=>{let a=o+t.length,s=e.slice(o,a);o=a,r%2==1&&(s=Q.createElement(`span`,{className:`${n}-menu-item-keyword`,key:`separator-${r}`},s)),i.push(s)}),i},ja=(e,t,n,r)=>{let i=[],a=e.toLowerCase();return t.forEach((e,t)=>{t!==0&&i.push(` / `);let o=e[r.label];(I(o)||x(o))&&(o=Aa(String(o),a,n)),i.push(o)}),i},Ma=Q.forwardRef((e,t)=>{let{prefixCls:r,size:i,disabled:a,className:o,rootClassName:s,multiple:l,bordered:u=!0,transitionName:d,choiceTransitionName:f=``,popupClassName:p,expandIcon:h,placement:g,showSearch:v,allowClear:y=!0,notFoundContent:x,direction:S,getPopupContainer:C,status:T,showArrow:E,builtinPlacements:D,style:k,variant:A,dropdownClassName:M,dropdownRender:N,onDropdownVisibleChange:P,onPopupVisibleChange:ee,dropdownMenuColumnStyle:F,popupRender:I,dropdownStyle:L,popupMenuColumnStyle:R,onOpenChange:B,styles:V,classNames:H,loadingIcon:U,clearIcon:W,removeIcon:G,suffixIcon:K,...ne}=e,{getPrefixCls:q,getPopupContainer:re,className:J,style:ie,classNames:oe,styles:ce,expandIcon:Y,loadingIcon:ue,clearIcon:de,removeIcon:fe,suffixIcon:pe,searchIcon:me}=le(`cascader`),{popupOverflow:he}=Q.useContext(m),{status:ge,hasFeedback:_e,isFormItemInput:X,feedbackIcon:ye}=Q.useContext(z),Z=ve(ge,T),[xe,Se,we,Te]=ga(r,S),Ee=we===`rtl`,De=q(),Oe=se(xe),[ke,Ae]=et(xe,Oe),je=se(Se);Ta(Se,je);let{compactSize:Me,compactItemClassnames:Ne}=O(xe,S),[Pe,Fe]=te(`cascader`,A,u),Ie=x||Te?.(`Cascader`)||Q.createElement(Ze,{componentName:`Cascader`}),Le=Ke(I||N),Re=R||F,ze=B||ee||P,Be=Q.useMemo(()=>{if(!v)return v;let e={render:ja};return c(v)&&(e={...e,...v}),e},[v]),Ve=_(e=>i??Me??e),He=Q.useContext(j),Ue=a??He,{expandIcon:We,loadingIcon:Ge}=xa({contextExpandIcon:Y,contextLoadingIcon:ue,expandIcon:h,loadingIcon:U,isRtl:Ee}),Je=_a(Se,l),Ye=Xe(e.suffixIcon,E),{suffixIcon:$e,removeIcon:tt,clearIcon:nt}=Qe({...e,clearIcon:W,contextClearIcon:de,removeIcon:G,contextRemoveIcon:fe,loadingIcon:Ge,suffixIcon:K,contextSuffixIcon:pe,searchIcon:c(v)?v.searchIcon:void 0,contextSearchIcon:me,hasFeedback:_e,feedbackIcon:ye,showSuffixIcon:Ye,multiple:l,prefixCls:xe,componentName:`Cascader`}),rt=Q.useMemo(()=>g===void 0?Ee?`bottomRight`:`bottomLeft`:g,[g,Ee]),it=y===!0?{clearIcon:nt}:y,at={...e,variant:Pe,size:Ve,status:Z,disabled:Ue},ot=b(ie),st=b(k),[ct,lt]=ae([oe,H],[ce,ot,V,st],{props:at},{popup:{_default:`root`}}),ut={...lt.popup.root,...L},[dt]=Ce(`SelectLike`,ut?.zIndex),ft=w(p||M,`${Se}-dropdown`,{[`${Se}-dropdown-rtl`]:we===`rtl`},s,Oe,ct.popup.root,je,ke,Ae);return Q.createElement(ha,{prefixCls:xe,className:w(!r&&Se,{[`${xe}-lg`]:Ve===`large`,[`${xe}-sm`]:Ve===`small`,[`${xe}-rtl`]:Ee,[`${xe}-${Pe}`]:Fe,[`${xe}-in-form-item`]:X},be(xe,Z,_e),Ne,J,o,s,ct.root,Oe,je,ke,Ae),disabled:Ue,style:lt.root,classNames:ct,styles:lt,...ne,builtinPlacements:qe(D,he),direction:we,placement:rt,notFoundContent:Ie,allowClear:it,showSearch:Be,expandIcon:We,suffixIcon:$e,removeIcon:tt,loadingIcon:Ge,checkable:Je,popupClassName:ft,popupPrefixCls:r||Se,popupStyle:{...ut,zIndex:dt},popupRender:Le,popupMenuColumnStyle:Re,onPopupVisibleChange:ze,choiceTransitionName:n(De,``,f),transitionName:n(De,`slide-up`,d),getPopupContainer:C||re,ref:t})}),Na=Ge(Ma,`popupAlign`,e=>k(e,[`visible`]));Ma.SHOW_PARENT=ka,Ma.SHOW_CHILD=Oa,Ma.Panel=Da,Ma._InternalPanelDoNotUseOrYouWillBeFired=Na;var Pa=(e,t,n,r,i,a)=>{let{classNames:o,styles:s}=le(e),[c,l]=ae([o,t],[s,n],{props:a},{popup:{_default:`root`}});return Q.useMemo(()=>[{...c,popup:{...c.popup,root:w(c.popup?.root,r)}},{...l,popup:{...l.popup,root:{...l.popup?.root,...i}}}],[c,l,r,i])},Fa=(e,t,n)=>re(n)?n:t===`year`&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder,Ia=(e,t,n)=>re(n)?n:t===`year`&&e.lang.rangeYearPlaceholder?e.lang.rangeYearPlaceholder:t===`quarter`&&e.lang.rangeQuarterPlaceholder?e.lang.rangeQuarterPlaceholder:t===`month`&&e.lang.rangeMonthPlaceholder?e.lang.rangeMonthPlaceholder:t===`week`&&e.lang.rangeWeekPlaceholder?e.lang.rangeWeekPlaceholder:t===`time`&&e.timePickerLocale.rangePlaceholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder,La=(e,t)=>{let{allowClear:n=!0}=e,{clearIcon:r,removeIcon:i}=Qe({...e,prefixCls:t,componentName:`DatePicker`});return[Q.useMemo(()=>n!==!1&&{clearIcon:r,...n===!0?{}:n},[n,r]),i]},[Ra,za]=[`week`,`WeekPicker`],[Ba,Va]=[`month`,`MonthPicker`],[Ha,Ua]=[`year`,`YearPicker`],[Wa,Ga]=[`quarter`,`QuarterPicker`],[Ka,qa]=[`time`,`TimePicker`],Ja=e=>Q.createElement(Ve,{size:`small`,type:`primary`,...e});function Ya(e){return(0,Q.useMemo)(()=>({button:Ja,...e}),[e])}var Xa=({picker:e,hasFeedback:t,feedbackIcon:n,suffixIcon:r})=>r===null||r===!1?null:r===!0||r===void 0?Q.createElement(Q.Fragment,null,e===Ka?Q.createElement(ut,{"aria-hidden":`true`}):Q.createElement(he,{"aria-hidden":`true`}),t&&n):r,Za=e=>(0,Q.forwardRef)((t,n)=>{let{prefixCls:r,getPopupContainer:i,components:a,className:o,style:s,classNames:c,styles:u,placement:d,size:f,disabled:p,bordered:h=!0,placeholder:g,status:v,variant:y,picker:b,dropdownClassName:x,popupClassName:S,popupStyle:C,rootClassName:T,suffixIcon:E,separator:D,allowClear:k,clearIcon:A,...M}=t,N=b===Ka?`timePicker`:`datePicker`,{suffixIcon:P,clearIcon:F,allowClear:I}=le(N),[L,R]=Pa(N,c,u,S||x,C),V=Q.useRef(null),{getPrefixCls:H,direction:U,getPopupContainer:W,rangePicker:G}=(0,Q.useContext)(m),K=H(`picker`,r),{compactSize:ne,compactItemClassnames:q}=O(K,U),re=H(),J=D??G?.separator,[ie,ae]=te(`rangePicker`,y,h),oe=se(K),[ce,Y]=Oi(K,oe),ue=w(ce,Y,oe,T),fe=Be({componentName:`RangePicker`,allowClear:k,clearIcon:A,contextAllowClear:I,contextClearIcon:F,defaultAllowClear:!0}),pe=Ya(a),me=_(e=>f??ne??e),he=Q.useContext(j),ge=p??he,{hasFeedback:_e,status:X,feedbackIcon:ye}=(0,Q.useContext)(z),xe=Xa({picker:b,hasFeedback:_e,feedbackIcon:ye,suffixIcon:E===void 0?P:E});(0,Q.useImperativeHandle)(n,()=>V.current);let[Se]=B(`Calendar`,ee),we=l(Se,t.locale||{}),[Te]=Ce(`DatePicker`,R?.popup?.root?.zIndex);return Q.createElement(Z,{space:!0},Q.createElement(oi,{separator:Q.createElement(`span`,{"aria-label":`to`,className:`${K}-separator`},J??Q.createElement(de,null)),disabled:ge,ref:V,placement:d,placeholder:Ia(we,b,g),suffixIcon:xe,prevIcon:Q.createElement(`span`,{className:`${K}-prev-icon`}),nextIcon:Q.createElement(`span`,{className:`${K}-next-icon`}),superPrevIcon:Q.createElement(`span`,{className:`${K}-super-prev-icon`}),superNextIcon:Q.createElement(`span`,{className:`${K}-super-next-icon`}),transitionName:`${re}-slide-up`,picker:b,...M,locale:we.lang,getPopupContainer:i||W,generateConfig:e,components:pe,direction:U,prefixCls:K,rootClassName:ue,className:w({[`${K}-large`]:me===`large`,[`${K}-small`]:me===`small`,[`${K}-${ie}`]:ae},be(K,ve(X,v),_e),q,o,G?.className),style:{...G?.style,...s},classNames:L,styles:{...R,popup:{...R.popup,root:{...R.popup.root,zIndex:Te}}},allowClear:fe}))}),Qa=e=>{let t=(t,n=`DatePicker`)=>{let r=n===qa?`timePicker`:`datePicker`;return(0,Q.forwardRef)((i,a)=>{let{prefixCls:o,getPopupContainer:s,components:c,style:u,className:d,size:f,bordered:p,placement:h,placeholder:g,disabled:v,status:y,variant:b,onCalendarChange:x,classNames:S,styles:C,dropdownClassName:T,popupClassName:E,popupStyle:D,rootClassName:k,suffixIcon:A,allowClear:M,clearIcon:N,...P}=i,{suffixIcon:F,clearIcon:I,allowClear:L}=le(n===qa?`timePicker`:`datePicker`),{getPrefixCls:R,direction:V,getPopupContainer:H,[r]:U}=(0,Q.useContext)(m),W=R(`picker`,o),{compactSize:G,compactItemClassnames:K}=O(W,V),ne=_(e=>f??G??e),q=Q.useContext(j),re=v??q,J={...i,size:ne,disabled:re,status:y,variant:b},[ie,ae]=Pa(r,S,C,E||T,D,J),oe=Q.useRef(null),[ce,Y]=te(`datePicker`,b,p),ue=se(W),[de,fe]=Oi(W,ue),pe=w(de,fe,ue,k);(0,Q.useImperativeHandle)(a,()=>oe.current);let me={showToday:!0},he=t||i.picker,ge=R(),{onSelect:_e,multiple:X}=P,ye=_e&&t===`time`&&!X,xe=(e,t,n)=>{x?.(e,t,n),ye&&_e(e)},[,Se]=La(i,W),we=Be({componentName:n,allowClear:M,clearIcon:N,contextAllowClear:L,contextClearIcon:I,defaultAllowClear:!0}),Te=Ya(c),{hasFeedback:Ee,status:De,feedbackIcon:Oe}=(0,Q.useContext)(z),ke=Xa({picker:he,hasFeedback:Ee,feedbackIcon:Oe,suffixIcon:A===void 0?F:A}),[Ae]=B(`DatePicker`,ee),je=l(Ae,i.locale||{}),[Me]=Ce(`DatePicker`,ae?.popup?.root?.zIndex);return Q.createElement(Z,{space:!0},Q.createElement(pi,{ref:oe,placeholder:Fa(je,he,g),suffixIcon:ke,placement:h,prevIcon:Q.createElement(`span`,{className:`${W}-prev-icon`}),nextIcon:Q.createElement(`span`,{className:`${W}-next-icon`}),superPrevIcon:Q.createElement(`span`,{className:`${W}-super-prev-icon`}),superNextIcon:Q.createElement(`span`,{className:`${W}-super-next-icon`}),transitionName:`${ge}-slide-up`,picker:t,onCalendarChange:xe,...me,...P,locale:je.lang,getPopupContainer:s||H,generateConfig:e,components:Te,direction:V,disabled:re,prefixCls:W,rootClassName:pe,className:w({[`${W}-large`]:ne===`large`,[`${W}-small`]:ne===`small`,[`${W}-${ce}`]:Y},be(W,ve(De,y),Ee),K,U?.className,d),style:{...U?.style,...u},classNames:ie,styles:{...ae,popup:{...ae.popup,root:{...ae.popup.root,zIndex:Me}}},allowClear:we,removeIcon:Se}))})},n=t(),r=t(Ra,za),i=t(Ba,Va),a=t(Ha,Ua),o=t(Wa,Ga);return{DatePicker:n,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:t(Ka,qa),QuarterPicker:o}},$a=e=>{let{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:o}=Qa(e),s=Za(e),c=t;return c.WeekPicker=n,c.MonthPicker=r,c.YearPicker=i,c.RangePicker=s,c.TimePicker=a,c.QuarterPicker=o,c},eo=$a(Nt);eo._InternalPanelDoNotUseOrYouWillBeFired=Ge(eo,`popupAlign`,void 0,`picker`),eo._InternalRangePanelDoNotUseOrYouWillBeFired=Ge(eo.RangePicker,`popupAlign`,void 0,`picker`),eo.generatePicker=$a;function to(e,t){let{disabled:n,prefixCls:r,character:i,characterRender:a,index:o,count:s,value:c,allowHalf:l,focused:u,onHover:d,onClick:f}=e,p=e=>{d(e,o)},m=e=>{f(e,o)},h=e=>{e.keyCode===F.ENTER&&f(e,o)},g=o+1,_=new Set([r]);c===0&&o===0&&u?_.add(`${r}-focused`):l&&c+.5>=g&&co?`true`:`false`,"aria-posinset":o+1,"aria-setsize":s,tabIndex:n?-1:0},Q.createElement(`div`,{className:`${r}-first`},v),Q.createElement(`div`,{className:`${r}-second`},v)));return a&&(y=a(y,e)),y}var no=Q.forwardRef(to);function ro(){let e=Q.useRef({});function t(t){return e.current[t]}function n(t){return n=>{e.current[t]=n}}return[t,n]}function io(e){let t=e.pageXOffset,n=`scrollLeft`;if(typeof t!=`number`){let r=e.document;t=r.documentElement[n],typeof t!=`number`&&(t=r.body[n])}return t}function ao(e){let t,n,r=e.ownerDocument,{body:i}=r,a=r&&r.documentElement,o=e.getBoundingClientRect();return t=o.left,n=o.top,t-=a.clientLeft||i.clientLeft||0,n-=a.clientTop||i.clientTop||0,{left:t,top:n}}function oo(e){let t=ao(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=io(r),t.left}function so(){return so=Object.assign?Object.assign.bind():function(e){for(var t=1;t{f||D.current?.focus()};Q.useImperativeHandle(t,()=>({focus:O,blur:()=>{f||D.current?.blur()}}));let[k,A]=oe(i||0,a),[j,M]=oe(null),N=(e,t)=>{let n=p===`rtl`,r=e+1;if(s){let i=C(e),a=oo(i),o=i.clientWidth;(n&&t-a>o/2||!n&&t-a{A(e),_?.(e)},[ee,I]=Q.useState(!1),L=()=>{I(!0),v?.()},R=()=>{I(!1),y?.()},[z,B]=Q.useState(null),V=(e,t)=>{let n=N(t,e.pageX);n!==j&&(B(n),M(null)),g?.(n)},H=e=>{f||(B(null),M(null),g?.(void 0)),e&&x?.(e)},U=(e,t)=>{let n=N(t,e.pageX),r=!1;c&&(r=n===k),H(),P(r?0:n),M(r?n:null)},W=e=>{let{keyCode:t}=e,n=p===`rtl`,r=s?.5:1;l&&(t===F.RIGHT&&k0&&!n||t===F.RIGHT&&k>0&&n?(P(k-r),e.preventDefault()):t===F.LEFT&&k{h&&!f&&O()},[]);let G=Array(o).fill(0).map((e,t)=>Q.createElement(no,{ref:T(t),index:t,count:o,disabled:f,prefixCls:`${n}-star`,allowHalf:s,value:z===null?k:z,onClick:U,onHover:V,key:e||t,character:u,characterRender:d,focused:ee})),te=w(n,r,{[`${n}-disabled`]:f,[`${n}-rtl`]:p===`rtl`});return Q.createElement(`ul`,so({className:te,onMouseLeave:H,tabIndex:f?-1:m,onFocus:f?null:L,onBlur:f?null:R,onKeyDown:f?null:W,ref:D},E(S,{aria:!0,data:!0,attr:!0})),G)}var lo=Q.forwardRef(co),uo=e=>{let{componentCls:t}=e;return{[`${t}-star`]:{position:`relative`,display:`inline-block`,color:`inherit`,cursor:`pointer`,"&:not(:last-child)":{marginInlineEnd:e.marginXS},"> div":{transition:`all ${e.motionDurationMid}, outline 0s`,"&:hover":{transform:e.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${g(e.lineWidth)} dashed ${e.starColor}`,transform:e.starHoverScale}},"&-first, &-second":{color:e.starBg,transition:`all ${e.motionDurationMid}`,userSelect:`none`},"&-first":{position:`absolute`,top:0,insetInlineStart:0,width:`50%`,height:`100%`,overflow:`hidden`,opacity:0},[`&-half ${t}-star-first, &-half ${t}-star-second`]:{opacity:1},[`&-half ${t}-star-first, &-full ${t}-star-second`]:{color:`inherit`}}}},fo=e=>({[`&-rtl${e.componentCls}`]:{direction:`rtl`}}),po=e=>{let{componentCls:t}=e;return{[t]:{...A(e),display:`inline-block`,margin:0,padding:0,color:e.starColor,fontSize:e.starSize,lineHeight:1,listStyle:`none`,outline:`none`,"&-small":{fontSize:e.starSizeSM},"&-large":{fontSize:e.starSizeLG},[`&-disabled${t} ${t}-star`]:{cursor:`default`,"> div:hover":{transform:`scale(1)`}},...uo(e),...fo(e)}}},mo=T(`Rate`,e=>po(J(e,{})),e=>({starColor:e.yellow6,starSize:e.controlHeight*.625,starSizeSM:e.controlHeightSM*.625,starSizeLG:e.controlHeightLG*.625,starHoverScale:`scale(1.1)`,starBg:e.colorFillContent})),ho=Q.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,tooltips:o,character:s=Q.createElement(ue,null),disabled:l,size:u,...d}=e,f=(e,{index:t=0})=>{if(!o)return e;let n=o[t];return c(n)?Q.createElement(xe,{...n},e):Q.createElement(xe,{title:n},e)},{getPrefixCls:p,direction:m,className:h,style:g}=le(`rate`),v=p(`rate`,n),[y,b]=mo(v),x={...g,...a},S=Q.useContext(j),C=l??S,T=_(e=>u??e);return Q.createElement(lo,{ref:t,character:s,characterRender:f,disabled:C,...d,className:w({[`${v}-large`]:T===`large`,[`${v}-small`]:T===`small`},r,i,y,b,h),style:x,prefixCls:v,direction:m})}),{TimePicker:go,RangePicker:_o}=eo,vo=Q.forwardRef((e,t)=>Q.createElement(_o,{...e,picker:`time`,mode:void 0,ref:t})),yo=Q.forwardRef((e,t)=>{let{addon:n,renderExtraFooter:r,variant:i,bordered:a,classNames:o,styles:s,popupClassName:c,popupStyle:l,...u}=e,[d]=te(`timePicker`,i,a),f=Q.useMemo(()=>{if(r)return r;if(n)return n},[n,r]),[p,m]=Pa(`timePicker`,o,s,c,l,{...e,variant:d});return Q.createElement(go,{...u,mode:void 0,ref:t,renderExtraFooter:f,variant:d,classNames:p,styles:m})}),bo=Ge(yo,`popupAlign`,void 0,`picker`);yo._InternalPanelDoNotUseOrYouWillBeFired=bo,yo.RangePicker=vo,yo._InternalPanelDoNotUseOrYouWillBeFired=bo;var xo=(e=>{let t=Q.useRef({valueLabels:new Map});return Q.useMemo(()=>{let{valueLabels:n}=t.current,r=new Map,i=e.map(e=>{let{value:t,label:i}=e,a=i??n.get(t);return r.set(t,a),{...e,label:a}});return t.current.valueLabels=r,[i]},[e])}),So=(e,t,n,r)=>Q.useMemo(()=>{let i=e=>e.map(({value:e})=>e),a=i(e),o=i(t),s=a.filter(e=>!r[e]),c=a,l=o;if(n){let e=Ae(a,!0,r);c=e.checkedKeys,l=e.halfCheckedKeys}return[Array.from(new Set([...s,...c])),l]},[e,t,n,r]),Co=e=>Array.isArray(e)?e:e===void 0?[]:[e],wo=e=>{let{label:t,value:n,children:r}=e||{};return{_title:t?[t]:[`title`,`label`],value:n||`value`,key:n||`value`,children:r||`children`}},To=e=>!e||e.disabled||e.disableCheckbox||e.checkable===!1,Eo=(e,t)=>{let n=[],r=e=>{e.forEach(e=>{let i=e[t.children];i&&(n.push(e[t.value]),r(i))})};return r(e),n},Do=e=>e==null,Oo=((e,t)=>Q.useMemo(()=>Te(e,{fieldNames:t,initWrapper:e=>({...e,valueEntities:new Map}),processEntity:(e,n)=>{let r=e.node[t.value];n.valueEntities.set(r,e)}}),[e,t])),ko=()=>null;function Ao(e){return f(e).map(e=>{if(!Q.isValidElement(e)||!e.type)return null;let{key:t,props:{children:n,value:r,...i}}=e,a={key:t,value:r,...i},o=Ao(n);return o.length&&(a.children=o),a}).filter(e=>e)}function jo(e){if(!e)return e;let t={...e};return`props`in t||Object.defineProperty(t,"props",{get(){return G(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),t}}),t}function Mo(e,t,n,r,i,a){let o=null,s=null;function c(){function e(r,i=`0`,c=!1){return r.map((r,l)=>{let u=`${i}-${l}`,d=r[a.value],f=n.includes(d),p=e(r[a.children]||[],u,f),m=Q.createElement(ko,r,p.map(e=>e.node));if(t===d&&(o=m),f){let e={pos:u,node:m,children:p};return c||s.push(e),e}return null}).filter(e=>e)}s||(s=[],e(r),s.sort(({node:{props:{value:e}}},{node:{props:{value:t}}})=>n.indexOf(e)-n.indexOf(t)))}Object.defineProperty(e,"triggerNode",{get(){return G(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),c(),o}}),Object.defineProperty(e,"allCheckedNodes",{get(){return G(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),c(),i?s:s.map(({node:e})=>e)}})}var No=(e,t,n)=>{let{fieldNames:r,treeNodeFilterProp:i,filterTreeNode:a}=n,{children:o}=r;return Q.useMemo(()=>{if(!t||a===!1)return e;let n=typeof a==`function`?a:(e,n)=>String(n[i]).toUpperCase().includes(t.toUpperCase()),r=(e,i=!1)=>e.reduce((e,a)=>{let s=a[o],c=i||n(t,jo(a)),l=r(s||[],c);return(c||l.length)&&e.push({...a,isLeaf:void 0,[o]:l}),e},[]);return r(e)},[e,t,o,i,a])};function Po(e){let t=Q.useRef();return t.current=e,Q.useCallback((...e)=>t.current(...e),[])}function Fo(e,t){let{id:n,pId:r,rootPId:i}=t,a=new Map,o=[];return e.forEach(e=>{let t=e[n],r={...e,key:e.key||t};a.set(t,r)}),a.forEach(e=>{let t=e[r],n=a.get(t);n?(n.children=n.children||[],n.children.push(e)):(t===i||i===null)&&o.push(e)}),o}function Io(e,t,n){return Q.useMemo(()=>e?n?Fo(e,{id:`id`,pId:`pId`,rootPId:null,...typeof n==`object`?n:{}}):e:Ao(t),[t,n,e])}var Lo=Q.createContext(null),Ro=Q.createContext(null);function zo(){return zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,multiple:r,searchValue:i,toggleOpen:a,open:o,notFoundContent:s}=Ye(),{virtual:c,listHeight:l,listItemHeight:u,listItemScrollOffset:d,treeData:f,fieldNames:p,onSelect:m,popupMatchSelectWidth:h,treeExpandAction:g,treeTitleRender:_,onPopupScroll:v,leftMaxCount:y,leafCountOnly:b,valueEntities:x,classNames:S,styles:C}=Q.useContext(Ro),{checkable:w,checkedKeys:T,halfCheckedKeys:E,treeExpandedKeys:D,treeDefaultExpandAll:O,treeDefaultExpandedKeys:k,onTreeExpand:A,treeIcon:j,showTreeIcon:M,switcherIcon:N,treeLine:ee,treeNodeFilterProp:I,loadData:L,treeLoadedKeys:R,treeMotion:z,onTreeLoad:B,keyEntities:V}=Q.useContext(Lo),H=Q.useRef(),U=P(()=>f,[o,f],(e,t)=>t[0]&&e[1]!==t[1]),W=Q.useMemo(()=>w?{checked:T,halfChecked:E}:null,[w,T,E]);Q.useEffect(()=>{o&&!r&&T.length&&H.current?.scrollTo({key:T[0]})},[o]);let G=e=>{e.preventDefault()},te=(e,t)=>{let{node:n}=t;w&&To(n)||(m(n.key,{selected:!T.includes(n.key)}),r||a(!1))},[K,ne]=Q.useState(k),[re,J]=Q.useState(null),ie=Q.useMemo(()=>D?[...D]:i?re:K,[K,re,D,i]),ae=e=>{ne(e),J(e),A&&A(e)},oe=String(i).toLowerCase(),se=e=>oe?String(e[I]).toLowerCase().includes(oe):!1;Q.useEffect(()=>{i&&J(Eo(f,p))},[i]);let[ce,le]=Q.useState(()=>new Map);Q.useEffect(()=>{y&&le(new Map)},[y]);function Y(e){let t=e[p.value];if(!ce.has(t)){let e=x.get(t);if((e.children||[]).length!==0){let n=e.children.filter(e=>!e.node.disabled&&!e.node.disableCheckbox&&!T.includes(e.node[p.value])).length;ce.set(t,n>y)}else ce.set(t,!1)}return ce.get(t)}let ue=q(e=>{let t=e[p.value];return T.includes(t)||y===null?!1:y<=0?!0:b&&y?Y(e):!1}),de=e=>{for(let t of e)if(!(t.disabled||t.selectable===!1)){if(i){if(se(t))return t}else return t;if(t[p.children]){let e=de(t[p.children]);if(e)return e}}return null},[fe,pe]=Q.useState(null),me=V[fe];Q.useEffect(()=>{if(!o)return;let e=null;e=!r&&T.length&&!i?T[0]:(()=>{let e=de(U);return e?e[p.value]:null})(),pe(e)},[o,i]),Q.useImperativeHandle(t,()=>({scrollTo:H.current?.scrollTo,onKeyDown:e=>{let{which:t}=e;switch(t){case F.UP:case F.DOWN:case F.LEFT:case F.RIGHT:H.current?.onKeyDown(e);break;case F.ENTER:if(me){let e=ue(me.node),{selectable:t,value:n,disabled:r}=me?.node||{};t!==!1&&!r&&!e&&te(null,{node:{key:fe},selected:!T.includes(n)})}break;case F.ESC:a(!1)}},onKeyUp:()=>{}}));let he=P(()=>!i,[i,D||K],([e],[t,n])=>e!==t&&!!(t||n))?L:null;if(U.length===0)return Q.createElement(`div`,{role:`listbox`,className:`${n}-empty`,onMouseDown:G},s);let ge={fieldNames:p};return R&&(ge.loadedKeys=R),ie&&(ge.expandedKeys=ie),Q.createElement(`div`,{onMouseDown:G},me&&o&&Q.createElement(`span`,{style:Bo,"aria-live":`assertive`},me.node.value),Q.createElement(De.Provider,{value:{nodeDisabled:ue}},Q.createElement(Oe,zo({classNames:S?.popup,styles:C?.popup,ref:H,focusable:!1,prefixCls:`${n}-tree`,treeData:U,height:l,itemHeight:u,itemScrollOffset:d,virtual:c!==!1&&h!==!1,multiple:r,icon:j,showIcon:M,switcherIcon:N,showLine:ee,loadData:he,motion:z,activeKey:fe,checkable:w,checkStrictly:!0,checkedKeys:W,selectedKeys:w?[]:T,defaultExpandAll:O,titleRender:_},ge,{onActiveChange:pe,onSelect:te,onCheck:te,onExpand:ae,onLoad:B,filterTreeNode:se,expandAction:g,onScroll:v}))))}),Ho=`SHOW_ALL`,Uo=`SHOW_PARENT`,Wo=`SHOW_CHILD`;function Go(e,t,n,r){let i=new Set(e);return t===`SHOW_CHILD`?e.filter(e=>{let t=n[e];return!t||!t.children||!t.children.some(({node:e})=>i.has(e[r.value]))||!t.children.every(({node:e})=>To(e)||i.has(e[r.value]))}):t===`SHOW_PARENT`?e.filter(e=>{let t=n[e],r=t?t.parent:null;return!r||To(r.node)||!i.has(r.key)}):e}function Ko(e,t){let{searchValue:n,inputValue:r,onSearch:i,autoClearSearchValue:a,filterTreeNode:o,treeNodeFilterProp:s}=t;return Q.useMemo(()=>{let t=typeof e==`object`,c={searchValue:n??r,onSearch:i,autoClearSearchValue:a,filterTreeNode:o,treeNodeFilterProp:s,...t?e:{}};return[t?!0:e,c]},[e,n,r,i,a,o,s])}function qo(){return qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-tree-select`,value:i,defaultValue:a,onChange:o,onSelect:s,onDeselect:c,showSearch:l,searchValue:u,inputValue:d,onSearch:f,autoClearSearchValue:p,filterTreeNode:m,treeNodeFilterProp:h,showCheckedStrategy:g,treeNodeLabelProp:_,multiple:v,treeCheckable:y,treeCheckStrictly:b,labelInValue:x,maxCount:S,fieldNames:C,treeDataSimpleMode:w,treeData:T,children:E,loadData:D,treeLoadedKeys:O,onTreeLoad:k,treeDefaultExpandAll:A,treeExpandedKeys:j,treeDefaultExpandedKeys:M,onTreeExpand:N,treeExpandAction:P,virtual:ee,listHeight:F=200,listItemHeight:I=20,listItemScrollOffset:L=0,onPopupVisibleChange:R,popupMatchSelectWidth:z=!0,treeLine:B,treeIcon:V,showTreeIcon:H,switcherIcon:U,treeMotion:W,treeTitleRender:G,onPopupScroll:te,classNames:K,styles:q,...re}=e,J=ne(n),ie=y&&!b,ae=y||b,se=b||x,ce=ae||v,[le,Y]=Ko(l,{searchValue:u,inputValue:d,onSearch:f,autoClearSearchValue:p,filterTreeNode:m,treeNodeFilterProp:h}),{searchValue:ue,onSearch:de,autoClearSearchValue:fe=!0,filterTreeNode:pe,treeNodeFilterProp:me=`value`}=Y,[he,ge]=oe(a,i),_e=Q.useMemo(()=>y?g||`SHOW_CHILD`:Ho,[g,y]),X=Q.useMemo(()=>wo(C),[JSON.stringify(C)]),[ve,ye]=oe(``,ue),Z=ve||``,be=e=>{ye(e),de?.(e)},xe=Io(T,E,w),{keyEntities:Se,valueEntities:Ce}=Oo(xe,X),we=Q.useCallback(e=>{let t=[],n=[];return e.forEach(e=>{Ce.has(e)?n.push(e):t.push(e)}),{missingRawValues:t,existRawValues:n}},[Ce]),Te=No(xe,Z,{fieldNames:X,treeNodeFilterProp:me,filterTreeNode:pe}),Ee=Q.useCallback(e=>{if(e){if(_)return e[_];let{_title:t}=X;for(let n=0;nCo(e).map(e=>Jo(e)?{value:e}:e),[]),Oe=Q.useCallback(e=>De(e).map(e=>{let{label:t}=e,{value:n,halfChecked:r}=e,i,a=Ce.get(n);return a?(t=G?G(a.node):t??Ee(a.node),i=a.node.disabled):t===void 0&&(t=De(he).find(e=>e.value===n).label),{label:t,value:n,halfChecked:r,disabled:i}}),[Ce,Ee,De,he]),ke=Q.useMemo(()=>De(he===null?[]:he),[De,he]),[je,Me]=Q.useMemo(()=>{let e=[],t=[];return ke.forEach(n=>{n.halfChecked?t.push(n):e.push(n)}),[e,t]},[ke]),Ne=Q.useMemo(()=>je.map(e=>e.value),[je]),[Pe,Fe]=So(je,Me,ie,Se),[Ie]=xo(Q.useMemo(()=>{let e=Go(Pe,_e,Se,X).map(e=>Se[e]?.node?.[X.value]??e).map(e=>{let t=je.find(t=>t.value===e);return{value:e,label:x?t?.label:G?.(t)}}),t=Oe(e),n=t[0];return!ce&&n&&Do(n.value)&&Do(n.label)?[]:t.map(e=>({...e,label:e.label??e.value}))},[X,ce,Pe,je,Oe,_e,Se])),Le=Q.useMemo(()=>ce&&(_e===`SHOW_CHILD`||b||!y)?S:null,[S,ce,b,_e,y]),Re=Po((e,t,n)=>{let r=Go(e,_e,Se,X);if(Le&&r.length>Le)return;let i=Oe(e);if(ge(i),fe&&ye(``),o){let i=e;ie&&(i=r.map(e=>{let t=Ce.get(e);return t?t.node[X.value]:e}));let{triggerValue:a,selected:s}=t||{triggerValue:void 0,selected:void 0},c=i;if(b){let e=Me.filter(e=>!i.includes(e.value));c=[...c,...e]}let l=Oe(c),u={preValue:je,triggerValue:a},d=!0;(b||n===`selection`&&!s)&&(d=!1),Mo(u,a,e,xe,d,X),ae?u.checked=s:u.selected=s;let f=se?l:l.map(e=>e.value);o(ce?f:f[0],se?null:l.map(e=>e.label),u)}}),ze=Q.useCallback((e,{selected:t,source:n})=>{let r=Se[e]?.node,i=r?.[X.value]??e;if(!ce)Re([i],{selected:!0,triggerValue:i},`option`);else{let e=t?[...Ne,i]:Pe.filter(e=>e!==i);if(ie){let{missingRawValues:n,existRawValues:r}=we(e),i=r.map(e=>Ce.get(e).key),a;t?{checkedKeys:a}=Ae(i,!0,Se):{checkedKeys:a}=Ae(i,{checked:!1,halfCheckedKeys:Fe},Se),e=[...n,...a.map(e=>Se[e].node[X.value])]}Re(e,{selected:t,triggerValue:i},n||`option`)}t||!ce?s?.(i,jo(r)):c?.(i,jo(r))},[we,Ce,Se,X,ce,Ne,Re,ie,s,c,Pe,Fe,S]),Be=Q.useCallback(e=>{R&&R(e)},[R]),Ve=Po((e,t)=>{let n=e.map(e=>e.value);if(t.type===`clear`){Re(n,{},`selection`);return}t.values.length&&ze(t.values[0].value,{selected:!1,source:`selection`})}),He=Q.useMemo(()=>({virtual:ee,popupMatchSelectWidth:z,listHeight:F,listItemHeight:I,listItemScrollOffset:L,treeData:Te,fieldNames:X,onSelect:ze,treeExpandAction:P,treeTitleRender:G,onPopupScroll:te,leftMaxCount:S===void 0?null:S-Ie.length,leafCountOnly:_e===`SHOW_CHILD`&&!b&&!!y,valueEntities:Ce,classNames:K,styles:q}),[ee,z,F,I,L,Te,X,ze,P,G,te,S,Ie.length,_e,b,y,Ce,K,q]),Ue=Q.useMemo(()=>({checkable:ae,loadData:D,treeLoadedKeys:O,onTreeLoad:k,checkedKeys:Pe,halfCheckedKeys:Fe,treeDefaultExpandAll:A,treeExpandedKeys:j,treeDefaultExpandedKeys:M,onTreeExpand:N,treeIcon:V,treeMotion:W,showTreeIcon:H,switcherIcon:U,treeLine:B,treeNodeFilterProp:me,keyEntities:Se}),[ae,D,O,k,Pe,Fe,A,j,M,N,V,W,H,U,B,me,Se]);return Q.createElement(Ro.Provider,{value:He},Q.createElement(Lo.Provider,{value:Ue},Q.createElement(Je,qo({ref:t},re,{classNames:K,styles:q,id:J,prefixCls:r,mode:ce?`multiple`:void 0,displayValues:Ie,onDisplayValuesChange:Ve,autoClearSearchValue:fe,showSearch:le,searchValue:Z,onSearch:be,OptionList:Vo,emptyOptions:!xe.length,onPopupVisibleChange:Be,popupMatchSelectWidth:z}))))});Yo.TreeNode=ko,Yo.SHOW_ALL=Ho,Yo.SHOW_PARENT=Uo,Yo.SHOW_CHILD=Wo;var Xo=Yo,Zo=e=>{let{componentCls:t,treePrefixCls:n,colorBgElevated:r}=e,i=`.${n}`;return[{[`${t}-dropdown`]:[{padding:`${g(e.paddingXS)} ${g(e.calc(e.paddingXS).div(2).equal())}`},Ee(n,J(e,{colorBgContainer:r}),!1),{[i]:{borderRadius:0,[`${i}-list-holder-inner`]:{alignItems:`stretch`,[`${i}-treenode`]:{[`${i}-node-content-wrapper`]:{flex:`auto`}}}}},it(`${n}-checkbox`,e),{"&-rtl":{direction:`rtl`,[`${i}-switcher${i}-switcher_close`]:{[`${i}-switcher-icon svg`]:{transform:`rotate(90deg)`}}}}]}]};function Qo(e,t,n){return T(`TreeSelect`,e=>Zo(J(e,{treePrefixCls:t})),we,{resetFont:!1})(e,n)}var $o=Q.forwardRef((e,t)=>{let{prefixCls:r,size:i,disabled:a,bordered:o=!0,style:s,className:c,rootClassName:l,treeCheckable:u,multiple:d,listHeight:f=256,listItemHeight:p,placement:h,notFoundContent:g,switcherIcon:v,treeLine:y,getPopupContainer:b,popupClassName:x,dropdownClassName:S,treeIcon:C=!1,transitionName:T,choiceTransitionName:E=``,status:D,treeExpandAction:A,builtinPlacements:M,dropdownMatchSelectWidth:P,popupMatchSelectWidth:ee,allowClear:F,variant:I,dropdownStyle:L,dropdownRender:R,popupRender:B,onDropdownVisibleChange:V,onOpenChange:H,tagRender:U,maxCount:W,showCheckedStrategy:G,treeCheckStrictly:K,styles:ne,classNames:q,...re}=e,{getPrefixCls:J,getPopupContainer:ie,direction:oe,styles:ce,classNames:Y,switcherIcon:ue}=le(`treeSelect`),{renderEmpty:de,virtual:fe,popupMatchSelectWidth:pe,popupOverflow:me}=Q.useContext(m),[,he]=N(),ge=p??he?.controlHeightSM+he?.paddingXXS,_e=J(),X=J(`select`,r),ye=J(`select-tree`,r),Z=J(`tree-select`,r),{compactSize:xe,compactItemClassnames:Se}=O(X,oe),we=se(X),Te=se(Z),[Ee,De]=et(X,we);Qo(Z,ye,Te);let[Oe,Ae]=te(`treeSelect`,I,o),je=_(e=>i??xe??e),Me=Q.useContext(j),Ne=a??Me,{status:Pe,hasFeedback:Fe,isFormItemInput:Ie,feedbackIcon:Le}=Q.useContext(z),Re=ve(Pe,D),ze={...e,size:je,disabled:Ne,status:Re,variant:Oe},[Be,Ve]=ae([Y,q],[ce,ne],{props:ze},{popup:{_default:`root`}}),He=w(x||S,`${Z}-dropdown`,{[`${Z}-dropdown-rtl`]:oe===`rtl`},l,Be.root,Be.popup?.root,De,we,Te,Ee),Ue=Ke(B||R),We=H||V,Ge=!!(u||d),Je=Q.useMemo(()=>{if(!(W&&(G===`SHOW_ALL`&&!K||G===`SHOW_PARENT`)))return W},[W,G,K]),Ye=Xe(e.suffixIcon,e.showArrow),$e=ee??P??pe,{suffixIcon:tt,removeIcon:nt,clearIcon:rt}=Qe({...re,multiple:Ge,showSuffixIcon:Ye,hasFeedback:Fe,feedbackIcon:Le,prefixCls:X,componentName:`TreeSelect`}),it=F===!0?{clearIcon:rt}:F,at;at=g===void 0?de?.(`Select`)||Q.createElement(Ze,{componentName:`Select`}):g;let ot=k(re,[`suffixIcon`,`removeIcon`,`clearIcon`]),st=Q.useMemo(()=>h===void 0?oe===`rtl`?`bottomRight`:`bottomLeft`:h,[h,oe]),ct=w(!r&&Z,{[`${X}-lg`]:je===`large`,[`${X}-sm`]:je===`small`,[`${X}-rtl`]:oe===`rtl`,[`${X}-${Oe}`]:Ae,[`${X}-in-form-item`]:Ie},be(X,Re,Fe),Se,c,l,Be?.root,De,we,Te,Ee),lt=v??ue,ut=e=>Q.createElement(ke,{prefixCls:ye,switcherIcon:lt,treeNodeProps:e,showLine:y}),[dt]=Ce(`SelectLike`,Ve.popup?.root?.zIndex);return Q.createElement(Xo,{classNames:Be,styles:Ve,virtual:fe,disabled:Ne,...ot,popupMatchSelectWidth:$e,builtinPlacements:qe(M,me),ref:t,prefixCls:X,className:ct,style:{...Ve?.root,...s},listHeight:f,listItemHeight:ge,treeCheckable:u&&Q.createElement(`span`,{className:`${X}-tree-checkbox-inner`}),treeLine:!!y,suffixIcon:tt,multiple:Ge,placement:st,removeIcon:nt,allowClear:it,switcherIcon:ut,showTreeIcon:C,notFoundContent:at,getPopupContainer:b||ie,treeMotion:null,popupClassName:He,popupStyle:{...Ve.root,...Ve.popup?.root,zIndex:dt},popupRender:Ue,onPopupVisibleChange:We,choiceTransitionName:n(_e,``,E),transitionName:n(_e,`slide-up`,T),treeExpandAction:A,tagRender:Ge?U:void 0,maxCount:Je,showCheckedStrategy:G,treeCheckStrictly:K})}),es=Ge($o,`popupAlign`,e=>k(e,[`visible`]));$o.TreeNode=ko,$o.SHOW_ALL=Ho,$o.SHOW_PARENT=Uo,$o.SHOW_CHILD=Wo,$o._InternalPanelDoNotUseOrYouWillBeFired=es;var $=W(),ts=({value:e,onChange:t,placeholder:n,disabled:r=!1,readonly:i=!1})=>{let{t:a}=ht(),[o,s]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(e);Q.useEffect(()=>{l(e)},[e]);let u=(0,Q.useCallback)(e=>{l(e),t?.(e),s(!1)},[t]),d=(0,Q.useCallback)(()=>{l(void 0),t?.(null)},[t]),f=(0,Q.useCallback)(({type:e})=>(0,$.jsx)(`div`,{className:`flex flex-wrap max-h-[400px] overflow-auto gap-2`,children:_e[e].map(e=>(0,$.jsx)(`div`,{className:`cursor-pointer p-2 border border-gray-300 rounded hover:border-blue-500 hover:bg-blue-50 transition-all flex items-center justify-center`,onClick:()=>u(e),title:e,children:(0,$.jsx)(ge,{name:e,style:{fontSize:20}})},e))}),[u]),p=(0,Q.useMemo)(()=>[{key:`use`,label:a(`xin.form.iconSelector.tabs.use`),children:(0,$.jsx)(f,{type:`useIcons`})},{key:`suggestion`,label:a(`xin.form.iconSelector.tabs.suggestion`),children:(0,$.jsx)(f,{type:`suggestionIcons`})},{key:`direction`,label:a(`xin.form.iconSelector.tabs.direction`),children:(0,$.jsx)(f,{type:`directionIcons`})},{key:`editor`,label:a(`xin.form.iconSelector.tabs.editor`),children:(0,$.jsx)(f,{type:`editorIcons`})},{key:`data`,label:a(`xin.form.iconSelector.tabs.data`),children:(0,$.jsx)(f,{type:`dataIcons`})},{key:`logo`,label:a(`xin.form.iconSelector.tabs.logo`),children:(0,$.jsx)(f,{type:`logoIcons`})},{key:`other`,label:a(`xin.form.iconSelector.tabs.other`),children:(0,$.jsx)(f,{type:`otherIcons`})}],[f,a]),m=(0,Q.useMemo)(()=>c?[{label:(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(ge,{name:c}),(0,$.jsx)(`span`,{children:c})]}),value:c}]:[],[c]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)($e,{value:c,placeholder:n||a(`xin.form.iconSelector.placeholder`),disabled:r,open:!1,onClick:()=>!r&&!i&&s(!0),options:m,style:{width:`100%`},allowClear:!0,onClear:d,suffixIcon:c?(0,$.jsx)(ge,{name:c}):void 0}),(0,$.jsx)(lt,{title:a(`xin.form.iconSelector.modal.title`),open:o,onCancel:()=>s(!1),footer:null,width:800,children:(0,$.jsx)(rt,{defaultActiveKey:`use`,items:p})})]})};function ns(e,t,n){return Y({url:e,method:`get`,params:t,...n||{}})}function rs(e,t,n){return Y({url:e,method:`post`,data:t,...n||{}})}function is(e,t,n){return Y({url:e,method:`put`,data:t,...n||{}})}function as(e,t,n){return Y({url:e,method:`delete`,params:t,...n||{}})}var os=({value:e,onChange:t,mode:n=`single`,placeholder:r,disabled:i=!1,readonly:a=!1,showDept:o=!0,maxTagCount:s=2})=>{let{t:c}=ht(),[l,u]=(0,Q.useState)(!1),[d,f]=(0,Q.useState)(!1),[p,m]=(0,Q.useState)([]),[h,g]=(0,Q.useState)([]),[_,v]=(0,Q.useState)(!1),[y,b]=(0,Q.useState)([]),[x,S]=(0,Q.useState)({current:1,pageSize:10,total:0}),[C,w]=(0,Q.useState)();(0,Q.useEffect)(()=>{if(!e){m([]),g([]);return}let t=Array.isArray(e)?e:[e];if(typeof t[0]==`object`){m(t),g(t.map(e=>e.id));return}f(!0),Promise.all(t.map(e=>ns(`/sys-user/list`,{id:e}))).then(e=>{let t=e.map(e=>e.data.data?.data?.[0]).filter(Boolean);m(t),g(t.map(e=>e.id))}).catch(e=>console.error(`Failed to load users:`,e)).finally(()=>f(!1))},[e]);let T=(0,Q.useMemo)(()=>[{title:c(`system.user.id`),dataIndex:`id`,width:80,align:`center`},{title:c(`system.user.username`),dataIndex:`username`,width:120,align:`center`},{title:c(`system.user.nickname`),dataIndex:`nickname`,width:120,align:`center`},{title:c(`system.user.mobile`),dataIndex:`mobile`,width:130,align:`center`},...o?[{title:c(`system.user.dept`),dataIndex:`dept_name`,width:120,align:`center`,render:e=>e?(0,$.jsx)(mt,{color:`volcano`,children:e}):`-`}]:[],{title:c(`system.user.status`),dataIndex:`status`,width:100,align:`center`,render:e=>e===1?(0,$.jsx)(mt,{color:`success`,children:c(`system.user.status.1`)}):(0,$.jsx)(mt,{color:`error`,children:c(`system.user.status.0`)})}],[c,o]),E=(0,Q.useCallback)(()=>{t?.(n===`single`?p[0]?.id||null:p.map(e=>e.id)),u(!1)},[n,p,t]),D=(0,Q.useCallback)((e,t)=>{if(n===`single`&&e.length>1){let n=e[e.length-1],r=t.find(e=>e.id===n);g([n]),m([r])}else g(e),m(t)},[n]),O=(0,Q.useCallback)(async(e=1,t=10,n)=>{v(!0);try{let r=await ns(`/system-user/list`,{page:e,pageSize:t,keywordSearch:n});b(r.data.data?.data||[]),S(n=>({...n,current:e,pageSize:t,total:r.data.data?.total||0}))}catch(e){console.error(`Failed to fetch users:`,e),b([])}finally{v(!1)}},[]);(0,Q.useEffect)(()=>{l&&O(1,x.pageSize,C?.keywordSearch)},[l]);let k=(0,Q.useMemo)(()=>({columns:T,rowKey:`id`,dataSource:y,loading:_,rowSelection:{type:n===`single`?`radio`:`checkbox`,selectedRowKeys:h,onChange:D,preserveSelectedRowKeys:!0},pagination:{...x,showSizeChanger:!0,showQuickJumper:!0,onChange:(e,t)=>{O(e,t,C?.keywordSearch)}},bordered:!0,size:`small`,scroll:{x:800}}),[T,y,_,n,h,D,x,C,O]),A=(0,Q.useCallback)(e=>{n===`single`?(!p.find(t=>t.id===e)&&e&&ns(`/sys-user/list`,{id:e}).then(e=>{let t=e.data.data?.data?.[0];t&&(m([t]),g([t.id]))}).catch(e=>console.error(`Failed to load user:`,e)),t?.(e||null)):t?.(e)},[n,p,t]),j=(0,Q.useMemo)(()=>p.map(e=>({label:e.nickname||e.username,value:e.id})),[p]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)($e,{mode:n===`multiple`?`multiple`:void 0,value:n===`single`?p[0]?.id||void 0:p.map(e=>e.id),onChange:A,placeholder:r||c(`xin.form.userSelector.placeholder`),disabled:i,loading:d,maxTagCount:s,open:!1,onClick:()=>!i&&!a&&u(!0),options:j,style:{width:`100%`},allowClear:!0,onClear:()=>{m([]),g([]),t?.(n===`single`?null:[])}}),(0,$.jsxs)(lt,{title:c(`xin.form.userSelector.modal.title`),open:l,onCancel:()=>u(!1),onOk:E,width:1e3,okText:c(`xin.form.userSelector.modal.okText`),cancelText:c(`xin.form.userSelector.modal.cancelText`),children:[(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(ft.Search,{placeholder:c(`system.user.searchPlaceholder`),style:{width:304},onSearch:e=>{w({keywordSearch:e}),O(1,x.pageSize,e)},allowClear:!0})}),(0,$.jsx)(je,{...k})]})]})},{TextArea:ss,Password:cs}=ft,{RangePicker:ls}=eo;function us(e){let{valueType:t,...n}=e,r;switch(t){case`password`:r=(0,$.jsx)(cs,{...n});break;case`textarea`:r=(0,$.jsx)(ss,{rows:4,...n});break;case`digit`:r=(0,$.jsx)(pe,{style:{width:`100%`},...n});break;case`money`:r=(0,$.jsx)(pe,{style:{width:`100%`},precision:2,prefix:`¥`,...n});break;case`select`:r=(0,$.jsx)($e,{...n});break;case`treeSelect`:r=(0,$.jsx)($o,{...n});break;case`cascader`:r=(0,$.jsx)(Ma,{...n});break;case`radio`:r=(0,$.jsx)(nt.Group,{options:[],optionType:`default`,...n});break;case`radioButton`:r=(0,$.jsx)(nt.Group,{options:[],optionType:`button`,...n});break;case`checkbox`:r=(0,$.jsx)(at.Group,{options:[],...n});break;case`switch`:r=(0,$.jsx)(pt,{...n});break;case`rate`:r=(0,$.jsx)(ho,{...n});break;case`slider`:r=(0,$.jsx)(ct,{...n});break;case`date`:r=(0,$.jsx)(eo,{style:{width:`100%`},...n});break;case`dateTime`:r=(0,$.jsx)(eo,{style:{width:`100%`},showTime:!0,...n});break;case`dateRange`:r=(0,$.jsx)(ls,{style:{width:`100%`},...n});break;case`time`:r=(0,$.jsx)(yo,{style:{width:`100%`},...n});break;case`timeRange`:r=(0,$.jsx)(yo.RangePicker,{style:{width:`100%`},...n});break;case`week`:r=(0,$.jsx)(eo,{style:{width:`100%`},picker:`week`,...n});break;case`month`:r=(0,$.jsx)(eo,{style:{width:`100%`},picker:`month`,...n});break;case`quarter`:r=(0,$.jsx)(eo,{style:{width:`100%`},picker:`quarter`,...n});break;case`year`:r=(0,$.jsx)(eo,{style:{width:`100%`},picker:`year`,...n});break;case`color`:r=(0,$.jsx)(fe,{...n});break;case`image`:r=(0,$.jsx)(gt,{...n});break;case`icon`:r=(0,$.jsx)(ts,{...n});break;case`user`:r=(0,$.jsx)(os,{...n});break;default:r=(0,$.jsx)(ft,{...n});break}return r}var ds=X();function fs(e){let{columns:t,layoutType:n=`Form`,grid:r=!1,rowProps:i,colProps:a={span:12},onFinish:o,formRef:s,form:c,modalProps:l,drawerProps:u,trigger:d,submitter:f,...p}=e,{t:m}=ht(),[h]=dt.useForm(c),[g,_]=(0,Q.useState)(!1),[v,y]=(0,Q.useState)(!1);(0,Q.useImperativeHandle)(s,()=>({...h,open:x,close:S,isOpen:()=>g,setLoading:e=>y(e)}));let b=(0,Q.useCallback)(async e=>{if(o)try{y(!0),await o(e)!==!1&&(n===`ModalForm`||n===`DrawerForm`)&&_(!1)}finally{y(!1)}},[o,n]),x=()=>_(!0),S=()=>_(!1),C=(0,Q.useCallback)((e,t)=>{let{dataIndex:n,valueType:i,title:o=``,fieldProps:s={},dependency:c,fieldRender:l,colProps:u={span:12}}=e,d=(0,ds.pick)(e,`colon.extra.getValueFromEvent.help.hidden.htmlFor.initialValue.name.normalize.noStyle.preserve.tooltip.trigger.required.rules.validateFirst.validateDebounce.validateStatus.hasFeedback.validateTrigger.valuePropName.messageVariables.wrapperCol.layout.label.labelAlign.labelCol`.split(`.`)),f=String(n)||`form-item-${t}`;if(c)return(0,$.jsx)(dt.Item,{noStyle:!0,shouldUpdate:!0,children:({getFieldsValue:t})=>{let p=t();if(c.visible&&!c.visible(p))return null;let m=c.disabled?c.disabled(p):!1,g=c.fieldProps?c.fieldProps(p):{},_={...s,...g,disabled:m||s?.disabled},v=(0,$.jsx)(us,{valueType:i,placeholder:o,..._});return r?(0,Q.createElement)(ot,{...a,...u,key:f},(0,$.jsx)(dt.Item,{name:n,label:e.title||e.label,...d,children:l?l(h):v},f)):(0,$.jsx)(dt.Item,{name:n,label:e.title||e.label,...d,children:l?l(h):v},f)}});{let t=(0,$.jsx)(us,{valueType:i,placeholder:o,...s});return r?(0,Q.createElement)(ot,{...a,...u,key:f},(0,$.jsx)(dt.Item,{name:n,label:e.title||e.label,...d,children:l?l(h):t},f)):(0,$.jsx)(dt.Item,{name:n,label:e.title||e.label,...d,children:l?l(h):t},f)}},[r,c]),w=(0,Q.useMemo)(()=>{if(f?.render===!1)return null;let e={submit:(0,$.jsx)(He,{type:`primary`,loading:v,onClick:()=>h.submit(),...f?.submitButtonProps,children:f?.submitText||m(`xin.form.submit`)}),close:(0,$.jsx)(He,{loading:v,onClick:S,...f?.closeButtonProps,children:f?.closeText||m(`xin.form.cancel`)}),reset:(0,$.jsx)(He,{loading:v,onClick:()=>h.resetFields(),...f?.resetButtonProps,children:f?.resetText||m(`xin.form.reset`)})};return typeof f?.render==`function`?f.render(e,s):n===`Form`?(0,$.jsx)(dt.Item,{children:(0,$.jsxs)(Me,{children:[e.reset,e.submit]})}):(0,$.jsxs)(Me,{children:[e.reset,e.submit,e.close]})},[v,c,f,m]),T=(0,Q.useMemo)(()=>(0,$.jsxs)(dt,{...p,form:h,onFinish:b,children:[r?(0,$.jsx)(st,{...i,children:t.map((e,t)=>C(e,t))}):t.map((e,t)=>C(e,t)),n===`Form`&&w]}),[c,b,e,r,i,t,C,n,w]),E=(0,Q.useMemo)(()=>d?Q.cloneElement(d,{onClick:x}):null,[d,x]);return n===`ModalForm`?(0,$.jsxs)($.Fragment,{children:[E,(0,$.jsx)(lt,{open:g,onCancel:S,footer:w,...l,children:T})]}):n===`DrawerForm`?(0,$.jsxs)($.Fragment,{children:[E,(0,$.jsx)(me,{open:g,onClose:S,footer:w,...u,children:T})]}):T}export{as as a,ts as c,rs as i,$o as l,us as n,ns as o,os as r,is as s,fs as t}; \ No newline at end of file diff --git a/public/assets/XinForm-ihfVpzb6.js b/public/assets/XinForm-ihfVpzb6.js deleted file mode 100644 index f7e29d3..0000000 --- a/public/assets/XinForm-ihfVpzb6.js +++ /dev/null @@ -1,62 +0,0 @@ -import{$ as e,$t as t,B as n,Bn as r,Bt as i,D as a,Er as o,Gn as s,H as c,J as l,Jn as u,Ln as d,Nn as f,Or as p,P as m,Qn as h,Rn as g,Sr as _,St as v,Tr as y,U as b,V as x,Vn as S,W as C,X as w,Xt as T,Y as E,an as D,bt as O,cn as k,d as A,dn as j,dt as M,en as N,et as P,fr as F,gt as I,hn as L,hr as R,it as z,lr as B,m as ee,mn as te,pn as V,pr as H,pt as ne,r as re,sn as ie,sr as U,t as W,tn as G,ur as K,ut as ae,vn as oe,wt as se,xn as q,xr as J,xt as Y}from"./jsx-runtime-NwRKtVrk.js";import{t as ce}from"./request-Blbag3Ot.js";import{_ as le,d as ue,g as de,h as fe,m as pe,p as me,s as he}from"./CopyOutlined-bJLUKQgS.js";import{d as ge,f as _e,m as X,n as ve,r as ye,t as be,y as xe}from"./statusUtils-G17j4Ng-.js";import{i as Se}from"./Input-yLjViSX8.js";import{a as Ce,c as Z,i as we,l as Te,o as Ee,r as De,s as Oe,t as ke}from"./table-By97ouEx.js";import{n as Ae,t as je}from"./button-CM-rzMOH.js";import{t as Me}from"./move-KzMQarL_.js";import{t as Ne}from"./space-Dvitgohy.js";import{n as Pe}from"./BarsOutlined-UcCNWNvv.js";import{t as Fe}from"./PurePanel-BhXcm5Bt.js";import{n as Ie}from"./card-D7XvzVif.js";import{Bt as Le,Ot as Re,Vt as ze,zt as Be}from"./es-Do50EHua.js";import{t as Ve}from"./radio-CkoyL693.js";import{t as He}from"./tag-C0Yg14A-.js";import{A as Ue,B as We,C as Ge,D as Ke,E as qe,H as Je,K as Ye,L as Xe,N as Ze,O as Qe,P as $e,R as et,S as tt,U as nt,V as rt,_ as it,a as at,i as ot,j as st,k as ct,q as lt,r as ut,s as dt,v as ft,y as pt,z as mt}from"./index-B7MUL4ct.js";import{t as ht}from"./ImageUploader-CHryWmjJ.js";var Q=p(y()),gt=Q.createContext({}),_t=`__rc_cascader_search_mark__`,vt=(e,t,{label:n=``})=>t.some(t=>String(t[n]).toLowerCase().includes(e.toLowerCase())),yt=(e,t,n,r)=>t.map(e=>e[r.label]).join(` / `),bt=(e,t,n,r,i,a)=>{let{filter:o=vt,render:s=yt,limit:c=50,sort:l}=i;return Q.useMemo(()=>{let i=[];if(!e)return[];function u(t,d,f=!1){t.forEach(t=>{if(!l&&c!==!1&&c>0&&i.length>=c)return;let p=[...d,t],m=t[n.children],h=f||t.disabled;(!m||m.length===0||a)&&o(e,p,{label:n.label})&&i.push({...t,disabled:h,[n.label]:s(e,p,r,n),[_t]:p,[n.children]:void 0}),m&&u(t[n.children],p,h)})}return u(t,[]),l&&i.sort((t,r)=>l(t[_t],r[_t],e,n)),c!==!1&&c>0?i.slice(0,c):i},[e,t,n,r,s,a,o,l,c])},xt=`__RC_CASCADER_SPLIT__`,St=`SHOW_PARENT`,Ct=`SHOW_CHILD`;function wt(e){return e.join(xt)}function Tt(e){return e.map(wt)}function Et(e){return e.split(xt)}function Dt(e){let{label:t,value:n,children:r}=e||{},i=n||`value`;return{label:t||`label`,value:i,key:i,children:r||`children`}}function Ot(e,t){return e.isLeaf??!e[t.children]?.length}function kt(e){let t=e.parentElement;if(!t)return;let n=e.offsetTop-t.offsetTop;n-t.scrollTop<0?t.scrollTo({top:n}):n+e.offsetHeight-t.scrollTop>t.offsetHeight&&t.scrollTo({top:n+e.offsetHeight-t.offsetHeight})}function At(e,t){return e.map(e=>e[_t]?.map(e=>e[t.value]))}function jt(e){return Array.isArray(e)&&Array.isArray(e[0])}function Mt(e){return e?jt(e)?e:(e.length===0?[]:[e]).map(e=>Array.isArray(e)?e:[e]):[]}function Nt(e,t,n){let r=new Set(e),i=t();return e.filter(e=>{let t=i[e],a=t?t.parent:null,o=t?t.children:null;return t&&t.node.disabled?!0:n===`SHOW_CHILD`?!(o&&o.some(e=>e.key&&r.has(e.key))):!(a&&!a.node.disabled&&r.has(a.key))})}function Pt(e,t,n,r=!1){let i=t,a=[];for(let t=0;t{let t=e[n.value];return r?String(t)===String(o):t===o}),c=s===-1?null:i?.[s];a.push({value:c?.[n.value]??o,index:s,option:c}),i=c?.[n.children]}return a}var Ft=((e,t,n,r,i)=>Q.useMemo(()=>{let a=i||(e=>{let t=r?e.slice(-1):e;return t.every(e=>[`string`,`number`].includes(typeof e))?t.join(` / `):t.reduce((e,t,n)=>{let r=Q.isValidElement(t)?Q.cloneElement(t,{key:n}):t;return n===0?[r]:[...e,` / `,r]},[])});return e.map(e=>{let r=Pt(e,t,n),i=a(r.map(({option:e,value:t})=>e?.[n.label]??t),r.map(({option:e})=>e)),o=wt(e);return{label:i,value:o,key:o,valueCells:e,disabled:r[r.length-1]?.option?.disabled}})},[e,t,n,i,r]));function It(e,t){return Q.useCallback(n=>{let r=[],i=[];return n.forEach(n=>{Pt(n,e,t).every(e=>e.option)?i.push(n):r.push(n)}),[i,r]},[e,t])}var Lt=((e,t)=>{let n=Q.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}});return Q.useCallback(()=>(n.current.options!==e&&(n.current.options=e,n.current.info=Z(e,{fieldNames:t,initWrapper:e=>({...e,pathKeyEntities:{}}),processEntity:(e,n)=>{let r=e.nodes.map(e=>e[t.value]).join(xt);n.pathKeyEntities[r]=e,e.key=r}})),n.current.info.pathKeyEntities),[t,e])});function Rt(e,t){let n=Q.useMemo(()=>t||[],[t]),r=Lt(n,e);return[n,r,Q.useCallback(t=>{let n=r();return t.map(t=>{let{nodes:r}=n[t];return r.map(t=>t[e.value])})},[r,e])]}function zt(e,t){let{autoClearSearchValue:n,searchValue:r,onSearch:i}=t;return Q.useMemo(()=>{if(!e)return[!1,{}];let t={matchInputWidth:!0,limit:50,autoClearSearchValue:n,searchValue:r,onSearch:i};return e&&typeof e==`object`&&(t={...t,...e}),t.limit<=0&&(t.limit=!1),[!0,t]},[e,n,r,i])}function Bt(e,t,n,r,i,a,o,s){return c=>{if(!e)t(c);else{let e=wt(c),l=Tt(n),u=Tt(r),d=l.includes(e),f=i.some(t=>wt(t)===e),p=n,m=i;if(f&&!d)m=i.filter(t=>wt(t)!==e);else{let t=d?l.filter(t=>t!==e):[...l,e],n=a(),r;d?{checkedKeys:r}=Oe(t,{checked:!1,halfCheckedKeys:u},n):{checkedKeys:r}=Oe(t,!0,n),p=o(Nt(r,a,s))}t([...m,...p])}}}function Vt(e,t,n,r,i){return Q.useMemo(()=>{let[a,o]=i(t);if(!e||!t.length)return[a,[],o];let{checkedKeys:s,halfCheckedKeys:c}=Oe(Tt(a),!0,n());return[r(s),r(c),o]},[e,t,n,r,i])}function Ht({prefixCls:e,checked:t,halfChecked:n,disabled:r,onClick:i,disableCheckbox:a}){let{checkable:o}=Q.useContext(gt),s=typeof o==`boolean`?null:o;return Q.createElement(`span`,{className:_(`${e}`,{[`${e}-checked`]:t,[`${e}-indeterminate`]:!t&&n,[`${e}-disabled`]:r||a}),onClick:i},s)}function Ut(){return Ut=Object.assign?Object.assign.bind():function(e){for(var t=1;tp||e,k=Q.useMemo(()=>n.map(e=>{let{disabled:t,disableCheckbox:n}=e,r=e[_t],i=e.__cascader_fix_label__??e[v.label],o=e[v.value],s=Ot(e,v),c=r?r.map(e=>e[v.value]):[...a,o],f=wt(c);return{disabled:t,label:i,value:o,isLeaf:s,isLoading:d.includes(f),checked:l.has(f),halfChecked:u.has(f),option:e,disableCheckbox:n,fullPath:c,fullPathKey:f}}),[n,l,v,u,d,a]);return Q.useEffect(()=>{if(g.current){let e=`.${h}-active`,t=g.current.querySelector(e);t&&kt(t)}},[i,h]),Q.createElement(`ul`,{className:_(m,T?.popup?.list),style:E?.popup?.list,ref:g,role:`menu`},k.map(({disabled:n,label:a,value:l,isLeaf:u,isLoading:d,checked:p,halfChecked:m,option:g,fullPath:v,fullPathKey:b,disableCheckbox:k})=>{let A=r(g,{aria:!0,data:!0}),j=()=>{if(O(n))return;let e=[...v];D&&u&&e.pop(),c(e)},M=()=>{f(g)&&!O(n)&&s(v,u)},N;return typeof g.title==`string`?N=g.title:typeof a==`string`&&(N=a),Q.createElement(`li`,Ut({key:b},A,{className:_(h,T?.popup?.listItem,{[`${h}-expand`]:!u,[`${h}-active`]:i===l||i===b,[`${h}-disabled`]:O(n),[`${h}-loading`]:d}),style:{...C,...E?.popup?.listItem},role:`menuitemcheckbox`,title:N,"aria-checked":p,"data-path-key":b,onClick:()=>{j(),!k&&(!t||u)&&M()},onDoubleClick:()=>{y&&o(!1)},onMouseEnter:()=>{D&&j()},onMouseDown:e=>{e.preventDefault()}}),t&&Q.createElement(Ht,{prefixCls:`${e}-checkbox`,checked:p,halfChecked:m,disabled:O(n)||k,disableCheckbox:k,onClick:e=>{k||(e.stopPropagation(),M())}}),Q.createElement(`div`,{className:`${h}-content`},w&&l!==`__EMPTY__`?w(g):a),!d&&x&&!u&&Q.createElement(`div`,{className:`${h}-expand-icon`},x),d&&S&&Q.createElement(`div`,{className:`${h}-loading-icon`},S))}))}var Kt=(e,t)=>{let{values:n}=Q.useContext(gt),r=n[0],[i,a]=Q.useState([]);return Q.useEffect(()=>{e||a(r||[])},[t,r]),[i,a]},qt=((e,t,n,r,i,a,o)=>{let{direction:s,searchValue:c,toggleOpen:l,open:d}=o,f=s===`rtl`,[p,m,h,g]=Q.useMemo(()=>{let e=-1,i=t,a=[],o=[],s=r.length,c=At(t,n);for(let t=0;t(c[i]?wt(c[i]):e[n.value])===r[t]);if(s===-1)break;e=s,a.push(e),o.push(r[t]),i=i[e][n.children]}let l=t;for(let e=0;e{i(e)},v=e=>{let t=h.length,r=m;r===-1&&e<0&&(r=t);for(let i=0;i{p.length>1?_(p.slice(0,-1)):l(!1)},b=()=>{let e=(h[m]?.[n.children]||[]).find(e=>!e.disabled);e&&_([...p,e[n.value]])};Q.useImperativeHandle(e,()=>({onKeyDown:e=>{let{which:t}=e;switch(t){case u.UP:case u.DOWN:{let e=0;t===u.UP?e=-1:t===u.DOWN&&(e=1),e!==0&&v(e);break}case u.LEFT:if(c)break;f?b():y();break;case u.RIGHT:if(c)break;f?y():b();break;case u.BACKSPACE:c||y();break;case u.ENTER:if(p.length){let e=h[m]?.__rc_cascader_search_mark__||[];e.length?a(e.map(e=>e[n.value]),e[e.length-1]):a(p,h[m])}break;case u.ESC:l(!1),d&&e.stopPropagation()}},onKeyUp:()=>{}}))});function Jt(){return Jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,multiple:r,searchValue:i,toggleOpen:a,notFoundContent:o,direction:s,open:c,disabled:l,lockOptions:u=!1}=e,d=Q.useRef(null),f=s===`rtl`,{options:p,values:m,halfValues:h,fieldNames:g,changeOnSelect:v,onSelect:y,searchOptions:b,popupPrefixCls:x,loadData:S,expandTrigger:C}=Q.useContext(gt),w=x||n,[T,E]=Q.useState([]),D=e=>{if(!S||i)return;let t=Pt(e,p,g).map(({option:e})=>e),n=t[t.length-1];if(n&&!Ot(n,g)){let n=wt(e);E(e=>[...e,n]),S(t)}};Q.useEffect(()=>{T.length&&T.forEach(e=>{let t=Pt(Et(e),p,g,!0).map(({option:e})=>e),n=t[t.length-1];(!n||n[g.children]||Ot(n,g))&&E(t=>t.filter(t=>t!==e))})},[p,T,g]);let O=Q.useMemo(()=>new Set(Tt(m)),[m]),k=Q.useMemo(()=>new Set(Tt(h)),[h]),[A,j]=Kt(r,c),M=e=>{j(e),D(e)},N=e=>{if(l)return!1;let{disabled:t}=e,n=Ot(e,g);return!t&&(n||v||r)},P=(e,t,n=!1)=>{y(e),!r&&(t||v&&(C===`hover`||n))&&a(!1)},F=Q.useMemo(()=>i?b:p,[i,b,p]),I=U(()=>F,[c,u],(e,t)=>!!t[0]&&!t[1]),L=Q.useMemo(()=>{let e=[{options:I}],t=I,n=At(t,g);for(let r=0;r(n[t]?wt(n[t]):e[g.value])===i)?.[g.children];if(!a?.length)break;t=a,e.push({options:a})}return e},[I,A,g]);qt(t,I,g,A,M,(e,t)=>{N(t)&&P(e,Ot(t,g),!0)},{direction:s,searchValue:i,toggleOpen:a,open:c}),Q.useEffect(()=>{if(!i)for(let e=0;e{let n=A.slice(0,t),r=A[t];return Q.createElement(Gt,Jt({key:t},B,{prefixCls:w,options:e.options,prevValuePath:n,activeValue:r}))});return Q.createElement(`div`,{className:_(`${w}-menus`,{[`${w}-menu-empty`]:R,[`${w}-rtl`]:f}),ref:d},ee)});function Xt(){return Xt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{lockOptions:n,...r}=lt();return Q.createElement(Yt,Xt({},e,r,{lockOptions:n,ref:t}))});function Qt(){}function $t(e){let{prefixCls:t=`rc-cascader`,style:n,className:r,options:i,checkable:a,defaultValue:o,value:s,fieldNames:c,changeOnSelect:l,onChange:u,showCheckedStrategy:d,loadData:f,expandTrigger:p,expandIcon:m=`>`,loadingIcon:h,direction:g,notFoundContent:v=`Not Found`,disabled:y,optionRender:b}=e,x=!!a,[S,C]=K(o,s),w=Mt(S),T=Q.useMemo(()=>Dt(c),[JSON.stringify(c)]),[E,D,O]=Rt(T,i),[k,A,j]=Vt(x,w,D,O,It(E,T)),M=Bt(x,R(e=>{if(C(e),u){let t=Mt(e),n=t.map(e=>Pt(e,E,T).map(e=>e.option));u(x?t:t[0],x?n:n[0])}}),k,A,j,D,O,d),N=R(e=>{M(e)}),P=Q.useMemo(()=>({options:E,fieldNames:T,values:k,halfValues:A,changeOnSelect:l,onSelect:N,checkable:a,searchOptions:[],popupPrefixCls:void 0,loadData:f,expandTrigger:p,expandIcon:m,loadingIcon:h,popupMenuColumnStyle:void 0,optionRender:b}),[E,T,k,A,l,N,a,f,p,m,h,b]),F=`${t}-panel`,I=!E.length;return Q.createElement(gt.Provider,{value:P},Q.createElement(`div`,{className:_(F,{[`${F}-rtl`]:g===`rtl`,[`${F}-empty`]:I},r),style:n},I?v:Q.createElement(Yt,{prefixCls:t,searchValue:``,multiple:x,toggleOpen:Qt,open:!0,direction:g,disabled:y})))}function en(){return en=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-cascader`,fieldNames:i,defaultValue:a,value:o,changeOnSelect:s,onChange:c,displayRender:l,checkable:u,showSearch:d,expandTrigger:f,options:p,popupPrefixCls:m,loadData:h,open:g,popupClassName:_,popupMenuColumnStyle:v,popupStyle:y,classNames:b,styles:x,placement:S,onPopupVisibleChange:C,expandIcon:w=`>`,loadingIcon:T,children:E,popupMatchSelectWidth:D=!1,showCheckedStrategy:O=St,optionRender:k,...A}=e,j=B(n),M=!!u,[N,P]=K(a,o),F=Mt(N),I=Q.useMemo(()=>Dt(i),[JSON.stringify(i)]),[L,z,ee]=Rt(I,p),[te,V]=zt(d,e),{autoClearSearchValue:H=!0,searchValue:ne,onSearch:re}=V,[ie,U]=K(``,ne),W=ie||``,G=(e,t)=>{U(e),t.source!==`blur`&&re&&re(e)},ae=bt(W,L,I,m||r,V,s||M),[oe,se,q]=Vt(M,F,z,ee,It(L,I)),J=Ft(Q.useMemo(()=>{let e=Nt(Tt(oe),z,O);return[...q,...ee(e)]},[oe,z,ee,q,O]),L,I,M,l),Y=R(e=>{if(P(e),c){let t=Mt(e),n=t.map(e=>Pt(e,L,I).map(e=>e.option));c(M?t:t[0],M?n:n[0])}}),ce=Bt(M,Y,oe,se,q,z,ee,O),le=R(e=>{(!M||H)&&U(``),ce(e)}),ue=(e,t)=>{if(t.type===`clear`){Y([]);return}let{valueCells:n}=t.values[0];le(n)},de=e=>{C?.(e)},fe=Q.useMemo(()=>({classNames:b,styles:x,options:L,fieldNames:I,values:oe,halfValues:se,changeOnSelect:s,onSelect:le,checkable:u,searchOptions:ae,popupPrefixCls:m,loadData:h,expandTrigger:f,expandIcon:w,loadingIcon:T,popupMenuColumnStyle:v,optionRender:k}),[b,x,L,I,oe,se,s,le,u,ae,m,h,f,w,T,v,k]),pe=!(W?ae:L).length,me=W&&V.matchInputWidth||pe?{}:{minWidth:`auto`};return Q.createElement(gt.Provider,{value:fe},Q.createElement(Ye,en({},A,{ref:t,id:j,prefixCls:r,autoClearSearchValue:H,popupMatchSelectWidth:D,classNames:b,styles:x,popupStyle:{...me,...y},displayValues:J,onDisplayValuesChange:ue,mode:M?`multiple`:void 0,searchValue:W,onSearch:G,showSearch:te,OptionList:Zt,emptyOptions:pe,open:g,popupClassName:_,placement:S,onPopupVisibleChange:de,getRawInputElement:()=>E})))});tn.SHOW_PARENT=St,tn.SHOW_CHILD=Ct,tn.Panel=$t;var nn=tn;function rn(e,t){let{getPrefixCls:n,direction:r,renderEmpty:i}=Q.useContext(ie),a=t||r;return[n(`select`,e),n(`cascader`,e),a,i]}function an(e,t){return Q.useMemo(()=>t?Q.createElement(`span`,{className:`${e}-checkbox-inner`}):!1,[e,t])}var on=Q.createElement(e,{spin:!0}),sn=Q.createElement(m,null),cn=Q.createElement(Pe,null);function ln({contextExpandIcon:e,contextLoadingIcon:t,expandIcon:n,loadingIcon:r,isRtl:i}){return Q.useMemo(()=>({expandIcon:n??e??(i?cn:sn),loadingIcon:r??t??on}),[e,t,n,i,r])}var un=e=>{let{prefixCls:t,componentCls:n}=e,r=`${n}-menu-item`,i=` - &${r}-expand ${r}-expand-icon, - ${r}-loading-icon -`;return[Xe(`${t}-checkbox`,e),{[n]:{"&-checkbox":{top:0,marginInlineEnd:e.paddingXS,pointerEvents:`unset`},"&-menus":{display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,[`&${n}-menu-empty`]:{[`${n}-menu`]:{width:`100%`,height:`auto`,[r]:{color:e.colorTextDisabled}}}},"&-menu":{flexGrow:1,flexShrink:0,minWidth:e.controlItemWidth,height:e.dropdownHeight,margin:0,padding:e.menuPadding,overflow:`auto`,verticalAlign:`top`,listStyle:`none`,"-ms-overflow-style":`-ms-autohiding-scrollbar`,"&:not(:last-child)":{borderInlineEnd:`${D(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"&-item":{display:`flex`,maxWidth:400,flexWrap:`nowrap`,alignItems:`center`,padding:e.optionPadding,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,"&:hover":{background:e.controlItemBgHover},"&-disabled":{color:e.colorTextDisabled,cursor:`not-allowed`,"&:hover":{background:`transparent`},[i]:{color:e.colorTextDisabled}},[`&-active:not(${r}-disabled)`]:{"&, &:hover":{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg}},"&-content":{flex:`auto`,minWidth:0,...G},[i]:{marginInlineStart:e.paddingXXS,color:e.colorIcon,fontSize:e.fontSizeIcon},"&-keyword":{color:e.colorHighlight}}}}}]},dn=e=>{let{componentCls:t,antCls:n}=e;return[{[t]:{width:e.controlWidth}},{[`${t}-dropdown`]:[{[`&${n}-select-dropdown`]:{padding:0}},un(e)]},{[`${t}-dropdown-rtl`]:{direction:`rtl`}},a(e)]},fn=e=>{let t=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:e.controlItemBgActive,optionSelectedFontWeight:e.fontWeightStrong,optionPadding:`${t}px ${e.paddingSM}px`,menuPadding:e.paddingXXS,optionSelectedColor:e.colorText}},pn=v(`Cascader`,dn,fn,{resetFont:!1,unitless:{optionSelectedFontWeight:!0}}),mn=O([`Cascader`,`Panel`],e=>{let{componentCls:t}=e;return{[`${t}-panel`]:[un(e),{display:`inline-flex`,border:`${D(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,borderRadius:e.borderRadiusLG,overflowX:`auto`,maxWidth:`100%`,[`${t}-menus`]:{alignItems:`stretch`},[`${t}-menu`]:{height:`auto`},"&-empty":{padding:e.paddingXXS}}]}},fn,{resetFont:!1});function hn(e){let{prefixCls:t,className:n,multiple:r,rootClassName:i,notFoundContent:a,direction:o,expandIcon:s,loadingIcon:c,disabled:l}=e,{expandIcon:u,loadingIcon:d}=k(`cascader`),f=Q.useContext(z),p=l??f,[m,h,g,v]=rn(t,o),y=P(h),[b,x]=pn(h,y);mn(h);let{expandIcon:S,loadingIcon:C}=ln({contextExpandIcon:u,contextLoadingIcon:d,expandIcon:s,loadingIcon:c,isRtl:g===`rtl`}),w=a||v?.(`Cascader`)||Q.createElement(nt,{componentName:`Cascader`}),T=an(h,r);return Q.createElement($t,{...e,checkable:T,prefixCls:h,className:_(n,b,i,x,y),notFoundContent:w,direction:g,expandIcon:S,loadingIcon:C,disabled:p})}var{SHOW_CHILD:gn,SHOW_PARENT:_n}=nn,vn=(e,t,n)=>{let r=e.toLowerCase().split(t).reduce((e,n,r)=>r===0?[n]:[].concat(q(e),[t,n]),[]),i=[],a=0;return r.forEach((t,r)=>{let o=a+t.length,s=e.slice(a,o);a=o,r%2==1&&(s=Q.createElement(`span`,{className:`${n}-menu-item-keyword`,key:`separator-${r}`},s)),i.push(s)}),i},yn=(e,t,n,r)=>{let i=[],a=e.toLowerCase();return t.forEach((e,t)=>{t!==0&&i.push(` / `);let o=e[r.label];(oe(o)||te(o))&&(o=vn(String(o),a,n)),i.push(o)}),i},bn=Q.forwardRef((e,t)=>{let{prefixCls:n,size:r,disabled:i,className:a,rootClassName:o,multiple:s,bordered:c=!0,transitionName:u,choiceTransitionName:d=``,popupClassName:f,expandIcon:p,placement:m,showSearch:h,allowClear:g=!0,notFoundContent:v,direction:y,getPopupContainer:b,status:x,showArrow:S,builtinPlacements:C,style:T,variant:D,dropdownClassName:O,dropdownRender:A,onDropdownVisibleChange:M,onPopupVisibleChange:N,dropdownMenuColumnStyle:F,popupRender:I,dropdownStyle:R,popupMenuColumnStyle:B,onOpenChange:te,styles:V,classNames:H,loadingIcon:ne,clearIcon:U,removeIcon:W,suffixIcon:G,...K}=e,{getPrefixCls:ae,getPopupContainer:oe,className:se,style:q,classNames:J,styles:Y,expandIcon:ce,loadingIcon:le,clearIcon:ue,removeIcon:de,suffixIcon:fe,searchIcon:pe}=k(`cascader`),{popupOverflow:me}=Q.useContext(ie),{status:he,hasFeedback:ge,isFormItemInput:_e,feedbackIcon:X}=Q.useContext(ee),ye=be(he,x),[Se,Ce,Z,we]=rn(n,y),Te=Z===`rtl`,Ee=ae(),De=P(Se),[Oe,ke]=rt(Se,De),Ae=P(Ce);pn(Ce,Ae);let{compactSize:je,compactItemClassnames:Me}=l(Se,y),[Ne,Pe]=re(`cascader`,D,c),Fe=v||we?.(`Cascader`)||Q.createElement(nt,{componentName:`Cascader`}),Ie=mt(I||A),Le=B||F,Re=te||N||M,ze=Q.useMemo(()=>{if(!h)return h;let e={render:yn};return L(h)&&(e={...e,...h}),e},[h]),Be=E(e=>r??je??e),Ve=Q.useContext(z),He=i??Ve,{expandIcon:Ue,loadingIcon:Ge}=ln({contextExpandIcon:ce,contextLoadingIcon:le,expandIcon:p,loadingIcon:ne,isRtl:Te}),Ke=an(Ce,s),qe=et(e.suffixIcon,S),{suffixIcon:Ye,removeIcon:Xe,clearIcon:Ze}=We({...e,clearIcon:U,contextClearIcon:ue,removeIcon:W,contextRemoveIcon:de,loadingIcon:Ge,suffixIcon:G,contextSuffixIcon:fe,searchIcon:L(h)?h.searchIcon:void 0,contextSearchIcon:pe,hasFeedback:ge,feedbackIcon:X,showSuffixIcon:qe,multiple:s,prefixCls:Se,componentName:`Cascader`}),Qe=Q.useMemo(()=>m===void 0?Te?`bottomRight`:`bottomLeft`:m,[m,Te]),$e=g===!0?{clearIcon:Ze}:g,tt={...e,variant:Ne,size:Be,status:ye,disabled:He},[it,at]=j([J,H],[Y,V],{props:tt},{popup:{_default:`root`}}),ot={...at.popup.root,...R},[st]=xe(`SelectLike`,ot?.zIndex),ct=_(f||O,`${Ce}-dropdown`,{[`${Ce}-dropdown-rtl`]:Z===`rtl`},o,De,it.popup.root,Ae,Oe,ke);return Q.createElement(nn,{prefixCls:Se,className:_(!n&&Ce,{[`${Se}-lg`]:Be===`large`,[`${Se}-sm`]:Be===`small`,[`${Se}-rtl`]:Te,[`${Se}-${Ne}`]:Pe,[`${Se}-in-form-item`]:_e},ve(Se,ye,ge),Me,se,a,o,it.root,De,Ae,Oe,ke),disabled:He,style:{...at.root,...q,...T},classNames:it,styles:at,...K,builtinPlacements:Je(C,me),direction:Z,placement:Qe,notFoundContent:Fe,allowClear:$e,showSearch:ze,expandIcon:Ue,suffixIcon:Ye,removeIcon:Xe,loadingIcon:Ge,checkable:Ke,popupClassName:ct,popupPrefixCls:n||Ce,popupStyle:{...ot,zIndex:st},popupRender:Ie,popupMenuColumnStyle:Le,onPopupVisibleChange:Re,choiceTransitionName:w(Ee,``,d),transitionName:w(Ee,`slide-up`,u),getPopupContainer:b||oe,ref:t})}),xn=Fe(bn,`popupAlign`,e=>S(e,[`visible`]));bn.SHOW_PARENT=_n,bn.SHOW_CHILD=gn,bn.Panel=hn,bn._InternalPanelDoNotUseOrYouWillBeFired=xn;var Sn=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekday=r()})(e,(function(){return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localeData=r()})(e,(function(){return function(e,t,n){var r=t.prototype,i=function(e){return e&&(e.indexOf?e:e.s)},a=function(e,t,n,r,a){var o=e.name?e:e.$locale(),s=i(o[t]),c=i(o[n]),l=s||c.map((function(e){return e.slice(0,r)}));if(!a)return l;var u=o.weekStart;return l.map((function(e,t){return l[(t+(u||0))%7]}))},o=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}(e.formats[t.toUpperCase()])},c=function(){var e=this;return{months:function(t){return t?t.format(`MMMM`):a(e,`months`)},monthsShort:function(t){return t?t.format(`MMM`):a(e,`monthsShort`,`months`,3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format(`dddd`):a(e,`weekdays`)},weekdaysMin:function(t){return t?t.format(`dd`):a(e,`weekdaysMin`,`weekdays`,2)},weekdaysShort:function(t){return t?t.format(`ddd`):a(e,`weekdaysShort`,`weekdays`,3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return c.bind(this)()},n.localeData=function(){var e=o();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return a(o(),`months`)},n.monthsShort=function(){return a(o(),`monthsShort`,`months`,3)},n.weekdays=function(e){return a(o(),`weekdays`,null,null,e)},n.weekdaysShort=function(e){return a(o(),`weekdaysShort`,`weekdays`,3,e)},n.weekdaysMin=function(e){return a(o(),`weekdaysMin`,`weekdays`,2,e)}}}))})),wn=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekOfYear=r()})(e,(function(){var e=`week`,t=`year`;return function(n,r,i){var a=r.prototype;a.week=function(n){if(n===void 0&&(n=null),n!==null)return this.add(7*(n-this.week()),`day`);var r=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var a=i(this).startOf(t).add(1,t).date(r),o=i(this).endOf(e);if(a.isBefore(o))return 1}var s=i(this).startOf(t).date(r).startOf(e).subtract(1,`millisecond`),c=this.diff(s,e,!0);return c<0?i(this).startOf(`week`).week():Math.ceil(c)},a.weeks=function(e){return e===void 0&&(e=null),this.week(e)}}}))})),Tn=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekYear=r()})(e,(function(){return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return t===1&&e===11?n+1:e===0&&t>=52?n-1:n}}}))})),En=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),Dn=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),On=p(Ke()),kn=p(Sn()),An=p(Cn()),jn=p(wn()),Mn=p(Tn()),Nn=p(En()),Pn=p(Dn());On.default.extend(Pn.default),On.default.extend(Nn.default),On.default.extend(kn.default),On.default.extend(An.default),On.default.extend(jn.default),On.default.extend(Mn.default),On.default.extend(function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||``).replace(`Wo`,`wo`);return r.bind(this)(t)}});var Fn={bn_BD:`bn-bd`,by_BY:`be`,en_GB:`en-gb`,en_US:`en`,fr_BE:`fr`,fr_CA:`fr-ca`,hy_AM:`hy-am`,kmr_IQ:`ku`,nl_BE:`nl-be`,pt_BR:`pt-br`,zh_CN:`zh-cn`,zh_HK:`zh-hk`,zh_TW:`zh-tw`},In=function(e){return Fn[e]||e.split(`_`)[0]},Ln=function(e){return!On.default.isDayjs(e)||e instanceof On.default?e:(0,On.default)(e.valueOf())},Rn={getNow:function(){var e=(0,On.default)();return typeof e.tz==`function`?e.tz():e},getFixedDate:function(e){return(0,On.default)(e,[`YYYY-M-DD`,`YYYY-MM-DD`])},getEndDate:function(e){return Ln(e).endOf(`month`)},getWeekDay:function(e){var t=Ln(e).locale(`en`);return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return Ln(e).year()},getMonth:function(e){return Ln(e).month()},getDate:function(e){return Ln(e).date()},getHour:function(e){return Ln(e).hour()},getMinute:function(e){return Ln(e).minute()},getSecond:function(e){return Ln(e).second()},getMillisecond:function(e){return Ln(e).millisecond()},addYear:function(e,t){return Ln(e).add(t,`year`)},addMonth:function(e,t){return Ln(e).add(t,`month`)},addDate:function(e,t){return Ln(e).add(t,`day`)},setYear:function(e,t){return Ln(e).year(t)},setMonth:function(e,t){return Ln(e).month(t)},setDate:function(e,t){return Ln(e).date(t)},setHour:function(e,t){return Ln(e).hour(t)},setMinute:function(e,t){return Ln(e).minute(t)},setSecond:function(e,t){return Ln(e).second(t)},setMillisecond:function(e,t){return Ln(e).millisecond(t)},isAfter:function(e,t){return Ln(e).isAfter(Ln(t))},isValidate:function(e){return Ln(e).isValid()},locale:{getWeekFirstDay:function(e){return(0,On.default)().locale(In(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return Ln(t).locale(In(e)).weekday(0)},getWeek:function(e,t){return Ln(t).locale(In(e)).week()},getShortWeekDays:function(e){return(0,On.default)().locale(In(e)).localeData().weekdaysMin()},getShortMonths:function(e){return(0,On.default)().locale(In(e)).localeData().monthsShort()},format:function(e,t,n){return Ln(t).locale(In(e)).format(n)},parse:function(e,t,n){for(var r=In(e),i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:`0`,r=String(e);r.lengthe.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=pr(Q.useState([!1,!1]),2),i=r[0],a=r[1];return[Q.useMemo(function(){return i.map(function(r,i){if(r)return!0;var a=e[i];return a?!!(!n[i]&&!a||a&&t(a,{activeIndex:i})):!1})},[e,i,t,n]),function(e,t){a(function(n){return tr(n,t,e)})}]}function br(e){"@babel/helpers - typeof";return br=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},br(e)}function xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Sr(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&(o=t.addDate(o,-7)),o}function di(e,t){var n=t.generateConfig,r=t.locale,i=t.format;return e?typeof i==`function`?i(e):n.locale.format(r.locale,e,i):``}function fi(e,t,n){var r=t,i=[`getHour`,`getMinute`,`getSecond`,`getMillisecond`];return[`setHour`,`setMinute`,`setSecond`,`setMillisecond`].forEach(function(t,a){r=n?e[t](r,e[i[a]](n)):e[t](r,0)}),r}function pi(e,t,n,r,i){return R(function(a,o){return!!(n&&n(a,o)||r&&e.isAfter(r,a)&&!si(e,t,r,a,o.type)||i&&e.isAfter(a,i)&&!si(e,t,i,a,o.type))})}function mi(e){"@babel/helpers - typeof";return mi=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},mi(e)}function hi(e,t,n){return Q.useMemo(function(){var r=er(rr(e,t,n)),i=r[0],a=mi(i)===`object`&&i.type===`mask`?i.format:null;return[r.map(function(e){return typeof e==`string`||typeof e==`function`?e:e.format}),a]},[e,t,n])}function gi(e,t,n){return typeof e[0]==`function`||n?!0:t}function _i(e){"@babel/helpers - typeof";return _i=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_i(e)}function vi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yi(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;return Q.useMemo(function(){var n=e&&er(e);return t&&n&&(n[1]=n[1]||n[0]),n},[e,t])}function Li(e,t){var n=e.generateConfig,r=e.locale,i=e.picker,a=i===void 0?`date`:i,o=e.prefixCls,s=o===void 0?`rc-picker`:o,c=e.previewValue,l=c===void 0?`hover`:c,u=e.styles,d=u===void 0?{}:u,f=e.classNames,p=f===void 0?{}:f,m=e.order,h=m===void 0?!0:m,g=e.components,_=g===void 0?{}:g,v=e.inputRender,y=e.allowClear,b=e.clearIcon,x=e.needConfirm,S=e.multiple,C=e.format,w=e.inputReadOnly,T=e.disabledDate,E=e.minDate,D=e.maxDate,O=e.showTime,k=e.value,A=e.defaultValue,j=e.pickerValue,M=e.defaultPickerValue,N=Ii(k),P=Ii(A),F=Ii(j),I=Ii(M),L=a===`date`&&O?`datetime`:a,R=L===`time`||L===`datetime`,z=R||S,B=x??R,ee=Ai(qr(e),4),te=ee[0],V=ee[1],H=ee[2],ne=ee[3],re=Or(r,V),ie=Q.useMemo(function(){return Jr(L,H,ne,te,re)},[L,H,ne,te,re]),U=Q.useMemo(function(){return Ei(Ei({},e),{},{previewValue:l,prefixCls:s,locale:re,picker:a,styles:d,classNames:p,order:h,components:Ei({input:v},_),clearIcon:Xr(s,y,b),showTime:ie,value:N,defaultValue:P,pickerValue:F,defaultPickerValue:I},t?.())},[e]),W=Ai(hi(L,re,C),2),G=W[0],K=W[1],ae=gi(G,w,S),oe=pi(n,r,T,E,D),se=Ci(n,a,oe,ie);return[Q.useMemo(function(){return Ei(Ei({},U),{},{needConfirm:B,inputReadOnly:ae,disabledDate:oe})},[U,B,ae,oe]),L,z,G,K,se]}function Ri(e,t){return Ui(e)||Hi(e,t)||Bi(e,t)||zi()}function zi(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bi(e,t){if(e){if(typeof e==`string`)return Vi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vi(e,t)}}function Vi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=Gi(Wi(n.every(function(e){return e})?!1:e,t||!1,r),2),a=i[0],o=i[1];function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!t.inherit||a)&&o(e,t.force)}return[a,s]}function Qi(e){var t=Q.useRef();return Q.useImperativeHandle(e,function(){return{nativeElement:t.current?.nativeElement,focus:function(e){var n;(n=t.current)==null||n.focus(e)},blur:function(){var e;(e=t.current)==null||e.blur()}}}),t}function $i(e,t){return ia(e)||ra(e,t)||ta(e,t)||ea()}function ea(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ta(e,t){if(e){if(typeof e==`string`)return na(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return na(e,t)}}function na(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=Q.useRef(t);r.current=t,H(function(){if(e)r.current(e);else{var t=g(function(){r.current(e)},n);return function(){g.cancel(t)}}},[e])}function sa(e,t){return fa(e)||da(e,t)||la(e,t)||ca()}function ca(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function la(e,t){if(e){if(typeof e==`string`)return ua(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ua(e,t)}}function ua(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=sa(Q.useState(0),2),i=r[0],a=r[1],o=sa(Q.useState(!1),2),s=o[0],c=o[1],l=Q.useRef([]),u=Q.useRef(null),d=Q.useRef(null),f=function(e){u.current=e};return oa(s||n,function(){s||(l.current=[],f(null))}),Q.useEffect(function(){s&&l.current.push(i)},[s,i]),[s,function(e){c(e)},function(e){return e&&(d.current=e),d.current},i,a,function(n){var r=l.current,i=new Set(r.filter(function(e){return n[e]||t[e]})),a=+(r[r.length-1]===0);return i.size>=2||e[a]?null:a},l.current,f,function(e){return u.current===e}]}function ma(e){"@babel/helpers - typeof";return ma=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ma(e)}function ha(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ga(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n8&&arguments[8]!==void 0?arguments[8]:Pa,l=arguments.length>9&&arguments[9]!==void 0?arguments[9]:Pa,u=arguments.length>10&&arguments[10]!==void 0?arguments[10]:Pa,d=arguments.length>11?arguments[11]:void 0,f=arguments.length>12?arguments[12]:void 0,p=arguments.length>13?arguments[13]:void 0,m=o===`time`,h=a||0,g=function(t){var r=e.getNow();return m&&(r=fi(e,r)),c[t]||n[t]||r},_=Da(l,2),v=_[0],y=_[1],b=Da(K(function(){return g(0)},v),2),x=b[0],S=b[1],C=Da(K(function(){return g(1)},y),2),w=C[0],T=C[1],E=Q.useMemo(function(){var t=[x,w][h];return m?t:fi(e,t,u[h])},[m,x,w,h,e,u]),D=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`panel`,a=[S,T][h];a(n);var s=[x,w];s[h]=n,d&&(!si(e,t,x,s[0],o)||!si(e,t,w,s[1],o))&&d(s,{source:i,range:h===1?`end`:`start`,mode:r})},O=function(n,r){if(s){var i={date:`month`,week:`month`,month:`year`,quarter:`year`}[o];if(i&&!si(e,t,n,r,i)||o===`year`&&n&&Math.floor(e.getYear(n)/10)!==Math.floor(e.getYear(r)/10))return Na(e,o,r,-1)}return r},k=Q.useRef(null);return F(function(){if(i&&!c[h]){var t=m?null:e.getNow();if(k.current!==null&&k.current!==h?t=[x,w][h^1]:n[h]?t=h===0?n[0]:O(n[0],n[1]):n[h^1]&&(t=n[h^1]),t){f&&e.isAfter(f,t)&&(t=f);var r=s?Na(e,o,t,1):t;p&&e.isAfter(r,p)&&(t=s?Na(e,o,p,-1):p),D(t,`reset`)}}},[i,h,n[h]]),Q.useEffect(function(){i?k.current=h:k.current=null},[i,h]),F(function(){i&&c&&c[h]&&D(c[h],`reset`)},[i,h]),[E,D]}function Ia(e,t){return Va(e)||Ba(e,t)||Ra(e,t)||La()}function La(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ra(e,t){if(e){if(typeof e==`string`)return za(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return za(e,t)}}function za(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,o=[],s=n>=1?n|0:1,c=e;c<=t;c+=s){var l=i.includes(c);(!l||!r)&&o.push({label:$n(c,a),value:c,disabled:l})}return o}function Oo(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t||{},i=r.use12Hours,a=r.hourStep,o=a===void 0?1:a,s=r.minuteStep,c=s===void 0?1:s,l=r.secondStep,u=l===void 0?1:l,d=r.millisecondStep,f=d===void 0?100:d,p=r.hideDisabledOptions,m=r.disabledTime,h=r.disabledHours,g=r.disabledMinutes,_=r.disabledSeconds,v=Q.useMemo(function(){return n||e.getNow()},[n,e]),y=Q.useCallback(function(e){var t=m?.(e)||{};return[t.disabledHours||h||Eo,t.disabledMinutes||g||Eo,t.disabledSeconds||_||Eo,t.disabledMilliseconds||Eo]},[m,h,g,_]),b=bo(Q.useMemo(function(){return y(v)},[v,y]),4),x=b[0],S=b[1],C=b[2],w=b[3],T=Q.useCallback(function(e,t,n,r){var a=Do(0,23,o,p,e());return[i?a.map(function(e){return go(go({},e),{},{label:$n(e.value%12||12,2)})}):a,function(e){return Do(0,59,c,p,t(e))},function(e,t){return Do(0,59,u,p,n(e,t))},function(e,t,n){return Do(0,999,f,p,r(e,t,n),3)}]},[p,o,i,f,c,u]),E=bo(Q.useMemo(function(){return T(x,S,C,w)},[T,x,S,C,w]),4),D=E[0],O=E[1],k=E[2],A=E[3];return[function(t,n){var r=function(){return D},i=O,a=k,o=A;if(n){var s=bo(y(n),4),c=s[0],l=s[1],u=s[2],d=s[3],f=bo(T(c,l,u,d),4),p=f[0],m=f[1],h=f[2],g=f[3];r=function(){return p},i=m,a=h,o=g}return po(t,r,i,a,o,e)},D,O,k,A]}function ko(e,t){return Po(e)||No(e,t)||jo(e,t)||Ao()}function Ao(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jo(e,t){if(e){if(typeof e==`string`)return Mo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mo(e,t)}}function Mo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;fe(e),v?.(e),t&&pe(e)},he=function(e,t){G(e),t&&me(t),pe(t,e)},ge=function(e){if(le(e),me(e),W!==S){var t=[`decade`,`year`],n=[].concat(t,[`month`]),r={quarter:[].concat(t,[`quarter`]),week:[].concat(Cl(n),[`week`]),date:[].concat(Cl(n),[`date`])}[S]||n,i=r[r.indexOf(W)+1];i&&he(i,e)}},_e=Q.useMemo(function(){var e,t;if(Array.isArray(T)){var n=Dl(T,2);e=n[0],t=n[1]}else e=T;return!e&&!t?null:(e||=t,t||=e,a.isAfter(e,t)?[t,e]:[e,t])},[T,a]),X=fr(E,D,O),ve=A[ae]||Nl[ae]||bs,ye=Q.useMemo(function(){return{classNames:P?.popup??n??{},styles:F?.popup??r??{}}},[P,n,F,r]),be=Q.useContext(qo),xe=Q.useMemo(function(){return yl(yl({},be),{},{hideHeader:j})},[be,j]),Se=`${I}-panel`,Ce=nr(e,[`showWeek`,`prevIcon`,`nextIcon`,`superPrevIcon`,`superNextIcon`,`disabledDate`,`minDate`,`maxDate`,`onHover`]);return Q.createElement(Uo.Provider,{value:ye},Q.createElement(qo.Provider,{value:xe},Q.createElement(`div`,{ref:L,tabIndex:l,className:_(Se,bl({},`${Se}-rtl`,o===`rtl`))},Q.createElement(ve,_l({},Ce,{showTime:re,prefixCls:I,locale:H,generateConfig:a,onModeChange:he,pickerValue:de,onPickerValueChange:function(e){me(e,!0)},value:Y[0],onSelect:ge,values:Y,cellRender:X,hoverRangeValue:_e,hoverValue:w})))))}var Fl=Q.memo(Q.forwardRef(Pl));function Il(e){"@babel/helpers - typeof";return Il=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Il(e)}function Ll(){return Ll=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yu(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function bu(e){var t=e.icon,n=e.type,r=vu(e,hu),i=Q.useContext(Bn),a=i.prefixCls,o=i.classNames,s=i.styles;return t?Q.createElement(`span`,_u({className:_(`${a}-${n}`,o.suffix),style:s.suffix},r),t):null}function xu(e){var t=e.onClear,n=vu(e,gu);return Q.createElement(bu,_u({},n,{type:`clear`,role:`button`,onMouseDown:function(e){e.preventDefault()},onClick:function(e){e.stopPropagation(),t()}}))}function Su(e){"@babel/helpers - typeof";return Su=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Su(e)}function Cu(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function wu(e,t){for(var n=0;n=a&&e<=o)return r;var s=Math.min(Math.abs(e-a),Math.abs(e-o));se.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ku(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var qu=Q.forwardRef(function(e,t){var n=e.className,r=e.active,i=e.showActiveCls,a=i===void 0?!0:i,o=e.suffixIcon,s=e.format,c=e.validateFormat,l=e.onChange;e.onInput;var u=e.helped,d=e.onHelp,f=e.onSubmit,p=e.onKeyDown,m=e.preserveInvalidOnBlur,h=m===void 0?!1:m,v=e.invalid,y=e.clearIcon,b=Gu(e,Pu),x=e.value,S=e.onFocus,C=e.onBlur,w=e.onMouseUp,T=Q.useContext(Bn),E=T.prefixCls,D=T.input,O=D===void 0?`input`:D,k=T.classNames,A=T.styles,j=`${E}-input`,M=zu(Q.useState(!1),2),N=M[0],P=M[1],I=zu(Q.useState(x),2),L=I[0],z=I[1],B=zu(Q.useState(``),2),ee=B[0],te=B[1],V=zu(Q.useState(null),2),H=V[0],ne=V[1],re=zu(Q.useState(null),2),ie=re[0],U=re[1],W=L||``;Q.useEffect(function(){z(x)},[x]);var G=Q.useRef(null),K=Q.useRef(null),ae=Q.useRef(!1);Q.useImperativeHandle(t,function(){return{nativeElement:G.current,inputElement:K.current,focus:function(e){K.current.focus(e)},blur:function(){K.current.blur()}}});var oe=Q.useMemo(function(){return new ju(s||``)},[s]),se=zu(Q.useMemo(function(){return u?[0,0]:oe.getSelection(H)},[oe,H,u]),2),q=se[0],J=se[1],Y=function(e){e&&e!==s&&e!==x&&d()},ce=R(function(e){c(e)&&l(e),z(e),Y(e)}),le=function(e){if(!s){var t=e.target.value;Y(t),z(t),l(t)}},ue=function(e){if(ae.current){e.preventDefault();return}var t=e.clipboardData.getData(`text`);c(t)&&ce(t)},de=function(){ae.current=!0},fe=function(e){var t=e.target.selectionStart;ne(oe.getMaskCellIndex(t)),U({}),w?.(e),ae.current=!1},pe=function(e){P(!0),ne(0),te(``),S(e)},me=function(e){C(e)},he=function(e){P(!1),me(e)};oa(r,function(){!r&&!h&&z(x)});var ge=function(e){e.key===`Enter`&&c(W)&&f(),p?.(e)},_e=function(e){if(ae.current){e.preventDefault();return}ge(e);var t=e.key,n=null,r=null,i=J-q,a=s.slice(q,J),o=function(e){ne(function(t){var n=t+e;return n=Math.max(n,0),n=Math.min(n,oe.size()-1),n})},c=function(e){var t=zu(Mu(a),3),n=t[0],r=t[1],i=t[2],o=W.slice(q,J),s=Number(o);if(isNaN(s))return String(i||(e>0?n:r));var c=s+e,l=r-n+1;return String(n+(l+c-n)%l)};switch(t){case`Backspace`:case`Delete`:n=``,r=a;break;case`ArrowLeft`:n=``,o(-1);break;case`ArrowRight`:n=``,o(1);break;case`ArrowUp`:n=``,r=c(1);break;case`ArrowDown`:n=``,r=c(-1);break;default:isNaN(Number(t))||(n=ee+t,r=n);break}n!==null&&(te(n),n.length>=i&&(o(1),te(``))),r!==null&&ce((W.slice(0,q)+$n(r,i)+W.slice(J)).slice(0,s.length)),U({})},X=Q.useRef();F(function(){if(!(!N||!s||ae.current)){if(!oe.match(W)){ce(s);return}return K.current.setSelectionRange(q,J),X.current=g(function(){K.current.setSelectionRange(q,J)}),function(){g.cancel(X.current)}}},[oe,s,N,W,H,q,J,ie,ce]);var ve=s?{onFocus:pe,onBlur:he,onKeyDown:_e,onMouseDown:de,onMouseUp:fe,onPaste:ue}:{};return Q.createElement(`div`,{ref:G,className:_(j,Iu(Iu({},`${j}-active`,r&&a),`${j}-placeholder`,u),n)},Q.createElement(O,Fu({ref:K,"aria-invalid":v,autoComplete:`off`},b,{onKeyDown:ge,onBlur:me},ve,{value:W,onChange:le,className:k.input,style:A.input})),Q.createElement(bu,{type:`suffix`,icon:o}),y)}),Ju=`id.prefix.clearIcon.suffixIcon.separator.activeIndex.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.value.onChange.onSubmit.onInputChange.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onActiveInfo.placement.onMouseDown.required.aria-required.autoFocus.tabIndex`.split(`.`),Yu=[`index`];function Xu(){return Xu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ud(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function dd(e,t){var n=e.id,r=e.prefix,i=e.clearIcon,a=e.suffixIcon,o=e.separator,s=o===void 0?`~`:o,c=e.activeIndex;e.activeHelp,e.allHelp;var l=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var u=e.placeholder,d=e.className,f=e.style,p=e.onClick,m=e.onClear,h=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var g=e.disabled,v=e.invalid;e.inputReadOnly;var y=e.direction;e.onOpenChange;var b=e.onActiveInfo;e.placement;var x=e.onMouseDown;e.required,e[`aria-required`];var S=e.autoFocus,C=e.tabIndex,w=ld(e,Ju),T=y===`rtl`,E=Q.useContext(Bn),D=E.prefixCls,O=E.classNames,k=E.styles,A=Q.useMemo(function(){if(typeof n==`string`)return[n];var e=n||{};return[e.start,e.end]},[n]),j=Q.useRef(),N=Q.useRef(),P=Q.useRef(),F=function(e){return[N,P][e]?.current};Q.useImperativeHandle(t,function(){return{nativeElement:j.current,focus:function(e){if(cd(e)===`object`){var t,n=e||{},r=n.index,i=r===void 0?0:r,a=ld(n,Yu);(t=F(i))==null||t.focus(a)}else{var o;(o=F(e??0))==null||o.focus()}},blur:function(){var e,t;(e=F(0))==null||e.blur(),(t=F(1))==null||t.blur()}}});var I=mu(w),L=Q.useMemo(function(){return Array.isArray(u)?u:[u,u]},[u]),z=nd(fu(Qu(Qu({},e),{},{id:A,placeholder:L})),1)[0],B=nd(Q.useState({position:`absolute`,width:0}),2),ee=B[0],te=B[1],V=R(function(){var e=F(c);if(e){var t=e.nativeElement.getBoundingClientRect(),n=j.current.getBoundingClientRect(),r=t.left-n.left;te(function(e){return Qu(Qu({},e),{},{width:t.width,left:r})}),b([t.left,t.right,n.width])}});Q.useEffect(function(){V()},[c]);var H=i&&(h[0]&&!g[0]||h[1]&&!g[1]),ne=S&&!g[0],re=S&&!ne&&!g[1];return Q.createElement(M,{onResize:V},Q.createElement(`div`,Xu({},I,{className:_(D,`${D}-range`,$u($u($u($u({},`${D}-focused`,l),`${D}-disabled`,g.every(function(e){return e})),`${D}-invalid`,v.some(function(e){return e})),`${D}-rtl`,T),d),style:f,ref:j,onClick:p,onMouseDown:function(e){var t=e.target;t!==N.current.inputElement&&t!==P.current.inputElement&&e.preventDefault(),x?.(e)}}),r&&Q.createElement(`div`,{className:_(`${D}-prefix`,O.prefix),style:k.prefix},r),Q.createElement(qu,Xu({ref:N},z(0),{className:`${D}-input-start`,autoFocus:ne,tabIndex:C,"date-range":`start`})),Q.createElement(`div`,{className:`${D}-range-separator`},s),Q.createElement(qu,Xu({ref:P},z(1),{className:`${D}-input-end`,autoFocus:re,tabIndex:C,"date-range":`end`})),Q.createElement(`div`,{className:`${D}-active-bar`,style:ee}),Q.createElement(bu,{type:`suffix`,icon:a}),H&&Q.createElement(xu,{icon:i,onClear:m})))}var fd=Q.forwardRef(dd);function pd(e){"@babel/helpers - typeof";return pd=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},pd(e)}function md(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hd(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0&&J.current.focus({index:n})}pe(!0),q?.(e)},$e=function(){Ve(null),pe(!1,{force:!0})},et=jd(Q.useState(null),2),tt=et[0],nt=et[1],rt=jd(Q.useState(null),2),it=rt[0],at=rt[1],ot=Q.useMemo(function(){return it||ye},[ye,it]);Q.useEffect(function(){de||at(null)},[de]);var st=jd(Q.useState([0,0,0]),2),ct=st[0],lt=st[1],ut=function(e,t){m===`hover`&&(at(e),nt(t))},dt=aa(U,W),ft=function(e){ut(e,`preset`)},pt=function(e){Ve(e)&&(Ce(`preset-click`),pe(!1,{force:!0}))},mt=function(e){Ze(e)},ht=function(e){ut(e?Xe(e,Z):null,`cell`)},gt=function(e){pe(!0),ke(e)},_t=function(){Ce(`panel`)},vt=function(e){X(tr(ye,Z,e)),!v&&!o&&a===Ie&&Ze(e)},yt=function(){pe(!1)},bt=fr(ae,oe,se,Rd(Z)),xt=ye[Z]||null,St=R(function(e){return l(e,{activeIndex:Z})}),Ct=Q.useMemo(function(){var e=r(i,!1);return S(i,[].concat(Sd(Object.keys(e)),[`onChange`,`onCalendarChange`,`style`,`className`,`onPanelChange`,`disabledTime`,`classNames`,`styles`]))},[i]),wt=Q.createElement(au,xd({},Ct,{showNow:Re,showTime:je,range:!0,multiplePanel:Le,activeInfo:ct,disabledDate:He,onFocus:gt,onBlur:Ae,onPanelMouseDown:_t,picker:j,mode:Fe,internalMode:Ie,onPanelChange:Ye,format:c,value:xt,isInvalid:St,onChange:null,onSelect:vt,pickerValue:qe,defaultOpenValue:er(P?.defaultOpenValue)[Z],onPickerValueChange:Je,hoverValue:ot,onHover:ht,needConfirm:v,onSubmit:Ze,onOk:ve,presets:dt,onPresetHover:ft,onPresetSubmit:pt,onNow:mt,cellRender:bt,classNames:ce,styles:le})),Tt=function(e,t){X(Xe(e,t))},Et=function(){Ce(`input`)},Dt=function(e,t){var n=Ee.length,r=Ee[n-1];if(n&&r!==t&&v&&!x[r]&&!Oe(r)&&ye[r]){J.current.focus({index:r});return}Ce(`input`),pe(!0,{inherit:!0}),Z!==t&&de&&!v&&o&&Ze(null,!0),we(t),ke(e,t)},Ot=function(e,t){pe(!1),!v&&Ce()===`input`&&Be(Z,Te(ye)===null),Ae(e,t)},kt=function(e,t){e.key===`Tab`&&Ze(null,!0),y?.(e,t)},At=Q.useMemo(function(){return{prefixCls:u,locale:k,generateConfig:A,button:G.button,input:G.input,classNames:ce,styles:le}},[u,k,A,G.button,G.input,ce,le]);return F(function(){de&&Z!==void 0&&Ye(null,j,!1)},[de,Z,j]),F(function(){var e=Ce();!de&&e===`input`&&(pe(!1),Ze(null,!0)),!de&&o&&!v&&e===`panel`&&(pe(!0),Ze())},[de]),Q.createElement(Bn.Provider,{value:At},Q.createElement(Kn,xd({},ar(i),{popupElement:wt,popupStyle:le.popup.root,popupClassName:_(d,ce.popup.root),visible:de,onClose:yt,range:!0}),Q.createElement(fd,xd({},i,{ref:J,className:_(i.className,d,ce.root),style:Dd(Dd({},le.root),i.style),suffixIcon:ne,activeIndex:xe||de?Z:null,activeHelp:!!it,allHelp:!!it&&tt===`preset`,focused:xe,onFocus:Dt,onBlur:Ot,onKeyDown:kt,onSubmit:Ze,value:ot,maskFormat:c,onChange:Tt,onInputChange:Et,format:s,inputReadOnly:H,disabled:b,open:de,onOpenChange:pe,onClick:Qe,onClear:$e,invalid:We,onInvalid:Ge,onActiveInfo:lt}))))}var Bd=Q.forwardRef(zd);function Vd(e){var t=e.prefixCls,n=e.value,r=e.onRemove,i=e.removeIcon,a=i===void 0?`×`:i,o=e.formatDate,s=e.disabled,c=e.maxTagCount,l=e.tagRender,u=e.placeholder,d=`${t}-selector`,f=`${t}-selection`,p=`${f}-overflow`;function m(e,t){return Q.createElement(`span`,{className:_(`${f}-item`),title:typeof e==`string`?e:null},Q.createElement(`span`,{className:`${f}-item-content`},e),!s&&t&&Q.createElement(`span`,{onMouseDown:function(e){e.preventDefault()},onClick:t,className:`${f}-item-remove`},a))}function h(e){var t=o(e),n=!s,i=function(t){t&&t.stopPropagation(),s||r(e)};return l?l({label:t,value:e,disabled:!!s,closable:n,onClose:i}):m(t,i)}function g(e){return m(`+ ${e.length} ...`)}return Q.createElement(`div`,{className:d},Q.createElement(A,{prefixCls:p,data:n,renderItem:h,renderRest:g,itemKey:function(e){return o(e)},maxCount:c}),!n.length&&Q.createElement(`span`,{className:`${t}-selection-placeholder`},u))}function Hd(e){"@babel/helpers - typeof";return Hd=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Hd(e)}var Ud=`id.open.prefix.clearIcon.suffixIcon.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.internalPicker.value.onChange.onSubmit.onInputChange.multiple.maxTagCount.tagRender.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onMouseDown.required.aria-required.autoFocus.tabIndex.removeIcon`.split(`.`);function Wd(){return Wd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rf(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function af(e,t){e.id;var n=e.open,r=e.prefix,i=e.clearIcon,a=e.suffixIcon;e.activeHelp,e.allHelp;var o=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var s=e.locale,c=e.generateConfig,l=e.placeholder,u=e.className,d=e.style,f=e.onClick,p=e.onClear,m=e.internalPicker,h=e.value,g=e.onChange,v=e.onSubmit;e.onInputChange;var y=e.multiple,b=e.maxTagCount,x=e.tagRender;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var S=e.disabled,C=e.invalid;e.inputReadOnly;var w=e.direction;e.onOpenChange;var T=e.onMouseDown;e.required,e[`aria-required`];var E=e.autoFocus,D=e.tabIndex,O=e.removeIcon,k=nf(e,Ud),A=w===`rtl`,j=Q.useContext(Bn),M=j.prefixCls,N=j.classNames,P=j.styles,F=Q.useRef(),I=Q.useRef();Q.useImperativeHandle(t,function(){return{nativeElement:F.current,focus:function(e){var t;(t=I.current)==null||t.focus(e)},blur:function(){var e;(e=I.current)==null||e.blur()}}});var L=mu(k),R=function(e){g([e])},z=function(e){g(h.filter(function(t){return t&&!si(c,s,t,e,m)})),n||v()},B=Xd(fu(Kd(Kd({},e),{},{onChange:R}),function(e){return{value:e.valueTexts[0]||``,active:o}}),2),ee=B[0],te=B[1],V=!!(i&&h.length&&!S),H=y?Q.createElement(Q.Fragment,null,Q.createElement(Vd,{prefixCls:M,value:h,onRemove:z,formatDate:te,maxTagCount:b,tagRender:x,disabled:S,removeIcon:O,placeholder:l}),Q.createElement(`input`,{className:`${M}-multiple-input`,value:h.map(te).join(`,`),ref:I,readOnly:!0,autoFocus:E,tabIndex:D}),Q.createElement(bu,{type:`suffix`,icon:a}),V&&Q.createElement(xu,{icon:i,onClear:p})):Q.createElement(qu,Wd({ref:I},ee(),{autoFocus:E,tabIndex:D,suffixIcon:a,clearIcon:V&&Q.createElement(xu,{icon:i,onClear:p}),showActiveCls:!1}));return Q.createElement(`div`,Wd({},L,{className:_(M,qd(qd(qd(qd(qd({},`${M}-multiple`,y),`${M}-focused`,o),`${M}-disabled`,S),`${M}-invalid`,C),`${M}-rtl`,A),u),style:d,ref:F,onClick:f,onMouseDown:function(e){e.target!==I.current?.inputElement&&e.preventDefault(),T?.(e)}}),r&&Q.createElement(`div`,{className:_(`${M}-prefix`,N.prefix),style:P.prefix},r),H)}var of=Q.forwardRef(af);function sf(e){"@babel/helpers - typeof";return sf=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},sf(e)}function cf(){return cf=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n{let{classNames:o,styles:s}=k(e),[c,l]=j([o,t],[s,n],{props:a},{popup:{_default:`root`}});return Q.useMemo(()=>[{...c,popup:{...c.popup,root:_(c.popup?.root,r)}},{...l,popup:{...l.popup,root:{...l.popup?.root,...i}}}],[c,l,r,i])},Df=e=>{let{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=e,a=e.max(e.calc(n).sub(r).equal(),0);return{basePadding:a,containerPadding:e.max(e.calc(a).sub(i).equal(),0),itemHeight:D(t),itemLineHeight:D(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},Of=e=>{let{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:a,multipleItemColorDisabled:o,multipleItemBorderColorDisabled:s,colorIcon:c,colorIconHover:l,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:`relative`,display:`flex`,flex:`auto`,flexWrap:`wrap`,maxWidth:`100%`,"&-item":{flex:`none`,alignSelf:`center`,maxWidth:`calc(100% - 4px)`,display:`inline-flex`},[`${t}-selection-item`]:{display:`flex`,alignSelf:`center`,flex:`none`,boxSizing:`border-box`,maxWidth:`100%`,marginBlock:u,borderRadius:r,cursor:`default`,transition:[`font-size`,`line-height`,`height`].map(e=>`${e} ${i}`).join(`, `),marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:a,paddingInlineEnd:e.calc(a).div(2).equal(),[`${t}-disabled&`]:{color:o,borderColor:s,cursor:`not-allowed`},"&-content":{display:`inline-block`,marginInlineEnd:e.calc(a).div(2).equal(),overflow:`hidden`,whiteSpace:`pre`,textOverflow:`ellipsis`},"&-remove":{...N(),display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${n}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}}}}}},kf=(e,t)=>{let{componentCls:n,controlHeight:r}=e,i=t?`${n}-${t}`:``,a=Df(e);return[{[`${n}-multiple${i}`]:{paddingBlock:a.containerPadding,paddingInlineStart:a.basePadding,minHeight:r,[`${n}-selection-item`]:{height:a.itemHeight,lineHeight:D(a.itemLineHeight)}}}]},Af=e=>{let{componentCls:t,calc:n,lineWidth:r}=e,a=i(e,{fontHeight:e.fontSize,selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS,controlHeight:e.controlHeightSM}),o=i(e,{fontHeight:n(e.multipleItemHeightLG).sub(n(r).mul(2).equal()).equal(),fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius,controlHeight:e.controlHeightLG});return[kf(a,`small`),kf(e),kf(o,`large`),{[`${t}${t}-multiple`]:{width:`100%`,cursor:`text`,[`${t}-selector`]:{flex:`auto`,padding:0,position:`relative`,"&:after":{margin:0},[`${t}-selection-placeholder`]:{position:`absolute`,top:`50%`,insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:0,transform:`translateY(-50%)`,transition:`all ${e.motionDurationSlow}`,flex:1,color:e.colorTextPlaceholder,pointerEvents:`none`,...G}},...Of(e),[`${t}-multiple-input`]:{width:0,height:0,border:0,visibility:`hidden`,position:`absolute`,zIndex:-1}}}]},jf=e=>{let{pickerCellCls:t,pickerCellInnerCls:n,cellHeight:r,borderRadiusSM:i,motionDurationMid:a,cellHoverBg:o,lineWidth:s,lineType:c,colorPrimary:l,cellActiveWithRangeBg:u,colorTextLightSolid:d,colorTextDisabled:f,cellBgDisabled:p,colorFillSecondary:m}=e;return{"&::before":{position:`absolute`,top:`50%`,insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:r,transform:`translateY(-50%)`,content:`""`,pointerEvents:`none`},[n]:{position:`relative`,zIndex:2,display:`inline-block`,minWidth:r,height:r,lineHeight:D(r),borderRadius:i,transition:`background-color ${a}`},[`&:hover:not(${t}-in-view):not(${t}-disabled), - &:hover:not(${t}-selected):not(${t}-range-start):not(${t}-range-end):not(${t}-disabled)`]:{[n]:{background:o}},[`&-in-view${t}-today ${n}`]:{"&::before":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${D(s)} ${c} ${l}`,borderRadius:i,content:`""`}},[`&-in-view${t}-in-range, - &-in-view${t}-range-start, - &-in-view${t}-range-end`]:{position:`relative`,[`&:not(${t}-disabled):before`]:{background:u}},[`&-in-view${t}-selected, - &-in-view${t}-range-start, - &-in-view${t}-range-end`]:{[`&:not(${t}-disabled) ${n}`]:{color:d,background:l},[`&${t}-disabled ${n}`]:{background:m}},[`&-in-view${t}-range-start:not(${t}-disabled):before`]:{insetInlineStart:`50%`},[`&-in-view${t}-range-end:not(${t}-disabled):before`]:{insetInlineEnd:`50%`},[`&-in-view${t}-range-start:not(${t}-range-end) ${n}`]:{borderStartStartRadius:i,borderEndStartRadius:i,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${t}-range-end:not(${t}-range-start) ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i},"&-disabled":{color:f,cursor:`not-allowed`,[n]:{background:`transparent`},"&::before":{background:p}},[`&-disabled${t}-today ${n}::before`]:{borderColor:f}}},Mf=e=>{let{componentCls:t,pickerCellCls:n,pickerCellInnerCls:r,pickerYearMonthCellWidth:i,pickerControlIconSize:a,cellWidth:o,paddingSM:s,paddingXS:c,paddingXXS:l,colorBgContainer:u,lineWidth:d,lineType:f,borderRadiusLG:p,colorPrimary:m,colorTextHeading:h,colorSplit:g,pickerControlIconBorderWidth:_,colorIcon:v,textHeight:y,motionDurationMid:b,colorIconHover:x,fontWeightStrong:S,cellHeight:C,pickerCellPaddingVertical:w,colorTextDisabled:T,colorText:E,fontSize:O,motionDurationSlow:k,withoutTimeCellHeight:A,pickerQuarterPanelContentHeight:j,borderRadiusSM:M,colorTextLightSolid:N,cellHoverBg:P,timeColumnHeight:F,timeColumnWidth:I,timeCellHeight:L,controlItemBgActive:R,marginXXS:z,pickerDatePanelPaddingHorizontal:B,pickerControlIconMargin:ee}=e,te=e.calc(o).mul(7).add(e.calc(B).mul(2)).equal();return{[t]:{"&-panel":{display:`inline-flex`,flexDirection:`column`,textAlign:`center`,background:u,borderRadius:p,outline:`none`,"&-focused":{borderColor:m},"&-rtl":{[`${t}-prev-icon, - ${t}-super-prev-icon`]:{transform:`rotate(45deg)`},[`${t}-next-icon, - ${t}-super-next-icon`]:{transform:`rotate(-135deg)`},[`${t}-time-panel`]:{[`${t}-content`]:{direction:`ltr`,"> *":{direction:`rtl`}}}}},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel, &-week-panel, &-date-panel, &-time-panel":{display:`flex`,flexDirection:`column`,width:te},"&-header":{display:`flex`,padding:`0 ${D(c)}`,color:h,borderBottom:`${D(d)} ${f} ${g}`,"> *":{flex:`none`},button:{padding:0,color:v,lineHeight:D(y),background:`transparent`,border:0,cursor:`pointer`,transition:`color ${b}`,fontSize:`inherit`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,"&:empty":{display:`none`}},"> button":{minWidth:`1.6em`,fontSize:O,"&:hover":{color:x},"&:disabled":{opacity:.25,pointerEvents:`none`}},"&-view":{flex:`auto`,fontWeight:S,lineHeight:D(y),"> button":{color:`inherit`,fontWeight:`inherit`,verticalAlign:`top`,"&:not(:first-child)":{marginInlineStart:c},"&:hover":{color:m}}}},"&-prev-icon, &-next-icon, &-super-prev-icon, &-super-next-icon":{position:`relative`,width:a,height:a,"&::before":{position:`absolute`,top:0,insetInlineStart:0,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-super-prev-icon, &-super-next-icon":{"&::after":{position:`absolute`,top:ee,insetInlineStart:ee,display:`inline-block`,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-prev-icon, &-super-prev-icon":{transform:`rotate(-45deg)`},"&-next-icon, &-super-next-icon":{transform:`rotate(135deg)`},"&-content":{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`,"th, td":{position:`relative`,minWidth:C,fontWeight:`normal`},th:{height:e.calc(C).add(e.calc(w).mul(2)).equal(),color:E,verticalAlign:`middle`}},"&-cell":{padding:`${D(w)} 0`,color:T,cursor:`pointer`,"&-in-view":{color:E},...jf(e)},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel":{[`${t}-content`]:{height:e.calc(A).mul(4).equal()},[r]:{padding:`0 ${D(c)}`}},"&-quarter-panel":{[`${t}-content`]:{height:j}},"&-decade-panel":{[r]:{padding:`0 ${D(e.calc(c).div(2).equal())}`},[`${t}-cell::before`]:{display:`none`}},"&-year-panel, &-quarter-panel, &-month-panel":{[`${t}-body`]:{padding:`0 ${D(c)}`},[r]:{width:i}},"&-date-panel":{[`${t}-body`]:{padding:`${D(c)} ${D(B)}`},[`${t}-content th`]:{boxSizing:`border-box`,padding:0}},"&-week-panel-row":{td:{"&:before":{transition:`background-color ${b}`},"&:first-child:before":{borderStartStartRadius:M,borderEndStartRadius:M},"&:last-child:before":{borderStartEndRadius:M,borderEndEndRadius:M}},"&:hover td:before":{background:P},"&-range-start td, &-range-end td, &-selected td, &-hover td":{[`&${n}`]:{"&:before":{background:m},[`&${t}-cell-week`]:{color:new J(N).setA(.5).toHexString()},[r]:{color:N}}},"&-range-hover td:before":{background:R}},"&-week-panel, &-date-panel-show-week":{[`${t}-body`]:{padding:`${D(c)} ${D(s)}`},[`${t}-content th`]:{width:`auto`}},"&-datetime-panel":{display:`flex`,[`${t}-time-panel`]:{borderInlineStart:`${D(d)} ${f} ${g}`},[`${t}-date-panel, - ${t}-time-panel`]:{transition:`opacity ${k}`},"&-active":{[`${t}-date-panel, - ${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:`auto`,minWidth:`auto`,[`${t}-content`]:{display:`flex`,flex:`auto`,height:F},"&-column":{flex:`1 0 auto`,width:I,margin:`${D(l)} 0`,padding:0,overflowY:`auto`,textAlign:`start`,listStyle:`none`,transition:`background-color ${b}`,overflowX:`hidden`,"&::-webkit-scrollbar":{width:8,backgroundColor:`transparent`},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:e.borderRadiusSM},"&":{scrollbarWidth:`thin`,scrollbarColor:`${e.colorTextTertiary} transparent`},"&::after":{display:`block`,height:`calc(100% - ${D(L)})`,content:`""`},"&:not(:first-child)":{borderInlineStart:`${D(d)} ${f} ${g}`},"&-active":{background:new J(R).setA(.2).toHexString()},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:z,[`${t}-time-panel-cell-inner`]:{display:`block`,width:e.calc(I).sub(e.calc(z).mul(2)).equal(),height:L,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:e.calc(I).sub(L).div(2).equal(),color:E,lineHeight:D(L),borderRadius:M,cursor:`pointer`,transition:`background-color ${b}`,"&:hover":{background:P}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:R}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:T,background:`transparent`,cursor:`not-allowed`}}}}}}}}},Nf=e=>{let{componentCls:t,textHeight:n,lineWidth:r,paddingSM:i,antCls:a,colorPrimary:o,cellActiveWithRangeBg:s,colorPrimaryBorder:c,lineType:l,colorSplit:u}=e;return{[`${t}-dropdown`]:{[`${t}-footer`]:{borderTop:`${D(r)} ${l} ${u}`,"&-extra":{padding:`0 ${D(i)}`,lineHeight:D(e.calc(n).sub(e.calc(r).mul(2)).equal()),textAlign:`start`,"&:not(:last-child)":{borderBottom:`${D(r)} ${l} ${u}`}}},[`${t}-panels + ${t}-footer ${t}-ranges`]:{justifyContent:`space-between`},[`${t}-ranges`]:{marginBlock:0,paddingInline:D(i),overflow:`hidden`,textAlign:`start`,listStyle:`none`,display:`flex`,justifyContent:`center`,alignItems:`center`,"> li":{lineHeight:D(e.calc(n).sub(e.calc(r).mul(2)).equal()),display:`inline-block`},[`${t}-now-btn-disabled`]:{pointerEvents:`none`,color:e.colorTextDisabled},[`${t}-preset > ${a}-tag-blue`]:{color:o,background:s,borderColor:c,cursor:`pointer`},[`${t}-ok`]:{paddingBlock:e.calc(r).mul(2).equal(),marginInlineStart:`auto`}}}}},Pf=e=>{let{componentCls:t,controlHeightLG:n,paddingXXS:r,padding:i}=e;return{pickerCellCls:`${t}-cell`,pickerCellInnerCls:`${t}-cell-inner`,pickerYearMonthCellWidth:e.calc(n).mul(1.5).equal(),pickerQuarterPanelContentHeight:e.calc(n).mul(1.4).equal(),pickerCellPaddingVertical:e.calc(r).add(e.calc(r).div(2)).equal(),pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconMargin:4,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:e.calc(i).add(e.calc(r).div(2)).equal()}},Ff=e=>{let{colorBgContainerDisabled:t,controlHeight:n,controlHeightSM:r,controlHeightLG:i,paddingXXS:a,lineWidth:o}=e,s=a*2,c=o*2,l=Math.min(n-s,n-c),u=Math.min(r-s,r-c),d=Math.min(i-s,i-c);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(a/2),cellHoverBg:e.controlItemBgHover,cellActiveWithRangeBg:e.controlItemBgActive,cellHoverWithRangeBg:new J(e.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new J(e.colorPrimary).lighten(20).toHexString(),cellBgDisabled:t,timeColumnWidth:i*1.4,timeColumnHeight:224,timeCellHeight:28,cellWidth:r*1.5,cellHeight:r,textHeight:i,withoutTimeCellHeight:i*1.65,multipleItemBg:e.colorFillSecondary,multipleItemBorderColor:`transparent`,multipleItemHeight:l,multipleItemHeightSM:u,multipleItemHeightLG:d,multipleSelectorBgDisabled:t,multipleItemColorDisabled:e.colorTextDisabled,multipleItemBorderColorDisabled:`transparent`}},If=e=>({...de(e),...Ff(e),..._e(e),presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50}),Lf=e=>{let{componentCls:t}=e;return{[t]:[{...pe(e),...fe(e),...me(e),...ue(e)},{"&-outlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${D(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-filled":{[`&${t}-multiple ${t}-selection-item`]:{background:e.colorBgContainer,border:`${D(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}},"&-borderless":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${D(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-underlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${D(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}}}]}},Rf=(e,t)=>({padding:`${D(e)} ${D(t)}`}),zf=e=>{let{componentCls:t,colorError:n,colorWarning:r}=e,[i]=Y(e.antCls,`date-picker`);return{[`${t}:not(${t}-disabled):not([disabled])`]:{[`&${t}-status-error`]:{[i(`affix-color`)]:e.colorErrorAffix,[`${t}-active-bar`]:{background:n}},[`&${t}-status-warning`]:{[i(`affix-color`)]:e.colorWarningAffix,[`${t}-active-bar`]:{background:r}}}}},Bf=e=>{let{componentCls:r,antCls:i,paddingInline:a,lineWidth:o,lineType:s,colorBorder:l,borderRadius:u,motionDurationMid:d,colorTextDisabled:f,colorTextPlaceholder:p,colorTextQuaternary:m,fontSizeLG:h,inputFontSizeLG:g,fontSizeSM:_,inputFontSizeSM:v,controlHeightSM:y,paddingInlineSM:S,paddingXS:w,marginXS:E,colorIcon:O,lineWidthBold:k,colorPrimary:A,motionDurationSlow:j,zIndexPopup:M,paddingXXS:N,sizePopupArrow:P,colorBgElevated:F,borderRadiusLG:I,boxShadowSecondary:L,borderRadiusSM:R,colorSplit:z,cellHoverBg:B,presetsWidth:ee,presetsMaxWidth:te,boxShadowPopoverArrow:V,fontHeight:H,lineHeightLG:ne}=e,[re,ie]=Y(i,`date-picker`);return[{[r]:{[re(`affix-color`)]:`inherit`,...t(e),...Rf(e.paddingBlock,e.paddingInline),position:`relative`,display:`inline-flex`,alignItems:`center`,lineHeight:1,borderRadius:u,transition:[`border`,`box-shadow`,`background-color`].map(e=>`${e} ${d}`).join(`, `),[`${r}-prefix`]:{color:ie(`affix-color`),flex:`0 0 auto`,marginInlineEnd:e.inputAffixPadding},[`${r}-input`]:{position:`relative`,display:`inline-flex`,alignItems:`center`,width:`100%`,"> input":{position:`relative`,display:`inline-block`,width:`100%`,color:`inherit`,fontSize:e.inputFontSize??e.fontSize,lineHeight:e.lineHeight,transition:`all ${d}`,...he(p),flex:`auto`,minWidth:1,height:`auto`,padding:0,background:`transparent`,border:0,fontFamily:`inherit`,"&:focus":{boxShadow:`none`,outline:0},"&[disabled]":{background:`transparent`,color:f,cursor:`not-allowed`}},"&-placeholder":{"> input":{color:p}}},"&-large":{...Rf(e.paddingBlockLG,e.paddingInlineLG),borderRadius:e.borderRadiusLG,[`${r}-input > input`]:{fontSize:g??h,lineHeight:ne}},"&-small":{...Rf(e.paddingBlockSM,e.paddingInlineSM),borderRadius:e.borderRadiusSM,[`${r}-input > input`]:{fontSize:v??_}},[`${r}-suffix`]:{display:`flex`,flex:`none`,alignSelf:`center`,marginInlineStart:e.calc(w).div(2).equal(),color:m,lineHeight:1,pointerEvents:`none`,transition:[`opacity`,`color`].map(e=>`${e} ${d}`).join(`, `),"> *":{verticalAlign:`top`,"&:not(:last-child)":{marginInlineEnd:E}}},[`${r}-clear`]:{position:`absolute`,top:`50%`,insetInlineEnd:0,color:m,lineHeight:1,transform:`translateY(-50%)`,cursor:`pointer`,opacity:0,pointerEvents:`none`,transition:[`opacity`,`color`].map(e=>`${e} ${d}`).join(`, `),"> *":{verticalAlign:`top`},"&:hover":{color:O},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...T(e)}},"&:hover, &:focus-within":{[`${r}-clear`]:{opacity:1,pointerEvents:`auto`},[`${r}-suffix:not(:last-child)`]:{opacity:0}},[`${r}-separator`]:{position:`relative`,display:`inline-block`,width:`1em`,height:h,color:m,fontSize:h,verticalAlign:`top`,cursor:`default`,[`${r}-focused &`]:{color:O},[`${r}-range-separator &`]:{[`${r}-disabled &`]:{cursor:`not-allowed`}}},"&-range":{position:`relative`,display:`inline-flex`,[`${r}-active-bar`]:{bottom:e.calc(o).mul(-1).equal(),height:k,background:A,opacity:0,transition:`all ${j} ease-out`,pointerEvents:`none`},[`&${r}-focused`]:{[`${r}-active-bar`]:{opacity:1}},[`${r}-range-separator`]:{alignItems:`center`,padding:`0 ${D(w)}`,lineHeight:1}},"&-range, &-multiple":{[`${r}-clear`]:{insetInlineEnd:a},[`&${r}-small`]:{[`${r}-clear`]:{insetInlineEnd:S}}},"&-dropdown":{...t(e),...Mf(e),pointerEvents:`none`,position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:M,[`&${r}-dropdown-hidden`]:{display:`none`},"&-rtl":{direction:`rtl`},[`&${r}-dropdown-placement-bottomLeft, - &${r}-dropdown-placement-bottomRight`]:{[`${r}-range-arrow`]:{top:0,display:`block`,transform:`translateY(-100%)`}},[`&${r}-dropdown-placement-topLeft, - &${r}-dropdown-placement-topRight`]:{[`${r}-range-arrow`]:{bottom:0,display:`block`,transform:`translateY(100%) rotate(180deg)`}},[`&${i}-slide-up-appear, &${i}-slide-up-enter`]:{[`${r}-range-arrow${r}-range-arrow`]:{transition:`none`}},[`&${i}-slide-up-enter${i}-slide-up-enter-active${r}-dropdown-placement-topLeft, - &${i}-slide-up-enter${i}-slide-up-enter-active${r}-dropdown-placement-topRight, - &${i}-slide-up-appear${i}-slide-up-appear-active${r}-dropdown-placement-topLeft, - &${i}-slide-up-appear${i}-slide-up-appear-active${r}-dropdown-placement-topRight`]:{animationName:x},[`&${i}-slide-up-enter${i}-slide-up-enter-active${r}-dropdown-placement-bottomLeft, - &${i}-slide-up-enter${i}-slide-up-enter-active${r}-dropdown-placement-bottomRight, - &${i}-slide-up-appear${i}-slide-up-appear-active${r}-dropdown-placement-bottomLeft, - &${i}-slide-up-appear${i}-slide-up-appear-active${r}-dropdown-placement-bottomRight`]:{animationName:b},[`&${i}-slide-up-leave ${r}-panel-container`]:{pointerEvents:`none`},[`&${i}-slide-up-leave${i}-slide-up-leave-active${r}-dropdown-placement-topLeft, - &${i}-slide-up-leave${i}-slide-up-leave-active${r}-dropdown-placement-topRight`]:{animationName:c},[`&${i}-slide-up-leave${i}-slide-up-leave-active${r}-dropdown-placement-bottomLeft, - &${i}-slide-up-leave${i}-slide-up-leave-active${r}-dropdown-placement-bottomRight`]:{animationName:C},[`${r}-panel > ${r}-time-panel`]:{paddingTop:N},[`${r}-range-wrapper`]:{display:`flex`,position:`relative`},[`${r}-range-arrow`]:{position:`absolute`,zIndex:1,display:`none`,paddingInline:e.calc(a).mul(1.5).equal(),boxSizing:`content-box`,transition:`all ${j} ease-out`,...ge(e,F,V),"&:before":{insetInlineStart:e.calc(a).mul(1.5).equal()}},[`${r}-panel-container`]:{overflow:`hidden`,verticalAlign:`top`,background:F,borderRadius:I,boxShadow:L,transition:`margin ${j}`,display:`inline-block`,pointerEvents:`auto`,[`${r}-panel-layout`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`stretch`},[`${r}-presets`]:{display:`flex`,flexDirection:`column`,minWidth:ee,maxWidth:te,ul:{height:0,flex:`auto`,listStyle:`none`,overflow:`auto`,margin:0,padding:w,borderInlineEnd:`${D(o)} ${s} ${z}`,li:{...G,borderRadius:R,paddingInline:w,paddingBlock:e.calc(y).sub(H).div(2).equal(),cursor:`pointer`,transition:`all ${j}`,"+ li":{marginTop:E},"&:hover":{background:B}}}},[`${r}-panels`]:{display:`inline-flex`,flexWrap:`nowrap`,"&:last-child":{[`${r}-panel`]:{borderWidth:0}}},[`${r}-panel`]:{verticalAlign:`top`,background:`transparent`,borderRadius:0,borderWidth:0,[`${r}-content, table`]:{textAlign:`center`},"&-focused":{borderColor:l}}}},"&-dropdown-range":{padding:`${D(e.calc(P).mul(2).div(3).equal())} 0`,"&-hidden":{display:`none`}},"&-rtl":{direction:`rtl`,[`${r}-separator`]:{transform:`scale(-1, 1)`},[`${r}-footer`]:{"&-extra":{direction:`rtl`}}}}},n(e,`slide-up`),n(e,`slide-down`),Me(e,`move-up`),Me(e,`move-down`)]},Vf=v(`DatePicker`,e=>{let t=i(le(e),Pf(e),{inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[Nf(t),Bf(t),Lf(t),zf(t),Af(t),a(e,{focusElCls:`${e.componentCls}-focused`})]},If),Hf=(e,t,n)=>V(n)?n:t===`year`&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder,Uf=(e,t,n)=>V(n)?n:t===`year`&&e.lang.rangeYearPlaceholder?e.lang.rangeYearPlaceholder:t===`quarter`&&e.lang.rangeQuarterPlaceholder?e.lang.rangeQuarterPlaceholder:t===`month`&&e.lang.rangeMonthPlaceholder?e.lang.rangeMonthPlaceholder:t===`week`&&e.lang.rangeWeekPlaceholder?e.lang.rangeWeekPlaceholder:t===`time`&&e.timePickerLocale.rangePlaceholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder,Wf=(e,t)=>{let{allowClear:n=!0}=e,{clearIcon:r,removeIcon:i}=We({...e,prefixCls:t,componentName:`DatePicker`});return[Q.useMemo(()=>n===!1?!1:{clearIcon:r,...n===!0?{}:n},[n,r]),i]},[Gf,Kf]=[`week`,`WeekPicker`],[qf,Jf]=[`month`,`MonthPicker`],[Yf,Xf]=[`year`,`YearPicker`],[Zf,Qf]=[`quarter`,`QuarterPicker`],[$f,ep]=[`time`,`TimePicker`],tp=e=>Q.createElement(Ae,{size:`small`,type:`primary`,...e});function np(e){return(0,Q.useMemo)(()=>({button:tp,...e}),[e])}var rp=({picker:e,hasFeedback:t,feedbackIcon:n,suffixIcon:r})=>r===null||r===!1?null:r===!0||r===void 0?Q.createElement(Q.Fragment,null,e===$f?Q.createElement(Be,{"aria-hidden":`true`}):Q.createElement(Le,{"aria-hidden":`true`}),t&&n):r,ip=e=>(0,Q.forwardRef)((t,n)=>{let{prefixCls:r,getPopupContainer:i,components:a,className:o,style:s,classNames:c,styles:u,placement:d,size:p,disabled:m,bordered:h=!0,placeholder:g,status:v,variant:y,picker:b,dropdownClassName:x,popupClassName:S,popupStyle:C,rootClassName:w,suffixIcon:T,separator:D,allowClear:O,clearIcon:A,...j}=t,M=b===$f?`timePicker`:`datePicker`,{suffixIcon:N,clearIcon:F,allowClear:L}=k(M),[R,B]=Ef(M,c,u,S||x,C),te=Q.useRef(null),{getPrefixCls:V,direction:H,getPopupContainer:U,rangePicker:W}=(0,Q.useContext)(ie),G=V(`picker`,r),{compactSize:K,compactItemClassnames:ae}=l(G,H),oe=V(),se=D??W?.separator,[q,J]=re(`rangePicker`,y,h),Y=P(G),[ce,le]=Vf(G,Y),ue=_(ce,le,Y,w),de=Se({componentName:`RangePicker`,allowClear:O,clearIcon:A,contextAllowClear:L,contextClearIcon:F,defaultAllowClear:!0}),fe=np(a),pe=E(e=>p??K??e),me=Q.useContext(z),he=m??me,{hasFeedback:ge,status:_e,feedbackIcon:ye}=(0,Q.useContext)(ee),Ce=rp({picker:b,hasFeedback:ge,feedbackIcon:ye,suffixIcon:T===void 0?N:T});(0,Q.useImperativeHandle)(n,()=>te.current);let[Z]=ne(`Calendar`,I),we=f(Z,t.locale||{}),[Te]=xe(`DatePicker`,B?.popup?.root?.zIndex);return Q.createElement(X,{space:!0},Q.createElement(Bd,{separator:Q.createElement(`span`,{"aria-label":`to`,className:`${G}-separator`},se??Q.createElement(ze,null)),disabled:he,ref:te,placement:d,placeholder:Uf(we,b,g),suffixIcon:Ce,prevIcon:Q.createElement(`span`,{className:`${G}-prev-icon`}),nextIcon:Q.createElement(`span`,{className:`${G}-next-icon`}),superPrevIcon:Q.createElement(`span`,{className:`${G}-super-prev-icon`}),superNextIcon:Q.createElement(`span`,{className:`${G}-super-next-icon`}),transitionName:`${oe}-slide-up`,picker:b,...j,locale:we.lang,getPopupContainer:i||U,generateConfig:e,components:fe,direction:H,prefixCls:G,rootClassName:ue,className:_({[`${G}-large`]:pe===`large`,[`${G}-small`]:pe===`small`,[`${G}-${q}`]:J},ve(G,be(_e,v),ge),ae,o,W?.className),style:{...W?.style,...s},classNames:R,styles:{...B,popup:{...B.popup,root:{...B.popup.root,zIndex:Te}}},allowClear:de}))}),ap=e=>{let t=(t,n=`DatePicker`)=>{let r=n===ep?`timePicker`:`datePicker`;return(0,Q.forwardRef)((i,a)=>{let{prefixCls:o,getPopupContainer:s,components:c,style:u,className:d,size:p,bordered:m,placement:h,placeholder:g,disabled:v,status:y,variant:b,onCalendarChange:x,classNames:S,styles:C,dropdownClassName:w,popupClassName:T,popupStyle:D,rootClassName:O,suffixIcon:A,allowClear:j,clearIcon:M,...N}=i,{suffixIcon:F,clearIcon:L,allowClear:R}=k(n===ep?`timePicker`:`datePicker`),{getPrefixCls:B,direction:te,getPopupContainer:V,[r]:H}=(0,Q.useContext)(ie),U=B(`picker`,o),{compactSize:W,compactItemClassnames:G}=l(U,te),K=E(e=>p??W??e),ae=Q.useContext(z),oe=v??ae,se={...i,size:K,disabled:oe,status:y,variant:b},[q,J]=Ef(r,S,C,T||w,D,se),Y=Q.useRef(null),[ce,le]=re(`datePicker`,b,m),ue=P(U),[de,fe]=Vf(U,ue),pe=_(de,fe,ue,O);(0,Q.useImperativeHandle)(a,()=>Y.current);let me={showToday:!0},he=t||i.picker,ge=B(),{onSelect:_e,multiple:ye}=N,Ce=_e&&t===`time`&&!ye,Z=(e,t,n)=>{x?.(e,t,n),Ce&&_e(e)},[,we]=Wf(i,U),Te=Se({componentName:n,allowClear:j,clearIcon:M,contextAllowClear:R,contextClearIcon:L,defaultAllowClear:!0}),Ee=np(c),{hasFeedback:De,status:Oe,feedbackIcon:ke}=(0,Q.useContext)(ee),Ae=rp({picker:he,hasFeedback:De,feedbackIcon:ke,suffixIcon:A===void 0?F:A}),[je]=ne(`DatePicker`,I),Me=f(je,i.locale||{}),[Ne]=xe(`DatePicker`,J?.popup?.root?.zIndex);return Q.createElement(X,{space:!0},Q.createElement(Tf,{ref:Y,placeholder:Hf(Me,he,g),suffixIcon:Ae,placement:h,prevIcon:Q.createElement(`span`,{className:`${U}-prev-icon`}),nextIcon:Q.createElement(`span`,{className:`${U}-next-icon`}),superPrevIcon:Q.createElement(`span`,{className:`${U}-super-prev-icon`}),superNextIcon:Q.createElement(`span`,{className:`${U}-super-next-icon`}),transitionName:`${ge}-slide-up`,picker:t,onCalendarChange:Z,...me,...N,locale:Me.lang,getPopupContainer:s||V,generateConfig:e,components:Ee,direction:te,disabled:oe,prefixCls:U,rootClassName:pe,className:_({[`${U}-large`]:K===`large`,[`${U}-small`]:K===`small`,[`${U}-${ce}`]:le},ve(U,be(Oe,y),De),G,H?.className,d),style:{...H?.style,...u},classNames:q,styles:{...J,popup:{...J.popup,root:{...J.popup.root,zIndex:Ne}}},allowClear:Te,removeIcon:we}))})},n=t(),r=t(Gf,Kf),i=t(qf,Jf),a=t(Yf,Xf),o=t(Zf,Qf);return{DatePicker:n,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:t($f,ep),QuarterPicker:o}},op=e=>{let{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:o}=ap(e),s=ip(e),c=t;return c.WeekPicker=n,c.MonthPicker=r,c.YearPicker=i,c.RangePicker=s,c.TimePicker=a,c.QuarterPicker=o,c},sp=op(Rn);sp._InternalPanelDoNotUseOrYouWillBeFired=Fe(sp,`popupAlign`,void 0,`picker`),sp._InternalRangePanelDoNotUseOrYouWillBeFired=Fe(sp.RangePicker,`popupAlign`,void 0,`picker`),sp.generatePicker=op;function cp(e,t){let{disabled:n,prefixCls:r,character:i,characterRender:a,index:o,count:s,value:c,allowHalf:l,focused:d,onHover:f,onClick:p}=e,m=e=>{f(e,o)},h=e=>{p(e,o)},g=e=>{e.keyCode===u.ENTER&&p(e,o)},v=o+1,y=new Set([r]);c===0&&o===0&&d?y.add(`${r}-focused`):l&&c+.5>=v&&co?`true`:`false`,"aria-posinset":o+1,"aria-setsize":s,tabIndex:n?-1:0},Q.createElement(`div`,{className:`${r}-first`},b),Q.createElement(`div`,{className:`${r}-second`},b)));return a&&(x=a(x,e)),x}var lp=Q.forwardRef(cp);function up(){let e=Q.useRef({});function t(t){return e.current[t]}function n(t){return n=>{e.current[t]=n}}return[t,n]}function dp(e){let t=e.pageXOffset,n=`scrollLeft`;if(typeof t!=`number`){let r=e.document;t=r.documentElement[n],typeof t!=`number`&&(t=r.body[n])}return t}function fp(e){let t,n,r=e.ownerDocument,{body:i}=r,a=r&&r.documentElement,o=e.getBoundingClientRect();return t=o.left,n=o.top,t-=a.clientLeft||i.clientLeft||0,n-=a.clientTop||i.clientTop||0,{left:t,top:n}}function pp(e){let t=fp(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=dp(r),t.left}function mp(){return mp=Object.assign?Object.assign.bind():function(e){for(var t=1;t{m||O.current?.focus()};Q.useImperativeHandle(t,()=>({focus:k,blur:()=>{m||O.current?.blur()}}));let[A,j]=K(a||0,o),[M,N]=K(null),P=(e,t)=>{let n=h===`rtl`,r=e+1;if(c){let i=E(e),a=pp(i),o=i.clientWidth;(n&&t-a>o/2||!n&&t-a{j(e),b?.(e)},[I,L]=Q.useState(!1),R=()=>{L(!0),x?.()},z=()=>{L(!1),S?.()},[B,ee]=Q.useState(null),te=(e,t)=>{let n=P(t,e.pageX);n!==M&&(ee(n),N(null)),y?.(n)},V=e=>{m||(ee(null),N(null),y?.(void 0)),e&&w?.(e)},H=(e,t)=>{let n=P(t,e.pageX),r=!1;l&&(r=n===A),V(),F(r?0:n),N(r?n:null)},ne=e=>{let{keyCode:t}=e,n=h===`rtl`,r=c?.5:1;d&&(t===u.RIGHT&&A0&&!n||t===u.RIGHT&&A>0&&n?(F(A-r),e.preventDefault()):t===u.LEFT&&A{v&&!m&&k()},[]);let re=Array(s).fill(0).map((e,t)=>Q.createElement(lp,{ref:D(t),index:t,count:s,disabled:m,prefixCls:`${n}-star`,allowHalf:c,value:B===null?A:B,onClick:H,onHover:te,key:e||t,character:f,characterRender:p,focused:I})),ie=_(n,i,{[`${n}-disabled`]:m,[`${n}-rtl`]:h===`rtl`});return Q.createElement(`ul`,mp({className:ie,onMouseLeave:V,tabIndex:m?-1:g,onFocus:m?null:R,onBlur:m?null:z,onKeyDown:m?null:ne,ref:O},r(T,{aria:!0,data:!0,attr:!0})),re)}var gp=Q.forwardRef(hp),_p=e=>{let{componentCls:t}=e;return{[`${t}-star`]:{position:`relative`,display:`inline-block`,color:`inherit`,cursor:`pointer`,"&:not(:last-child)":{marginInlineEnd:e.marginXS},"> div":{transition:`all ${e.motionDurationMid}, outline 0s`,"&:hover":{transform:e.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${D(e.lineWidth)} dashed ${e.starColor}`,transform:e.starHoverScale}},"&-first, &-second":{color:e.starBg,transition:`all ${e.motionDurationMid}`,userSelect:`none`},"&-first":{position:`absolute`,top:0,insetInlineStart:0,width:`50%`,height:`100%`,overflow:`hidden`,opacity:0},[`&-half ${t}-star-first, &-half ${t}-star-second`]:{opacity:1},[`&-half ${t}-star-first, &-full ${t}-star-second`]:{color:`inherit`}}}},vp=e=>({[`&-rtl${e.componentCls}`]:{direction:`rtl`}}),yp=e=>{let{componentCls:n}=e;return{[n]:{...t(e),display:`inline-block`,margin:0,padding:0,color:e.starColor,fontSize:e.starSize,lineHeight:1,listStyle:`none`,outline:`none`,"&-small":{fontSize:e.starSizeSM},"&-large":{fontSize:e.starSizeLG},[`&-disabled${n} ${n}-star`]:{cursor:`default`,"> div:hover":{transform:`scale(1)`}},..._p(e),...vp(e)}}},bp=v(`Rate`,e=>yp(i(e,{})),e=>({starColor:e.yellow6,starSize:e.controlHeight*.625,starSizeSM:e.controlHeightSM*.625,starSizeLG:e.controlHeightLG*.625,starHoverScale:`scale(1.1)`,starBg:e.colorFillContent})),xp=Q.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,tooltips:o,character:s=Q.createElement(Re,null),disabled:c,size:l,...u}=e,d=(e,{index:t})=>{if(!o)return e;let n=o[t];return L(n)?Q.createElement(ye,{...n},e):Q.createElement(ye,{title:n},e)},{getPrefixCls:f,direction:p,className:m,style:h}=k(`rate`),g=f(`rate`,n),[v,y]=bp(g),b={...h,...a},x=Q.useContext(z),S=c??x,C=E(e=>l??e);return Q.createElement(gp,{ref:t,character:s,characterRender:d,disabled:S,...u,className:_({[`${g}-large`]:C===`large`,[`${g}-small`]:C===`small`},r,i,v,y,m),style:b,prefixCls:g,direction:p})}),{TimePicker:Sp,RangePicker:Cp}=sp,wp=Q.forwardRef((e,t)=>Q.createElement(Cp,{...e,picker:`time`,mode:void 0,ref:t})),Tp=Q.forwardRef((e,t)=>{let{addon:n,renderExtraFooter:r,variant:i,bordered:a,classNames:o,styles:s,popupClassName:c,popupStyle:l,...u}=e,[d]=re(`timePicker`,i,a),f=Q.useMemo(()=>{if(r)return r;if(n)return n},[n,r]),[p,m]=Ef(`timePicker`,o,s,c,l,{...e,variant:d});return Q.createElement(Sp,{...u,mode:void 0,ref:t,renderExtraFooter:f,variant:d,classNames:p,styles:m})}),Ep=Fe(Tp,`popupAlign`,void 0,`picker`);Tp._InternalPanelDoNotUseOrYouWillBeFired=Ep,Tp.RangePicker=wp,Tp._InternalPanelDoNotUseOrYouWillBeFired=Ep;var Dp=(e=>{let t=Q.useRef({valueLabels:new Map});return Q.useMemo(()=>{let{valueLabels:n}=t.current,r=new Map,i=e.map(e=>{let{value:t,label:i}=e,a=i??n.get(t);return r.set(t,a),{...e,label:a}});return t.current.valueLabels=r,[i]},[e])}),Op=(e,t,n,r)=>Q.useMemo(()=>{let i=e=>e.map(({value:e})=>e),a=i(e),o=i(t),s=a.filter(e=>!r[e]),c=a,l=o;if(n){let e=Oe(a,!0,r);c=e.checkedKeys,l=e.halfCheckedKeys}return[Array.from(new Set([...s,...c])),l]},[e,t,n,r]),kp=e=>Array.isArray(e)?e:e===void 0?[]:[e],Ap=e=>{let{label:t,value:n,children:r}=e||{};return{_title:t?[t]:[`title`,`label`],value:n||`value`,key:n||`value`,children:r||`children`}},jp=e=>!e||e.disabled||e.disableCheckbox||e.checkable===!1,Mp=(e,t)=>{let n=[],r=e=>{e.forEach(e=>{let i=e[t.children];i&&(n.push(e[t.value]),r(i))})};return r(e),n},Np=e=>e==null,Pp=((e,t)=>Q.useMemo(()=>Z(e,{fieldNames:t,initWrapper:e=>({...e,valueEntities:new Map}),processEntity:(e,n)=>{let r=e.node[t.value];n.valueEntities.set(r,e)}}),[e,t])),Fp=()=>null;function Ip(e){return d(e).map(e=>{if(!Q.isValidElement(e)||!e.type)return null;let{key:t,props:{children:n,value:r,...i}}=e,a={key:t,value:r,...i},o=Ip(n);return o.length&&(a.children=o),a}).filter(e=>e)}function Lp(e){if(!e)return e;let t={...e};return`props`in t||Object.defineProperty(t,"props",{get(){return s(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),t}}),t}function Rp(e,t,n,r,i,a){let o=null,c=null;function l(){function e(r,i=`0`,s=!1){return r.map((r,l)=>{let u=`${i}-${l}`,d=r[a.value],f=n.includes(d),p=e(r[a.children]||[],u,f),m=Q.createElement(Fp,r,p.map(e=>e.node));if(t===d&&(o=m),f){let e={pos:u,node:m,children:p};return s||c.push(e),e}return null}).filter(e=>e)}c||(c=[],e(r),c.sort(({node:{props:{value:e}}},{node:{props:{value:t}}})=>n.indexOf(e)-n.indexOf(t)))}Object.defineProperty(e,"triggerNode",{get(){return s(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),l(),o}}),Object.defineProperty(e,"allCheckedNodes",{get(){return s(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),l(),i?c:c.map(({node:e})=>e)}})}var zp=(e,t,n)=>{let{fieldNames:r,treeNodeFilterProp:i,filterTreeNode:a}=n,{children:o}=r;return Q.useMemo(()=>{if(!t||a===!1)return e;let n=typeof a==`function`?a:(e,n)=>String(n[i]).toUpperCase().includes(t.toUpperCase()),r=(e,i=!1)=>e.reduce((e,a)=>{let s=a[o],c=i||n(t,Lp(a)),l=r(s||[],c);return(c||l.length)&&e.push({...a,isLeaf:void 0,[o]:l}),e},[]);return r(e)},[e,t,o,i,a])};function Bp(e){let t=Q.useRef();return t.current=e,Q.useCallback((...e)=>t.current(...e),[])}function Vp(e,t){let{id:n,pId:r,rootPId:i}=t,a=new Map,o=[];return e.forEach(e=>{let t=e[n],r={...e,key:e.key||t};a.set(t,r)}),a.forEach(e=>{let t=e[r],n=a.get(t);n?(n.children=n.children||[],n.children.push(e)):(t===i||i===null)&&o.push(e)}),o}function Hp(e,t,n){return Q.useMemo(()=>e?n?Vp(e,{id:`id`,pId:`pId`,rootPId:null,...typeof n==`object`?n:{}}):e:Ip(t),[t,n,e])}var Up=Q.createContext(null),Wp=Q.createContext(null);function Gp(){return Gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,multiple:r,searchValue:i,toggleOpen:a,open:o,notFoundContent:s}=lt(),{virtual:c,listHeight:l,listItemHeight:d,listItemScrollOffset:f,treeData:p,fieldNames:m,onSelect:h,popupMatchSelectWidth:g,treeExpandAction:_,treeTitleRender:v,onPopupScroll:y,leftMaxCount:b,leafCountOnly:x,valueEntities:S,classNames:C,styles:w}=Q.useContext(Wp),{checkable:T,checkedKeys:E,halfCheckedKeys:D,treeExpandedKeys:O,treeDefaultExpandAll:k,treeDefaultExpandedKeys:A,onTreeExpand:j,treeIcon:M,showTreeIcon:N,switcherIcon:P,treeLine:F,treeNodeFilterProp:I,loadData:L,treeLoadedKeys:z,treeMotion:B,onTreeLoad:ee,keyEntities:te}=Q.useContext(Up),V=Q.useRef(),H=U(()=>p,[o,p],(e,t)=>t[0]&&e[1]!==t[1]),ne=Q.useMemo(()=>T?{checked:E,halfChecked:D}:null,[T,E,D]);Q.useEffect(()=>{o&&!r&&E.length&&V.current?.scrollTo({key:E[0]})},[o]);let re=e=>{e.preventDefault()},ie=(e,t)=>{let{node:n}=t;T&&jp(n)||(h(n.key,{selected:!E.includes(n.key)}),r||a(!1))},[W,G]=Q.useState(A),[K,ae]=Q.useState(null),oe=Q.useMemo(()=>O?[...O]:i?K:W,[W,K,O,i]),se=e=>{G(e),ae(e),j&&j(e)},q=String(i).toLowerCase(),J=e=>q?String(e[I]).toLowerCase().includes(q):!1;Q.useEffect(()=>{i&&ae(Mp(p,m))},[i]);let[Y,ce]=Q.useState(()=>new Map);Q.useEffect(()=>{b&&ce(new Map)},[b]);function le(e){let t=e[m.value];if(!Y.has(t)){let e=S.get(t);if((e.children||[]).length!==0){let n=e.children.filter(e=>!e.node.disabled&&!e.node.disableCheckbox&&!E.includes(e.node[m.value])).length;Y.set(t,n>b)}else Y.set(t,!1)}return Y.get(t)}let ue=R(e=>{let t=e[m.value];return E.includes(t)||b===null?!1:b<=0?!0:x&&b?le(e):!1}),de=e=>{for(let t of e)if(!(t.disabled||t.selectable===!1)){if(i){if(J(t))return t}else return t;if(t[m.children]){let e=de(t[m.children]);if(e)return e}}return null},[fe,pe]=Q.useState(null),me=te[fe];Q.useEffect(()=>{if(!o)return;let e=null;e=!r&&E.length&&!i?E[0]:(()=>{let e=de(H);return e?e[m.value]:null})(),pe(e)},[o,i]),Q.useImperativeHandle(t,()=>({scrollTo:V.current?.scrollTo,onKeyDown:e=>{let{which:t}=e;switch(t){case u.UP:case u.DOWN:case u.LEFT:case u.RIGHT:V.current?.onKeyDown(e);break;case u.ENTER:if(me){let e=ue(me.node),{selectable:t,value:n,disabled:r}=me?.node||{};t!==!1&&!r&&!e&&ie(null,{node:{key:fe},selected:!E.includes(n)})}break;case u.ESC:a(!1)}},onKeyUp:()=>{}}));let he=U(()=>!i,[i,O||W],([e],[t,n])=>e!==t&&!!(t||n))?L:null;if(H.length===0)return Q.createElement(`div`,{role:`listbox`,className:`${n}-empty`,onMouseDown:re},s);let ge={fieldNames:m};return z&&(ge.loadedKeys=z),oe&&(ge.expandedKeys=oe),Q.createElement(`div`,{onMouseDown:re},me&&o&&Q.createElement(`span`,{style:Kp,"aria-live":`assertive`},me.node.value),Q.createElement(Te.Provider,{value:{nodeDisabled:ue}},Q.createElement(Ee,Gp({classNames:C?.popup,styles:w?.popup,ref:V,focusable:!1,prefixCls:`${n}-tree`,treeData:H,height:l,itemHeight:d,itemScrollOffset:f,virtual:c!==!1&&g!==!1,multiple:r,icon:M,showIcon:N,switcherIcon:P,showLine:F,loadData:he,motion:B,activeKey:fe,checkable:T,checkStrictly:!0,checkedKeys:ne,selectedKeys:T?[]:E,defaultExpandAll:k,titleRender:v},ge,{onActiveChange:pe,onSelect:ie,onCheck:ie,onExpand:se,onLoad:ee,filterTreeNode:J,expandAction:_,onScroll:y}))))}),Jp=`SHOW_ALL`,Yp=`SHOW_PARENT`,Xp=`SHOW_CHILD`;function Zp(e,t,n,r){let i=new Set(e);return t===`SHOW_CHILD`?e.filter(e=>{let t=n[e];return!t||!t.children||!t.children.some(({node:e})=>i.has(e[r.value]))||!t.children.every(({node:e})=>jp(e)||i.has(e[r.value]))}):t===`SHOW_PARENT`?e.filter(e=>{let t=n[e],r=t?t.parent:null;return!r||jp(r.node)||!i.has(r.key)}):e}function Qp(e,t){let{searchValue:n,inputValue:r,onSearch:i,autoClearSearchValue:a,filterTreeNode:o,treeNodeFilterProp:s}=t;return Q.useMemo(()=>{let t=typeof e==`object`,c={searchValue:n??r,onSearch:i,autoClearSearchValue:a,filterTreeNode:o,treeNodeFilterProp:s,...t?e:{}};return[t?!0:e,c]},[e,n,r,i,a,o,s])}function $p(){return $p=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-tree-select`,value:i,defaultValue:a,onChange:o,onSelect:s,onDeselect:c,showSearch:l,searchValue:u,inputValue:d,onSearch:f,autoClearSearchValue:p,filterTreeNode:m,treeNodeFilterProp:h,showCheckedStrategy:g,treeNodeLabelProp:_,multiple:v,treeCheckable:y,treeCheckStrictly:b,labelInValue:x,maxCount:S,fieldNames:C,treeDataSimpleMode:w,treeData:T,children:E,loadData:D,treeLoadedKeys:O,onTreeLoad:k,treeDefaultExpandAll:A,treeExpandedKeys:j,treeDefaultExpandedKeys:M,onTreeExpand:N,treeExpandAction:P,virtual:F,listHeight:I=200,listItemHeight:L=20,listItemScrollOffset:R=0,onPopupVisibleChange:z,popupMatchSelectWidth:ee=!0,treeLine:te,treeIcon:V,showTreeIcon:H,switcherIcon:ne,treeMotion:re,treeTitleRender:ie,onPopupScroll:U,classNames:W,styles:G,...ae}=e,oe=B(n),se=y&&!b,q=y||b,J=b||x,Y=q||v,[ce,le]=Qp(l,{searchValue:u,inputValue:d,onSearch:f,autoClearSearchValue:p,filterTreeNode:m,treeNodeFilterProp:h}),{searchValue:ue,onSearch:de,autoClearSearchValue:fe=!0,filterTreeNode:pe,treeNodeFilterProp:me=`value`}=le,[he,ge]=K(a,i),_e=Q.useMemo(()=>y?g||`SHOW_CHILD`:Jp,[g,y]),X=Q.useMemo(()=>Ap(C),[JSON.stringify(C)]),[ve,ye]=K(``,ue),be=ve||``,xe=e=>{ye(e),de?.(e)},Se=Hp(T,E,w),{keyEntities:Ce,valueEntities:Z}=Pp(Se,X),we=Q.useCallback(e=>{let t=[],n=[];return e.forEach(e=>{Z.has(e)?n.push(e):t.push(e)}),{missingRawValues:t,existRawValues:n}},[Z]),Te=zp(Se,be,{fieldNames:X,treeNodeFilterProp:me,filterTreeNode:pe}),Ee=Q.useCallback(e=>{if(e){if(_)return e[_];let{_title:t}=X;for(let n=0;nkp(e).map(e=>em(e)?{value:e}:e),[]),ke=Q.useCallback(e=>De(e).map(e=>{let{label:t}=e,{value:n,halfChecked:r}=e,i,a=Z.get(n);return a?(t=ie?ie(a.node):t??Ee(a.node),i=a.node.disabled):t===void 0&&(t=De(he).find(e=>e.value===n).label),{label:t,value:n,halfChecked:r,disabled:i}}),[Z,Ee,De,he]),Ae=Q.useMemo(()=>De(he===null?[]:he),[De,he]),[je,Me]=Q.useMemo(()=>{let e=[],t=[];return Ae.forEach(n=>{n.halfChecked?t.push(n):e.push(n)}),[e,t]},[Ae]),Ne=Q.useMemo(()=>je.map(e=>e.value),[je]),[Pe,Fe]=Op(je,Me,se,Ce),[Ie]=Dp(Q.useMemo(()=>{let e=ke(Zp(Pe,_e,Ce,X).map(e=>Ce[e]?.node?.[X.value]??e).map(e=>{let t=je.find(t=>t.value===e);return{value:e,label:x?t?.label:ie?.(t)}})),t=e[0];return!Y&&t&&Np(t.value)&&Np(t.label)?[]:e.map(e=>({...e,label:e.label??e.value}))},[X,Y,Pe,je,ke,_e,Ce])),Le=Q.useMemo(()=>Y&&(_e===`SHOW_CHILD`||b||!y)?S:null,[S,Y,b,_e,y]),Re=Bp((e,t,n)=>{let r=Zp(e,_e,Ce,X);if(!(Le&&r.length>Le)&&(ge(ke(e)),fe&&ye(``),o)){let i=e;se&&(i=r.map(e=>{let t=Z.get(e);return t?t.node[X.value]:e}));let{triggerValue:a,selected:s}=t||{triggerValue:void 0,selected:void 0},c=i;if(b){let e=Me.filter(e=>!i.includes(e.value));c=[...c,...e]}let l=ke(c),u={preValue:je,triggerValue:a},d=!0;(b||n===`selection`&&!s)&&(d=!1),Rp(u,a,e,Se,d,X),q?u.checked=s:u.selected=s;let f=J?l:l.map(e=>e.value);o(Y?f:f[0],J?null:l.map(e=>e.label),u)}}),ze=Q.useCallback((e,{selected:t,source:n})=>{let r=Ce[e]?.node,i=r?.[X.value]??e;if(!Y)Re([i],{selected:!0,triggerValue:i},`option`);else{let e=t?[...Ne,i]:Pe.filter(e=>e!==i);if(se){let{missingRawValues:n,existRawValues:r}=we(e),i=r.map(e=>Z.get(e).key),a;t?{checkedKeys:a}=Oe(i,!0,Ce):{checkedKeys:a}=Oe(i,{checked:!1,halfCheckedKeys:Fe},Ce),e=[...n,...a.map(e=>Ce[e].node[X.value])]}Re(e,{selected:t,triggerValue:i},n||`option`)}t||!Y?s?.(i,Lp(r)):c?.(i,Lp(r))},[we,Z,Ce,X,Y,Ne,Re,se,s,c,Pe,Fe,S]),Be=Q.useCallback(e=>{z&&z(e)},[z]),Ve=Bp((e,t)=>{let n=e.map(e=>e.value);if(t.type===`clear`){Re(n,{},`selection`);return}t.values.length&&ze(t.values[0].value,{selected:!1,source:`selection`})}),He=Q.useMemo(()=>({virtual:F,popupMatchSelectWidth:ee,listHeight:I,listItemHeight:L,listItemScrollOffset:R,treeData:Te,fieldNames:X,onSelect:ze,treeExpandAction:P,treeTitleRender:ie,onPopupScroll:U,leftMaxCount:S===void 0?null:S-Ie.length,leafCountOnly:_e===`SHOW_CHILD`&&!b&&!!y,valueEntities:Z,classNames:W,styles:G}),[F,ee,I,L,R,Te,X,ze,P,ie,U,S,Ie.length,_e,b,y,Z,W,G]),Ue=Q.useMemo(()=>({checkable:q,loadData:D,treeLoadedKeys:O,onTreeLoad:k,checkedKeys:Pe,halfCheckedKeys:Fe,treeDefaultExpandAll:A,treeExpandedKeys:j,treeDefaultExpandedKeys:M,onTreeExpand:N,treeIcon:V,treeMotion:re,showTreeIcon:H,switcherIcon:ne,treeLine:te,treeNodeFilterProp:me,keyEntities:Ce}),[q,D,O,k,Pe,Fe,A,j,M,N,V,re,H,ne,te,me,Ce]);return Q.createElement(Wp.Provider,{value:He},Q.createElement(Up.Provider,{value:Ue},Q.createElement(Ye,$p({ref:t},ae,{classNames:W,styles:G,id:oe,prefixCls:r,mode:Y?`multiple`:void 0,displayValues:Ie,onDisplayValuesChange:Ve,autoClearSearchValue:fe,showSearch:ce,searchValue:be,onSearch:xe,OptionList:qp,emptyOptions:!Se.length,onPopupVisibleChange:Be,popupMatchSelectWidth:ee}))))});tm.TreeNode=Fp,tm.SHOW_ALL=Jp,tm.SHOW_PARENT=Yp,tm.SHOW_CHILD=Xp;var nm=tm,rm=e=>{let{componentCls:t,treePrefixCls:n,colorBgElevated:r}=e,a=`.${n}`;return[{[`${t}-dropdown`]:[{padding:`${D(e.paddingXS)} ${D(e.calc(e.paddingXS).div(2).equal())}`},we(n,i(e,{colorBgContainer:r}),!1),{[a]:{borderRadius:0,[`${a}-list-holder-inner`]:{alignItems:`stretch`,[`${a}-treenode`]:{[`${a}-node-content-wrapper`]:{flex:`auto`}}}}},Xe(`${n}-checkbox`,e),{"&-rtl":{direction:`rtl`,[`${a}-switcher${a}-switcher_close`]:{[`${a}-switcher-icon svg`]:{transform:`rotate(90deg)`}}}}]}]};function im(e,t,n){return v(`TreeSelect`,e=>rm(i(e,{treePrefixCls:t})),Ce,{resetFont:!1})(e,n)}var am=Q.forwardRef((e,t)=>{let{prefixCls:n,size:r,disabled:i,bordered:a=!0,style:o,className:s,rootClassName:c,treeCheckable:u,multiple:d,listHeight:f=256,listItemHeight:p,placement:m,notFoundContent:h,switcherIcon:g,treeLine:v,getPopupContainer:y,popupClassName:b,dropdownClassName:x,treeIcon:C=!1,transitionName:T,choiceTransitionName:D=``,status:O,treeExpandAction:A,builtinPlacements:M,dropdownMatchSelectWidth:N,popupMatchSelectWidth:F,allowClear:I,variant:L,dropdownStyle:R,dropdownRender:B,popupRender:te,onDropdownVisibleChange:V,onOpenChange:H,tagRender:ne,maxCount:U,showCheckedStrategy:W,treeCheckStrictly:G,styles:K,classNames:ae,...oe}=e,{getPrefixCls:q,getPopupContainer:J,direction:Y,styles:ce,classNames:le,switcherIcon:ue}=k(`treeSelect`),{renderEmpty:de,virtual:fe,popupMatchSelectWidth:pe,popupOverflow:me}=Q.useContext(ie),[,he]=se(),ge=p??he?.controlHeightSM+he?.paddingXXS,_e=q(),X=q(`select`,n),ye=q(`select-tree`,n),Se=q(`tree-select`,n),{compactSize:Ce,compactItemClassnames:Z}=l(X,Y),we=P(X),Te=P(Se),[Ee,Oe]=rt(X,we);im(Se,ye,Te);let[ke,Ae]=re(`treeSelect`,L,a),je=E(e=>r??Ce??e),Me=Q.useContext(z),Ne=i??Me,{status:Pe,hasFeedback:Fe,isFormItemInput:Ie,feedbackIcon:Le}=Q.useContext(ee),Re=be(Pe,O),ze={...e,size:je,disabled:Ne,status:Re,variant:ke},[Be,Ve]=j([le,ae],[ce,K],{props:ze},{popup:{_default:`root`}}),He=_(b||x,`${Se}-dropdown`,{[`${Se}-dropdown-rtl`]:Y===`rtl`},c,Be.root,Be.popup?.root,Oe,we,Te,Ee),Ue=mt(te||B),Ge=H||V,Ke=!!(u||d),qe=Q.useMemo(()=>{if(!(U&&(W===`SHOW_ALL`&&!G||W===`SHOW_PARENT`)))return U},[U,W,G]),Ye=et(e.suffixIcon,e.showArrow),Xe=F??N??pe,{suffixIcon:Ze,removeIcon:Qe,clearIcon:$e}=We({...oe,multiple:Ke,showSuffixIcon:Ye,hasFeedback:Fe,feedbackIcon:Le,prefixCls:X,componentName:`TreeSelect`}),tt=I===!0?{clearIcon:$e}:I,it;it=h===void 0?de?.(`Select`)||Q.createElement(nt,{componentName:`Select`}):h;let at=S(oe,[`suffixIcon`,`removeIcon`,`clearIcon`]),ot=Q.useMemo(()=>m===void 0?Y===`rtl`?`bottomRight`:`bottomLeft`:m,[m,Y]),st=_(!n&&Se,{[`${X}-lg`]:je===`large`,[`${X}-sm`]:je===`small`,[`${X}-rtl`]:Y===`rtl`,[`${X}-${ke}`]:Ae,[`${X}-in-form-item`]:Ie},ve(X,Re,Fe),Z,s,c,Be?.root,Oe,we,Te,Ee),ct=g??ue,lt=e=>Q.createElement(De,{prefixCls:ye,switcherIcon:ct,treeNodeProps:e,showLine:v}),[ut]=xe(`SelectLike`,Ve.popup?.root?.zIndex);return Q.createElement(nm,{classNames:Be,styles:Ve,virtual:fe,disabled:Ne,...at,popupMatchSelectWidth:Xe,builtinPlacements:Je(M,me),ref:t,prefixCls:X,className:st,style:{...Ve?.root,...o},listHeight:f,listItemHeight:ge,treeCheckable:u&&Q.createElement(`span`,{className:`${X}-tree-checkbox-inner`}),treeLine:!!v,suffixIcon:Ze,multiple:Ke,placement:ot,removeIcon:Qe,allowClear:tt,switcherIcon:lt,showTreeIcon:C,notFoundContent:it,getPopupContainer:y||J,treeMotion:null,popupClassName:He,popupStyle:{...Ve.root,...Ve.popup?.root,zIndex:ut},popupRender:Ue,onPopupVisibleChange:Ge,choiceTransitionName:w(_e,``,D),transitionName:w(_e,`slide-up`,T),treeExpandAction:A,tagRender:Ke?ne:void 0,maxCount:qe,showCheckedStrategy:W,treeCheckStrictly:G})}),om=Fe(am,`popupAlign`,e=>S(e,[`visible`]));am.TreeNode=Fp,am.SHOW_ALL=Jp,am.SHOW_PARENT=Yp,am.SHOW_CHILD=Xp,am._InternalPanelDoNotUseOrYouWillBeFired=om;var $=W(),sm=({value:e,onChange:t,placeholder:n,disabled:r=!1,readonly:i=!1})=>{let{t:a}=dt(),[o,s]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(e);Q.useEffect(()=>{l(e)},[e]);let u=(0,Q.useCallback)(e=>{l(e),t?.(e),s(!1)},[t]),d=(0,Q.useCallback)(()=>{l(void 0),t?.(null)},[t]),f=(0,Q.useCallback)(({type:e})=>(0,$.jsx)(`div`,{className:`flex flex-wrap max-h-[400px] overflow-auto gap-2`,children:at[e].map(e=>(0,$.jsx)(`div`,{className:`cursor-pointer p-2 border border-gray-300 rounded hover:border-blue-500 hover:bg-blue-50 transition-all flex items-center justify-center`,onClick:()=>u(e),title:e,children:(0,$.jsx)(ot,{name:e,style:{fontSize:20}})},e))}),[u]),p=(0,Q.useMemo)(()=>[{key:`use`,label:a(`xin.form.iconSelector.tabs.use`),children:(0,$.jsx)(f,{type:`useIcons`})},{key:`suggestion`,label:a(`xin.form.iconSelector.tabs.suggestion`),children:(0,$.jsx)(f,{type:`suggestionIcons`})},{key:`direction`,label:a(`xin.form.iconSelector.tabs.direction`),children:(0,$.jsx)(f,{type:`directionIcons`})},{key:`editor`,label:a(`xin.form.iconSelector.tabs.editor`),children:(0,$.jsx)(f,{type:`editorIcons`})},{key:`data`,label:a(`xin.form.iconSelector.tabs.data`),children:(0,$.jsx)(f,{type:`dataIcons`})},{key:`logo`,label:a(`xin.form.iconSelector.tabs.logo`),children:(0,$.jsx)(f,{type:`logoIcons`})},{key:`other`,label:a(`xin.form.iconSelector.tabs.other`),children:(0,$.jsx)(f,{type:`otherIcons`})}],[f,a]),m=(0,Q.useMemo)(()=>c?[{label:(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(ot,{name:c}),(0,$.jsx)(`span`,{children:c})]}),value:c}]:[],[c]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(st,{value:c,placeholder:n||a(`xin.form.iconSelector.placeholder`),disabled:r,open:!1,onClick:()=>!r&&!i&&s(!0),options:m,style:{width:`100%`},allowClear:!0,onClear:d,suffixIcon:c?(0,$.jsx)(ot,{name:c}):void 0}),(0,$.jsx)(pt,{title:a(`xin.form.iconSelector.modal.title`),open:o,onCancel:()=>s(!1),footer:null,width:800,children:(0,$.jsx)(Ie,{defaultActiveKey:`use`,items:p})})]})};function cm(e,t,n){return ce({url:e,method:`get`,params:t,...n||{}})}function lm(e,t,n){return ce({url:e,method:`post`,data:t,...n||{}})}function um(e,t,n){return ce({url:e,method:`put`,data:t,...n||{}})}function dm(e,t,n){return ce({url:e,method:`delete`,params:t,...n||{}})}var fm=({value:e,onChange:t,mode:n=`single`,placeholder:r,disabled:i=!1,readonly:a=!1,showDept:o=!0,maxTagCount:s=2})=>{let{t:c}=dt(),[l,u]=(0,Q.useState)(!1),[d,f]=(0,Q.useState)(!1),[p,m]=(0,Q.useState)([]),[h,g]=(0,Q.useState)([]),[_,v]=(0,Q.useState)(!1),[y,b]=(0,Q.useState)([]),[x,S]=(0,Q.useState)({current:1,pageSize:10,total:0}),[C,w]=(0,Q.useState)();(0,Q.useEffect)(()=>{if(!e){m([]),g([]);return}let t=Array.isArray(e)?e:[e];if(typeof t[0]==`object`){m(t),g(t.map(e=>e.id));return}f(!0),Promise.all(t.map(e=>cm(`/sys-user/list`,{id:e}))).then(e=>{let t=e.map(e=>e.data.data?.data?.[0]).filter(Boolean);m(t),g(t.map(e=>e.id))}).catch(e=>console.error(`Failed to load users:`,e)).finally(()=>f(!1))},[e]);let T=(0,Q.useMemo)(()=>[{title:c(`system.user.id`),dataIndex:`id`,width:80,align:`center`},{title:c(`system.user.username`),dataIndex:`username`,width:120,align:`center`},{title:c(`system.user.nickname`),dataIndex:`nickname`,width:120,align:`center`},{title:c(`system.user.mobile`),dataIndex:`mobile`,width:130,align:`center`},...o?[{title:c(`system.user.dept`),dataIndex:`dept_name`,width:120,align:`center`,render:e=>e?(0,$.jsx)(He,{color:`volcano`,children:e}):`-`}]:[],{title:c(`system.user.status`),dataIndex:`status`,width:100,align:`center`,render:e=>e===1?(0,$.jsx)(He,{color:`success`,children:c(`system.user.status.1`)}):(0,$.jsx)(He,{color:`error`,children:c(`system.user.status.0`)})}],[c,o]),E=(0,Q.useCallback)(()=>{t?.(n===`single`?p[0]?.id||null:p.map(e=>e.id)),u(!1)},[n,p,t]),D=(0,Q.useCallback)((e,t)=>{if(n===`single`&&e.length>1){let n=e[e.length-1],r=t.find(e=>e.id===n);g([n]),m([r])}else g(e),m(t)},[n]),O=(0,Q.useCallback)(async(e=1,t=10,n)=>{v(!0);try{let r=await cm(`/system-user/list`,{page:e,pageSize:t,keywordSearch:n});b(r.data.data?.data||[]),S(n=>({...n,current:e,pageSize:t,total:r.data.data?.total||0}))}catch(e){console.error(`Failed to fetch users:`,e),b([])}finally{v(!1)}},[]);(0,Q.useEffect)(()=>{l&&O(1,x.pageSize,C?.keywordSearch)},[l]);let k=(0,Q.useMemo)(()=>({columns:T,rowKey:`id`,dataSource:y,loading:_,rowSelection:{type:n===`single`?`radio`:`checkbox`,selectedRowKeys:h,onChange:D,preserveSelectedRowKeys:!0},pagination:{...x,showSizeChanger:!0,showQuickJumper:!0,onChange:(e,t)=>{O(e,t,C?.keywordSearch)}},bordered:!0,size:`small`,scroll:{x:800}}),[T,y,_,n,h,D,x,C,O]),A=(0,Q.useCallback)(e=>{n===`single`?(!p.find(t=>t.id===e)&&e&&cm(`/sys-user/list`,{id:e}).then(e=>{let t=e.data.data?.data?.[0];t&&(m([t]),g([t.id]))}).catch(e=>console.error(`Failed to load user:`,e)),t?.(e||null)):t?.(e)},[n,p,t]),j=(0,Q.useMemo)(()=>p.map(e=>({label:e.nickname||e.username,value:e.id})),[p]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(st,{mode:n===`multiple`?`multiple`:void 0,value:n===`single`?p[0]?.id||void 0:p.map(e=>e.id),onChange:A,placeholder:r||c(`xin.form.userSelector.placeholder`),disabled:i,loading:d,maxTagCount:s,open:!1,onClick:()=>!i&&!a&&u(!0),options:j,style:{width:`100%`},allowClear:!0,onClear:()=>{m([]),g([]),t?.(n===`single`?null:[])}}),(0,$.jsxs)(pt,{title:c(`xin.form.userSelector.modal.title`),open:l,onCancel:()=>u(!1),onOk:E,width:1e3,okText:c(`xin.form.userSelector.modal.okText`),cancelText:c(`xin.form.userSelector.modal.cancelText`),children:[(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(tt.Search,{placeholder:c(`system.user.searchPlaceholder`),style:{width:304},onSearch:e=>{w({keywordSearch:e}),O(1,x.pageSize,e)},allowClear:!0})}),(0,$.jsx)(ke,{...k})]})]})},{TextArea:pm,Password:mm}=tt,{RangePicker:hm}=sp;function gm(e){let{valueType:t,...n}=e,r;switch(t){case`password`:r=(0,$.jsx)(mm,{...n});break;case`textarea`:r=(0,$.jsx)(pm,{rows:4,...n});break;case`digit`:r=(0,$.jsx)(Ue,{style:{width:`100%`},...n});break;case`money`:r=(0,$.jsx)(Ue,{style:{width:`100%`},precision:2,prefix:`¥`,...n});break;case`select`:r=(0,$.jsx)(st,{...n});break;case`treeSelect`:r=(0,$.jsx)(am,{...n});break;case`cascader`:r=(0,$.jsx)(bn,{...n});break;case`radio`:r=(0,$.jsx)(Ve.Group,{options:[],optionType:`default`,...n});break;case`radioButton`:r=(0,$.jsx)(Ve.Group,{options:[],optionType:`button`,...n});break;case`checkbox`:r=(0,$.jsx)($e.Group,{options:[],...n});break;case`switch`:r=(0,$.jsx)(it,{...n});break;case`rate`:r=(0,$.jsx)(xp,{...n});break;case`slider`:r=(0,$.jsx)(ct,{...n});break;case`date`:r=(0,$.jsx)(sp,{style:{width:`100%`},...n});break;case`dateTime`:r=(0,$.jsx)(sp,{style:{width:`100%`},showTime:!0,...n});break;case`dateRange`:r=(0,$.jsx)(hm,{style:{width:`100%`},...n});break;case`time`:r=(0,$.jsx)(Tp,{style:{width:`100%`},...n});break;case`timeRange`:r=(0,$.jsx)(Tp.RangePicker,{style:{width:`100%`},...n});break;case`week`:r=(0,$.jsx)(sp,{style:{width:`100%`},picker:`week`,...n});break;case`month`:r=(0,$.jsx)(sp,{style:{width:`100%`},picker:`month`,...n});break;case`quarter`:r=(0,$.jsx)(sp,{style:{width:`100%`},picker:`quarter`,...n});break;case`year`:r=(0,$.jsx)(sp,{style:{width:`100%`},picker:`year`,...n});break;case`color`:r=(0,$.jsx)(Qe,{...n});break;case`image`:r=(0,$.jsx)(ht,{...n});break;case`icon`:r=(0,$.jsx)(sm,{...n});break;case`user`:r=(0,$.jsx)(fm,{...n});break;default:r=(0,$.jsx)(tt,{...n});break}return r}var _m=ut();function vm(e){let{columns:t,layoutType:n=`Form`,grid:r=!1,rowProps:i,colProps:a={span:12},onFinish:o,formRef:s,form:c,modalProps:l,drawerProps:u,trigger:d,submitter:f,...p}=e,{t:m}=dt(),[h]=Ge.useForm(c),[g,_]=(0,Q.useState)(!1),[v,y]=(0,Q.useState)(!1);(0,Q.useImperativeHandle)(s,()=>({...h,open:x,close:S,isOpen:()=>g,setLoading:e=>y(e)}));let b=(0,Q.useCallback)(async e=>{if(o)try{y(!0),await o(e)!==!1&&(n===`ModalForm`||n===`DrawerForm`)&&_(!1)}finally{y(!1)}},[o,n]),x=()=>_(!0),S=()=>_(!1),C=(0,Q.useCallback)((e,t)=>{let{dataIndex:n,valueType:i,title:o=``,fieldProps:s={},dependency:c,fieldRender:l,colProps:u={span:12}}=e,d=(0,_m.pick)(e,`colon.extra.getValueFromEvent.help.hidden.htmlFor.initialValue.name.normalize.noStyle.preserve.tooltip.trigger.required.rules.validateFirst.validateDebounce.validateStatus.hasFeedback.validateTrigger.valuePropName.messageVariables.wrapperCol.layout.label.labelAlign.labelCol`.split(`.`)),f=String(n)||`form-item-${t}`;if(c)return(0,$.jsx)(Ge.Item,{noStyle:!0,shouldUpdate:!0,children:({getFieldsValue:t})=>{let p=t();if(c.visible&&!c.visible(p))return null;let m=c.disabled?c.disabled(p):!1,g=c.fieldProps?c.fieldProps(p):{},_=(0,$.jsx)(gm,{valueType:i,placeholder:o,...s,...g,disabled:m||s?.disabled});return r?(0,Q.createElement)(Ze,{...a,...u,key:f},(0,$.jsx)(Ge.Item,{name:n,label:e.title||e.label,...d,children:l?l(h):_},f)):(0,$.jsx)(Ge.Item,{name:n,label:e.title||e.label,...d,children:l?l(h):_},f)}});{let t=(0,$.jsx)(gm,{valueType:i,placeholder:o,...s});return r?(0,Q.createElement)(Ze,{...a,...u,key:f},(0,$.jsx)(Ge.Item,{name:n,label:e.title||e.label,...d,children:l?l(h):t},f)):(0,$.jsx)(Ge.Item,{name:n,label:e.title||e.label,...d,children:l?l(h):t},f)}},[r,c]),w=(0,Q.useMemo)(()=>{if(f?.render===!1)return null;let e={submit:(0,$.jsx)(je,{type:`primary`,loading:v,onClick:()=>h.submit(),...f?.submitButtonProps,children:f?.submitText||m(`xin.form.submit`)}),close:(0,$.jsx)(je,{loading:v,onClick:S,...f?.closeButtonProps,children:f?.closeText||m(`xin.form.cancel`)}),reset:(0,$.jsx)(je,{loading:v,onClick:()=>h.resetFields(),...f?.resetButtonProps,children:f?.resetText||m(`xin.form.reset`)})};return typeof f?.render==`function`?f.render(e,s):n===`Form`?(0,$.jsx)(Ge.Item,{children:(0,$.jsxs)(Ne,{children:[e.reset,e.submit]})}):(0,$.jsxs)(Ne,{children:[e.reset,e.submit,e.close]})},[v,c,f,m]),T=(0,Q.useMemo)(()=>(0,$.jsxs)(Ge,{...p,form:h,onFinish:b,children:[r?(0,$.jsx)(ft,{...i,children:t.map((e,t)=>C(e,t))}):t.map((e,t)=>C(e,t)),n===`Form`&&w]}),[c,b,e,r,i,t,C,n,w]),E=(0,Q.useMemo)(()=>d?Q.cloneElement(d,{onClick:x}):null,[d,x]);return n===`ModalForm`?(0,$.jsxs)($.Fragment,{children:[E,(0,$.jsx)(pt,{open:g,onCancel:S,footer:w,...l,children:T})]}):n===`DrawerForm`?(0,$.jsxs)($.Fragment,{children:[E,(0,$.jsx)(qe,{open:g,onClose:S,footer:w,...u,children:T})]}):T}export{dm as a,sm as c,lm as i,am as l,gm as n,cm as o,fm as r,um as s,vm as t}; \ No newline at end of file diff --git a/public/assets/XinTable-Cyzgse09.js b/public/assets/XinTable-Cyzgse09.js deleted file mode 100644 index 085e748..0000000 --- a/public/assets/XinTable-Cyzgse09.js +++ /dev/null @@ -1 +0,0 @@ -import{Or as e,Tr as t,n,t as r,tt as i}from"./jsx-runtime-NwRKtVrk.js";import{r as a}from"./CopyOutlined-bJLUKQgS.js";import{r as o}from"./statusUtils-G17j4Ng-.js";import{n as s,t as c}from"./table-By97ouEx.js";import{t as l}from"./button-CM-rzMOH.js";import{t as u}from"./space-Dvitgohy.js";import{t as d}from"./card-D7XvzVif.js";import{a as f,i as p,n as m,o as h,s as ee,t as te}from"./XinForm-ihfVpzb6.js";import{C as ne,Wt as re,X as ie,mt as ae,nt as oe,rt as se,v as ce}from"./es-Do50EHua.js";import{t as le}from"./flex-CfpySdsa.js";import{C as g,M as ue,N as _,S as de,T as fe,X as pe,r as v,s as y,v as b}from"./index-B7MUL4ct.js";import{t as x}from"./AuthButton-MNxRWjhj.js";var S=e(t(),1),C=v(),w=r();function me(e){let{columns:t,handleSearch:n,submitter:r,form:i,grid:a=!0,rowProps:o={gutter:[20,20],wrap:!0},colProps:s={xs:24,sm:12,md:12,lg:8,xl:6,xxl:4},...c}=e,{t:d}=y(),[f]=g.useForm(i),p=(0,S.useCallback)((e,t)=>{let{dataIndex:n,valueType:r,title:i=``,fieldProps:o={},fieldRender:c}=e,l=(0,C.pick)(e,[`colon`,`extra`,`getValueFromEvent`,`help`,`htmlFor`,`initialValue`,`labelAlign`,`labelCol`,`name`,`normalize`,`noStyle`,`tooltip`,`wrapperCol`,`layout`]),u=String(n)||`form-item-${t}`,d=(0,w.jsx)(m,{valueType:r,placeholder:i,...o}),p=(0,w.jsx)(g.Item,{style:{marginBottom:0},name:u,label:e.title,...l,required:!1,children:c?c(f):d},u);return a?(0,S.createElement)(_,{...s,...e.colProps,key:u},p):p},[f,a,s]),h=(0,S.useMemo)(()=>{if(r?.render===!1)return null;let e={search:(0,w.jsx)(l,{type:`primary`,onClick:()=>f.submit(),...r?.submitButtonProps,children:r?.submitText||d(`xin.table.search.search`)}),reset:(0,w.jsx)(l,{onClick:()=>f.resetFields(),...r?.resetButtonProps,children:r?.resetText||d(`xin.table.search.reset`)})};return typeof r?.render==`function`?r.render(e):(0,w.jsx)(g.Item,{style:{marginBottom:0},children:(0,w.jsxs)(u,{size:16,children:[e.reset,e.search]})})},[f,r,d]);return(0,w.jsx)(g,{...c,form:f,onFinish:n,style:{width:`100%`},children:a?(0,w.jsxs)(b,{...o,children:[t.map((e,t)=>p(e,t)),(0,w.jsx)(_,{...s,children:h})]}):(0,w.jsxs)(w.Fragment,{children:[t.map((e,t)=>p(e,t)),h]})})}var he=10,ge=1;function T(e){let{api:t,accessName:r,rowKey:m,columns:_,tableRef:v,formProps:b,modalProps:T,cardProps:_e,searchProps:ve,operateProps:ye={},pagination:be={},addShow:xe=!0,editShow:E=!0,deleteShow:D=!0,searchShow:O=!0,operateShow:k=!0,paginationShow:Se=!0,keywordSearchShow:Ce=!0,toolBarRender:A,actionBarRender:j,operateRender:M,handleRequest:N,requestParams:P,handleFinish:F}=e,{t:I}=y(),L=(0,S.useRef)(null),[R,z]=(0,S.useState)(!0),[B,V]=(0,S.useState)([]),[H,we]=(0,S.useState)(0),[U,W]=(0,S.useState)({page:ge,pageSize:he}),[G,K]=(0,S.useState)(),[q,Te]=(0,S.useState)(),[J]=g.useForm(),[Y,Ee]=(0,S.useState)([]),[De,Oe]=(0,S.useState)(!1),[X,ke]=(0,S.useState)(`create`),[Z,Ae]=(0,S.useState)(void 0),Q=(0,S.useCallback)(async e=>{try{z(!0);let n=Object.assign({page:ge,pageSize:he},e),r=P?P(n):n,i;if(N)i=await N(r);else{let{data:e}=await h(t,r);i=e.data}V(i.data),we(i.total)}finally{z(!1)}},[t,N,P]),je=(0,S.useCallback)(()=>{ke(`create`),Ae(void 0),L.current?.resetFields(),L.current?.open()},[]),Me=(0,S.useCallback)(e=>{ke(`update`),Ae(e),L.current?.setFieldsValue(e),L.current?.open()},[]);(0,S.useImperativeHandle)(v,()=>({reload:async()=>{await Q()},reset:async()=>{J.resetFields(),W({page:1,pageSize:10}),await Q({page:1,pageSize:10})},getDataSource:()=>B,setDataSource:V,getTotal:()=>H,getLoading:()=>R,setLoading:z,setPageInfo:(e,t)=>{W(n=>({...n,...e!==void 0&&{page:e},...t!==void 0&&{pageSize:t}}))},getForm:()=>L.current,getSearchForm:()=>J})),(0,S.useEffect)(()=>{Q()},[]);let Ne=async(e,t,n)=>{let r={...U,page:e.current??U.page,pageSize:e.pageSize??U.pageSize};(0,C.isEmpty)(t)||(r.filterValues=t),n&&!(0,C.isArray)(n)&&!(0,C.isEmpty)(n)&&n.field?r.sorterValue={field:String(n.field),order:n.order===`ascend`?`asc`:`desc`}:delete r.sorterValue,W(r),await Q(r)},Pe=async e=>{if(!e){window.$message?.warning(I(`xin.table.keywordEmpty`));return}let t={...U,page:1,keywordSearch:e};W(t),await Q(t)},Fe=e=>{if(e.target.value)W({...U,keywordSearch:e.target.value});else{let e={...U};delete e.keywordSearch,W(e)}},Ie=async()=>{let e=J.getFieldsValue();Object.keys(e).forEach(t=>{(e[t]===``||e[t]===void 0)&&delete e[t]}),await Q({page:1,...U,...e})},Le=(0,S.useMemo)(()=>O?_.filter(e=>e.hideInSearch!==!0):[],[_,O]),Re=(0,S.useMemo)(()=>_.filter(e=>X===`update`?e.hideInForm!==!0&&e.hideInUpdate!==!0:e.hideInForm!==!0&&e.hideInCreate!==!0),[_,X]),$=(0,S.useMemo)(()=>_.filter(e=>e.hideInTable!==!0&&e.dataIndex).map(e=>(0,C.omit)(e,[`hideInTable`,`hideInForm`,`hideInSearch`,`search`])),[_]);(0,S.useEffect)(()=>{Ee($.map(e=>e.dataIndex))},[$]);let ze=t=>{let n=()=>(typeof E==`function`?E(t):E)?(0,w.jsx)(x,{auth:e.accessName+`.update`,children:(0,w.jsx)(o,{title:I(`xin.table.edit`),children:(0,w.jsx)(l,{type:`primary`,icon:(0,w.jsx)(a,{}),size:`small`,onClick:()=>Me(t)})})},`update`):null,r=()=>(typeof D==`function`?D(t):D)?(0,w.jsx)(x,{auth:e.accessName+`.delete`,children:(0,w.jsx)(o,{title:I(`xin.table.delete`),children:(0,w.jsx)(l,{danger:!0,type:`primary`,icon:(0,w.jsx)(ae,{}),size:`small`,onClick:()=>Be(t)})})},`delete`):null;return M?M(t,{del:r(),edit:n()}):[r(),n()]},Be=async e=>{window.$modal?.confirm({title:I(`xin.table.deleteConfirm`,{id:e[m]}),okText:I(`xin.table.deleteOk`),cancelText:I(`xin.table.deleteCancel`),onOk:async()=>{await f(t+`/${e[m]}`),window.$message?.success(I(`xin.table.deleteSuccess`)),await Q(U)}})},Ve=async e=>{try{if(L.current?.setLoading(!0),F){await F(e,X,L,Z)&&(await Q(U),L.current?.close());return}if(X===`create`)await p(t,e),window.$message?.success(I(`xin.table.form.createSuccess`));else if(Z&&m)await ee(t+`/${Z[m]}`,e),window.$message?.success(I(`xin.table.form.updateSuccess`));else{window.$message?.error(I(`xin.table.form.updateKeyUndefined`));return}await Q(U),L.current?.close()}finally{L.current?.setLoading(!1)}},He={items:[{key:`large`,label:I(`xin.table.density.default`),onClick:()=>K(`large`)},{key:`middle`,label:I(`xin.table.density.middle`),onClick:()=>K(`middle`)},{key:`small`,label:I(`xin.table.density.compact`),onClick:()=>K(`small`)}],selectedKeys:[G||`large`]},Ue=(0,S.useMemo)(()=>_.filter(e=>e.hideInTable!==!0&&e.dataIndex).map(e=>({key:String(e.dataIndex),title:e.title})),[_]),We=e=>{(0,C.isArray)(e)&&Ee(e)},Ge=(0,S.useMemo)(()=>{let e=$.filter(e=>Y.includes(e.dataIndex));return k?[...e,{title:I(`xin.table.operate`),key:`operate`,align:`center`,...ye,render:(e,t)=>(0,w.jsx)(u,{children:[...ze(t)]})}]:e},[$,Y,k]),Ke={showQuickJumper:!0,showSizeChanger:!0,showTotal:e=>I(`xin.table.total`,{total:e}),pageSize:U.pageSize,...be,current:U.page,total:H},qe=()=>{let e=xe?(0,w.jsx)(x,{auth:r+`.create`,children:(0,w.jsx)(l,{type:`primary`,onClick:je,icon:(0,w.jsx)(n,{}),children:I(`xin.table.add`)})}):null,t=O?(0,w.jsx)(l,{type:`primary`,icon:(0,w.jsx)(re,{}),onClick:()=>Oe(!De),children:`搜索`}):null,i=Ce?(0,w.jsx)(de.Search,{onChange:Fe,placeholder:I(`xin.table.keywordPlaceholder`),style:{width:200},value:U.keywordSearch,onSearch:Pe}):null;return j?j({add:e,search:t,keywordSearch:i}).filter(Boolean):[e,t,i].filter(Boolean)},Je=()=>{let e=(0,w.jsx)(o,{title:`刷新表格`,children:(0,w.jsx)(l,{type:`text`,icon:(0,w.jsx)(ne,{}),onClick:()=>Q()})}),t=(0,w.jsx)(fe,{menu:He,trigger:[`click`],children:(0,w.jsx)(l,{type:`text`,icon:(0,w.jsx)(ie,{})})}),n=(0,w.jsx)(o,{title:I(q?`xin.table.hideBorder`:`xin.table.showBorder`),children:(0,w.jsx)(l,{type:`text`,icon:q?(0,w.jsx)(se,{}):(0,w.jsx)(oe,{}),onClick:()=>Te(!q)})}),r=(0,w.jsx)(pe,{content:(0,w.jsx)(i,{theme:{components:{Tree:{switcherSize:12}}},children:(0,w.jsx)(s,{icon:!1,blockNode:!0,checkable:!0,treeData:Ue,selectable:!1,checkedKeys:Y,onCheck:We})}),trigger:`click`,placement:`bottomRight`,title:I(`xin.table.columnSettings`),children:(0,w.jsx)(o,{title:I(`xin.table.columnSettings`),children:(0,w.jsx)(l,{type:`text`,icon:(0,w.jsx)(ce,{})})})});return A?A({reload:e,columnHeight:t,hideBorder:n,columnSetting:r}).filter(Boolean):[e,t,n,r]};return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(d,{..._e,children:[De&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(me,{form:J,columns:Le,handleSearch:Ie,...ve}),(0,w.jsx)(ue,{})]}),(0,w.jsxs)(le,{justify:`space-between`,align:`center`,style:{marginBottom:20},children:[(0,w.jsx)(u,{children:[...qe()]}),(0,w.jsx)(u,{size:1,children:[...Je()]})]}),(0,w.jsx)(c,{loading:R,dataSource:B,size:G,bordered:q,...e,columns:Ge,rowKey:m,onChange:Ne,pagination:Se?Ke:!1})]}),(0,w.jsx)(te,{...b,columns:Re,formRef:L,layoutType:`ModalForm`,modalProps:{title:I(X===`update`?`xin.table.form.editTitle`:`xin.table.form.createTitle`),styles:{header:{marginBottom:16}},...T},onFinish:Ve})]})}export{T as t}; \ No newline at end of file diff --git a/public/assets/XinTable-DP0Q6sQS.js b/public/assets/XinTable-DP0Q6sQS.js new file mode 100644 index 0000000..8a58ce8 --- /dev/null +++ b/public/assets/XinTable-DP0Q6sQS.js @@ -0,0 +1 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,t as n}from"./jsx-runtime-ADHq9IcL.js";import{C as r,D as i,c as a,t as o,w as s,x as c}from"./lodash-D-pgfsxw.js";import{t as l}from"./tooltip-CRuv8UNz.js";import{t as u}from"./config-provider-BFg4S-AS.js";import{t as d}from"./PlusOutlined-W6xCIIXs.js";import{n as f,t as p}from"./table-CG-GtmXj.js";import{t as m}from"./space-BqavXZJj.js";import{t as h}from"./button-CcpWP-mq.js";import{t as ee}from"./SearchOutlined-B7X5pgf4.js";import{t as te}from"./popover-DCXX8fLF.js";import{a as ne,i as re,n as g,o as ie,s as ae,t as oe}from"./XinForm-CH1TH01p.js";import{t as se}from"./card-BFxeciPE.js";import{n as _,t as v}from"./row-DQ81_S1d.js";import{t as ce}from"./divider-qVVmElWH.js";import{t as le}from"./dropdown-dXoRpGL-.js";import{t as ue}from"./flex-BB50-T81.js";import{t as y}from"./form-CNvo0lCF.js";import{t as de}from"./input-De-xbsfR.js";import{r as fe}from"./CopyOutlined-BfEUU2AX.js";import{t as pe}from"./DeleteOutlined-D3Fhpkuo.js";import{t as b}from"./useTranslation-DIuTqE8W.js";import{t as x}from"./AuthButton-ZAAWoGLQ.js";var S=e(t(),1),C=o(),w=n();function me(e){let{columns:t,handleSearch:n,submitter:r,form:i,grid:a=!0,rowProps:o={gutter:[20,20],wrap:!0},colProps:s={xs:24,sm:12,md:12,lg:8,xl:6,xxl:4},...c}=e,{t:l}=b(),[u]=y.useForm(i),d=(0,S.useCallback)((e,t)=>{let{dataIndex:n,valueType:r,title:i=``,fieldProps:o={},fieldRender:c}=e,l=(0,C.pick)(e,[`colon`,`extra`,`getValueFromEvent`,`help`,`htmlFor`,`initialValue`,`labelAlign`,`labelCol`,`name`,`normalize`,`noStyle`,`tooltip`,`wrapperCol`,`layout`]),d=String(n)||`form-item-${t}`,f=(0,w.jsx)(g,{valueType:r,placeholder:i,...o}),p=(0,w.jsx)(y.Item,{style:{marginBottom:0},name:d,label:e.title,...l,required:!1,children:c?c(u):f},d);return a?(0,S.createElement)(_,{...s,...e.colProps,key:d},p):p},[u,a,s]),f=(0,S.useMemo)(()=>{if(r?.render===!1)return null;let e={search:(0,w.jsx)(h,{type:`primary`,onClick:()=>u.submit(),...r?.submitButtonProps,children:r?.submitText||l(`xin.table.search.search`)}),reset:(0,w.jsx)(h,{onClick:()=>u.resetFields(),...r?.resetButtonProps,children:r?.resetText||l(`xin.table.search.reset`)})};return typeof r?.render==`function`?r.render(e):(0,w.jsx)(y.Item,{style:{marginBottom:0},children:(0,w.jsxs)(m,{size:16,children:[e.reset,e.search]})})},[u,r,l]);return(0,w.jsx)(y,{...c,form:u,onFinish:n,style:{width:`100%`},children:a?(0,w.jsxs)(v,{...o,children:[t.map((e,t)=>d(e,t)),(0,w.jsx)(_,{...s,children:f})]}):(0,w.jsxs)(w.Fragment,{children:[t.map((e,t)=>d(e,t)),f]})})}var he=10,T=1;function ge(e){let{api:t,accessName:n,rowKey:o,columns:g,tableRef:_,formProps:v,modalProps:ge,cardProps:_e,searchProps:ve,operateProps:ye={},pagination:be={},addShow:xe=!0,editShow:E=!0,deleteShow:D=!0,searchShow:O=!0,operateShow:k=!0,paginationShow:Se=!0,keywordSearchShow:Ce=!0,toolBarRender:A,actionBarRender:j,operateRender:M,handleRequest:N,requestParams:P,handleFinish:F}=e,{t:I}=b(),L=(0,S.useRef)(null),[R,z]=(0,S.useState)(!0),[B,V]=(0,S.useState)([]),[H,we]=(0,S.useState)(0),[U,W]=(0,S.useState)({page:T,pageSize:he}),[G,K]=(0,S.useState)(),[q,Te]=(0,S.useState)(),[J]=y.useForm(),[Y,Ee]=(0,S.useState)([]),[De,Oe]=(0,S.useState)(!1),[X,ke]=(0,S.useState)(`create`),[Z,Ae]=(0,S.useState)(void 0),Q=(0,S.useCallback)(async e=>{try{z(!0);let n=Object.assign({page:T,pageSize:he},e),r=P?P(n):n,i;if(N)i=await N(r);else{let{data:e}=await ie(t,r);i=e.data}V(i.data),we(i.total)}finally{z(!1)}},[t,N,P]),je=(0,S.useCallback)(()=>{ke(`create`),Ae(void 0),L.current?.resetFields(),L.current?.open()},[]),Me=(0,S.useCallback)(e=>{ke(`update`),Ae(e),L.current?.setFieldsValue(e),L.current?.open()},[]);(0,S.useImperativeHandle)(_,()=>({reload:async()=>{await Q()},reset:async()=>{J.resetFields(),W({page:1,pageSize:10}),await Q({page:1,pageSize:10})},getDataSource:()=>B,setDataSource:V,getTotal:()=>H,getLoading:()=>R,setLoading:z,setPageInfo:(e,t)=>{W(n=>({...n,...e!==void 0&&{page:e},...t!==void 0&&{pageSize:t}}))},getForm:()=>L.current,getSearchForm:()=>J})),(0,S.useEffect)(()=>{Q()},[]);let Ne=async(e,t,n)=>{let r={...U,page:e.current??U.page,pageSize:e.pageSize??U.pageSize};(0,C.isEmpty)(t)||(r.filterValues=t),n&&!(0,C.isArray)(n)&&!(0,C.isEmpty)(n)&&n.field?r.sorterValue={field:String(n.field),order:n.order===`ascend`?`asc`:`desc`}:delete r.sorterValue,W(r),await Q(r)},Pe=async e=>{if(!e){window.$message?.warning(I(`xin.table.keywordEmpty`));return}let t={...U,page:1,keywordSearch:e};W(t),await Q(t)},Fe=e=>{if(e.target.value)W({...U,keywordSearch:e.target.value});else{let e={...U};delete e.keywordSearch,W(e)}},Ie=async()=>{let e=J.getFieldsValue();Object.keys(e).forEach(t=>{(e[t]===``||e[t]===void 0)&&delete e[t]}),await Q({page:1,...U,...e})},Le=(0,S.useMemo)(()=>O?g.filter(e=>e.hideInSearch!==!0):[],[g,O]),Re=(0,S.useMemo)(()=>g.filter(e=>X===`update`?e.hideInForm!==!0&&e.hideInUpdate!==!0:e.hideInForm!==!0&&e.hideInCreate!==!0),[g,X]),$=(0,S.useMemo)(()=>g.filter(e=>e.hideInTable!==!0&&e.dataIndex).map(e=>(0,C.omit)(e,[`hideInTable`,`hideInForm`,`hideInSearch`,`search`])),[g]);(0,S.useEffect)(()=>{let e=$.map(e=>e.dataIndex);Ee(e)},[$]);let ze=t=>{let n=()=>(typeof E==`function`?E(t):E)?(0,w.jsx)(x,{auth:e.accessName+`.update`,children:(0,w.jsx)(l,{title:I(`xin.table.edit`),children:(0,w.jsx)(h,{type:`primary`,icon:(0,w.jsx)(fe,{}),size:`small`,onClick:()=>Me(t)})})},`update`):null,r=()=>(typeof D==`function`?D(t):D)?(0,w.jsx)(x,{auth:e.accessName+`.delete`,children:(0,w.jsx)(l,{title:I(`xin.table.delete`),children:(0,w.jsx)(h,{danger:!0,type:`primary`,icon:(0,w.jsx)(pe,{}),size:`small`,onClick:()=>Be(t)})})},`delete`):null;return M?M(t,{del:r(),edit:n()}):[r(),n()]},Be=async e=>{window.$modal?.confirm({title:I(`xin.table.deleteConfirm`,{id:e[o]}),okText:I(`xin.table.deleteOk`),cancelText:I(`xin.table.deleteCancel`),onOk:async()=>{await ne(t+`/${e[o]}`),window.$message?.success(I(`xin.table.deleteSuccess`)),await Q(U)}})},Ve=async e=>{try{if(L.current?.setLoading(!0),F){await F(e,X,L,Z)&&(await Q(U),L.current?.close());return}if(X===`create`)await re(t,e),window.$message?.success(I(`xin.table.form.createSuccess`));else if(Z&&o)await ae(t+`/${Z[o]}`,e),window.$message?.success(I(`xin.table.form.updateSuccess`));else{window.$message?.error(I(`xin.table.form.updateKeyUndefined`));return}await Q(U),L.current?.close()}finally{L.current?.setLoading(!1)}},He={items:[{key:`large`,label:I(`xin.table.density.default`),onClick:()=>K(`large`)},{key:`middle`,label:I(`xin.table.density.middle`),onClick:()=>K(`middle`)},{key:`small`,label:I(`xin.table.density.compact`),onClick:()=>K(`small`)}],selectedKeys:[G||`large`]},Ue=(0,S.useMemo)(()=>g.filter(e=>e.hideInTable!==!0&&e.dataIndex).map(e=>({key:String(e.dataIndex),title:e.title})),[g]),We=e=>{(0,C.isArray)(e)&&Ee(e)},Ge=(0,S.useMemo)(()=>{let e=$.filter(e=>Y.includes(e.dataIndex));return k?[...e,{title:I(`xin.table.operate`),key:`operate`,align:`center`,...ye,render:(e,t)=>(0,w.jsx)(m,{children:[...ze(t)]})}]:e},[$,Y,k]),Ke={showQuickJumper:!0,showSizeChanger:!0,showTotal:e=>I(`xin.table.total`,{total:e}),pageSize:U.pageSize,...be,current:U.page,total:H},qe=()=>{let e=xe?(0,w.jsx)(x,{auth:n+`.create`,children:(0,w.jsx)(h,{type:`primary`,onClick:je,icon:(0,w.jsx)(d,{}),children:I(`xin.table.add`)})}):null,t=O?(0,w.jsx)(h,{type:`primary`,icon:(0,w.jsx)(ee,{}),onClick:()=>Oe(!De),children:`搜索`}):null,r=Ce?(0,w.jsx)(de.Search,{onChange:Fe,placeholder:I(`xin.table.keywordPlaceholder`),style:{width:200},value:U.keywordSearch,onSearch:Pe}):null;return j?j({add:e,search:t,keywordSearch:r}).filter(Boolean):[e,t,r].filter(Boolean)},Je=()=>{let e=(0,w.jsx)(l,{title:`刷新表格`,children:(0,w.jsx)(h,{type:`text`,icon:(0,w.jsx)(i,{}),onClick:()=>Q()})}),t=(0,w.jsx)(le,{menu:He,trigger:[`click`],children:(0,w.jsx)(h,{type:`text`,icon:(0,w.jsx)(c,{})})}),n=(0,w.jsx)(l,{title:I(q?`xin.table.hideBorder`:`xin.table.showBorder`),children:(0,w.jsx)(h,{type:`text`,icon:q?(0,w.jsx)(s,{}):(0,w.jsx)(r,{}),onClick:()=>Te(!q)})}),o=(0,w.jsx)(te,{content:(0,w.jsx)(u,{theme:{components:{Tree:{switcherSize:12}}},children:(0,w.jsx)(f,{icon:!1,blockNode:!0,checkable:!0,treeData:Ue,selectable:!1,checkedKeys:Y,onCheck:We})}),trigger:`click`,placement:`bottomRight`,title:I(`xin.table.columnSettings`),children:(0,w.jsx)(l,{title:I(`xin.table.columnSettings`),children:(0,w.jsx)(h,{type:`text`,icon:(0,w.jsx)(a,{})})})});return A?A({reload:e,columnHeight:t,hideBorder:n,columnSetting:o}).filter(Boolean):[e,t,n,o]};return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(se,{..._e,children:[De&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(me,{form:J,columns:Le,handleSearch:Ie,...ve}),(0,w.jsx)(ce,{})]}),(0,w.jsxs)(ue,{justify:`space-between`,align:`center`,style:{marginBottom:20},children:[(0,w.jsx)(m,{children:[...qe()]}),(0,w.jsx)(m,{size:1,children:[...Je()]})]}),(0,w.jsx)(p,{loading:R,dataSource:B,size:G,bordered:q,...e,columns:Ge,rowKey:o,onChange:Ne,pagination:Se?Ke:!1})]}),(0,w.jsx)(oe,{...v,columns:Re,formRef:L,layoutType:`ModalForm`,modalProps:{title:I(X===`update`?`xin.table.form.editTitle`:`xin.table.form.createTitle`),styles:{header:{marginBottom:16}},...ge},onFinish:Ve})]})}export{ge as t}; \ No newline at end of file diff --git a/public/assets/agent-B-tYZjRz.js b/public/assets/agent-B-tYZjRz.js new file mode 100644 index 0000000..2d040cc --- /dev/null +++ b/public/assets/agent-B-tYZjRz.js @@ -0,0 +1 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,t as n}from"./jsx-runtime-ADHq9IcL.js";import{o as r}from"./chunk-KS7C4IRE-CN93VkYO.js";import{t as i}from"./typography-C2UybztD.js";import{t as a}from"./tooltip-CRuv8UNz.js";import{t as o}from"./space-BqavXZJj.js";import{t as s}from"./button-CcpWP-mq.js";import{t as c}from"./app-BscZ5bao.js";import{t as l}from"./empty-oL0hNsAh.js";import{t as u}from"./avatar-ZeeUR_v9.js";import{t as d}from"./card-BFxeciPE.js";import{t as f}from"./spin-BELbZOk0.js";import{t as p}from"./switch-BWactV-h.js";import{t as m}from"./tag-BMkLMUVK.js";import{t as h}from"./theme-D6zyXNMh.js";import{t as g}from"./useTranslation-DIuTqE8W.js";import{n as _,r as v}from"./agent-CqLbN1cd.js";var y=e(t(),1),b=n(),{Title:x,Text:S,Paragraph:C}=i;function w(){let{t:e}=g(),{token:t}=h.useToken(),{message:n}=c.useApp(),i=r(),[w,T]=(0,y.useState)([]),[E,D]=(0,y.useState)(!1),O=(0,y.useCallback)(async()=>{D(!0);try{let e=await _();T(e.data.data??[])}finally{D(!1)}},[]);(0,y.useEffect)(()=>{O()},[O]);let k=async(t,r)=>{try{await v(t,{enabled:r}),T(e=>e.map(e=>e.id===t?{...e,enabled:r}:e)),n.success(e(`ai.agent.update.success`))}catch{n.error(e(`ai.agent.update.failed`))}};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:t.marginLG},children:(0,b.jsxs)(`div`,{children:[(0,b.jsx)(x,{level:3,style:{marginBottom:t.marginXS},children:e(`ai.agent.page.title`)}),(0,b.jsx)(S,{type:`secondary`,children:e(`ai.agent.page.description`)})]})}),(0,b.jsx)(f,{spinning:E,children:w.length>0?(0,b.jsx)(`div`,{className:`flex flex-wrap gap-6`,children:w.map(n=>(0,b.jsx)(a,{title:n.description,children:(0,b.jsxs)(d,{hoverable:!0,variant:`borderless`,styles:{body:{width:300,padding:20,overflow:`hidden`}},children:[(0,b.jsxs)(`div`,{className:`flex justify-between items-center mb-2.5`,children:[(0,b.jsxs)(o,{align:`center`,children:[(0,b.jsx)(u,{src:n.icon,size:32}),(0,b.jsx)(`span`,{style:{fontWeight:700,fontSize:18},children:n.name})]}),(0,b.jsx)(p,{checked:n.enabled,size:`small`,onChange:e=>k(n.id,e)})]}),(0,b.jsx)(C,{type:`secondary`,ellipsis:{rows:2},style:{marginBottom:t.marginSM},children:n.description}),(0,b.jsx)(o,{size:[4,4],wrap:!0,children:n.tags?.map(e=>(0,b.jsx)(m,{color:`blue`,children:e},e))}),(0,b.jsx)(`div`,{style:{marginTop:t.marginSM},children:(0,b.jsx)(s,{type:`primary`,size:`small`,block:!0,onClick:()=>i(`/ai/chat?agent_id=${n.id}`),children:e(`ai.agent.goChat`)})})]})}))}):(0,b.jsx)(l,{description:e(`ai.agent.empty`)})})]})}export{w as default}; \ No newline at end of file diff --git a/public/assets/agent-C0Bl3C-v.js b/public/assets/agent-C0Bl3C-v.js deleted file mode 100644 index 985bca7..0000000 --- a/public/assets/agent-C0Bl3C-v.js +++ /dev/null @@ -1 +0,0 @@ -import{Or as e,Tr as t,t as n}from"./jsx-runtime-NwRKtVrk.js";import{r}from"./statusUtils-G17j4Ng-.js";import{t as i}from"./button-CM-rzMOH.js";import{t as a}from"./space-Dvitgohy.js";import{t as o}from"./card-D7XvzVif.js";import{t as s}from"./spin-DV35Mdw9.js";import{t as c}from"./tag-C0Yg14A-.js";import{$ as l,W as u,Y as d,_ as f,g as p,h as m,it as h,s as g}from"./index-B7MUL4ct.js";import{n as _,r as v}from"./agent-D8tKYnoa.js";var y=e(t(),1),b=n(),{Title:x,Text:S,Paragraph:C}=m;function w(){let{t:e}=g(),{token:t}=p.useToken(),{message:n}=l.useApp(),m=h(),[w,T]=(0,y.useState)([]),[E,D]=(0,y.useState)(!1),O=(0,y.useCallback)(async()=>{D(!0);try{T((await _()).data.data??[])}finally{D(!1)}},[]);(0,y.useEffect)(()=>{O()},[O]);let k=async(t,r)=>{try{await v(t,{enabled:r}),T(e=>e.map(e=>e.id===t?{...e,enabled:r}:e)),n.success(e(`ai.agent.update.success`))}catch{n.error(e(`ai.agent.update.failed`))}};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:t.marginLG},children:(0,b.jsxs)(`div`,{children:[(0,b.jsx)(x,{level:3,style:{marginBottom:t.marginXS},children:e(`ai.agent.page.title`)}),(0,b.jsx)(S,{type:`secondary`,children:e(`ai.agent.page.description`)})]})}),(0,b.jsx)(s,{spinning:E,children:w.length>0?(0,b.jsx)(`div`,{className:`flex flex-wrap gap-6`,children:w.map(n=>(0,b.jsx)(r,{title:n.description,children:(0,b.jsxs)(o,{hoverable:!0,variant:`borderless`,styles:{body:{width:300,padding:20,overflow:`hidden`}},children:[(0,b.jsxs)(`div`,{className:`flex justify-between items-center mb-2.5`,children:[(0,b.jsxs)(a,{align:`center`,children:[(0,b.jsx)(d,{src:n.icon,size:32}),(0,b.jsx)(`span`,{style:{fontWeight:700,fontSize:18},children:n.name})]}),(0,b.jsx)(f,{checked:n.enabled,size:`small`,onChange:e=>k(n.id,e)})]}),(0,b.jsx)(C,{type:`secondary`,ellipsis:{rows:2},style:{marginBottom:t.marginSM},children:n.description}),(0,b.jsx)(a,{size:[4,4],wrap:!0,children:n.tags?.map(e=>(0,b.jsx)(c,{color:`blue`,children:e},e))}),(0,b.jsx)(`div`,{style:{marginTop:t.marginSM},children:(0,b.jsx)(i,{type:`primary`,size:`small`,block:!0,onClick:()=>m(`/ai/chat?agent_id=${n.id}`),children:e(`ai.agent.goChat`)})})]})}))}):(0,b.jsx)(u,{description:e(`ai.agent.empty`)})})]})}export{w as default}; \ No newline at end of file diff --git a/public/assets/agent-D8tKYnoa.js b/public/assets/agent-CqLbN1cd.js similarity index 76% rename from public/assets/agent-D8tKYnoa.js rename to public/assets/agent-CqLbN1cd.js index e7c49fc..abd424d 100644 --- a/public/assets/agent-D8tKYnoa.js +++ b/public/assets/agent-CqLbN1cd.js @@ -1 +1 @@ -import{t as e}from"./request-Blbag3Ot.js";async function t(){return e({url:`/ai/agent`,method:`get`})}async function n(t){return e({url:`/ai/agent/${t}`,method:`get`})}async function r(t,n){return e({url:`/ai/agent/${t}`,method:`put`,data:n})}export{t as n,r,n as t}; \ No newline at end of file +import{t as e}from"./request-Vytbr90w.js";async function t(){return e({url:`/ai/agent`,method:`get`})}async function n(t){return e({url:`/ai/agent/${t}`,method:`get`})}async function r(t,n){return e({url:`/ai/agent/${t}`,method:`put`,data:n})}export{t as n,r,n as t}; \ No newline at end of file diff --git a/public/assets/ai-B-FWBJej.js b/public/assets/ai-B-FWBJej.js deleted file mode 100644 index 1e594a6..0000000 --- a/public/assets/ai-B-FWBJej.js +++ /dev/null @@ -1,2 +0,0 @@ -import{Or as e,Tr as t,t as n}from"./jsx-runtime-NwRKtVrk.js";import{t as r}from"./request-Blbag3Ot.js";import{t as i}from"./alert-DAtI4UaJ.js";import{t as a}from"./button-CM-rzMOH.js";import{t as o}from"./card-D7XvzVif.js";import{t as s}from"./XinForm-ihfVpzb6.js";import{d as c}from"./es-Do50EHua.js";import{t as l}from"./spin-DV35Mdw9.js";import{C as u,N as d,b as f,h as p,s as m,v as h}from"./index-B7MUL4ct.js";var g=e(t(),1);async function _(){return r({url:`/system/ai/list`,method:`get`})}async function v(){return r({url:`/system/ai/config`,method:`get`})}async function y(e){return r({url:`/system/ai/save`,method:`post`,data:e})}var b=n(),{Text:x,Title:S}=p,C=()=>{let{t:e}=m(),t=(0,g.useRef)(null),[n]=u.useForm(),[r,p]=(0,g.useState)({default:[]}),[C,w]=(0,g.useState)(!1),[T,E]=(0,g.useState)(null),[D,O]=(0,g.useState)(null),k=e=>({dependencies:[`default`],visible:t=>t.default===e}),A=t=>({dataIndex:[`providers`,t,`key`],valueType:`password`,title:e(`system.ai.provider.api_key`,{lab:t}),fieldProps:{placeholder:`sk-...`},colProps:{span:16},dependency:k(t)}),j=(t,n=``)=>({dataIndex:[`providers`,t,`url`],valueType:`text`,title:e(`system.ai.provider.url`,{lab:t}),fieldProps:{placeholder:e(`system.ai.provider.url.placeholder`,{url:n})},colProps:{span:8},dependency:k(t)}),M=[A(`anthropic`),j(`anthropic`,`https://api.anthropic.com/v1`)],N=[A(`openai`),j(`openai`,`https://api.openai.com/v1`)],P=[A(`gemini`),j(`gemini`,`https://generativelanguage.googleapis.com/v1beta/`)],F=[A(`ollama`),j(`ollama`,`http://localhost:11434`)],I=[A(`azure`),j(`azure`,`https://.openai.azure.com`),{dataIndex:[`providers`,`azure`,`api_version`],valueType:`text`,title:e(`system.ai.azure.api_version`),fieldProps:{placeholder:`2025-04-01-preview`},colProps:{span:8},dependency:k(`azure`)},{dataIndex:[`providers`,`azure`,`deployment`],valueType:`text`,title:e(`system.ai.azure.deployment`),fieldProps:{placeholder:`gpt-4o`},colProps:{span:8},dependency:k(`azure`)},{dataIndex:[`providers`,`azure`,`embedding_deployment`],valueType:`text`,title:e(`system.ai.azure.embedding_deployment`),fieldProps:{placeholder:`text-embedding-3-small`},colProps:{span:8},dependency:k(`azure`)},{dataIndex:[`providers`,`azure`,`image_deployment`],valueType:`text`,title:e(`system.ai.azure.image_deployment`),fieldProps:{placeholder:`gpt-image-1`},colProps:{span:12},dependency:k(`azure`)}],L=[{dataIndex:[`providers`,`bedrock`,`region`],valueType:`text`,title:e(`system.ai.bedrock.region`),fieldProps:{placeholder:`us-east-1`},colProps:{span:12},dependency:k(`bedrock`)},A(`bedrock`),{dataIndex:[`providers`,`bedrock`,`access_key_id`],valueType:`password`,title:e(`system.ai.bedrock.access_key_id`),fieldProps:{placeholder:e(`system.ai.provider.api_key.placeholder`)},colProps:{span:12},dependency:k(`bedrock`)},{dataIndex:[`providers`,`bedrock`,`secret_access_key`],valueType:`password`,title:e(`system.ai.bedrock.secret_access_key`),fieldProps:{placeholder:e(`system.ai.provider.api_key.placeholder`)},colProps:{span:12},dependency:k(`bedrock`)},{dataIndex:[`providers`,`bedrock`,`session_token`],valueType:`password`,title:e(`system.ai.bedrock.session_token`),fieldProps:{placeholder:e(`system.ai.provider.api_key.placeholder`)},colProps:{span:24},dependency:k(`bedrock`)}],R=[{dataIndex:`default`,valueType:`radio`,title:e(`system.ai.default`),tooltip:e(`system.ai.default.tooltip`),colProps:{span:24},fieldProps:{options:r.default.map(e=>({label:e,value:e}))}},...M,...N,...P,...I,...L,...F,A(`cohere`),A(`deepseek`),A(`eleven`),A(`groq`),A(`jina`),A(`mistral`),A(`openrouter`),A(`voyageai`),A(`xai`)];(0,g.useEffect)(()=>{z(),_().then(e=>e.data.data&&p(e.data.data))},[]);let z=async()=>{let{data:e}=await v();e.success&&n.setFieldsValue(e.data)};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(`div`,{className:`mb-5`,children:[(0,b.jsx)(S,{level:3,children:e(`system.ai.page.title`)}),(0,b.jsx)(x,{type:`secondary`,children:e(`system.ai.page.description`)})]}),(0,b.jsxs)(h,{gutter:24,children:[(0,b.jsx)(d,{span:16,children:(0,b.jsx)(o,{variant:`borderless`,children:(0,b.jsx)(s,{columns:R,layout:`vertical`,formRef:t,form:n,grid:!0,onFinish:async t=>{await y(t),f.success(e(`system.ai.save.success`))},rowProps:{gutter:[10,0]}})})}),(0,b.jsx)(d,{span:8,children:(0,b.jsx)(o,{title:e(`system.ai.test.title`),children:(0,b.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,b.jsx)(x,{type:`secondary`,children:e(`system.ai.test.hint`)}),(0,b.jsx)(a,{type:`primary`,block:!0,icon:(0,b.jsx)(c,{}),loading:C,onClick:async()=>{w(!0),E(null),O(null);try{let t=localStorage.getItem(`token`),n=await fetch(`/index.php/system/ai/test`,{method:`POST`,headers:{Authorization:`Bearer ${t}`,Accept:`text/event-stream`}});if(!n.ok){let e=await n.json().catch(()=>null);throw Error(e?.msg||`HTTP ${n.status}`)}let r=n.body?.getReader();if(!r)throw Error(`Stream not supported`);let i=new TextDecoder,a=``,o=``;for(;;){let{done:e,value:t}=await r.read();if(e)break;a+=i.decode(t,{stream:!0});let n=a.split(` -`);a=n.pop()||``;for(let e of n){if(!e.startsWith(`data: `))continue;let t=e.slice(6).trim();if(t!==`[DONE]`)try{let e=JSON.parse(t);e.type===`text_delta`&&e.delta&&(o+=e.delta,E(o))}catch{}}}f.success(e(`system.ai.test.success`))}catch(e){let t=e?.message||`Connection test failed`;O(t),f.error(t)}finally{w(!1)}},children:e(C?`system.ai.test.testing`:`system.ai.test.button`)}),C&&!T&&(0,b.jsx)(`div`,{className:`flex justify-center py-8`,children:(0,b.jsx)(l,{description:e(`system.ai.test.testing`)})}),T&&(0,b.jsx)(i,{type:`success`,title:e(`system.ai.test.success`),description:T,showIcon:!0}),D&&(0,b.jsx)(i,{type:`error`,title:e(`system.ai.test.error`),description:D,showIcon:!0})]})})})]})]})};export{C as default}; \ No newline at end of file diff --git a/public/assets/ai-Ch0jvFq_.js b/public/assets/ai-Ch0jvFq_.js new file mode 100644 index 0000000..e9be2cd --- /dev/null +++ b/public/assets/ai-Ch0jvFq_.js @@ -0,0 +1,2 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,t as n}from"./jsx-runtime-ADHq9IcL.js";import{t as r}from"./request-Vytbr90w.js";import{t as i}from"./typography-C2UybztD.js";import{s as a}from"./lodash-D-pgfsxw.js";import{t as o}from"./alert-DNqab9Ea.js";import{t as s}from"./button-CcpWP-mq.js";import{t as c}from"./XinForm-CH1TH01p.js";import{t as l}from"./card-BFxeciPE.js";import{t as u}from"./spin-BELbZOk0.js";import{n as d,t as f}from"./row-DQ81_S1d.js";import{t as p}from"./form-CNvo0lCF.js";import{r as m}from"./PictureOutlined-5m8FAlCn.js";import{t as h}from"./useTranslation-DIuTqE8W.js";var g=e(t(),1);async function _(){return r({url:`/system/ai/list`,method:`get`})}async function v(){return r({url:`/system/ai/config`,method:`get`})}async function y(e){return r({url:`/system/ai/save`,method:`post`,data:e})}var b=n(),{Text:x,Title:S}=i,C=()=>{let{t:e}=h(),t=(0,g.useRef)(null),[n]=p.useForm(),[r,i]=(0,g.useState)({default:[]}),[C,w]=(0,g.useState)(!1),[T,E]=(0,g.useState)(null),[D,O]=(0,g.useState)(null),k=e=>({dependencies:[`default`],visible:t=>t.default===e}),A=t=>({dataIndex:[`providers`,t,`key`],valueType:`password`,title:e(`system.ai.provider.api_key`,{lab:t}),fieldProps:{placeholder:`sk-...`},colProps:{span:16},dependency:k(t)}),j=(t,n=``)=>({dataIndex:[`providers`,t,`url`],valueType:`text`,title:e(`system.ai.provider.url`,{lab:t}),fieldProps:{placeholder:e(`system.ai.provider.url.placeholder`,{url:n})},colProps:{span:8},dependency:k(t)}),M=[A(`anthropic`),j(`anthropic`,`https://api.anthropic.com/v1`)],N=[A(`openai`),j(`openai`,`https://api.openai.com/v1`)],P=[A(`gemini`),j(`gemini`,`https://generativelanguage.googleapis.com/v1beta/`)],F=[A(`ollama`),j(`ollama`,`http://localhost:11434`)],I=[A(`azure`),j(`azure`,`https://.openai.azure.com`),{dataIndex:[`providers`,`azure`,`api_version`],valueType:`text`,title:e(`system.ai.azure.api_version`),fieldProps:{placeholder:`2025-04-01-preview`},colProps:{span:8},dependency:k(`azure`)},{dataIndex:[`providers`,`azure`,`deployment`],valueType:`text`,title:e(`system.ai.azure.deployment`),fieldProps:{placeholder:`gpt-4o`},colProps:{span:8},dependency:k(`azure`)},{dataIndex:[`providers`,`azure`,`embedding_deployment`],valueType:`text`,title:e(`system.ai.azure.embedding_deployment`),fieldProps:{placeholder:`text-embedding-3-small`},colProps:{span:8},dependency:k(`azure`)},{dataIndex:[`providers`,`azure`,`image_deployment`],valueType:`text`,title:e(`system.ai.azure.image_deployment`),fieldProps:{placeholder:`gpt-image-1`},colProps:{span:12},dependency:k(`azure`)}],L=[{dataIndex:[`providers`,`bedrock`,`region`],valueType:`text`,title:e(`system.ai.bedrock.region`),fieldProps:{placeholder:`us-east-1`},colProps:{span:12},dependency:k(`bedrock`)},A(`bedrock`),{dataIndex:[`providers`,`bedrock`,`access_key_id`],valueType:`password`,title:e(`system.ai.bedrock.access_key_id`),fieldProps:{placeholder:e(`system.ai.provider.api_key.placeholder`)},colProps:{span:12},dependency:k(`bedrock`)},{dataIndex:[`providers`,`bedrock`,`secret_access_key`],valueType:`password`,title:e(`system.ai.bedrock.secret_access_key`),fieldProps:{placeholder:e(`system.ai.provider.api_key.placeholder`)},colProps:{span:12},dependency:k(`bedrock`)},{dataIndex:[`providers`,`bedrock`,`session_token`],valueType:`password`,title:e(`system.ai.bedrock.session_token`),fieldProps:{placeholder:e(`system.ai.provider.api_key.placeholder`)},colProps:{span:24},dependency:k(`bedrock`)}],R=[{dataIndex:`default`,valueType:`radio`,title:e(`system.ai.default`),tooltip:e(`system.ai.default.tooltip`),colProps:{span:24},fieldProps:{options:r.default.map(e=>({label:e,value:e}))}},...M,...N,...P,...I,...L,...F,A(`cohere`),A(`deepseek`),A(`eleven`),A(`groq`),A(`jina`),A(`mistral`),A(`openrouter`),A(`voyageai`),A(`xai`)];(0,g.useEffect)(()=>{z(),_().then(e=>e.data.data&&i(e.data.data))},[]);let z=async()=>{let{data:e}=await v();e.success&&n.setFieldsValue(e.data)};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(`div`,{className:`mb-5`,children:[(0,b.jsx)(S,{level:3,children:e(`system.ai.page.title`)}),(0,b.jsx)(x,{type:`secondary`,children:e(`system.ai.page.description`)})]}),(0,b.jsxs)(f,{gutter:24,children:[(0,b.jsx)(d,{span:16,children:(0,b.jsx)(l,{variant:`borderless`,children:(0,b.jsx)(c,{columns:R,layout:`vertical`,formRef:t,form:n,grid:!0,onFinish:async t=>{await y(t),m.success(e(`system.ai.save.success`))},rowProps:{gutter:[10,0]}})})}),(0,b.jsx)(d,{span:8,children:(0,b.jsx)(l,{title:e(`system.ai.test.title`),children:(0,b.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,b.jsx)(x,{type:`secondary`,children:e(`system.ai.test.hint`)}),(0,b.jsx)(s,{type:`primary`,block:!0,icon:(0,b.jsx)(a,{}),loading:C,onClick:async()=>{w(!0),E(null),O(null);try{let t=localStorage.getItem(`token`),n=await fetch(`/index.php/system/ai/test`,{method:`POST`,headers:{Authorization:`Bearer ${t}`,Accept:`text/event-stream`}});if(!n.ok){let e=await n.json().catch(()=>null);throw Error(e?.msg||`HTTP ${n.status}`)}let r=n.body?.getReader();if(!r)throw Error(`Stream not supported`);let i=new TextDecoder,a=``,o=``;for(;;){let{done:e,value:t}=await r.read();if(e)break;a+=i.decode(t,{stream:!0});let n=a.split(` +`);a=n.pop()||``;for(let e of n){if(!e.startsWith(`data: `))continue;let t=e.slice(6).trim();if(t!==`[DONE]`)try{let e=JSON.parse(t);e.type===`text_delta`&&e.delta&&(o+=e.delta,E(o))}catch{}}}m.success(e(`system.ai.test.success`))}catch(e){let t=e?.message||`Connection test failed`;O(t),m.error(t)}finally{w(!1)}},children:e(C?`system.ai.test.testing`:`system.ai.test.button`)}),C&&!T&&(0,b.jsx)(`div`,{className:`flex justify-center py-8`,children:(0,b.jsx)(u,{description:e(`system.ai.test.testing`)})}),T&&(0,b.jsx)(o,{type:`success`,title:e(`system.ai.test.success`),description:T,showIcon:!0}),D&&(0,b.jsx)(o,{type:`error`,title:e(`system.ai.test.error`),description:D,showIcon:!0})]})})})]})]})};export{C as default}; \ No newline at end of file diff --git a/public/assets/alert-DAtI4UaJ.js b/public/assets/alert-DAtI4UaJ.js deleted file mode 100644 index 68bb266..0000000 --- a/public/assets/alert-DAtI4UaJ.js +++ /dev/null @@ -1 +0,0 @@ -import{$t as e,Bn as t,Gt as n,Ht as r,Kt as i,Or as a,Sn as o,Sr as s,St as c,Tr as l,Ut as u,Vt as d,Wt as f,Zt as p,an as m,cn as h,dn as g,hn as _,pn as v,tr as y,wn as b}from"./jsx-runtime-NwRKtVrk.js";import{n as x,r as S,t as C}from"./ExclamationCircleFilled-gmOeErIU.js";import{b as w}from"./CopyOutlined-bJLUKQgS.js";var T=a(l()),E=(e,t,n)=>({background:e,[`${n}-icon`]:{color:t}}),D=t=>{let{componentCls:n,motionDurationSlow:r,marginXS:i,marginSM:a,fontSize:o,fontSizeLG:s,lineHeight:c,borderRadiusLG:l,motionEaseInOutCirc:u,withDescriptionIconSize:d,colorText:f,colorTextHeading:p,withDescriptionPadding:h,defaultPadding:g,lineWidth:_,lineType:v,colorSuccessBorder:y,colorWarningBorder:b,colorErrorBorder:x,colorInfoBorder:S}=t;return{[n]:{...e(t),position:`relative`,display:`flex`,alignItems:`center`,padding:g,wordWrap:`break-word`,borderRadius:l,borderWidth:m(_),borderStyle:v,[`&${n}-success`]:{borderColor:y},[`&${n}-info`]:{borderColor:S},[`&${n}-warning`]:{borderColor:b},[`&${n}-error`]:{borderColor:x},[`&${n}-filled`]:{borderColor:`transparent`},[`&${n}-rtl`]:{direction:`rtl`},[`${n}-section`]:{flex:1,minWidth:0},[`${n}-icon`]:{marginInlineEnd:i,lineHeight:0},"&-description":{display:`none`,fontSize:o,lineHeight:c},"&-title":{color:p},[`&${n}-motion-leave`]:{overflow:`hidden`,opacity:1,transition:[`max-height`,`opacity`,`padding-top`,`padding-bottom`,`margin-bottom`].map(e=>`${e} ${r} ${u}`).join(`, `)},[`&${n}-motion-leave-active`]:{maxHeight:0,marginBottom:`0 !important`,paddingTop:0,paddingBottom:0,opacity:0}},[`${n}-with-description`]:{alignItems:`flex-start`,padding:h,[`${n}-icon`]:{marginInlineEnd:a,fontSize:d,lineHeight:0},[`${n}-title`]:{display:`block`,marginBottom:i,color:p,fontSize:s},[`${n}-description`]:{display:`block`,color:f}},[`${n}-banner`]:{marginBottom:0,border:`0 !important`,borderRadius:0}}},O=e=>{let{componentCls:t,colorSuccess:n,colorSuccessBg:r,colorWarning:i,colorWarningBg:a,colorError:o,colorErrorBg:s,colorInfo:c,colorInfoBg:l}=e;return{[t]:{"&-success":E(r,n,t),"&-info":E(l,c,t),"&-warning":E(a,i,t),"&-error":{...E(s,o,t),[`${t}-description > pre`]:{margin:0,padding:0}}}}},k=e=>{let{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:i,fontSizeIcon:a,colorIcon:o,colorIconHover:s}=e;return{[t]:{[`${t}-actions`]:{marginInlineStart:i},[`${t}-close-icon`]:{marginInlineStart:i,padding:0,overflow:`hidden`,fontSize:a,lineHeight:m(a),backgroundColor:`transparent`,border:`none`,cursor:`pointer`,...p(e),[`${n}-close`]:{color:o,transition:`color ${r}`,"&:hover":{color:s}}},"&-close-text":{color:o,transition:`color ${r}`,"&:hover":{color:s}}}}},ee=c(`Alert`,e=>[D(e),O(e),k(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`})),te=e=>{let{icon:t,type:n,className:r,style:i,successIcon:a,infoIcon:o,warningIcon:s,errorIcon:c}=e,l={success:a??T.createElement(S,null),info:o??T.createElement(w,null),error:c??T.createElement(x,null),warning:s??T.createElement(C,null)};return T.createElement(`span`,{className:r,style:i},t??l[n])},ne=e=>{let{isClosable:t,prefixCls:n,closeIcon:r,handleClose:i,ariaProps:a,className:o,style:c}=e,l=r===!0||r===void 0?T.createElement(b,null):r;return t?T.createElement(`button`,{type:`button`,onClick:i,className:s(`${n}-close-icon`,o),tabIndex:0,style:c,...a},l):null},A=T.forwardRef((e,n)=>{let{description:r,prefixCls:i,message:a,title:c,banner:l,className:u,rootClassName:d,style:f,onMouseEnter:p,onMouseLeave:m,onClick:b,afterClose:x,showIcon:S,closable:C,closeText:w,closeIcon:E,action:D,id:O,styles:k,classNames:A,...j}=e,M=c??a,[N,re]=T.useState(!1),P=T.useRef(null);T.useImperativeHandle(n,()=>({nativeElement:P.current}));let{getPrefixCls:ie,direction:F,variant:ae,closable:I,closeIcon:L,className:R,style:z,classNames:B,styles:V,successIcon:H,infoIcon:U,warningIcon:W,errorIcon:G}=h(`alert`),K=ie(`alert`,i),[q,oe]=ee(K),{onClose:se,afterClose:ce}=_(C)?C:{},le=t=>{re(!0),(se??e.onClose)?.(t)},J=T.useMemo(()=>e.type===void 0?l?`warning`:`info`:e.type,[e.type,l]),Y=e.variant??ae??`outlined`,X=T.useMemo(()=>_(C)&&C.closeIcon||w?!0:typeof C==`boolean`?C:E!==!1&&v(E)?!0:!!I,[w,E,C,I]),Z=l&&S===void 0?!0:S,ue={...e,prefixCls:K,variant:Y,type:J,showIcon:Z,closable:X},[Q,$]=g([B,A],[V,k],{props:ue}),de=s(K,`${K}-${J}`,`${K}-${Y}`,{[`${K}-with-description`]:!!r,[`${K}-no-icon`]:!Z,[`${K}-banner`]:!!l,[`${K}-rtl`]:F===`rtl`},R,u,d,Q.root,oe,q),fe=t(j,{aria:!0,data:!0}),pe=T.useMemo(()=>_(C)&&C.closeIcon?C.closeIcon:w||(E===void 0?_(I)&&I.closeIcon?I.closeIcon:L:E),[E,C,I,w,L]),me=T.useMemo(()=>{let e=C??I;return _(e)?t(e,{data:!0,aria:!0}):{}},[C,I]);return T.createElement(o,{visible:!N,motionName:`${K}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:ce??x},({className:t,style:n},i)=>T.createElement(`div`,{id:O,ref:y(P,i),"data-show":!N,className:s(de,t),style:{...$.root,...z,...f,...n},onMouseEnter:p,onMouseLeave:m,onClick:b,role:`alert`,...fe},Z?T.createElement(te,{className:s(`${K}-icon`,Q.icon),style:$.icon,description:r,icon:e.icon,prefixCls:K,type:J,successIcon:H,infoIcon:U,warningIcon:W,errorIcon:G}):null,T.createElement(`div`,{className:s(`${K}-section`,Q.section),style:$.section},M?T.createElement(`div`,{className:s(`${K}-title`,Q.title),style:$.title},M):null,r?T.createElement(`div`,{className:s(`${K}-description`,Q.description),style:$.description},r):null),D?T.createElement(`div`,{className:s(`${K}-actions`,Q.actions),style:$.actions},D):null,T.createElement(ne,{className:Q.close,style:$.close,isClosable:X,prefixCls:K,closeIcon:pe,handleClose:le,ariaProps:me})))});function j(e,t,n){return t=u(t),d(e,r()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}var M=function(e){function t(){var e;return i(this,t),e=j(this,t,arguments),e.state={error:void 0,info:{}},e}return f(t,e),n(t,[{key:`componentDidCatch`,value:function(e,t){this.setState({error:e,info:t})}},{key:`render`,value:function(){let{message:e,title:t,description:n,id:r,children:i}=this.props,{error:a,info:o}=this.state,s=t??e,c=o?.componentStack||null,l=v(s)?s:a?.toString(),u=v(n)?n:c;return a?T.createElement(A,{id:r,type:`error`,title:l,description:T.createElement(`pre`,{style:{fontSize:`0.9em`,overflowX:`auto`}},u)}):i}}])}(T.PureComponent),N=A;N.ErrorBoundary=M;export{N as t}; \ No newline at end of file diff --git a/public/assets/alert-DNqab9Ea.js b/public/assets/alert-DNqab9Ea.js new file mode 100644 index 0000000..1454a0c --- /dev/null +++ b/public/assets/alert-DNqab9Ea.js @@ -0,0 +1 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Cn as t,Dn as n,Dr as r,En as i,Et as a,Jt as o,Mt as s,Pn as c,Sn as l,St as u,Tn as d,Vn as f,Wt as p,Xn as m,Zt as h,ur as g,wn as _,wt as v,xt as y,zn as b}from"./jsx-runtime-ADHq9IcL.js";import{t as x}from"./CheckCircleFilled-D9xa2k05.js";import{t as S}from"./CloseCircleFilled-BARdd-Ff.js";import{r as C}from"./PlusOutlined-W6xCIIXs.js";import{t as w}from"./ExclamationCircleFilled-BF18pnJ8.js";import{_ as T}from"./context-o-GHk4GQ.js";var E=e(r()),D=(e,t,n)=>({background:e,[`${n}-icon`]:{color:t}}),O=e=>{let{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:i,fontSize:a,fontSizeLG:o,lineHeight:s,borderRadiusLG:l,motionEaseInOutCirc:u,withDescriptionIconSize:d,colorText:f,colorTextHeading:p,withDescriptionPadding:m,defaultPadding:g,lineWidth:_,lineType:v,colorSuccessBorder:y,colorWarningBorder:b,colorErrorBorder:x,colorInfoBorder:S}=e;return{[t]:{...h(e),position:`relative`,display:`flex`,alignItems:`center`,padding:g,wordWrap:`break-word`,borderRadius:l,borderWidth:c(_),borderStyle:v,[`&${t}-success`]:{borderColor:y},[`&${t}-info`]:{borderColor:S},[`&${t}-warning`]:{borderColor:b},[`&${t}-error`]:{borderColor:x},[`&${t}-filled`]:{borderColor:`transparent`},[`&${t}-rtl`]:{direction:`rtl`},[`${t}-section`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:`none`,fontSize:a,lineHeight:s},"&-title":{color:p},[`&${t}-motion-leave`]:{overflow:`hidden`,opacity:1,transition:[`max-height`,`opacity`,`padding-top`,`padding-bottom`,`margin-bottom`].map(e=>`${e} ${n} ${u}`).join(`, `)},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:`0 !important`,paddingTop:0,paddingBottom:0,opacity:0},[`&${t}-with-description`]:{alignItems:`flex-start`,padding:m,[`${t}-icon`]:{marginInlineEnd:i,fontSize:d,lineHeight:0},[`${t}-title`]:{display:`block`,marginBottom:r,color:p,fontSize:o},[`${t}-description`]:{display:`block`,color:f}},[`&${t}-banner`]:{marginBottom:0,border:`0 !important`,borderRadius:0}}}},k=e=>{let{componentCls:t,colorSuccess:n,colorSuccessBg:r,colorWarning:i,colorWarningBg:a,colorError:o,colorErrorBg:s,colorInfo:c,colorInfoBg:l}=e;return{[t]:{"&-success":D(r,n,t),"&-info":D(l,c,t),"&-warning":D(a,i,t),"&-error":{...D(s,o,t),[`${t}-description > pre`]:{margin:0,padding:0}}}}},A=e=>{let{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:i,fontSizeIcon:a,colorIcon:s,colorIconHover:l}=e;return{[t]:{[`${t}-actions`]:{marginInlineStart:i},[`${t}-close-icon`]:{marginInlineStart:i,padding:0,overflow:`hidden`,fontSize:a,lineHeight:c(a),backgroundColor:`transparent`,border:`none`,cursor:`pointer`,...o(e),[`${n}-close`]:{color:s,transition:`color ${r}`,"&:hover":{color:l}}},"&-close-text":{color:s,transition:`color ${r}`,"&:hover":{color:l}}}}},j=p(`Alert`,e=>[O(e),k(e),A(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`})),ee=e=>{let{icon:t,type:n,className:r,style:i,successIcon:a,infoIcon:o,warningIcon:s,errorIcon:c}=e,l={success:a??E.createElement(x,null),info:o??E.createElement(T,null),error:c??E.createElement(S,null),warning:s??E.createElement(w,null)};return E.createElement(`span`,{className:r,style:i},t??l[n])},te=e=>{let{isClosable:t,prefixCls:n,closeIcon:r,handleClose:i,ariaProps:a,className:o,style:s}=e,c=r===!0||r===void 0?E.createElement(C,null):r;return t?E.createElement(`button`,{type:`button`,onClick:i,className:f(`${n}-close-icon`,o),tabIndex:0,style:s,...a},c):null},M=E.forwardRef((e,t)=>{let{description:n,prefixCls:r,message:i,title:o,banner:c,className:l,rootClassName:d,style:p,onMouseEnter:h,onMouseLeave:_,onClick:x,afterClose:S,showIcon:C,closable:w,closeText:T,closeIcon:D,action:O,id:k,styles:A,classNames:M,...N}=e,P=o??i,[F,ne]=E.useState(!1),I=E.useRef(null);E.useImperativeHandle(t,()=>({nativeElement:I.current}));let{getPrefixCls:re,direction:ie,variant:ae,closable:L,closeIcon:R,className:oe,style:z,classNames:B,styles:V,successIcon:H,infoIcon:U,warningIcon:W,errorIcon:G}=b(`alert`),K=re(`alert`,r),[se,ce]=j(K),{onClose:le,afterClose:ue}=a(w)?w:{},de=t=>{ne(!0),(le??e.onClose)?.(t)},q=E.useMemo(()=>e.type===void 0?c?`warning`:`info`:e.type,[e.type,c]),J=e.variant??ae??`outlined`,Y=E.useMemo(()=>a(w)&&w.closeIcon||T?!0:typeof w==`boolean`?w:D!==!1&&v(D)?!0:!!L,[T,D,w,L]),X=c&&C===void 0?!0:C,Z={...e,prefixCls:K,variant:J,type:q,showIcon:X,closable:Y},fe=u(z),pe=u(p),[Q,$]=y([B,M],[V,fe,A,pe],{props:Z}),me=f(K,`${K}-${q}`,`${K}-${J}`,{[`${K}-with-description`]:!!n,[`${K}-no-icon`]:!X,[`${K}-banner`]:!!c,[`${K}-rtl`]:ie===`rtl`},oe,l,d,Q.root,ce,se),he=m(N,{aria:!0,data:!0}),ge=E.useMemo(()=>a(w)&&w.closeIcon?w.closeIcon:T||(D===void 0?a(L)&&L.closeIcon?L.closeIcon:R:D),[D,w,L,T,R]),_e=E.useMemo(()=>{let e=w??L;return a(e)?m(e,{data:!0,aria:!0}):{}},[w,L]);return E.createElement(s,{visible:!F,motionName:`${K}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:ue??S},({className:t,style:r},i)=>E.createElement(`div`,{id:k,ref:g(I,i),"data-show":!F,className:f(me,t),style:{...$.root,...r},onMouseEnter:h,onMouseLeave:_,onClick:x,role:`alert`,...he},X?E.createElement(ee,{className:f(`${K}-icon`,Q.icon),style:$.icon,description:n,icon:e.icon,prefixCls:K,type:q,successIcon:H,infoIcon:U,warningIcon:W,errorIcon:G}):null,E.createElement(`div`,{className:f(`${K}-section`,Q.section),style:$.section},P?E.createElement(`div`,{className:f(`${K}-title`,Q.title),style:$.title},P):null,n?E.createElement(`div`,{className:f(`${K}-description`,Q.description),style:$.description},n):null),O?E.createElement(`div`,{className:f(`${K}-actions`,Q.actions),style:$.actions},O):null,E.createElement(te,{className:Q.close,style:$.close,isClosable:Y,prefixCls:K,closeIcon:ge,handleClose:de,ariaProps:_e})))});function N(e,n,r){return n=_(n),l(e,t()?Reflect.construct(n,r||[],_(e).constructor):n.apply(e,r))}var P=function(e){function t(){var e;return n(this,t),e=N(this,t,arguments),e.state={error:void 0,info:{}},e}return d(t,e),i(t,[{key:`componentDidCatch`,value:function(e,t){this.setState({error:e,info:t})}},{key:`render`,value:function(){let{message:e,title:t,description:n,id:r,children:i}=this.props,{error:a,info:o}=this.state,s=t??e,c=o?.componentStack||null,l=v(s)?s:a?.toString(),u=v(n)?n:c;return a?E.createElement(M,{id:r,type:`error`,title:l,description:E.createElement(`pre`,{style:{fontSize:`0.9em`,overflowX:`auto`}},u)}):i}}])}(E.PureComponent),F=M;F.ErrorBoundary=P;export{F as t}; \ No newline at end of file diff --git a/public/assets/analysis-CXEH-AcX.js b/public/assets/analysis-CXEH-AcX.js deleted file mode 100644 index 2f0defd..0000000 --- a/public/assets/analysis-CXEH-AcX.js +++ /dev/null @@ -1,40 +0,0 @@ -import{Dr as e,Er as t,Or as n,Tr as r,t as i}from"./jsx-runtime-NwRKtVrk.js";import{t as a}from"./table-By97ouEx.js";import{t as o}from"./space-Dvitgohy.js";import{t as s}from"./card-D7XvzVif.js";import{F as c,f as l,lt as u,ut as d}from"./es-Do50EHua.js";import{t as f}from"./list-69SP5aW7.js";import{t as p}from"./radio-CkoyL693.js";import{t as m}from"./tag-C0Yg14A-.js";import{N as h,Y as g,g as _,s as v,v as y}from"./index-B7MUL4ct.js";import{a as b,i as x,n as S,r as C,t as w}from"./tslib.es6-5i5FW2KX.js";var T=n(r()),E=function(e,t){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},E(e,t)};function D(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);E(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var O=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),k=new(function(){function e(){this.browser=new O,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(k.wxa=!0,k.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?k.worker=!0:!k.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(k.node=!0,k.svgSupported=!0):A(navigator.userAgent,k);function A(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var j=`12px sans-serif`,ee=20,te=100,ne=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function re(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n=0)s=o*n.length;else for(var c=0;cut,HashMap:()=>it,RADIAN_TO_DEGREE:()=>lt,assert:()=>Xe,assignProps:()=>Te,bind:()=>L,clone:()=>M,concatArray:()=>at,createCanvas:()=>Ee,createHashMap:()=>U,createObject:()=>ot,curry:()=>Ie,defaults:()=>P,disableUserSelect:()=>st,each:()=>F,eqNaN:()=>Ge,extend:()=>N,filter:()=>Me,find:()=>Ne,guid:()=>xe,hasOwn:()=>W,indexOf:()=>De,inherits:()=>Oe,isArray:()=>R,isArrayLike:()=>Ae,isBuiltInObject:()=>ze,isDom:()=>Ve,isFunction:()=>z,isGradientObject:()=>He,isImagePatternObject:()=>Ue,isNumber:()=>Re,isObject:()=>V,isPrimitive:()=>et,isRegExp:()=>We,isString:()=>B,isStringSafe:()=>Le,isTypedArray:()=>Be,keys:()=>Pe,logError:()=>Se,map:()=>I,merge:()=>Ce,mergeAll:()=>we,mixin:()=>ke,noop:()=>ct,normalizeCssArray:()=>Ye,reduce:()=>je,retrieve:()=>Ke,retrieve2:()=>H,retrieve3:()=>qe,setAsPrimitive:()=>$e,slice:()=>Je,trim:()=>Ze}),ce=je([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),le=je([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),ue=Object.prototype.toString,de=Array.prototype,fe=de.forEach,pe=de.filter,me=de.slice,he=de.map,ge=function(){}.constructor,_e=ge?ge.prototype:null,ve=`__proto__`,ye=2311,be=2**53-1;function xe(){return ye>=be&&(ye=0),ye++}function Se(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function M(e){if(typeof e!=`object`||!e)return e;var t=e,n=ue.call(e);if(n===`[object Array]`){if(!et(e)){t=[];for(var r=0,i=e.length;rgt,applyTransform:()=>Pt,clone:()=>mt,copy:()=>pt,create:()=>ft,dist:()=>kt,distSquare:()=>jt,distance:()=>Ot,distanceSquare:()=>At,div:()=>wt,dot:()=>Tt,len:()=>yt,lenSquare:()=>xt,length:()=>bt,lengthSquare:()=>St,lerp:()=>Nt,max:()=>It,min:()=>Ft,mul:()=>Ct,negate:()=>Mt,normalize:()=>Dt,scale:()=>Et,scaleAndAdd:()=>_t,set:()=>ht,sub:()=>vt});function ft(e,t){return e??=0,t??=0,[e,t]}function pt(e,t){return e[0]=t[0],e[1]=t[1],e}function mt(e){return[e[0],e[1]]}function ht(e,t,n){return e[0]=t,e[1]=n,e}function gt(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function _t(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function vt(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function yt(e){return Math.sqrt(xt(e))}var bt=yt;function xt(e){return e[0]*e[0]+e[1]*e[1]}var St=xt;function Ct(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function wt(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function Tt(e,t){return e[0]*t[0]+e[1]*t[1]}function Et(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Dt(e,t){var n=yt(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Ot(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var kt=Ot;function At(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var jt=At;function Mt(e,t){return e[0]=-t[0],e[1]=-t[1],e}function Nt(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function Pt(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function Ft(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function It(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Lt=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),Rt=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Lt(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new Lt(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new Lt(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new Lt(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Lt(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new Lt(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),zt=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){F(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Yt(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Ht(s,o):Ht(o,s))}function Xt(e){return e.nodeName.toUpperCase()===`CANVAS`}var Zt=/([&<>"'])/g,Qt={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function $t(e){return e==null?``:(e+``).replace(Zt,function(e,t){return Qt[t]})}var en=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,tn=[],nn=k.browser.firefox&&+k.browser.version.split(`.`)[0]<39;function rn(e,t,n,r){return n||={},r?an(e,t,n):nn&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?an(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function an(e,t,n){if(k.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Xt(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}else if(qt(tn,e,r,i)){n.zrX=tn[0],n.zrY=tn[1];return}}n.zrX=n.zrY=0}function on(e){return e||window.event}function sn(e,t,n){if(t=on(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&rn(e,i,t,n)}else{rn(e,t,t,n);var a=cn(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&en.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function cn(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function ln(e,t,n,r){e.addEventListener(t,n,r)}function un(e,t,n,r){e.removeEventListener(t,n,r)}var dn=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function fn(e){return e.which===2||e.which===3}var pn=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=mn(r)/mn(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=hn(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},_n=e({clone:()=>En,copy:()=>bn,create:()=>vn,identity:()=>yn,invert:()=>Tn,mul:()=>xn,rotate:()=>Cn,scale:()=>wn,translate:()=>Sn});function vn(){return[1,0,0,1,0,0]}function yn(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function bn(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function xn(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function Sn(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Cn(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function wn(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function Tn(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function En(e){var t=vn();return bn(t,e),t}var G=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),Dn=Math.min,On=Math.max,kn=Math.abs,An=[`x`,`y`],jn=[`width`,`height`],Mn=new G,Nn=new G,Pn=new G,Fn=new G,In=Xn(),Ln=In.minTv,Rn=In.maxTv,zn=[0,0],K=function(){function e(e,t,n,r){Vn(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=Dn(e.x,this.x),n=Dn(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=On(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=On(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return Un(vn(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&G.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=Vn(Kn,t.x,t.y,t.width,t.height)),n instanceof e||(n=Vn(qn,n.x,n.y,n.width,n.height));var s=!!r;In.reset(i,s);var c=In.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){Hn(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n){e!==t&&Hn(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Mn.x=Pn.x=t.x,Mn.y=Fn.y=t.y,Nn.x=Fn.x=t.x+t.width,Nn.y=Pn.y=t.y+t.height,Mn.transform(n),Fn.transform(n),Nn.transform(n),Pn.transform(n),e.x=Dn(Mn.x,Nn.x,Pn.x,Fn.x),e.y=Dn(Mn.y,Nn.y,Pn.y,Fn.y);var s=On(Mn.x,Nn.x,Pn.x,Fn.x),c=On(Mn.y,Nn.y,Pn.y,Fn.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=yn(e||[]),Sn(e,e,ht(Jn,-t.x,-t.y)),wn(e,e,ht(Jn,r,i)),Sn(e,e,ht(Jn,n.x,n.y)),e},e}(),Bn=K.create,Vn=K.set,Hn=K.copy,Un=K.calculateTransform,Wn=K.applyTransform,Gn=K.contain,Kn=new K(0,0,0,0),qn=new K(0,0,0,0),Jn=[];function Yn(e,t,n,r,i,a,o,s){var c=kn(t-n),l=kn(r-e),u=Dn(c,l),d=An[i],f=An[1-i],p=jn[i];t=l||!In.bidirectional)&&(Ln[d]=-l,Ln[f]=0,In.useDir&&In.calcDirMTV())))}function Xn(){var e=0,t=new G,n=new G,r={minTv:new G,maxTv:new G,useDir:!1,dirMinTv:new G,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=On(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(rr.copy(u.getBoundingRect()),u.transform&&rr.applyTransform(u.transform),rr.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function ar(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return i?Zn:!0}return!1}function or(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=ar(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==Zn)){t.target=o;break}}}function sr(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var cr=32,lr=7;function ur(e){for(var t=0;e>=cr;)t|=e&1,e>>=1;return e+t}function dr(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function fr(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function mr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function hr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function gr(e,t){var n=lr,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=lr||m>=lr);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-mr(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=lr||g>=lr);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),pr(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var vr=!1;function yr(){vr||(vr=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function br(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var xr=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=br}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Sr=k.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Cr={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=1.70158*1.525;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Cr.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Cr.bounceIn(e*2)*.5:Cr.bounceOut(e*2-1)*.5+.5}},wr=Math.pow,Tr=Math.sqrt,Er=1e-8,Dr=1e-4,Or=Tr(3),kr=1/3,Ar=ft(),jr=ft(),Mr=ft();function Nr(e){return e>-Er&&eEr||e<-Er}function Fr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function Ir(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function Lr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(Nr(u)&&Nr(d))if(Nr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}else{var h=d*d-4*u*f;if(Nr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=Tr(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-wr(-y,kr):wr(y,kr),b=b<0?-wr(-b,kr):wr(b,kr);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*Tr(u*u*u)),S=Math.acos(x)/3,C=Tr(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+Or*Math.sin(S)))/(3*o),T=(-s+C*(w-Or*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function Rr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(Nr(o)){if(Pr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(Nr(u))i[0]=-a/(2*o);else if(u>0){var d=Tr(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function zr(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function Br(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;Ar[0]=c,Ar[1]=l;for(var v=0;v<1;v+=.05)jr[0]=Fr(e,n,i,o,v),jr[1]=Fr(t,r,a,s,v),g=jt(Ar,jr),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(Nr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=Tr(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Gr(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Kr(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function qr(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;Ar[0]=o,Ar[1]=s;for(var f=0;f<1;f+=.05){jr[0]=Hr(e,n,i,f),jr[1]=Hr(t,r,a,f);var p=jt(Ar,jr);p=0&&p=1?1:Lr(0,r,a,1,e,s)&&Fr(0,i,o,1,s[0])}}}var Zr=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||ct,this.ondestroy=e.ondestroy||ct,this.onrestart=e.onrestart||ct,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1)if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=z(e)?e:Cr[e]||Xr(e)},e}(),Qr=function(){function e(e){this.value=e}return e}(),$r=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Qr(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),ei=function(){function e(e){this._list=new $r,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Qr(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),ti=e({fastLerp:()=>bi,fastMapToColor:()=>xi,lerp:()=>Si,lift:()=>vi,liftColor:()=>Ai,lum:()=>Di,mapToColor:()=>Ci,modifyAlpha:()=>Ti,modifyHSL:()=>wi,parse:()=>hi,parseCssFloat:()=>si,parseCssInt:()=>oi,random:()=>Oi,stringify:()=>Ei,toHex:()=>yi}),ni={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ri(e){return e=Math.round(e),e<0?0:e>255?255:e}function ii(e){return e=Math.round(e),e<0?0:e>360?360:e}function ai(e){return e<0?0:e>1?1:e}function oi(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?ri(parseFloat(t)/100*255):ri(parseInt(t,10))}function si(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?ai(parseFloat(t)/100):ai(parseFloat(t))}function ci(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function li(e,t,n){return e+(t-e)*n}function ui(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function di(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var fi=new ei(20),pi=null;function mi(e,t){pi&&di(pi,t),pi=fi.put(e,pi||t.slice())}function hi(e,t){if(e){t||=[];var n=fi.get(e);if(n)return di(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in ni)return di(t,ni[r]),mi(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){ui(t,0,0,0,1);return}return ui(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),mi(e,t),t}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){ui(t,0,0,0,1);return}return ui(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),mi(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?ui(t,+l[0],+l[1],+l[2],1):ui(t,0,0,0,1);u=si(l.pop());case`rgb`:if(l.length>=3)return ui(t,oi(l[0]),oi(l[1]),oi(l[2]),l.length===3?u:si(l[3])),mi(e,t),t;ui(t,0,0,0,1);return;case`hsla`:if(l.length!==4){ui(t,0,0,0,1);return}return l[3]=si(l[3]),gi(l,t),mi(e,t),t;case`hsl`:if(l.length!==3){ui(t,0,0,0,1);return}return gi(l,t),mi(e,t),t;default:return}}ui(t,0,0,0,1)}}function gi(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=si(e[1]),i=si(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],ui(t,ri(ci(o,a,n+1/3)*255),ri(ci(o,a,n)*255),ri(ci(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function _i(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function vi(e,t){var n=hi(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Ei(n,n.length===4?`rgba`:`rgb`)}}function yi(e){var t=hi(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function bi(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=ri(li(o[0],s[0],c)),n[1]=ri(li(o[1],s[1],c)),n[2]=ri(li(o[2],s[2],c)),n[3]=ai(li(o[3],s[3],c)),n}}var xi=bi;function Si(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=hi(t[i]),s=hi(t[a]),c=r-i,l=Ei([ri(li(o[0],s[0],c)),ri(li(o[1],s[1],c)),ri(li(o[2],s[2],c)),ai(li(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}var Ci=Si;function wi(e,t,n,r){var i=hi(e);if(e)return i=_i(i),t!=null&&(i[0]=ii(z(t)?t(i[0]):t)),n!=null&&(i[1]=si(z(n)?n(i[1]):n)),r!=null&&(i[2]=si(z(r)?r(i[2]):r)),Ei(gi(i),`rgba`)}function Ti(e,t){var n=hi(e);if(n&&t!=null)return n[3]=ai(t),Ei(n,`rgba`)}function Ei(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Di(e,t){var n=hi(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}function Oi(){return Ei([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],`rgb`)}var ki=new ei(100);function Ai(e){if(B(e)){var t=ki.get(e);return t||(t=vi(e,-.1),ki.put(e,t)),t}else if(He(e)){var n=N({},e);return n.colorStops=I(e.colorStops,function(e){return{offset:e.offset,color:vi(e.color,-.1)}}),n}return e}var ji=Math.round;function Mi(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=hi(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var Ni=1e-4;function Pi(e){return e-Ni}function Fi(e){return ji(e*1e3)/1e3}function Ii(e){return ji(e*1e4)/1e4}function Li(e){return`matrix(`+Fi(e[0])+`,`+Fi(e[1])+`,`+Fi(e[2])+`,`+Fi(e[3])+`,`+Ii(e[4])+`,`+Ii(e[5])+`)`}var Ri={left:`start`,right:`end`,center:`middle`,middle:`middle`};function zi(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function Bi(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function Vi(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function Hi(e){return e&&!!e.image}function Ui(e){return e&&!!e.svgElement}function Wi(e){return Hi(e)||Ui(e)}function Gi(e){return e.type===`linear`}function Ki(e){return e.type===`radial`}function qi(e){return e&&(e.type===`linear`||e.type===`radial`)}function Ji(e){return`url(#`+e+`)`}function Yi(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Xi(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*lt,i=H(e.scaleX,1),a=H(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+ji(o*lt)+`deg, `+ji(s*lt)+`deg)`),c.join(` `)}var Zi=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),Qi=Array.prototype.slice;function $i(e,t,n){return(t-e)*n+e}function ea(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=ha,s=t;if(Ae(t)){var c=ca(t);o=c,(c===1&&!Re(t[0])||c===2&&!Re(t[0][0]))&&(a=!0)}else if(Re(t)&&!Ge(t))o=la;else if(B(t))if(!isNaN(+t))o=la;else{var l=hi(t);l&&(s=l,o=fa)}else if(He(t)){var u=N({},s);u.colorStops=I(t.colorStops,function(e){return{offset:e.offset,color:hi(e.color)}}),Gi(t)?o=pa:Ki(t)&&(o=ma),s=u}i===0?this.valType=o:(o!==this.valType||o===ha)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=z(n)?n:Cr[n]||Xr(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=_a(r),c=ga(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?va:e[s];if((_a(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(_a(i))i===ua?ea(g,f[r],p[r],h):ta(g,f[r],p[r],h);else if(ga(i)){var _=f[r],v=p[r],y=i===pa;e[s]={type:y?`linear`:`radial`,x:$i(_.x,v.x,h),y:$i(_.y,v.y,h),colorStops:I(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:$i(e.offset,n.offset,h),color:sa(ea([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=$i(_.x2,v.x2,h),e[s].y2=$i(_.y2,v.y2,h)):e[s].r=$i(_.r,v.r,h)}else if(c)ea(g,f[r],p[r],h),n||(e[s]=sa(g));else{var b=$i(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===la?e[n]=e[n]+r:t===fa?(hi(e[n],va),na(va,va,r,1),e[n]=sa(va)):t===ua?na(e[n],e[n],r,1):t===da&&ra(e[n],e[n],r,1)},e}(),ba=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){Se(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Pe(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,oa(c),r),this._trackKeys.push(o)}s.addKeyframe(e,oa(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function xa(){return new Date().getTime()}var Sa=function(e){D(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=xa()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Sr(t),!e._paused&&e.update())}Sr(t)},t.prototype.start=function(){this._running||(this._time=xa(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=xa(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=xa()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new ba(e,t.loop);return this.addAnimator(n),n},t}(zt),Ca=300,wa=k.domSupported,Ta=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:I(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Ea={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Da=!1;function Oa(e){var t=e.pointerType;return t===`pen`||t===`touch`}function ka(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Aa(e){e&&(e.zrByTouch=!0)}function ja(e,t){return sn(e.dom,new Na(e,t),!0)}function Ma(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Na=function(){function e(e,t){this.stopPropagation=ct,this.stopImmediatePropagation=ct,this.preventDefault=ct,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Pa={mousedown:function(e){e=sn(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=sn(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=sn(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=sn(this.dom,e);var t=e.toElement||e.relatedTarget;Ma(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Da=!0,e=sn(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Da||(e=sn(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=sn(this.dom,e),Aa(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Pa.mousemove.call(this,e),Pa.mousedown.call(this,e)},touchmove:function(e){e=sn(this.dom,e),Aa(e),this.handler.processGesture(e,`change`),Pa.mousemove.call(this,e)},touchend:function(e){e=sn(this.dom,e),Aa(e),this.handler.processGesture(e,`end`),Pa.mouseup.call(this,e),new Date-+this.__lastTouchMomentYa||e<-Ya}var Za=[],Qa=[],$a=vn(),eo=Math.abs,to=function(){function e(){}return e.prototype.getLocalTransform=function(e){return no(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Xa(this.rotation)||Xa(this.x)||Xa(this.y)||Xa(this.scaleX-1)||Xa(this.scaleY-1)||Xa(this.skewX)||Xa(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(Ja(n),this.invTransform=null);return}n||=vn(),t?this.getLocalTransform(n):Ja(n),e&&(t?xn(n,e,n):bn(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||vn(),Tn(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Za);var n=Za[0]<0?-1:1,r=Za[1]<0?-1:1,i=((Za[0]-n)*t+n)/Za[0]||0,a=((Za[1]-r)*t+r)/Za[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||vn(),xn(Qa,e.invTransform,t),t=Qa);var n=this.originX,r=this.originY;(n||r)&&($a[4]=n,$a[5]=r,xn(Qa,t,$a),Qa[4]-=n,Qa[5]-=r,t=Qa),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Pt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Pt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&eo(e[0]-1)>1e-10&&eo(e[3]-1)>1e-10?Math.sqrt(eo(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){ao(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&Cn(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),no=to.getLocalTransform;function ro(){return new to}var io=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function ao(e,t){return Te(e,t,io)}function oo(e){so||=new ei(100),e||=`12px sans-serif`;var t=so.get(e);return t||(t={font:e,strWidthCache:new ei(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:ae.measureText(`国`,e).width,asciiCharWidth:ae.measureText(`a`,e).width},so.put(e,t)),t}var so;function co(e){if(!(lo>=uo)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=ae.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?lo=uo:i>2&&lo++,t}}var lo=0,uo=5;function fo(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=co(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function po(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=ae.measureText(t,e.font).width,n.put(t,r)),r}function mo(e,t,n,r){var i=po(oo(t),e),a=vo(t);return new K(go(0,i,n),_o(0,a,r),i,a)}function ho(e,t,n,r){var i=((e||``)+``).split(` -`);if(i.length===1)return mo(i[0],t,n,r);for(var a=new K(0,0,0,0),o=0;o=0?parseFloat(e)/100*t:parseFloat(e):e}function bo(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=yo(r[0],n.width),l+=yo(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`;break}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var xo=`__zr_normal__`,So=io.concat([`ignore`]),Co=je(io,function(e,t){return e[t]=!0,e},{ignore:!1}),wo={},To=new K(0,0,0,0),Eo=[],Do=function(){function e(e){this.id=xe(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0;break}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=To,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(wo,n,d):bo(wo,n,d),i.x=wo.x,i.y=wo.y,a=wo.align,o=wo.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=yo(f[0],d.width),m=yo(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||={};if(u){var _=g.overflowRect=g.overflowRect||new K(0,0,0,0);i.getLocalTransform(Eo),Tn(Eo,Eo),K.copy(_,d),_.applyTransform(Eo)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Ka:Ga},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&hi(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,Ei(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},N(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(V(e))for(var n=Pe(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(xo,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===xo;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(De(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){Se(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=Fo(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,Lo(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=De(r,e),a=De(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var q=function(e){D(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=De(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=De(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nGo,disposeAll:()=>Ko,getElementSSRData:()=>Xo,getInstance:()=>qo,init:()=>Wo,registerPainter:()=>Jo,registerSSRDataGetter:()=>Zo,version:()=>Qo}),zo={},Bo={};function Vo(e){delete Bo[e]}function Ho(e){if(!e)return!1;if(typeof e==`string`)return Di(e,1)0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var J=ms;function ms(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`;break}return hs(e,t,n)}function hs(e,t,n){return B(e)?_s(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function gs(e){return B(e)&&_s(e)}function _s(e){return!!ts(e).match(/%$/)}function vs(e,t,n){return isNaN(t)?n?``+e:+e:(t=ns(rs(0,t),es),e=(+e).toFixed(t),n?e:+e)}function ys(e,t,n){return t??=10,vs(e,t,n)}function bs(e){return e.sort(function(e,t){return e-t}),e}function xs(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(as(e*t)/t===e)return n}return Ss(e)}function Ss(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return rs(0,(a<0?0:i-1-a)-r)}function Cs(e,t){var n=os(ls(e[1]-e[0])/us),r=as(ls(is(t[1]-t[0]))/us),i=ns(rs(-n+r,0),es);return isFinite(i)?i:es}function ws(e,t,n){var r=is(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=ls(2*is(n||1)*is(r))/us,a=ls(is(t))/us,o=rs(0,ss(-i+a));return isFinite(o)||(o=NaN),o}function Ts(e,t,n){return e[t]&&Es(e,n)[t]||0}function Es(e,t){var n=je(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=cs(10,t),i=I(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=I(i,function(e){return os(e)}),s=je(o,function(e,t){return e+t},0),c=I(i,function(e,t){return e-o[t]});sl&&(l=c[d],u=d);++o[u],c[u]=0,++s}return I(o,function(e){return e/r})}function Ds(e,t){var n=rs(xs(e),xs(t)),r=e+t;return n>es?r:vs(r,n)}var Os=cs(2,53)-1;function ks(e){var t=ds*2;return(e%t+t)%t}function As(e){return e>-$o&&e<$o}var js=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Ms(e){if(e instanceof Date)return e;if(B(e)){var t=js.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(e==null)return new Date(NaN);return new Date(as(e))}function Ns(e){return cs(10,Ps(e))}function Ps(e){if(e===0)return 0;var t=os(ls(e)/us);return e/cs(10,t)>=10&&t++,t}function Fs(e,t){var n=Ps(e),r=cs(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,vs(e,-n)}function Is(e,t){var n=(e.length-1)*t+1,r=os(n),i=+e[r-1],a=n-r;return a?i+a*(e[r]-i):i}function Ls(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0):!1},e}();function Fc(e){e.option=e.parentModel=e.ecModel=null}function Ic(){return[1/0,-1/0]}function Lc(e,t){Vc(t)&&(te[1]&&(e[1]=t))}function Rc(e,t){Vc(t)&&te[1]&&(e[1]=t)}function Bc(e,t){Hc(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function Vc(e){return e!=null&&isFinite(e)}function Hc(e,t){return Vc(e)&&Vc(t)&&e<=t}function Uc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Wc(e){Hc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Gc(){var e=`__ec_once_`+Kc++;return function(t,n){W(t,e)||(t[e]=1,n())}}var Kc=Bs();function qc(e,t,n){var r=U(),i=0;F(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Jc(e){return e.value+``}function Yc(e){return e+``}function Xc(e,t){return H(t,!0)?e.seriesIndex+2:0}function Zc(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Qc(e,t){return{seriesType:e,overallReset:t}}function $c(e){return{overallReset:e}}var el=`.`,tl=`___EC__COMPONENT__CONTAINER___`,nl=`___EC__EXTENDED_CLASS___`;function rl(e){var t={main:``,sub:``};if(e){var n=e.split(el);t.main=n[0]||``,t.sub=n[1]||``}return t}function il(e){Xe(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function al(e){return!!(e&&e[nl])}function ol(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return sl(t)?n=function(e){D(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},Oe(n,this)),N(n.prototype,e),n[nl]=!0,n.extend=this.extend,n.superCall=dl,n.superApply=fl,n.superClass=t,n}}function sl(e){return z(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function cl(e,t){e.extend=t.extend}var ll=Math.round(Math.random()*10);function ul(e){var t=[`__\0is_clz`,ll++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function dl(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function fl(e,t,n){return this.superClass.prototype[t].apply(e,n)}function pl(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){il(r),e.prototype.type=r;var i=rl(r);if(!i.sub)t[i.main]=e;else if(i.sub!==tl){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[tl]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=rl(e),r=[],i=t[n.main];return i&&i[tl]?F(i,function(e,t){t!==tl&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[rl(e).main]},e.getAllClassMainTypes=function(){var e=[];return F(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[rl(e).main];return n&&n[tl]};function n(e){var n=t[e.main];return(!n||!n[tl])&&(n=t[e.main]={},n[tl]=!0),n}}function ml(e,t){for(var n=0;n=0||i&&De(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var hl=ml([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),gl=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return hl(this,e,t)},e}(),_l=new ei(50);function vl(e){if(typeof e==`string`){var t=_l.get(e);return t&&t.image}else return e}function yl(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=_l.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!xl(t)&&a.pending.push(o)):(t=ae.loadImage(e,bl,bl),t.__zrImageSrc=e,_l.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e}function bl(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;l++)c-=s;var u=po(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function El(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=po(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?Dl(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=po(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Dl(e,t,n){for(var r=0,i=0,a=e.length;ig&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=Tl(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)El(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=oo(l),S=0;S<_.length;S++)w=Math.max(po(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var kl=function(){function e(){}return e}(),Al=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),jl=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function Ml(e,t,n,r,i){var a=new jl,o=Vl(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=Sl.lastIndex=0,h;(h=Sl.exec(o))!=null;){var g=h.index;g>m&&Nl(a,o.substring(m,g),t,p),Nl(a,h[2],t,p,h[1]),m=Sl.lastIndex}md){var re=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length0&&m+r.accumWidth>r.width&&(u=t.split(` -`),l=!0),r.accumWidth=m}else{var h=Ll(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(` -`);for(var g=oo(c),_=0;_=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Fl=je(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Il(e){return Pl(e)?!!Fl[e]:!0}function Ll(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=oo(t),f=0;fn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Rl(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;K.set(zl,go(n,o,i),_o(r,s,a),o,s),K.intersect(t,zl,null,Bl);var c=Bl.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=go(c.x,c.width,i,!0),e.baseY=_o(c.y,c.height,a,!0)}}var zl=new K(0,0,0,0),Bl={outIntersectRect:{},clamp:!0};function Vl(e){return e==null?e=``:e+=``}function Hl(e){var t=Vl(e.text),n=e.font;return Ul(e,po(oo(n),t),vo(n),null)}function Ul(e,t,n,r){var i=new K(go(e.x||0,t,e.textAlign),_o(e.y||0,n,e.textBaseline),t,n),a=r??(Wl(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Wl(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var Gl=`__zr_style_`+Math.round(Math.random()*10),Kl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},ql={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Kl[Gl]=!0;var Jl=[`z`,`z2`,`invisible`],Yl=[`invisible`],Xl=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=Pe(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(au[0]=ru(i)*n+e,au[1]=nu(i)*r+t,ou[0]=ru(a)*n+e,ou[1]=nu(a)*r+t,l(s,au,ou),u(c,au,ou),i%=iu,i<0&&(i+=iu),a%=iu,a<0&&(a+=iu),i>a&&!o?a+=iu:ii&&(su[0]=ru(p)*n+e,su[1]=nu(p)*r+t,l(s,su,s),u(c,su,c))}var hu={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},gu=[],_u=[],vu=[],yu=[],bu=[],xu=[],Su=Math.min,Cu=Math.max,wu=Math.cos,Tu=Math.sin,Eu=Math.abs,Du=Math.PI,Ou=Du*2,ku=typeof Float32Array<`u`,Au=[];function ju(e){return Math.round(e/Du*1e8)/1e8%2*Du}function Mu(e,t){var n=ju(e[0]);n<0&&(n+=Ou);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Ou?i=n+Ou:t&&n-i>=Ou?i=n-Ou:!t&&n>i?i=n+(Ou-ju(n-i)):t&&n0&&(this._ux=Eu(n/Ua/e)||0,this._uy=Eu(n/Ua/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(hu.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Eu(e-this._xi),r=Eu(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(hu.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(hu.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(hu.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),Au[0]=r,Au[1]=i,Mu(Au,a),r=Au[0],i=Au[1];var o=i-r;return this.addData(hu.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=wu(i)*n+e,this._yi=Tu(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(hu.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(hu.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&ku&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){vu[0]=vu[1]=bu[0]=bu[1]=Number.MAX_VALUE,yu[0]=yu[1]=xu[0]=xu[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,r=0,i=0,a;for(a=0;an||Eu(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case hu.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=Vr(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case hu.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Jr(i,a,y,b,h,g,10),i=h,a=g;break;case hu.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=wu(D)*T+C,s=Tu(D)*E+w),m=Cu(T,E)*Su(Ou,Math.abs(O)),i=wu(k)*T+C,a=Tu(k)*E+w;break;case hu.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case hu.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s;break}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case hu.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case hu.L:u=n[x++],d=n[x++];var w=Eu(u-c),T=Eu(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case hu.C:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++],te=n[x++],ne=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;zr(c,k,j,te,D,gu),zr(l,A,ee,ne,D,_u),e.bezierCurveTo(gu[1],_u[1],gu[2],_u[2],gu[3],_u[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,ee,te,ne),c=te,l=ne;break;case hu.Q:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Kr(c,k,j,D,gu),Kr(l,A,ee,D,_u),e.quadraticCurveTo(gu[1],_u[1],gu[2],_u[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,ee),c=j,l=ee;break;case hu.A:var re=n[x++],ie=n[x++],ae=n[x++],oe=n[x++],se=n[x++],ce=n[x++],le=n[x++],ue=!n[x++],de=ae>oe?ae:oe,fe=Eu(ae-oe)>.001,pe=se+ce,me=!1;if(f){var E=p[g++];h+E>_&&(pe=se+ce*(_-h)/E,me=!0),h+=E}if(fe&&e.ellipse?e.ellipse(re,ie,ae,oe,le,se,pe,ue):e.arc(re,ie,de,se,pe,ue),me)break lo;C&&(o=wu(se)*ae+re,s=Tu(se)*oe+ie),c=wu(pe)*ae+re,l=Tu(pe)*oe+ie;break;case hu.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var he=n[x++],ge=n[x++];if(f){var E=p[g++];if(h+E>_){var _e=_-h;e.moveTo(u,d),e.lineTo(u+Su(_e,he),d),_e-=he,_e>0&&e.lineTo(u+he,d+Su(_e,ge)),_e-=ge,_e>0&&e.lineTo(u+Cu(he-_e,0),d+ge),_e-=he,_e>0&&e.lineTo(u,d+Cu(ge-_e,0));break lo}h+=E}e.rect(u,d,he,ge);break;case hu.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=hu,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function Pu(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=zu);var f=Math.atan2(c,s);return f<0&&(f+=zu),f>=r&&f<=i||f+zu>=r&&f+zu<=i}function Vu(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var Hu=Nu.CMD,Uu=Math.PI*2,Wu=1e-4;function Gu(e,t){return Math.abs(e-t)t&&l>r&&l>a&&l>s||l1&&Ju(),p=Fr(t,r,a,s,qu[0]),f>1&&(m=Fr(t,r,a,s,qu[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=Hr(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);Ku[0]=-c,Ku[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=Uu-1e-4){r=0,i=Uu;var u=a?1:-1;return o>=Ku[0]+e&&o<=Ku[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=Uu,i+=Uu);for(var f=0,p=0;p<2;p++){var m=Ku[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=Uu+h),(h>=r&&h<=i||h+Uu>=r&&h+Uu<=i)&&(h>Math.PI/2&&h1&&(n||(s+=Vu(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case Hu.M:u=a[m++],d=a[m++],c=u,l=d;break;case Hu.L:if(n){if(Pu(c,l,a[m],a[m+1],t,r,i))return!0}else s+=Vu(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Hu.C:if(n){if(Fu(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Yu(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Hu.Q:if(n){if(Iu(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Xu(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Hu.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=Vu(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(Bu(_,v,b,x,x+S,C,t,w,i))return!0}else s+=Zu(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case Hu.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(Pu(u,d,f,d,t,r,i)||Pu(f,d,f,p,t,r,i)||Pu(f,p,u,p,t,r,i)||Pu(u,p,u,d,t,r,i))return!0}else s+=Vu(f,d,f,p,r,i),s+=Vu(u,p,u,d,r,i);break;case Hu.Z:if(n){if(Pu(c,l,u,d,t,r,i))return!0}else s+=Vu(c,l,u,d,r,i);c=u,l=d;break}}return!n&&!Gu(l,d)&&(s+=Vu(c,l,u,d,r,i)||0),s!==0}function $u(e,t,n){return Qu(e,0,!1,t,n)}function ed(e,t,n,r){return Qu(e,t,!0,n,r)}var td=P({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Kl),nd={style:P({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ql.style)},rd=io.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),id=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Ga:t>.2?qa:Ka}else if(e)return Ka}return Ga},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(B(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Di(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Nu(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),ed(a,o/s,e,t)))return!0}if(this.hasFill())return $u(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:N(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return ot(td,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=N({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=N({},r.shape),N(c,n.shape)):(c=N({},i?this.shape:r.shape),N(c,n.shape)):s&&(c=r.shape),c)if(a){this.shape=N({},this.shape);for(var l={},u=Pe(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var fd=Math.round;function pd(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(fd(r*2)===fd(i*2)&&(e.x1=e.x2=hd(r,s,!0)),fd(a*2)===fd(o*2)&&(e.y1=e.y2=hd(a,s,!0)),e):e}}function md(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=hd(r,s,!0),e.y=hd(i,s,!0),e.width=Math.max(hd(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(hd(i+o,s,!1)-e.y,o===0?0:1),e):e}}function hd(e,t,n){if(!t)return e;var r=fd(e*2);return(r+fd(t))%2==0?r/2:(r+(n?1:-1))/2}var gd=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),_d={},vd=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new gd},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=md(_d,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?dd(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(id);vd.prototype.type=`rect`;var yd={fill:`#000`},bd=2,xd={},Sd={style:P({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ql.style)},Cd=function(e){D(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=yd,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&Id(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=Pd(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(od),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=Nd(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=Md(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=bd,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=qe(s.opacity,t.opacity,1),Od(p,s),y&&(p.lineWidth=qe(s.lineWidth,t.lineWidth,g),p.lineDash=H(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Ul(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(vd),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=H(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(ud),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=H(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=qe(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return kd(e)&&(t=[e.fontStyle,e.fontWeight,Dd(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&Ze(t)||e.textFont||e.font},t}(Xl),wd={left:!0,right:1,center:1},Td={top:1,bottom:1,middle:1},Ed=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Dd(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Od(e,t){for(var n=0;n=0,a=!1;if(e instanceof id){var o=$d(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(uf(s)||uf(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=N({},r),l=N({},l),l.fill=s):!uf(l.fill)&&uf(s)?(a=!0,r=N({},r),l=N({},l),l.fill=Ai(s)):!uf(l.stroke)&&uf(c)&&(a||(r=N({},r),l=N({},l)),l.stroke=Ai(c)),r.style=l}}if(r&&r.z2==null){a||(r=N({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Cf(e,t,n){if(n&&n.z2==null){n=N({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function wf(e,t,n){var r=De(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:xf(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=N({},n),o=N({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Tf(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Sf(this,e,t,n);if(e===`blur`)return wf(this,e,n);if(e===`select`)return Cf(this,e,n)}return n}function Ef(e){e.stateProxy=Tf;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Tf),n&&(n.stateProxy=Tf)}function Df(e,t){!Ff(e,t)&&!e.__highByOuter&&yf(e,ff)}function Of(e,t){!Ff(e,t)&&!e.__highByOuter&&yf(e,pf)}function kf(e,t){e.__highByOuter|=1<<(t||0),yf(e,ff)}function Af(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&yf(e,pf)}function jf(e){yf(e,mf)}function Mf(e){yf(e,hf)}function Nf(e){yf(e,gf)}function Pf(e){yf(e,_f)}function Ff(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function If(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=ef(i),o=Xd(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){hf(e)}),s&&n.push(i)),a.isBlured=!1}),F(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Lf(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function Kf(e,t,n){$f(e,!0),yf(e,Ef),Yf(e,t,n)}function qf(e){$f(e,!1)}function Jf(e,t,n,r){r?qf(e):Kf(e,t,n)}function Yf(e,t,n){var r=Y(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var Xf=[`emphasis`,`blur`,`select`],Zf={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function Qf(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=dp(m),s*=dp(m));var h=(i===a?-1:1)*dp((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+pp(d)*g-fp(d)*_,y=(t+r)/2+fp(d)*g+pp(d)*_,b=_p([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=_p(x,S);if(gp(x,S)<=-1&&(C=mp),gp(x,S)>=1&&(C=0),C<0){var w=Math.round(C/mp*1e6)/1e6;C=mp*2+w%2*mp}u.addData(l,v,y,o,s,b,C,d,a)}var yp=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,bp=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function xp(e){var t=new Nu;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=Nu.CMD,c=e.match(yp);if(!c)return t;for(var l=0;lA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function Kp(e){var t;if(R(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function qp(e,t){var n,r=Vp(t.r,0),i=Vp(t.r0||0,0),a=r>0;if(!(!a&&!(i>0))){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=zp(c-s),p=f>Pp&&f%Pp;if(p>Up&&(f=p),!(r>Up))e.moveTo(l,u);else if(f>Pp-Up)e.moveTo(l+r*Ip(s),u+r*Fp(s)),e.arc(l,u,r,s,c,!d),i>Up&&(e.moveTo(l+i*Ip(c),u+i*Fp(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Ip(s),j=r*Fp(s),ee=i*Ip(c),te=i*Fp(c),ne=f>Up;if(ne){var re=t.cornerRadius;re&&(n=Kp(re),m=n[0],h=n[1],g=n[2],_=n[3]);var ie=zp(r-i)/2;if(v=Hp(ie,g),y=Hp(ie,_),b=Hp(ie,m),x=Hp(ie,h),w=S=Vp(v,y),T=C=Vp(b,x),(S>Up||C>Up)&&(E=r*Ip(c),D=r*Fp(c),O=i*Ip(s),k=i*Fp(s),fUp){var fe=Hp(g,w),pe=Hp(_,w),me=Gp(O,k,A,j,r,fe,d),he=Gp(E,D,ee,te,r,pe,d);e.moveTo(l+me.cx+me.x0,u+me.cy+me.y0),w0&&e.arc(l+me.cx,u+me.cy,fe,Rp(me.y0,me.x0),Rp(me.y1,me.x1),!d),e.arc(l,u,r,Rp(me.cy+me.y1,me.cx+me.x1),Rp(he.cy+he.y1,he.cx+he.x1),!d),pe>0&&e.arc(l+he.cx,u+he.cy,pe,Rp(he.y1,he.x1),Rp(he.y0,he.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>Up)||!ne)e.lineTo(l+ee,u+te);else if(T>Up){var fe=Hp(m,T),pe=Hp(h,T),me=Gp(ee,te,E,D,i,-pe,d),he=Gp(A,j,O,k,i,-fe,d);e.lineTo(l+me.cx+me.x0,u+me.cy+me.y0),T0&&e.arc(l+me.cx,u+me.cy,pe,Rp(me.y0,me.x0),Rp(me.y1,me.x1),!d),e.arc(l,u,i,Rp(me.cy+me.y1,me.cx+me.x1),Rp(he.cy+he.y1,he.cx+he.x1),d),fe>0&&e.arc(l+he.cx,u+he.cy,fe,Rp(he.y1,he.x1),Rp(he.y0,he.x0),!d))}else e.lineTo(l+ee,u+te),e.arc(l,u,i,c,s,d)}e.closePath()}}}var Jp=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),Yp=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Jp},t.prototype.buildPath=function(e,t){qp(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(id);Yp.prototype.type=`sector`;var Xp=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),Zp=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Xp},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(id);Zp.prototype.type=`ring`;function Qp(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=Qp(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sxm[1]){if(i=!1,Sm.negativeSize||n)return i;var s=ym(xm[0]-bm[1]),c=ym(bm[0]-xm[1]);_m(s,c)>wm.len()&&(s=c||!Sm.bidirectional)&&(G.scale(Cm,o,-c*r),Sm.useDir&&Sm.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function jm(e,t,n,r,i,a){Am(`update`,e,t,n,r,i,a)}function Mm(e,t,n,r,i,a){Am(`enter`,e,t,n,r,i,a)}function Nm(e){if(!e.__zr)return!0;for(var t=0;tfm,BezierCurve:()=>um,BoundingRect:()=>K,Circle:()=>Ap,CompoundPath:()=>pm,Ellipse:()=>Mp,Group:()=>q,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>ud,IncrementalDisplayable:()=>Dm,Line:()=>om,LinearGradient:()=>hm,OrientedBoundingRect:()=>Tm,Path:()=>id,Point:()=>G,Polygon:()=>tm,Polyline:()=>rm,RadialGradient:()=>gm,Rect:()=>vd,Ring:()=>Zp,Sector:()=>Yp,Text:()=>Cd,WH:()=>Vm,XY:()=>X,applyTransform:()=>nh,calcZ2Range:()=>Th,clipPointsByRect:()=>sh,clipRectByRect:()=>ch,createIcon:()=>lh,decomposeTransform:()=>kh,ensureCopyRect:()=>Sh,ensureCopyTransform:()=>Ch,expandOrShrinkRect:()=>mh,extendPath:()=>Wm,extendShape:()=>Hm,getCurrentCanvasPainter:()=>jh,getShapeClass:()=>Km,getTransform:()=>th,groupTransition:()=>oh,initProps:()=>Mm,isBoundingRectAxisAligned:()=>bh,isElementRemoved:()=>Nm,lineLineIntersect:()=>dh,linePolygonIntersect:()=>uh,makeImage:()=>Jm,makePath:()=>qm,mergePath:()=>Xm,payloadDisableAnimation:()=>Oh,registerShape:()=>Gm,removeElement:()=>Pm,removeElementWithFadeOut:()=>Im,resizePath:()=>Zm,retrieveZInfo:()=>wh,setTooltipConfig:()=>_h,subPixelOptimize:()=>eh,subPixelOptimizeLine:()=>Qm,subPixelOptimizeRect:()=>$m,transformDirection:()=>rh,traverseElements:()=>yh,traverseUpdateZ:()=>Eh,updateProps:()=>jm}),Bm={},X=[`x`,`y`],Vm=[`width`,`height`];function Hm(e){return id.extend(e)}var Um=Ep;function Wm(e,t){return Um(e,t)}function Gm(e,t){Bm[e]=t}function Km(e){if(Bm.hasOwnProperty(e))return Bm[e]}function qm(e,t,n,r){var i=Tp(e,t);return n&&(r===`center`&&(n=Ym(n,i.getBoundingRect())),Zm(i,n)),i}function Jm(e,t,n){var r=new ud({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(Ym(t,i))}}});return r}function Ym(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var Xm=Dp;function Zm(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function Qm(e,t){return pd(e,e,{lineWidth:t}),e}function $m(e,t){return md(e,e,t),e}var eh=hd;function th(e,t){for(var n=yn([]);e&&e!==t;)xn(n,e.getLocalTransform(),n),e=e.parent;return n}function nh(e,t,n){return t&&!Ae(t)&&(t=to.getLocalTransform(t)),n&&(t=Tn([],t)),Pt([],e,t)}function rh(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:is(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:is(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=nh(a,t,n),is(a[0])>is(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function ih(e){return!e.isGroup}function ah(e){return e.shape!=null}function oh(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){ih(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return ah(e)&&(t.shape=M(e.shape)),t}var a=r(e);t.traverse(function(e){if(ih(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),jm(e,r,n,Y(e).dataIndex)}}})}function sh(e,t){return I(e,function(e){var n=e[0];n=rs(n,t.x),n=ns(n,t.x+t.width);var r=e[1];return r=rs(r,t.y),r=ns(r,t.y+t.height),[n,r]})}function ch(e,t){var n=rs(e.x,t.x),r=ns(e.x+e.width,t.x+t.width),i=rs(e.y,t.y),a=ns(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function lh(e,t,n){var r=N({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),P(i,n),new ud(r)):qm(e.replace(`path://`,``),r,n,`center`)}function uh(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=fh(p,m,u,d)/f;return!(g<0||g>1)}function fh(e,t,n,r){return e*r-n*t}function ph(e){return e<=1e-6&&e>=-1e-6}function mh(e,t,n,r,i){return t==null?e:(Re(t)?hh[0]=hh[1]=hh[2]=hh[3]=t:(hh[0]=t[0],hh[1]=t[1],hh[2]=t[2],hh[3]=t[3]),r&&(hh[0]=rs(0,hh[0]),hh[1]=rs(0,hh[1]),hh[2]=rs(0,hh[2]),hh[3]=rs(0,hh[3])),n&&(hh[0]=-hh[0],hh[1]=-hh[1],hh[2]=-hh[2],hh[3]=-hh[3]),gh(e,hh,`x`,`width`,3,1,i&&i[0]||0),gh(e,hh,`y`,`height`,0,2,i&&i[1]||0),e)}var hh=[0,0,0,0];function gh(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=rs(0,ns(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:is(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function _h(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=B(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&F(Pe(c),function(e){W(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Y(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:P({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function vh(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function yh(e,t){if(e)if(R(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Eh(e,t,n){Dh(e,t,n,-1/0)}function Dh(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s=0&&n.push(e)}),n}}function dg(e,t){return Ce(Ce({},e,!0),t,!0)}var fg={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},pg={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},mg=`ZH`,hg=`EN`,gg=hg,_g={},vg={},yg=k.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||gg).toUpperCase().indexOf(mg)>-1?mg:gg}():gg;function bg(e,t){e=e.toUpperCase(),vg[e]=new og(t),_g[e]=t}function xg(e){if(B(e)){var t=_g[e.toUpperCase()]||{};return e===mg||e===hg?M(t):Ce(M(t),M(_g[gg]),!1)}else return Ce(M(e),M(_g[gg]),!1)}function Sg(e){return vg[e]}function Cg(){return vg[gg]}bg(hg,fg),bg(mg,pg);var wg=null;function Tg(e){wg||=e}function Eg(){return wg}function Dg(e,t){var n=Eg(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function Og(e){var t=e.brk;return t?t.breaks:[]}function kg(e){var t=e.brk;return t?t.hasBreaks():!1}var Ag=1e3,jg=Ag*60,Mg=jg*60,Ng=Mg*24,Pg=Ng*365,Fg={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Ig={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},Lg=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,Rg=`{yyyy}-{MM}-{dd}`,zg={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:Rg,hour:Rg+` `+Ig.hour,minute:Rg+` `+Ig.minute,second:Rg+` `+Ig.second,millisecond:Lg},Bg=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],Vg=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function Hg(e){return!B(e)&&!z(e)?Ug(e):e}function Ug(e){e||={};var t={},n=!0;return F(Bg,function(t){n&&=e[t]==null}),F(Bg,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=Bg[s],l=V(a)&&!R(a)?a[c]:a,u=void 0;R(l)?(u=l.slice(),o=u[0]||``):B(l)?(o=l,u=[o]):(o==null?o=Ig[r]:Fg[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function Wg(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function Gg(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function Kg(e){return e===Gg(e)}function qg(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function Jg(e,t,n,r){var i=Ms(e),a=i[Qg(n)](),o=i[$g(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[e_(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[t_(n)](),d=(u-1)%12+1,f=i[n_(n)](),p=i[r_(n)](),m=i[i_(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof og?r:Sg(r||yg)||Cg()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,Wg(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,Wg(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,Wg(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,Wg(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,Wg(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,Wg(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,Wg(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,Wg(m,3)).replace(/{S}/g,m+``)}function Yg(e,t,n,r,i){var a=null;if(B(n))a=n;else if(z(n)){var o={time:e.time,level:e.time?e.time.level:0},s=Eg();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=Xg(e.value,i);a=n[u][u][0]}}return Jg(new Date(e.value),a,i,r)}function Xg(e,t){var n=Ms(e),r=n[$g(t)]()+1,i=n[e_(t)](),a=n[t_(t)](),o=n[n_(t)](),s=n[r_(t)](),c=n[i_(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function Zg(e,t,n){switch(t){case`year`:e[o_(n)](0);case`month`:e[s_(n)](1);case`day`:e[c_(n)](0);case`hour`:e[l_(n)](0);case`minute`:e[u_(n)](0);case`second`:e[d_(n)](0)}return e}function Qg(e){return e?`getUTCFullYear`:`getFullYear`}function $g(e){return e?`getUTCMonth`:`getMonth`}function e_(e){return e?`getUTCDate`:`getDate`}function t_(e){return e?`getUTCHours`:`getHours`}function n_(e){return e?`getUTCMinutes`:`getMinutes`}function r_(e){return e?`getUTCSeconds`:`getSeconds`}function i_(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function a_(e){return e?`setUTCFullYear`:`setFullYear`}function o_(e){return e?`setUTCMonth`:`setMonth`}function s_(e){return e?`setUTCDate`:`setDate`}function c_(e){return e?`setUTCHours`:`setHours`}function l_(e){return e?`setUTCMinutes`:`setMinutes`}function u_(e){return e?`setUTCSeconds`:`setSeconds`}function d_(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function f_(e,t,n,r,i,a,o,s){return new Cd({style:{text:e,font:t,align:n,verticalAlign:r,padding:i,rich:a,overflow:o?`truncate`:null,lineHeight:s}}).getBoundingRect()}function p_(e){if(!zs(e))return B(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function m_(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var h_=Ye;function g_(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&Ze(e)?e:`-`}function a(e){return Us(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Ms(e):e;if(!isNaN(+c))return Jg(c,r,n);if(s)return`-`}if(t===`ordinal`)return Le(e)?i(e):Re(e)&&a(e)?e+``:`-`;var l=Rs(e);return a(l)?p_(l):Le(e)?i(e):typeof e==`boolean`?e+``:`-`}var __=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],v_=function(e,t){return`{`+e+(t??``)+`}`};function y_(e,t,n){R(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function S_(e,t,n){(e===`week`||e===`month`||e===`quarter`||e===`half-year`||e===`year`)&&(e=`MM-dd -yyyy`);var r=Ms(t),i=n?`getUTC`:`get`,a=r[i+`FullYear`](),o=r[i+`Month`]()+1,s=r[i+`Date`](),c=r[i+`Hours`](),l=r[i+`Minutes`](),u=r[i+`Seconds`](),d=r[i+`Milliseconds`]();return e=e.replace(`MM`,Wg(o,2)).replace(`M`,o).replace(`yyyy`,a).replace(`yy`,Wg(a%100+``,2)).replace(`dd`,Wg(s,2)).replace(`d`,s).replace(`hh`,Wg(c,2)).replace(`h`,c).replace(`mm`,Wg(l,2)).replace(`m`,l).replace(`ss`,Wg(u,2)).replace(`s`,u).replace(`SSS`,Wg(d,3)),e}function C_(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function w_(e,t){return t||=`transparent`,B(e)?e:V(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function T_(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var E_={},D_={},O_=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(E_,!0),this._normalMasterList=n(D_,!1);function n(n,r){var i=[];return F(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){F(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){E_[e]=t;return}D_[e]=t},e.get=function(e){return D_[e]||E_[e]},e}();function k_(e){return!!E_[e]}function A_(e){j_.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var j_=U();function M_(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=j_.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function N_(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!k_(n)&&(i=0))}return{coordSysType:n,kind:i}}function P_(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=N_(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var F_=function(e,t){var n=t.getReferringComponents(e,Tc).models[0];return n&&n.coordinateSystem},I_=F,L_=[`left`,`right`,`top`,`bottom`,`width`,`height`],R_=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function z_(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var B_=z_;Ie(z_,`vertical`),Ie(z_,`horizontal`);function V_(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function H_(e,t){var n=q_(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===K_.point)a=n.refPoint,i=W_(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=R(o)?o:[o,o];i=W_(r,n.refContainer),a=n.boxCoordFrom===2?n.refPoint:[J(s[0],i.width)+i.x,J(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function U_(e,t){var n=H_(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);R(a)||(a=[0,a]);var o=J(r.width,t.getWidth()),s=J(r.height,t.getHeight()),c=Math.min(o,s),l=J(a[0],c/2),u=J(a[1],c/2);return{cx:i[0],cy:i[1],r0:l,r:u,viewRect:r}}function W_(e,t,n){n=h_(n||0);var r=t.width,i=t.height,a=J(e.left,r),o=J(e.top,i),s=J(e.right,r),c=J(e.bottom,i),l=J(e.width,r),u=J(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f;break}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d;break}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new K((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}function G_(e,t,n){var r=e.getShallow(`preserveAspect`,!0);if(!r)return t;var i=t.width/t.height;if(Math.abs(Math.atan(n)-Math.atan(i))<1e-9)return t;var a=e.getShallow(`preserveAspectAlign`,!0),o=e.getShallow(`preserveAspectVerticalAlign`,!0),s={width:t.width,height:t.height},c=r===`cover`;return i>n&&!c||i=u)return a;for(var d=0;d=0;o--)a=Ce(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return Dc(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return V_(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(og);cl(tv,og),pl(tv),lg(tv),ug(tv,nv);function nv(e){var t=[];return F(tv.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=I(t,function(e){return rl(e).main}),e!==`dataset`&&De(t,`dataset`)<=0&&t.unshift(`dataset`),t}var Z={color:{},darkColor:{},size:{}},rv=Z.color={theme:[`#5070dd`,`#b6d634`,`#505372`,`#ff994d`,`#0ca8df`,`#ffd10a`,`#fb628b`,`#785db0`,`#3fbe95`],neutral00:`#fff`,neutral05:`#f4f7fd`,neutral10:`#e8ebf0`,neutral15:`#dbdee4`,neutral20:`#cfd2d7`,neutral25:`#c3c5cb`,neutral30:`#b7b9be`,neutral35:`#aaacb2`,neutral40:`#9ea0a5`,neutral45:`#929399`,neutral50:`#86878c`,neutral55:`#797b7f`,neutral60:`#6d6e73`,neutral65:`#616266`,neutral70:`#54555a`,neutral75:`#48494d`,neutral80:`#3c3c41`,neutral85:`#303034`,neutral90:`#232328`,neutral95:`#17171b`,neutral99:`#000`,accent05:`#eff1f9`,accent10:`#e0e4f2`,accent15:`#d0d6ec`,accent20:`#c0c9e6`,accent25:`#b1bbdf`,accent30:`#a1aed9`,accent35:`#91a0d3`,accent40:`#8292cc`,accent45:`#7285c6`,accent50:`#6578ba`,accent55:`#5c6da9`,accent60:`#536298`,accent65:`#4a5787`,accent70:`#404c76`,accent75:`#374165`,accent80:`#2e3654`,accent85:`#252b43`,accent90:`#1b2032`,accent95:`#121521`,transparent:`rgba(0,0,0,0)`,highlight:`rgba(255,231,130,0.8)`};for(var iv in N(rv,{primary:rv.neutral80,secondary:rv.neutral70,tertiary:rv.neutral60,quaternary:rv.neutral50,disabled:rv.neutral20,border:rv.neutral30,borderTint:rv.neutral20,borderShade:rv.neutral40,background:rv.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:rv.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:rv.neutral70,axisLineTint:rv.neutral40,axisTick:rv.neutral70,axisTickMinor:rv.neutral60,axisLabel:rv.neutral70,axisSplitLine:rv.neutral15,axisMinorSplitLine:rv.neutral05}),rv)if(rv.hasOwnProperty(iv)){var av=rv[iv];iv===`theme`?Z.darkColor.theme=rv.theme.slice():iv===`highlight`?Z.darkColor.highlight=`rgba(255,231,130,0.4)`:iv.indexOf(`accent`)===0?Z.darkColor[iv]=wi(av,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Z.darkColor[iv]=wi(av,null,function(e){return e*.9},function(e){return 1-e**1.5})}Z.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var ov=``;typeof navigator<`u`&&(ov=navigator.platform||``);var sv=`rgba(0, 0, 0, 0.2)`,cv=Z.color.theme[0],lv=wi(cv,null,null,.9),uv={darkMode:`auto`,colorBy:`series`,color:Z.color.theme,gradientColor:[lv,cv],aria:{decal:{decals:[{color:sv,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:sv,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:sv,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:sv,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:sv,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:sv,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:ov.match(/^Win/)?`Microsoft YaHei`:`sans-serif`,fontSize:12,fontStyle:`normal`,fontWeight:`normal`},blendMode:null,stateAnimation:{duration:300,easing:`cubicOut`},animation:`auto`,animationDuration:1e3,animationDurationUpdate:500,animationEasing:`cubicInOut`,animationEasingUpdate:`cubicInOut`,animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},dv={Must:1,Might:2,Not:3},fv=xc();function pv(e){fv(e).datasetMap=U()}function mv(e,t,n){var r={},i=gv(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=fv(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),F(e,function(t,n){var i=V(t)?t:e[n]={name:t};i.type===`ordinal`&&u==null&&(u=n,d=m(i)),r[i.name]=[]});var f=c.get(l)||c.set(l,{categoryWayDim:d,valueWayDim:0});F(e,function(e,t){var n=e.name,i=m(e);if(u==null){var s=f.valueWayDim;p(r[n],s,i),p(o,s,i),f.valueWayDim+=i}else if(u===t)p(r[n],0,i),p(a,0,i);else{var s=f.categoryWayDim;p(r[n],s,i),p(o,s,i),f.categoryWayDim+=i}});function p(e,t,n){for(var r=0;rt)return e[r];return e[n-1]}function Ov(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:Dv(r,o);if(u||=n,!(!u||!u.length)){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function kv(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Av,jv,Mv,Nv=`\0_ec_inner`,Pv=1,Fv=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(e,t,n,r,i,a){r||={},this.option=null,this._theme=new og(r),this._locale=new og(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=Bv(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,Bv(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);!this.option||e===`recreate`?Mv(this,i):(this.restoreData(),this._mergeOption(i,t)),n=!0}if((e===`timeline`||e===`media`)&&this.restoreData(),!e||e===`recreate`||e===`timeline`){var a=r.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,t))}if(!e||e===`recreate`||e===`media`){var o=r.getMediaOption(this);o.length&&F(o,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=U(),s=t&&t.replaceMergeMainTypeMap;pv(this),F(e,function(e,t){e!=null&&(tv.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?M(e):Ce(n[t],e,!0))}),s&&s.each(function(e,t){tv.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),tv.topologicalTravel(a,tv.getAllClassMainTypes(),c,this);function c(t){var a=Sv(this,t,$s(e[t])),o=r.get(t),c=ic(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);_c(c,t,tv),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;F(c,function(e,n){var r=e.existing,i=e.newOption;if(!i)r&&(r.mergeOption({},this),r.optionUpdated({},!1));else{var a=t===`series`,o=tv.getClass(t,e.keyInfo.subType,!a);if(!o)return;if(t===`tooltip`){if(f)return;f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=N({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),N(r,s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}r?(l.push(r.option),u.push(r),d++):(l.push(void 0),u.push(void 0))},this),n[t]=l,r.set(t,u),i.set(t,d),t===`series`&&Av(this)}this._seriesIndices||Av(this)},t.prototype.getOption=function(){var e=M(this.option);return F(e,function(t,n){if(tv.hasClass(n)){for(var r=$s(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!hc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[Nv],e},t.prototype.setTheme=function(e){this._theme=new og(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function Kv(e,t){return e.join(`,`)===t.join(`,`)}var qv=F,Jv=V,Yv=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function Xv(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=Yv.length;n0?e[n-1].seriesModel:null)}),yy(e))})}function yy(e){F(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Ds(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var by=function(){function e(e){this.data=e.data||(e.sourceFormat===`keyedColumns`?{}:[]),this.sourceFormat=e.sourceFormat||`unknown`,this.seriesLayoutBy=e.seriesLayoutBy||`column`,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;nl&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Fy=(e={},e[Vd+`_`+Kd]={pure:!0,appendData:i},e[Vd+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[Hd]={pure:!0,appendData:i},e[Ud]={pure:!0,appendData:function(e){var t=this._data;F(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[Bd]={appendData:i},e[Wd]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;t=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return Yy(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function Qy(e){var t,n;return V(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function $y(e){return new eb(e)}var eb=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:at},gte:function(e,t){return e>=t}},ob=function(){function e(e,t){Re(t)||Ys(``),this._opFn=ab[e],this._rvalFloat=Rs(t)}return e.prototype.evaluate=function(e){return Re(e)?this._opFn(e,this._rvalFloat):this._opFn(Rs(e),this._rvalFloat)},e}(),sb=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=Re(e)?e:Rs(e),r=Re(t)?t:Rs(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=B(e),s=B(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}(),cb=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Rs(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Rs(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function lb(e,t){return e===`eq`||e===`ne`?new cb(e===`eq`,t):W(ab,e)?new ob(e,t):null}function ub(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function db(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,wb=typeof Uint16Array>`u`?Array:Uint16Array,Tb=typeof Int32Array>`u`?Array:Int32Array,Eb=typeof Float64Array>`u`?Array:Float64Array,Db={float:Eb,int:Tb,ordinal:Array,number:Array,time:Eb},Ob;function kb(e){return e>65535?Cb:wb}function Ab(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function jb(e,t,n,r,i){var a=Db[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=I(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f)if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(kb(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=h),d[f++]=g}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return nb(e[r],this._dimensions[r])}Ob={arrayRows:e,objectRows:function(e,t,n,r){return nb(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return nb(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),Nb=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(Fb(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=Be(o)?Wd:Bd,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=H(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=H(u.sourceHeader,d.sourceHeader),m=H(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Sy(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Sy(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&Ib(``);var i,a=[],o=[];return F(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&Ib(``),a.push(t),o.push(e._getVersionSign())}),n?i=bb(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[wy(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||n>0&&!e.noHeader;return F(e.blocks,function(e){var n=Gb(e);n>=t&&(t=n+ +(r&&(!n||Ub(e)&&!e.noHeader)))}),t}return 0}function Kb(e,t,n,r){var i=t.noHeader,a=Yb(Gb(t)),o=[],s=t.blocks||[];Xe(!s||R(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(W(l,c)){var u=new sb(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}F(s,function(n,i){var s=t.valueFormatter,c=Wb(n)(s?N(N({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):Xb(r,o.join(``),i?n:a.html);if(i)return d;var f=g_(t.header,`ordinal`,e.useUTC),p=zb(r,e.renderMode).nameStyle,m=Rb(r);return e.renderMode===`richText`?$b(e,f,p)+a.richText+d:Xb(r,`
`+$t(f)+`
`+d,n)}function qb(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=R(e)?e:[e],I(e,function(e,t){return g_(e,R(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Z.color.secondary,i),f=a?``:g_(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=zb(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:$b(e,f,v))+(o?``:ex(e,m,h,g,y)):Xb(r,(s?``:d)+(a?``:Zb(f,!s,v))+(o?``:Qb(m,h,g,y)),n)}}function Jb(e,t,n,r,i,a){if(e)return Wb(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function Yb(e){return{html:Bb[e],richText:Vb[e]}}function Xb(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=Rb(e);return`
`+t+r+`
`}function Zb(e,t,n){var r=t?`margin-left:2px`:``;return``+$t(e)+``}function Qb(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=R(e)?e:[e],``+I(e,function(e){return $t(e)}).join(`  `)+``}function $b(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function ex(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(R(t)?t.join(` `):t,a)}function tx(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return w_(n)}function nx(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var rx=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Bs()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=x_({color:t,type:e,renderMode:n,markerId:r});return B(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};R(t)?F(t,function(e){return N(n,e)}):N(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function ix(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=R(s),l=tx(t,n),u,d,f,p;if(o>1||c&&!o){var m=ax(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=Yy(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=mc(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return Hb(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[Hb(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!Ze(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function ax(e,t,n,r,i){var a=t.getData(),o=je(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?F(r,function(e){u(Yy(a,n,e),e)}):F(e,u);function u(e,t){var n=a.getDimensionInfo(t);!n||n.otherDims.tooltip===!1||(o?l.push(Hb(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var ox=xc();function sx(e,t){return e.getName(t)||e.getId(t)}var cx=`__universalTransitionEnabled`,lx=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=$y({count:fx,reset:px}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(ox(this).sourceManager=new Nb(this)).prepareSource();var r=this.getInitialData(e,n);hx(r,this),this.dataTask.context.data=r,ox(this).dataBeforeProcessed=r,ux(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=X_(this),r=n?Q_(e):{},i=this.subType;tv.hasClass(i)&&(i+=`Series`),Ce(e,t.getTheme().get(this.subType)),Ce(e,this.getDefaultOption()),ec(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&Z_(e,r,n)},t.prototype.mergeOption=function(e,t){e=Ce(this.option,e,!0),this.fillDataTextStyle(e.data);var n=X_(this);n&&Z_(this.option,e,n);var r=ox(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);hx(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,ox(this).dataBeforeProcessed=i,ux(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Be(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return ix({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(k.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=Tv.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[sx(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(!(!a||!o)){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){V(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return tv.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(tv);ke(lx,Zy),ke(lx,Tv),cl(lx,tv);function ux(e){var t=e.name;mc(e)||(e.name=dx(e)||t)}function dx(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return F(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function fx(e){return e.model.getRawData().count()}function px(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),mx}function mx(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function hx(e,t){F(at(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,Ie(gx,t))})}function gx(e,t){var n=_x(e);return n&&n.setOutputEnd((t||this).count()),t}function _x(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var vx=function(){function e(){this.group=new q,this.uid=cg(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();ol(vx),pl(vx);function yx(){var e=xc();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==o||a!==s)&&`reset`}}var bx=xc(),xx=yx(),Sx=function(){function e(){this.group=new q,this.uid=cg(`viewChart`),this.renderTask=$y({plan:Ex,reset:Dx}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&Tx(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&Tx(i,r,`normal`)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){yh(this.group,e)},e.markUpdateMethod=function(e,t){bx(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function Cx(e,t,n){e&&ep(e)&&(t===`emphasis`?kf:Af)(e,n)}function Tx(e,t,n){var r=bc(e,t),i=t&&t.highlightKey!=null?np(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){Cx(e,n,i)}):F($s(r),function(t){Cx(e.getItemGraphicEl(t),n,i)})}ol(Sx,[`dispose`]),pl(Sx);function Ex(e){return xx(e.model)}function Dx(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&bx(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),Ox[c]}var Ox={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},kx=`\0__throttleOriginMethod`,Ax=`\0__throttleRate`,jx=`\0__throttleType`;function Mx(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function Nx(e,t,n,r){var i=e[t];if(i){var a=i[kx]||i,o=i[jx];if(i[Ax]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Mx(a,n,r===`debounce`),i[kx]=a,i[jx]=r,i[Ax]=n}return i}}function Px(e,t){var n=e[t];n&&n[kx]&&(n.clear&&n.clear(),e[t]=n[kx])}var Fx=xc(),Ix={itemStyle:ml(rg,!0),lineStyle:ml(eg,!0)},Lx={lineStyle:`stroke`,itemStyle:`fill`};function Rx(e,t){return e.visualStyleMapper||Ix[t]||(console.warn(`Unknown style type '`+t+`'.`),Ix.itemStyle)}function zx(e,t){return e.visualDrawType||Lx[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var Bx={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=Rx(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=zx(e,r),c=a[s],l=z(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||z(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||z(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=N({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},Vx=new og,Hx={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=Rx(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){Vx.option=n[r];var o=i(Vx);N(e.ensureUniqueItemVisual(t,`style`),o),Vx.option.decal&&(e.setItemVisual(t,`decal`,Vx.option.decal),Vx.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},Ux={performRawSeries:!0,overallReset:function(e){var t=U();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();Fx(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=Fx(e).scope,a=zx(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},Wx=Math.PI;function Gx(e,t){t||={},P(t,{text:`loading`,textColor:Z.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Z.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new q,r=new vd({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Cd({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new vd({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new fm({shape:{startAngle:-Wx/2,endAngle:-Wx/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Wx*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:Wx*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var Kx=function(){function e(e,t,n,r){this._stageTaskMap=U(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):Zc(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=U();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;F(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});Xe(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;F(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=U(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||$y({plan:Zx,reset:Qx,count:tS}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||$y({reset:qx});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=U(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;Xe(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):F(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,$y({reset:Jx,onDirty:Xx})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return z(e)&&(e={overallReset:e,seriesType:nS(e)}),e.uid=cg(`stageHandler`),t&&(e.visualType=t),e},e}();function qx(e){e.overallReset(e.ecModel,e.api,e.payload)}function Jx(e){return e.dirtyOnOverallProgress&&Yx}function Yx(){this.agent.dirty(),this.getDownstream().dirty()}function Xx(){this.agent&&this.agent.dirty()}function Zx(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Qx(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=$s(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?I(t,function(e,t){return eS(t)}):$x}var $x=eS(0);function eS(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),fS=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],pS=fS.concat([`symbolKeepAspect`]),mS={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&qS(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function XS(e,t,n){for(var r=t.type===`radial`?YS(e,t,n):JS(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:Re(e)?[e]:R(e)?e:null}function tC(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&eC(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=I(n,function(e){return e/i}),r/=i)}return[n,r]}var nC=new Nu(!0);function rC(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function iC(e){return typeof e==`string`&&e!==`none`}function aC(e){var t=e.fill;return t!=null&&t!==`none`}function oC(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function sC(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function cC(e,t,n){var r=yl(t.image,t.__image,n);if(xl(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*lt),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function lC(e,t,n,r,i){var a,o=rC(n),s=aC(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||nC,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?XS(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?XS(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?cC(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?cC(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=tC(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&sC(e,n),s&&oC(e,n)):(s&&oC(e,n),o&&sC(e,n)),T&&e.setLineDash([])}function uC(e,t,n){var r=t.__image=yl(n.image,t.__image,t,t.onload);if(!(!r||!xl(r))){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function dC(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=tC(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(rC(n)&&e.strokeText(i,n.x,n.y),aC(n)&&e.fillText(i,n.x,n.y)):(aC(n)&&e.fillText(i,n.x,n.y),rC(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var fC=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],pC=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function mC(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){TC(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Kl.opacity:o}(r||t.blend!==n.blend)&&(a||=(TC(e,i),!0),e.globalCompositeOperation=t.blend||Kl.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[sw]){if(this._disposed){this.id;return}var r,i,a;if(V(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[sw]=!0,zw(this),!this._model||t){var o=new Hv(this._api),s=this._theme,c=this._model=new Fv;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},qw);var l={seriesTransition:a,optionChanged:!0};if(n)this[lw]={silent:r,updateParams:l},this[sw]=!1,this.getZr().wakeUp();else{try{xw(this),ww.update.call(this,null,l)}catch(e){throw this[lw]=null,this[sw]=!1,e}this._ssr||this._zr.flush(),this[lw]=null,this[sw]=!1,Ow.call(this,r),kw.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[sw]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[lw]&&(r??=this[lw].silent,i=this[lw].updateParams,this[lw]=null),this[sw]=!0,zw(this);try{this._updateTheme(e),n.setTheme(this._theme),xw(this),ww.update.call(this,{type:`setTheme`},i)}catch(e){throw this[sw]=!1,e}this[sw]=!1,Ow.call(this,r),kw.call(this,r)}}},t.prototype._updateTheme=function(e){B(e)&&(e=Yw[e]),e&&(e=M(e),e&&gy(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||k.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return F(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;F(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return F(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(Qw[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();F(Zw,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(M(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=ae.createCanvas(),h=Wo(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return F(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}else return e.connectedBackgroundColor&&h.add(new vd({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),F(u,function(e){var t=new ud({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return Tw(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return Tw(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return Tw(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return F(Cc(n,e),function(e,n){n.indexOf(`Models`)>=0&&F(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Cc(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?_S(i,t):gS(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;F(Hw,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&SS(i,function(e){var t=Y(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}else if(t.eventData)return a=N({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;F(Gw,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),xS(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&kc(this.getDom(),tT,``);var e=this,t=e._api,n=e._model;F(e._componentsViews,function(e){e.dispose(n,t)}),F(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete Zw[e.id]},t.prototype.resize=function(e){if(!this[sw]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[lw]&&(r??=this[lw].silent,n=!0,this[lw]=null),this[sw]=!0,zw(this);try{n&&xw(this),ww.update.call(this,{type:`resize`,animation:N({duration:0},e&&e.animation)})}catch(e){throw this[sw]=!1,e}this[sw]=!1,Ow.call(this,r),kw.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(V(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),Xw[e]){var n=Xw[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=N({},e);return t.type=Ww[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(V(t)||(t={silent:!!t}),Uw[e.type]&&this._model){if(this[sw]){this._pendingActions.push(e);return}var n=t.silent;Dw.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&k.browser.weChat&&this._throttledZrFlush(),Ow.call(this,n),kw.call(this,n)}},t.prototype.updateLabelLayout=function(){CS.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){xw=function(e){jS(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),Sw(e,!0),Sw(e,!1),t.plan()},Sw=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cH(t.get(`hoverLayerThreshold`),uv.hoverLayerThreshold)&&!k.node&&!k.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=wh(e);t.eachRendered(function(e){return Eh(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!Nm(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(Nm(e))return;if(e instanceof id&&ap(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}Fw=function(e){return new(function(t){D(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){kf(t,n),Lw(e)},n.prototype.leaveEmphasis=function(t,n){Af(t,n),Lw(e)},n.prototype.enterBlur=function(t){jf(t),Lw(e)},n.prototype.leaveBlur=function(t){Mf(t),Lw(e)},n.prototype.enterSelect=function(t){Nf(t),Lw(e)},n.prototype.leaveSelect=function(t){Pf(t),Lw(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[cw]},n.prototype.usingTHL=function(){return e._usingTHL},n}(Yd))(e)},Iw=function(e){function t(e,t){for(var n=0;n=0)){xT.push(n);var o=Kx.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function CT(e,t){Xw[e]=t}function wT(e){oe({createCanvas:e})}function TT(e,t,n){var r=ES(`registerMap`);r&&r(e,t,n)}function ET(e){var t=ES(`getMap`);return t&&t(e)}var DT=yb;bT(QC,Bx),bT(tw,Hx),bT(tw,Ux),bT(QC,mS),bT(tw,hS),bT(aw,zC),uT(gy),dT(GC,_y),CT(`default`,Gx),hT({type:rf,event:rf,update:rf},ct),hT({type:af,event:af,update:af},ct),hT({type:of,event:lf,update:of,action:ct,refineEvent:OT,publishNonRefinedEvent:!0}),hT({type:sf,event:lf,update:sf,action:ct,refineEvent:OT,publishNonRefinedEvent:!0}),hT({type:cf,event:lf,update:cf,action:ct,refineEvent:OT,publishNonRefinedEvent:!0});function OT(e,t,n,r){return{eventContent:{selected:Gf(n),isFromClick:t.isFromClick||!1}}}lT(`default`,{}),lT(`dark`,uS);var kT={},AT=[],jT={registerPreprocessor:uT,registerProcessor:dT,registerPostInit:fT,registerPostUpdate:pT,registerUpdateLifecycle:mT,registerAction:hT,registerCoordinateSystem:gT,registerLayout:yT,registerVisual:bT,registerTransform:DT,registerLoading:CT,registerMap:TT,registerImpl:TS,PRIORITY:ow,ComponentModel:tv,ComponentView:vx,SeriesModel:lx,ChartView:Sx,registerComponentModel:function(e){tv.registerClass(e)},registerComponentView:function(e){vx.registerClass(e)},registerSeriesModel:function(e){lx.registerClass(e)},registerChartView:function(e){Sx.registerClass(e)},registerCustomSeries:function(e,t){OS(e,t)},registerSubTypeDefaulter:function(e,t){tv.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Jo(e,t)}};function MT(e){if(R(e)){F(e,function(e){MT(e)});return}De(AT,e)>=0||(AT.push(e),z(e)&&(e={install:e}),e.install(jT))}function NT(e){return e==null?0:e.length||1}function PT(e){return e}var FT=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||PT,this._newKeyGetter=r||PT,this.context=i,this._diffModeMultiple=a===`multiple`}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?`_executeMultiple`:`_executeOneToOne`]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=Array(e.length),i=Array(t.length);this._initIndexMap(e,null,r,`_oldKeyGetter`),this._initIndexMap(t,n,i,`_newKeyGetter`);for(var a=0;a1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;o30}var YT=V,XT=I,ZT=typeof Int32Array>`u`?Array:Int32Array,QT=`e\0\0`,$T=-1,eE=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],tE=[`_approximateExtent`],nE,rE,iE,aE,oE,sE,cE,lE=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;GT(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),R(i)?i=i.slice():YT(i)&&(i=N({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,YT(t)?N(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){YT(e)?N(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?N(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){Ld(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){F(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:XT(this.dimensions,this._getDimInfo,this),this.hostModel),oE(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];z(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Je(arguments)))})},e.internalField=function(){nE=function(e){var t=e._invertedIndicesMap;F(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new ZT(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function uE(e,t){return dE(e,t).dimensions}function dE(e,t){xy(e)||(e=Cy(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=U(),a=[],o=fE(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&JT(o),c=r===e.dimensionsDefine,l=c?qT(e):KT(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=U(u),f=new Tb(o),p=0;p0&&(e.name+=t-1)}),new WT({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function fE(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return F(t,function(e){var t;V(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function pE(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var mE=function(){function e(e){this.coordSysDims=[],this.axisMap=U(),this.categoryAxisMap=U(),this.coordSysName=e}return e}();function hE(e){var t=e.get(`coordinateSystem`),n=new mE(t),r=gE[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var gE={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Tc).models[0],a=e.getReferringComponents(`yAxis`,Tc).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),_E(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),_E(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Tc).models[0];t.coordSysDims=[`single`],n.set(`single`,i),_E(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Tc).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),_E(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),_E(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();F(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),_E(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Tc).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function _E(e){return e.get(`type`)===`category`}function vE(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;yE(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(F(a,function(e,t){B(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),F(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;F(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function yE(e){return!GT(e.schema)}function bE(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function xE(e,t){return bE(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function SE(e,t){var n=e.get(`coordinateSystem`),r=O_.get(n),i;return t&&t.coordSysDims&&(i=I(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=zT(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function CE(e,t,n){var r,i;return n&&F(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function wE(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Cy(e)):(i=r.getSource(),a=i.sourceFormat===Bd);var o=hE(t),s=SE(t,o),c=n.useEncodeDefaulter,l=z(c)?c:c?Ie(mv,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=dE(i,u),f=CE(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=vE(t,{schema:d,store:p}),h=new lE(d,t);h.setCalculationInfo(m);var g=f!=null&&TE(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function TE(e){if(e.sourceFormat===`original`)return!R(nc(EE(e.data||[])))}function EE(e){for(var t=0;t=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){VE(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),VE(r,e,t,n)},freeze:function(){}};function VE(e,t,n,r){Hc(n,r)&&(e[t][0]=n,e[t][1]=r)}function HE(e){return UE(e)||GE(e)}function UE(e){return e.type===`interval`}function WE(e){return e.type===`time`}function GE(e){return e.type===`log`}function KE(e){return e.type===`ordinal`}function qE(e){var t=Ps(e),n=cs(10,t),r=as(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,vs(r*n,-t)}function JE(e){return xs(e)+2}function YE(e,t){return ls(e)/ls(t)}function XE(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var tD=function(e){D(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,NE(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new kE({}),R(i)&&(i=new kE({categories:I(i,function(e){return V(e)?e.value:e})})),r._ordinalMeta=i;var a=ME(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,PE(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:B(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=as(e),e},t.prototype.getTicks=function(){var e=[];return eD(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=ns(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=ns(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=vs(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=vs(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?vs(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return nD(this,e,Og(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=xs(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),p_(vs(e.value,n,!0))},t.type=`interval`,t}(DE);DE.registerClass(rD);var iD=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function lD(e){var t=30*Ng;return e/=t,e>6?6:e>3?3:e>2?2:1}function uD(e){return e/=Mg,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function dD(e,t){return e/=t?jg:Ag,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function fD(e){return rs(Fs(e,!0),1)}function pD(e,t,n){var r=Math.max(0,De(Bg,t)-1);return Zg(new Date(e),Bg[r],n).getTime()}function mD(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function hD(e,t,n,r,i,a){var o=Vg,s=0;function c(e,t,n,i,o,c,l){for(var u=mD(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!sD(Gg(e),r[0],r[1],n)){s&&(i=[{value:pD(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=Me(I(u,function(e){return Me(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=oD.length,l=Math.min(iD(oD,a,0,c),c-1),u=oD[l][1],d=oD[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};DE.registerClass(aD);var _D=0,vD=1,yD=2,bD=function(e){D(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=rD.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[_D]=i[vD]=a[_D]=a[vD]=NaN,NE(r,t.mapperMethods);var s=Eg(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},yD,l),r.powStub=new rD({breakParsed:l.original}),r.intervalStub=new rD({breakParsed:l.transformed}),PE(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Eg(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return I(i.getTicks(e||{}),function(e){var i=e.value,o=XE(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,Og(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return nD(this,e,Og(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(YE(e,this.base))},scale:function(e){return XE(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=YE(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return xD.depth=n,SD.lookup=this._lookup,XE(n===2?e:this.intervalStub.transformOut(e,xD),this.base,SD)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Hc(t,n)||t<=0||n<=0)){var r=CD,i=CD;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[_D]=t,r[vD]=n);var o=this.base;this.intervalStub.setExtent2(e,i[_D]=YE(t,o),i[vD]=YE(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Hc(t[0],t[1])&&Us(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(DE);DE.registerClass(bD);var xD={},SD={},CD=[],wD={value:1,category:1,time:1,log:1},TD=xc();function ED(e){var t=e.get(`type`);return(t==null||!W(wD,t)&&!DE.getClass(t))&&(t=`value`),t}function DD(e,t,n){var r=Eg(),i;switch(r&&(i=RD(e,t,n)),t){case`category`:return new tD({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Ic()});case`time`:return new aD({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new bD({logBase:e.get(`logBase`),breakOption:i});case`value`:return new rD({breakOption:i});default:return new((DE.getClass(t))||rD)({})}}function OD(e,t,n){var r=n?IE(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Hc(i,a)?i===t||a===t?2:it?1:3:3}function kD(e){TD(e).noOnMyZero=!0}function AD(e){return TD(e).noOnMyZero}function jD(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=Hg(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}else if(B(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};else if(z(t)){if(e.type===`category`)return function(n,r){return t(MD(e,n),n.value-e.scale.getExtent()[0],null)};var r=Eg();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(MD(e,n),i,a)}}else return function(t){return e.scale.getLabel(t)}}function MD(e,t){var n=e.scale;return KE(n)?n.getLabel(t):t.value}function ND(e){return e.get(`interval`)??`auto`}function PD(e){return e.type===`category`&&ND(e.getLabelModel())===0}function FD(e,t){var n={};return F(e.mapDimensionsAll(t),function(t){n[xE(e,t)]=!0}),Pe(n)}function ID(e){return e===`middle`||e===`center`}function LD(e){return e.getShallow(`show`)}function RD(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Eg()||!n||!zD(t)?void 0:r}function zD(e){return e!==`category`}function BD(e,t,n,r,i,a){var o=GE(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=QE(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function VD(e,t){return KE(e)?e.getRawOrdinalNumber(t.value):t.value}function HD(e,t){return KE(e)&&!!t.get(`boundaryGap`)}var UD=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),WD=Gc(),GD=xc(),KD=xc();function qD(e,t){var n=e.model,r=GD(PS(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function JD(e,t){return ZD(qD(e,t))}function YD(e,t){var n=[];return XD(e.model.ecModel,function(e){for(var r=0;r0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=hO(e,t.get(`startValue`,!0)),x=b!=null;!Us(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Us(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),mO(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),mO(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function mO(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Wc(t))}function hO(e,t){return t==null?null:Ge(t)?NaN:e.parse(t)}function gO(e,t){var n;if(KE(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=R(r)?r:[r,r]}return[_O(n[0]),_O(n[1])]}function _O(e){return yo(typeof e==`boolean`?0:e,1)||0}function vO(e){var t=dO(e.scale);return t.extent||=Ic(),t}function yO(e,t){vO(e).dimIdxInCoord=t.get(e.dim)}function bO(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||xO(n,e,i,r,t)}function xO(e,t,n,r,i){var a=vO(t),o=a.extent,s=!1;QD(t,function(r){if(r.boxCoordinateSystem){var i=M_(r).coord,c=a.dimIdxInCoord;if(c>=0&&R(i)){var l=i[c];l!=null&&!R(l)&&Lc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;F(FD(u,n),function(e){Bc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=DO(e,t,r);CO(e,new pO(e,r,o,s,c),i),a.extent=null}function SO(e,t){var n=e.scale;CO(n,new pO(n,e.model,t,!1,!1),fO)}function CO(e,t,n){e.rawExtentInfo=t,t.from=n}function wO(e,t){TO.set(e,t)}var TO=U();function EO(e,t,n,r,i){e.rawExtentInfo||SO({scale:e,model:t},i||Ic());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function DO(e,t,n){var r=HD(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return rO(t,function(e){a=!!TO.get(e)||a}),a}function OO(e,t,n,r){if(n.ctnShp){var i;if(rO(e,function(t){var n=TO.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Rc(i,a[0]),zc(i,a[1]),kD(e))}}),i){var a=t.getExtent();if(KE(t))e.onBand||t.setExtent2(1,ns(a[0],a[0]+i[0]),rs(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=ns(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=rs(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}function kO(e,t){var n=GE(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=ZE(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?jO(r,t):AO(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=JE(d)),i[0]||(s[0]=vs(os(s[0]/u)*u,l)),i[1]||(s[1]=vs(ss(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),BD(e,i,o,s,a,c)}function AO(e,t){var n=$E(t.splitNumber,5),r=RE(e),i=t.minInterval,a=t.maxInterval,o=Fs(r/n,!0);i!=null&&oa&&(o=a);var s=JE(o),c=e.getExtent(),l=[vs(ss(c[0]/o)*o,s),vs(os(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function jO(e,t){var n=$E(t.splitNumber,10),r=e.getExtent(),i=RE(e),a=rs(Ns(i),1);n/i*a<=.5&&(a*=10);var o=JE(a),s=[vs(ss(r[0]/a)*a,o),vs(os(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function MO(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;NO(t,n,r,i,null)}function NO(e,t,n,r,i){var a=EO(e,t,r,n,i),o=UE(e)||WE(e);PO(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&OO(n,e,a,r)}function PO(e,t){FO[e.type](e,t)}var FO={interval:kO,log:kO,time:gD,ordinal:ct},IO=e({createDimensions:()=>uE,createList:()=>LO,createScale:()=>zO,createSymbol:()=>WS,createTextStyle:()=>VO,dataStack:()=>RO,enableHoverEmphasis:()=>Kf,getECData:()=>Y,getLayoutRect:()=>W_,mixinAxisModelCommonMethods:()=>BO});function LO(e){return wE(null,e)}var RO={isDimensionStacked:bE,enableDataStack:vE,getStackedDimension:xE};function zO(e,t){var n=t;t instanceof og||(n=new og(t));var r=ED(n),i=DD(n,r,!1);return e[1]n&&(t=i,n=o)}if(t)return JO(t.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},t.prototype.getBoundingRect=function(e){var t=this._rect;if(t&&!e)return t;var n=[1/0,1/0],r=[-1/0,-1/0],i=this.geometries;return F(i,function(t){t.type===`polygon`?qO(t.exterior,n,r,e):F(t.points,function(t){qO(t,n,r,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(r[0])&&isFinite(r[1])||(n[0]=n[1]=r[0]=r[1]=0),t=new K(n[0],n[1],r[0]-n[0],r[1]-n[1]),e||(this._rect=t),t},t.prototype.contain=function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;loopGeo:for(var r=0,i=n.length;r>1^-(s&1),c=c>>1^-(c&1),s+=i,c+=a,i=s,a=c,r.push([s/n,c/n])}return r}function rk(e,t){return e=ek(e),I(Me(e.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,r=e.geometry,i=[];switch(r.type){case`Polygon`:var a=r.coordinates;i.push(new XO(a[0],a.slice(1)));break;case`MultiPolygon`:F(r.coordinates,function(e){e[0]&&i.push(new XO(e[0],e.slice(1)))});break;case`LineString`:i.push(new ZO([r.coordinates]));break;case`MultiLineString`:i.push(new ZO(r.coordinates))}var o=new QO(n[t||`name`],i,n.cp);return o.properties=n,o})}var ik=e({MAX_SAFE_INTEGER:()=>Os,asc:()=>bs,getPercentWithPrecision:()=>Ts,getPixelPrecision:()=>Cs,getPrecision:()=>xs,getPrecisionSafe:()=>Ss,isNumeric:()=>zs,isRadianAroundZero:()=>As,linearMap:()=>ps,nice:()=>Fs,numericToNumber:()=>Rs,parseDate:()=>Ms,parsePercent:()=>J,quantile:()=>Is,quantity:()=>Ns,quantityExponent:()=>Ps,reformIntervals:()=>Ls,remRadian:()=>ks,round:()=>ys}),ak=e({format:()=>Jg,parse:()=>Ms,roundTime:()=>Zg}),ok=e({Arc:()=>fm,BezierCurve:()=>um,BoundingRect:()=>K,Circle:()=>Ap,CompoundPath:()=>pm,Ellipse:()=>Mp,Group:()=>q,Image:()=>ud,IncrementalDisplayable:()=>Dm,Line:()=>om,LinearGradient:()=>hm,Polygon:()=>tm,Polyline:()=>rm,RadialGradient:()=>gm,Rect:()=>vd,Ring:()=>Zp,Sector:()=>Yp,Text:()=>Cd,clipPointsByRect:()=>sh,clipRectByRect:()=>ch,createIcon:()=>lh,extendPath:()=>Wm,extendShape:()=>Hm,getShapeClass:()=>Km,getTransform:()=>th,initProps:()=>Mm,makeImage:()=>Jm,makePath:()=>qm,mergePath:()=>Xm,registerShape:()=>Gm,resizePath:()=>Zm,updateProps:()=>jm}),sk=e({addCommas:()=>p_,capitalFirst:()=>C_,encodeHTML:()=>$t,formatTime:()=>S_,formatTpl:()=>y_,getTextRect:()=>f_,getTooltipMarker:()=>x_,normalizeCssArray:()=>h_,toCamelCase:()=>m_,truncateText:()=>Cl}),ck=e({bind:()=>L,clone:()=>M,curry:()=>Ie,defaults:()=>P,each:()=>F,extend:()=>N,filter:()=>Me,indexOf:()=>De,inherits:()=>Oe,isArray:()=>R,isFunction:()=>z,isObject:()=>V,isString:()=>B,map:()=>I,merge:()=>Ce,reduce:()=>je}),lk=xc(),uk=xc(),dk={estimate:1,determine:2};function fk(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function pk(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:I(hk(n,r),function(t,n){return{formattedLabel:jD(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?gk(e,t):yk(e)}function mk(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:hk(i,r)}:e.type===`category`?vk(e,t):{ticks:r.getTicks(n)}}function hk(e,t){var n=t.getExtent(),r=[];return F(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),qc(r,Yc,null),bs(r),I(r,function(e){return{value:e}})}function gk(e,t){var n=e.getLabelModel(),r=_k(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function _k(e,t,n){var r=xk(e),i=ND(t),a=n.kind===dk.estimate;if(!a){var o=Ck(r,i);if(o)return o}var s,c;z(i)?s=Ak(e,i,!1):(c=i===`auto`?Tk(e,n):i,s=Ak(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return wk(r,i,l),!0}):wk(r,i,l),l}function vk(e,t){var n=bk(e),r=ND(t),i=Ck(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),z(r))a=Ak(e,r,!0);else if(r===`auto`){var s=_k(e,e.getLabelModel(),fk(dk.determine));o=s.labelCategoryInterval,a=I(s.labels,function(e){return e.tick})}else o=r,a=Ak(e,o,!0);return wk(n,r,{ticks:a,tickCategoryInterval:o})}function yk(e){var t=e.scale.getTicks(),n=jD(e);return{labels:I(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var bk=Sk(`axisTick`),xk=Sk(`axisLabel`);function Sk(e){return function(t){return uk(t)[e]||(uk(t)[e]={list:[]})}}function Ck(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=ho(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===dk.estimate?(t.out.noPxChangeTryDetermine.push(L(Dk,null,e,S,c)),S):Ok(e,S,c)??S}function Dk(e,t,n){return Ok(e,t,n)==null}function Ok(e,t,n){var r=lk(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function kk(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function Ak(e,t,n){var r=jD(e),i=e.scale,a=[],o=z(t);return eD(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var jk=.8;function Mk(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=LE(r);Us(o)||(o=NaN);var s=e.getExtent(),c=is(s[1]-s[0]);return KE(r)?Nk(n,e,o,c):i&&Pk(n,e,o,c,i),a!=null&&(n.w=Us(n.w)?rs(a,n.w):a),n}function Nk(e,t,n,r){var i=t.onBand,a=n+ +!!i;a===0&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}function Pk(e,t,n,r,i){var a=!1,o=-1/0;F(i.key?[JD(t,i.key)]:YD(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Us(n)&&n>0&&Us(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*jk,e.w2=e.w*n/r)}var Fk=[0,1],Ik=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),ps(e,Fk,Lk(this),t)},e.prototype.coordToData=function(e,t){var n=ps(e,Lk(this),Fk,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=I(mk(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(VD(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=Rk(this,n,r);return I(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(KE(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),I(this.scale.getMinorTicks(e),function(e){return I(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=fk(dk.determine),pk(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return Mk(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=fk(dk.determine),Ek(this,e)},e}();function Lk(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function Rk(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=Mk(e).w;if(!i)return!1;F(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}function zk(e){var t=tv.extend(e);return tv.registerClass(t),t}function Bk(e){var t=vx.extend(e);return vx.registerClass(t),t}function Vk(e){var t=lx.extend(e);return lx.registerClass(t),t}function Hk(e){var t=Sx.extend(e);return Sx.registerClass(t),t}var Uk=Math.PI*2,Wk=Nu.CMD,Gk=[`top`,`right`,`bottom`,`left`];function Kk(e,t,n,r,i){var a=n.width,o=n.height;switch(e){case`top`:r.set(n.x+a/2,n.y-t),i.set(0,-1);break;case`bottom`:r.set(n.x+a/2,n.y+o+t),i.set(0,1);break;case`left`:r.set(n.x-t,n.y+o/2),i.set(-1,0);break;case`right`:r.set(n.x+a+t,n.y+o/2),i.set(1,0);break}}function qk(e,t,n,r,i,a,o,s,c){o-=e,s-=t;var l=Math.sqrt(o*o+s*s);o/=l,s/=l;var u=o*n+e,d=s*n+t;if(Math.abs(r-i)%Uk<1e-4)return c[0]=u,c[1]=d,l-n;if(a){var f=r;r=Ru(i),i=Ru(f)}else r=Ru(r),i=Ru(i);r>i&&(i+=Uk);var p=Math.atan2(s,o);if(p<0&&(p+=Uk),p>=r&&p<=i||p+Uk>=r&&p+Uk<=i)return c[0]=u,c[1]=d,l-n;var m=n*Math.cos(r)+e,h=n*Math.sin(r)+t,g=n*Math.cos(i)+e,_=n*Math.sin(i)+t,v=(m-o)*(m-o)+(h-s)*(h-s),y=(g-o)*(g-o)+(_-s)*(_-s);return v0){t=t/180*Math.PI,$k.fromArray(e[0]),eA.fromArray(e[1]),tA.fromArray(e[2]),G.sub(nA,$k,eA),G.sub(rA,tA,eA);var n=nA.len(),r=rA.len();if(!(n<.001||r<.001)){nA.scale(1/n),rA.scale(1/r);var i=nA.dot(rA);if(Math.cos(t)1&&G.copy(oA,tA),oA.toArray(e[1])}}}}function cA(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,$k.fromArray(e[0]),eA.fromArray(e[1]),tA.fromArray(e[2]),G.sub(nA,eA,$k),G.sub(rA,tA,eA);var r=nA.len(),i=rA.len();if(!(r<.001||i<.001)&&(nA.scale(1/r),rA.scale(1/i),nA.dot(t)=o)G.copy(oA,tA);else{oA.scaleAndAdd(rA,a/Math.tan(Math.PI/2-s));var c=tA.x===eA.x?(oA.y-eA.y)/(tA.y-eA.y):(oA.x-eA.x)/(tA.x-eA.x);if(isNaN(c))return;c<0?G.copy(oA,eA):c>1&&G.copy(oA,tA)}oA.toArray(e[1])}}}function lA(e,t,n,r){var i=n===`normal`,a=i?e:e.ensureState(n);a.ignore=t;var o=r.get(`smooth`);o=o===!0?.3:Math.max(+o,0)||0,a.shape=a.shape||{},a.shape.smooth=o;var s=r.getModel(`lineStyle`).getLineStyle();i?e.useStyle(s):a.style=s}function uA(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=kt(r[0],r[1]),a=kt(r[1],r[2]);if(!i||!a){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(i,a)*n,s=Nt([],r[1],r[0],o/i),c=Nt([],r[1],r[2],o/a),l=Nt([],s,c,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(c[0],c[1],c[0],c[1],r[2][0],r[2][1])}else for(var u=1;u0&&i&&S(-d/a,0,a);var g=e[0],_=e[a-1],v,y;b(),v<0&&C(-v,.8),y<0&&C(y,.8),b(),x(v,y,1),x(y,v,-1),b(),v<0&&w(-v),y<0&&w(y);function b(){v=g.rect[o]-n,y=r-_.rect[o]-_.rect[s]}function x(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var i=r+e;i<0&&C(-i*n,1)}else C(-e*n,1)}}function S(t,n,r){t!==0&&(u=!0);for(var i=n;i0)for(var c=0;c0;c--){var f=r[c-1]*d;S(-f,c,a)}}}function w(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r0?S(n,0,r+1):S(-n,a-r-1,a),e-=n,e<=0)return}return u}function DA(e){for(var t=0;t=0&&n.attr(i.oldLayoutSelect),De(u,`emphasis`)>=0&&n.attr(i.oldLayoutEmphasis)),jm(n,c,t,s)}else if(n.attr(c),!Kh(n).valueAnimation){var d=H(n.style.opacity,1);n.style.opacity=0,Mm(n,{style:{opacity:d}},t,s)}if(i.oldLayout=c,n.states.select){var f=i.oldLayoutSelect={};IA(f,c,LA),IA(f,n.states.select,LA)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};IA(p,c,LA),IA(p,n.states.emphasis,LA)}Jh(n,s,l,t,t)}if(r&&!r.ignore&&!r.invisible){var i=FA(r),a=i.oldLayout,m={points:r.shape.points};a?(r.attr({shape:a}),jm(r,{shape:m},t)):(r.setShape(m),r.style.strokePercent=0,Mm(r,{style:{strokePercent:1}},t)),i.oldLayout=m}},e}(),zA=xc();function BA(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){var r=zA(t).labelManager;r||=zA(t).labelManager=new RA,r.clearLabels()}),e.registerUpdateLifecycle(`series:layoutlabels`,function(e,t,n){var r=zA(t).labelManager;F(n.updatedSeries,function(e){r.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()})}var VA=Math.sin,HA=Math.cos,UA=Math.PI,WA=Math.PI*2,GA=180/UA,KA=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str=``,this._p=10**(e||4)},e.prototype.moveTo=function(e,t){this._add(`M`,e,t)},e.prototype.lineTo=function(e,t){this._add(`L`,e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){this._add(`C`,e,t,n,r,i,a)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add(`Q`,e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,a){this.ellipse(e,t,n,n,0,r,i,a)},e.prototype.ellipse=function(e,t,n,r,i,a,o,s){var c=o-a,l=!s,u=Math.abs(c),d=Pi(u-WA)||(l?c>=WA:-c>=WA),f=c>0?c%WA:c%WA+WA,p=!1;p=d?!0:Pi(u)?!1:f>=UA==!!l;var m=e+n*HA(a),h=t+r*VA(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*GA);if(d){var _=1/this._p,v=(l?1:-1)*(WA-_);this._add(`A`,n,r,g,1,+l,e+n*HA(a+v),t+r*VA(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*HA(o),b=t+r*VA(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function cj(e){return``}function lj(e,t){t||={};var n=t.newline?` -`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return sj(i,a)+(i===`style`?o||``:$t(o))+(t?``+n+I(t,function(e){return r(e)}).join(n)+n:``)+cj(i)}return r(e)}function uj(e,t,n){n||={};var r=n.newline?` -`:``,i=` {`+r,a=r+`}`,o=I(Pe(e),function(t){return t+i+I(Pe(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=I(Pe(t),function(e){return`@keyframes `+e+i+I(Pe(t[e]),function(n){return n+i+I(Pe(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function dj(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function fj(e,t,n,r){return oj(`svg`,`root`,{width:e,height:t,xmlns:ej,"xmlns:xlink":tj,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var pj=0;function mj(){return pj++}var hj={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},gj=`transform-origin`;function _j(e,t,n){var r=N({},e.shape);N(r,t),e.buildPath(n,r);var i=new KA;return i.reset(Yi(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function vj(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[gj]=n+`px `+r+`px`)}var yj={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function bj(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function xj(e,t,n){var r=e.shape.paths,i={},a,o;if(F(r,function(e){var t=dj(n.zrId);t.animation=!0,Cj(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=Pe(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=bj(i,n);return a.replace(o,s)}}function Sj(e){return B(e)?hj[e]?`cubic-bezier(`+hj[e]+`)`:Xr(e)?e:``:``}function Cj(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof pm){var s=xj(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return bj(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+mj();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function wj(e,t,n){if(!e.ignore)if(e.isSilent()){var r={"pointer-events":`none`};Tj(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=Ai(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),Tj(r,t,n,!0)}}function Tj(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+mj(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var Ej=Math.round;function Dj(e){return e&&B(e.src)}function Oj(e){return e&&z(e.toDataURL)}function kj(e,t,n,r){$A(function(i,a){var o=i===`fill`||i===`stroke`;o&&qi(a)?Wj(t,e,i,r):o&&Wi(a)?Gj(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),Uj(n,e,r)}function Aj(e,t){var n=Xo(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[ij+`silent`]=`true`))}function jj(e){return Pi(e[0]-1)&&Pi(e[1])&&Pi(e[2])&&Pi(e[3]-1)}function Mj(e){return Pi(e[4])&&Pi(e[5])}function Nj(e,t,n){if(t&&!(Mj(t)&&jj(t))){var r=n?10:1e4;e.transform=jj(t)?`translate(`+Ej(t[4]*r)/r+` `+Ej(t[5]*r)/r+`)`:Li(t)}}function Pj(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;Xe(f,g),Xe(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=yl(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=oj(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=M(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=Xi(i);x&&(o.patternTransform=x);var S=oj(`pattern`,``,o,[d]),C=lj(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=oj(`pattern`,T,o,[d])),t[n]=Ji(T)}}function Kj(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=oj(`clipPath`,a,o,[zj(e,n)])}t[`clip-path`]=Ji(a)}function qj(e){return document.createTextNode(e)}function Jj(e,t,n){e.insertBefore(t,n)}function Yj(e,t){e.removeChild(t)}function Xj(e,t){e.appendChild(t)}function Zj(e){return e.parentNode}function Qj(e){return e.nextSibling}function $j(e,t){e.textContent=t}var eM=58,tM=120,nM=oj(``,``);function rM(e){return e===void 0}function iM(e){return e!==void 0}function aM(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function oM(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function sM(e){var t,n=e.children,r=e.tag;if(iM(r)){var i=e.elm=aj(r);if(uM(nM,e),R(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,cM(e,m,n,i,c)):lM(e,t,r,a))}function fM(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(uM(e,t),rM(t.text)?iM(r)&&iM(i)?r!==i&&dM(n,r,i):iM(i)?(iM(e.text)&&$j(n,``),cM(n,null,i,0,i.length-1)):iM(r)?lM(n,r,0,r.length-1):iM(e.text)&&$j(n,``):e.text!==t.text&&(iM(r)&&lM(n,r,0,r.length-1),$j(n,t.text)))}function pM(e,t){if(oM(e,t))fM(e,t);else{var n=e.elm,r=Zj(n);sM(t),r!==null&&(Jj(r,t.elm,Qj(n)),lM(r,[e],0,0))}return t}var mM=0,hM=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=gM(`configLayer`),this.storage=t,this._opts=n=N({},n),this.root=e,this._id=`zr`+mM++,this._oldVNode=fj(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=aj(`svg`);uM(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,pM(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return Hj(e,dj(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=dj(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=_M(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=oj(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=I(Pe(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(oj(`defs`,`defs`,{},c)),e.animation){var l=uj(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=oj(`style`,`stl`,{},[],l);a.push(u)}}return fj(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},lj(this.renderToVNode({animation:H(e.cssAnimation,!0),emphasis:H(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:H(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g=a}}for(var l=xM(this),u=l.startIdx;u=0)&&(a=!0)}),!(!a&&!i.__dirty)){var o=n._opts.useDirtyRect&&!bM(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}PM(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},BM),k.wxa&&IM(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r)if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s=t.endIdx},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=bM(e),c=s&&ae.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d15){d++;break}}}OC(o,a),t.drawIdx=Math.max(d,l)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t||=0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=wM,t=0);var i=FM(this._i,e)[t];return i||(i=AM(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&Ce(i,this._layerConfig[e],!0),(n||r&&e!==wM)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(!(a[t]&&a[t][n])&&OM(e)){for(var l=o.length,u=0;u0&&(c=FM(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),FM(i,t)[n]=e,!r&&!e.virtual)if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom);e.painter||=this}},e.prototype.eachLayer=function(e,t){return IM(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return IM(this._i,function(n,r){e.call(t,n,r)},LM)},e.prototype.eachOtherLayer=function(e,t){return IM(this._i,function(n,r){e.call(t,n,r)},RM)},e.prototype.getLayers=function(){var e={};return IM(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(bM(t)?s=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=$S(i,0,r),t=$S(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,IM(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(wM).resize(e,t)}return this},e.prototype.clearLayer=function(e){F(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._i.layers[wM][0].dom;var t=new SM(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;IM(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;s-1&&(s.style.stroke=s.style.fill,s.style.fill=Z.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(lx);function WM(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=Yy(e,t,n[0]);return i==null?null:i+``}else if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var KM=function(e){D(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=WS(e,-1,-1,2,2,null,a);o.attr({z2:H(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=qM,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){kf(this.childAt(0))},t.prototype.downplay=function(){Af(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):jm(f,p,o,n),Lm(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Mm(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Ih(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=KS(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof ud){var S=a.style;a.useStyle(N({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(N({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Fh(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):WM(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),Jf(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=Y(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Pm(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Pm(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return GS(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(q);function qM(e,t){this.parent.drift(e,t)}function JM(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function YM(e){return e!=null&&!V(e)&&(e={isIgnore:e}),e||{}}function XM(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Ih(t),cursorStyle:t.get(`cursor`)}}function ZM(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var QM=function(){function e(e){this.group=new q,this._SymbolCtor=e||KM}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=YM(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=XM(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);JM(e,i,r,t)&&ZM(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!JM(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):jm(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i0?n=r[0]:r[1]<0&&(n=r[1]),n}function tN(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function nN(e,t){return!isFinite(e)||!isFinite(t)}var rN=typeof Float32Array<`u`?Float32Array:void 0,iN=typeof Float64Array<`u`?Float64Array:void 0;function aN(e){return oN({ctor:rN},e).arr}function oN(e,t){var n=e.arr,r=e.ctor;if(t>Os&&(t=Os),!n||e.typed&&n.length=i||h<0)break;if(nN(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g=r||nN(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,ee=v-u,te=C-v,ne=void 0,re=void 0;if(s===`x`){ne=Math.abs(A),re=Math.abs(j);var ie=E>0?1:-1;p=_-ie*ne*o,m=v,O=_+ie*re*o,k=v}else if(s===`y`){ne=Math.abs(ee),re=Math.abs(te);var ae=D>0?1:-1;p=_,m=v-ae*ne*o,O=_,k=v+ae*re*o}else ne=Math.sqrt(A*A+ee*ee),re=Math.sqrt(j*j+te*te),T=re/(re+ne),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=lN(O,uN(S,_)),k=lN(k,uN(C,v)),O=uN(O,lN(S,_)),k=uN(k,lN(C,v)),E=O-_,D=k-v,p=_-E*ne/re,m=v-D*ne/re,p=lN(p,uN(l,_)),m=lN(m,uN(u,v)),p=uN(p,lN(l,_)),m=uN(m,lN(u,v)),E=_-p,D=v-m,O=_+E*re/ne,k=v+D*re/ne}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var fN=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),pN=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new fN},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&nN(n[i*2-2],n[i*2-1]);i--);for(;r=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?Lr(i,u,f,m,e,s):Lr(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?Fr(a,d,p,h,b):Fr(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h;break}}},t}(id),mN=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(fN),hN=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new mN},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&nN(n[a*2-2],n[a*2-1]);a--);for(;i=0,a=e.fill||Z.color.neutral99;DN(r,t);var o=r.textFill==null;return i?o&&(r.textFill=n.insideFill||Z.color.neutral00,!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=a),r.textStrokeWidth??=2):(o&&(r.textFill=e.fill||n.outsideFill||Z.color.neutral00),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,F(t.rich,function(e){DN(e,e)}),r}function DN(e,t){t&&(W(t,`fill`)&&(e.textFill=t.fill),W(t,`stroke`)&&(e.textStroke=t.fill),W(t,`lineWidth`)&&(e.textStrokeWidth=t.lineWidth),W(t,`font`)&&(e.font=t.font),W(t,`fontStyle`)&&(e.fontStyle=t.fontStyle),W(t,`fontWeight`)&&(e.fontWeight=t.fontWeight),W(t,`fontSize`)&&(e.fontSize=t.fontSize),W(t,`fontFamily`)&&(e.fontFamily=t.fontFamily),W(t,`align`)&&(e.textAlign=t.align),W(t,`verticalAlign`)&&(e.textVerticalAlign=t.verticalAlign),W(t,`lineHeight`)&&(e.textLineHeight=t.lineHeight),W(t,`width`)&&(e.textWidth=t.width),W(t,`height`)&&(e.textHeight=t.height),W(t,`backgroundColor`)&&(e.textBackgroundColor=t.backgroundColor),W(t,`padding`)&&(e.textPadding=t.padding),W(t,`borderColor`)&&(e.textBorderColor=t.borderColor),W(t,`borderWidth`)&&(e.textBorderWidth=t.borderWidth),W(t,`borderRadius`)&&(e.textBorderRadius=t.borderRadius),W(t,`shadowColor`)&&(e.textBoxShadowColor=t.shadowColor),W(t,`shadowBlur`)&&(e.textBoxShadowBlur=t.shadowBlur),W(t,`shadowOffsetX`)&&(e.textBoxShadowOffsetX=t.shadowOffsetX),W(t,`shadowOffsetY`)&&(e.textBoxShadowOffsetY=t.shadowOffsetY),W(t,`textShadowColor`)&&(e.textShadowColor=t.textShadowColor),W(t,`textShadowBlur`)&&(e.textShadowBlur=t.textShadowBlur),W(t,`textShadowOffsetX`)&&(e.textShadowOffsetX=t.textShadowOffsetX),W(t,`textShadowOffsetY`)&&(e.textShadowOffsetY=t.textShadowOffsetY))}function ON(e,t){if(e.length===t.length){for(var n=0;nt){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function FN(e,t,n){var r=e.getVisual(`visualMeta`);if(!(!r||!r.length||!e.count())&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=I(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=PN(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;F(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new hm(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function IN(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&LN(a,t))){var o=t.mapDimension(a.dim),s={};return F(a.getViewLabels(),function(e){e.tick.offInterval||(s[VD(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function LN(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function RN(e){for(var t=e.length/2;t>0&&nN(e[t*2-2],e[t*2-1]);t--);return t-1}function zN(e,t){return[e[t*2],e[t*2+1]]}function BN(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function VN(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var ee=f.getState(`emphasis`).style;ee.lineWidth=+f.style.lineWidth+1}Y(f).seriesIndex=e.seriesIndex,Jf(f,k,A,j);var te=jN(e.get(`smooth`)),ne=e.get(`smoothMonotone`);if(f.setShape({smooth:te,smoothMonotone:ne,connectNulls:x}),p){var re=a.getCalculationInfo(`stackedOnSeries`),ie=0;p.useStyle(P(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),re&&(ie=jN(re.get(`smooth`))),p.setShape({smooth:te,stackedOnSmooth:ie,smoothMonotone:ne,connectNulls:x}),Qf(p,e,`areaStyle`),Y(p).seriesIndex=e.seriesIndex,Jf(p,k,A,j)}var ae=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=ae)}),this._polyline.onHoverStateChange=ae,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var oe=e.get(`triggerEvent`),se=e.get(`triggerLineEvent`),ce=se===!0||oe===!0||oe===`line`,le=se===!0||oe===!0||oe===`area`;this.packEventData(e,f,ce),p&&this.packEventData(e,p,le)},t.prototype.packEventData=function(e,t,n){Y(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=bc(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(nN(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new KM(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Sx.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=bc(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else Sx.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;bf(this._polyline,e),t&&bf(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new pN({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new hN({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);z(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=z(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n)if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=z(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(VN(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Cd({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=RN(o);c>=0&&(Fh(a,Ih(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?WM(i,e):GM(i,n)},enableTextSetter:!0},UN(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=BN(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=zN(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Nc(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=zN(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=Kh(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=cN(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=NN(u.stackedOnCurrent,u.current,n,i,o),d=NN(u.current,null,n,i,o),m=NN(u.stackedOnNext,u.next,n,i,o),p=NN(u.next,null,n,i,o)),AN(d,p)>3e3||c&&AN(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),jm(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),jm(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;B(i)?p=KN[i]:z(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,qN))}}}}}function YN(e){e.registerChartView(WN),e.registerSeriesModel(UM),e.registerLayout(GN(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,JN(`line`))}var XN=function(e){D(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Ik),ZN=null;function QN(e){ZN||=e}function $N(){return ZN}var eP=`expandAxisBreak`,tP=`collapseAxisBreak`,nP=`toggleAxisBreak`,rP=`axisbreakchanged`,iP={type:eP,event:rP,update:`update`,refineEvent:sP},aP={type:tP,event:rP,update:`update`,refineEvent:sP},oP={type:nP,event:rP,update:`update`,refineEvent:sP};function sP(e,t,n,r){var i=[];return F(e,function(e){i=i.concat(e.eventBreaks)}),{eventContent:{breaks:i}}}function cP(e){e.registerAction(iP,t),e.registerAction(aP,t),e.registerAction(oP,t);function t(e,t){var n=[],r=Cc(t,e);function i(t,i){F(r[t],function(t){F(t.updateAxisBreaks(e).breaks,function(e){var r;n.push(P((r={},r[i]=t.componentIndex,r),e))})})}return i(`xAxisModels`,`xAxisIndex`),i(`yAxisModels`,`yAxisIndex`),i(`singleAxisModels`,`singleAxisIndex`),{eventBreaks:n}}}var lP=Math.PI,uP=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],dP=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],fP=xc(),pP=xc(),mP=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}();function hP(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=zP(e.axisName)&&ID(e.nameLocation);F(r,function(e){var t=yA(e);if(!(!t||t.label.ignore)){o.push(t);var n=a.transGroup;c&&(n.transform?Tn(gP,n.transform):yn(gP),t.transform&&xn(gP,gP,t.transform),K.copy(_P,t.localRect),_P.applyTransform(gP),s?s.union(_P):K.copy(s=new K(0,0,0,0),_P))}});var l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new K(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var gP=vn(),_P=new K(0,0,0,0),vP=function(e,t,n,r,i,a){if(ID(e.nameLocation)){var o=a.stOccupiedRect;o&&yP(SA({},o,a.transGroup.transform),r,i)}else bP(a.labelInfoList,a.dirVec,r,i)};function yP(e,t,n){var r=new G;kA(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&CA(t,r)}function bP(e,t,n,r){for(var i=G.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):As(r-lP)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),SP=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],CP={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Pt(u,u,l),Pt(d,d,l));var p=N({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&kg(r.axis.scale))$N().buildAxisBreakLine(r,i,a,m);else{var h=new om(N({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));Qm(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);B(g)&&(g=[g,g]),(B(_)||Re(_))&&(_=[_,_]);var v=KS(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];F([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=WS(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){MP(t,i,s)&&wP(e,t,n,r,i,a,o,dk.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){MP(t,i,s)&&wP(e,t,n,r,i,a,o,dk.determine);var c=AP(e,i,a,r);DP(e,t.labelLayoutList,c),jP(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(zP(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new G(0,0),_=new G(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=vn();_.transform(Cn(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*lP/180);var b,x;ID(u)?b=xP.innerTextLayout(e.rotation,y??e.rotation,d):(b=TP(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=Ke(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Cd({x:g.x,y:g.y,rotation:b.rotation,silent:xP.isLabelSilent(r),style:Lh(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(_h({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=xP.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Y(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=yA({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:ID(u)?uP[E]:dP[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function wP(e,t,n,r,i,a,o,s){PP(t)||NP(e,t,i,s,r,o);var c=t.labelLayoutList;IP(e,r,c,a),VP(r,e.rotation,c);var l=e.optionHideOverlap;EP(r,c,l),l&&OA(Me(c,function(e){return e&&!e.label.ignore})),hP(e,n,r,c)}function TP(e,t,n,r){var i=ks(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return As(i-lP/2)?(o=c?`bottom`:`top`,a=`center`):As(i-lP*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=ilP/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function EP(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(PD(r))return;function a(e,a,o){var s=yA(t[a]),c=yA(t[o]),l=r.scale;if(!(!s||!c)){if(e==null){if(!n&&i)return;var u=fP(s.label).labelInfo.tick;if(WE(l)&&u.notNice||KE(l)&&u.offInterval){OP(s.label);return}}if(e===!1||s.suggestIgnore){OP(s.label);return}if(c.suggestIgnore){OP(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=wA({marginForce:f},s),c=wA({marginForce:f},c)}kA(s,c,null,{touchThreshold:d})&&OP(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function DP(e,t,n){e.showMinorTicks||F(t,function(e){if(e&&e.label.ignore)for(var t=0;t=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}oN(XP,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r0&&v0?-2:-1,n.serUids=r}var XP=oN({ctor:iN},50);function ZP(e){return function(t,n){var r=Mk(t,{fromStat:{key:e}});if(Us(r.w2))return[-r.w2/2,r.w2/2]}}function QP(e){return e+`|&`}function $P(e,t){return e+`|&`+t}function eF(e){return JP(),{liPosMinGap:!KE(e.scale)}}var tF=`pictorialBar`;function nF(e,t,n,r){lO(e,{key:t,seriesType:n,coordSysType:r,getMetrics:eF})}function rF(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var iF={left:0,right:0,top:0,bottom:0},aF=[`25%`,`25%`],oF=`cartesian2d`,sF=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=Q_(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&Z_(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&Z_(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:iF,outerBoundsContain:`all`,outerBoundsClampWidth:aF[0],outerBoundsClampHeight:aF[1],backgroundColor:Z.color.transparent,borderWidth:1,borderColor:Z.color.neutral30},t}(tv),cF=Gc(),lF=`__ec_stack_`;function uF(e){return e.get(`stack`)||lF+e.seriesIndex}function dF(e){if(KE(e.axis.scale)){for(var t=Mk(e.axis),n=[],r=0;ro&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=rs(u,0);var d=0,f;F(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return F(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function hF(e){return{seriesType:e,overallReset:function(t){var n=$P(e,oF);nO(t,n,function(t){var r=fF(t,e);$D(t,n,function(e){var t=r.columnMap[uF(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function gF(e){return{seriesType:e,plan:yx(),reset:function(e){if(UP(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=bE(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(rF(i))),p=_F(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&aN(r*3),c=p&&s&&aN(r*3),l=p&&aN(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,is(k)s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(lx);lx.registerClass(bF);var xF=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return wE(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=Zc(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=dg(bF.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Z.color.primary,borderWidth:2}},realtimeSort:!1}),t}(bF),SF=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),CF=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new SF},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-cMath.PI/2&&ua)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Im(t,e,Y(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(Sx),MF={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=kF(t.x,e.x),s=AF(t.x+t.width,i),c=kF(t.y,e.y),l=AF(t.y+t.height,a),u=si?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=AF(t.r,e.r),a=kF(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},NF={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new vd({shape:N({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?CF:Yp,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=wF(HF(i),{isRoundCap:l===CF}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?jm:Mm)(u,{shape:p},a)}return u}};function PF(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function FF(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?jm:Mm)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?jm:Mm)(n,{shape:l},u,i)}function IF(e,t){for(var n=0;n0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function VF(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function HF(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function UF(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;N(u,OF(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?QF(i,a.coordinateSystem):$F(i,a.coordinateSystem),p=Ih(r);Fh(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:WM(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`?!0:null,TF(e,h===`outside`?f:h,HF(o),r.get([`label`,`rotate`]))}qh(m,p,a.getRawValue(n),function(e){return GM(t,e)});var g=r.getModel([`emphasis`]);Jf(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),Qf(e,r),VF(i)&&(e.style.fill=`none`,e.style.stroke=`none`,F(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function WF(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var GF=function(){function e(){}return e}(),KF=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new GF},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c=0?n:null},30,!1);function YF(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function XF(e,t,n){if(xN(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}else{var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function ZF(e,t,n){return new(e.type===`polar`?Yp:vd)({shape:XF(t,n,e),silent:!0,z2:0})}function QF(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function $F(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function eI(e){e.registerChartView(jF),e.registerSeriesModel(xF),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,hF(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,gF(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,JN(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),yF(e)}function tI(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:`legend`});if(!(!n||!n.length)){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),iI=xc(),aI=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new rI(L(this.getData,this),L(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return nI(this,{coordDimensions:[`value`],encodeDefaulter:Ie(hv,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=iI(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=Es(a,n.hostModel.get(`percentPrecision`))}var o=e.prototype.getDataParams.call(this,t);return o.percent=i[t]||0,o.$vars.push(`percent`),o},t.prototype._defaultLabelLine=function(e){ec(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type=`series.pie`,t.defaultOption={z:2,legendHoverLink:!0,colorBy:`data`,center:[`50%`,`50%`],radius:[0,`50%`],clockwise:!0,startAngle:90,endAngle:`auto`,padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:`box`,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:`truncate`,position:`outer`,alignTo:`none`,edgeDistance:`25%`,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:`solid`}},itemStyle:{borderWidth:1,borderJoin:`round`},showEmptyCircle:!0,emptyCircleStyle:{color:`lightgray`,opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:`expansion`,animationDuration:1e3,animationTypeUpdate:`transition`,animationEasingUpdate:`cubicInOut`,animationDurationUpdate:500,animationEasing:`cubicInOut`},t}(lx);A_({fullType:aI.type,getCoord2:function(e){return e.getShallow(`center`)}});var oI=Math.PI/180;function sI(e,t,n,r,i,a,o,s,c,l){if(e.length<2)return;function u(e){for(var a=e.rB,o=a*a,s=0;sn?o:a,d=Math.abs(c.label.y-n);if(d>=l.maxY){var f=c.label.x-t-c.len2*i,p=r+c.len;l.rB=Math.abs(f)e.unconstrainedWidth?null:f:null;r.setStyle(`width`,p)}uI(a,r)}}}function uI(e,t){fI.rect=e,bA(fI,t,dI)}var dI={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},fI={};function pI(e){return e.position===`center`}function mI(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*oI,s=t.getLayout(`viewRect`),c=t.getLayout(`r`),l=s.width,u=s.x,d=s.y,f=s.height;function p(e){e.ignore=!0}function m(e){if(!e.ignore)return!0;for(var t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){var s=t.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),g=s.getTextGuideLine(),_=t.getItemModel(e),v=_.getModel(`label`),y=v.get(`position`)||_.get([`emphasis`,`label`,`position`]),b=v.get(`distanceToLabelLine`),x=v.get(`alignTo`),S=J(v.get(`edgeDistance`),l),C=v.get(`bleedMargin`);C??=Math.min(l,f)>200?10:2;var w=_.getModel(`labelLine`),T=w.get(`length`);T=J(T,l);var E=w.get(`length2`);if(E=J(E,l),Math.abs(d.endAngle-d.startAngle)0?`right`:`left`:O>0?`left`:`right`}var le=Math.PI,ue=0,de=v.get(`rotate`);if(Re(de))ue=le/180*de;else if(y===`center`)ue=0;else if(de===`radial`||de===!0)ue=O<0?-D+le:-D;else if(de===`tangential`||de===`tangential-noflip`&&y!==`outside`&&y!==`outer`){var fe=Math.atan2(O,k);fe<0&&(fe=le*2+fe),k>0&&de!==`tangential-noflip`&&(fe=le+fe),ue=fe-le}if(a=!!ue,h.x=A,h.y=j,h.rotation=ue,h.setStyle({verticalAlign:`middle`}),ne){h.setStyle({align:te});var pe=h.states.select;pe&&(pe.x+=h.x,pe.y+=h.y)}else{var me=new K(0,0,0,0);uI(me,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new G(O,k),linePoints:ee,textAlign:te,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:me,unconstrainedWidth:me.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:ne})}}),!a&&e.get(`avoidLabelOverlap`)&&cI(n,r,i,c,l,f,u,d);for(var h=0;hr?(l=O+x*r/2,u=l):(l=O+C,u=i-C),n.setItemLayout(t,{angle:r,startAngle:l,endAngle:u,clockwise:_,cx:a,cy:o,r0:c,r:v?ps(e,b,[c,s]):s}),O=i}),E0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l=n.r0}},t.type=`pie`,t}(Sx);function SI(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension(`value`),r=n.get(t,e);return!(Re(r)&&!isNaN(r)&&r<0)})}}}function CI(e){e.registerChartView(xI),e.registerSeriesModel(aI),yS(`pie`,e.registerAction),e.registerLayout(_I),e.registerProcessor(tI(`pie`)),e.registerProcessor(SI(`pie`))}var wI=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e,t){return wE(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?5e3:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?1e4:this.get(`progressiveThreshold`))},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:``},t.type=`series.scatter`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:Z.color.primary}},universalTransition:{divideShape:`clone`}},t}(lx),TI=4,EI=function(){function e(){}return e}(),DI=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new EI},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.buildPath=function(e,t){var n=t.points,r=t.size,i=this.symbolProxy,a=i.shape,o=e.getContext?e.getContext():e,s=o&&r[0]=0;s--){var c=s*2,l=r[c]-a/2,u=r[c+1]-o/2;if(e>=l&&t>=u&&e<=l+a&&t<=u+o)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],a=r[1],o=1/0,s=1/0,c=-1/0,l=-1/0,u=0;u=0&&(c.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),kI=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,AI(e)),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),Xc(t),AI(t)),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),this._finished){var i=GN(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(AI(e))}else return{update:!0}},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return(!n||r!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=r?new OI:new QM,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type=`scatter`,t}(Sx);function AI(e){return{clipShape:bN(e)}}var jI=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Tc).models[0]},t.type=`cartesian2dAxis`,t}(tv);ke(jI,UD);var MI={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:Z.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:Z.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Z.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Z.color.backgroundTint,Z.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Z.color.neutral00,borderColor:Z.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},NI=Ce({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},MI),PI=Ce({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Z.color.axisMinorSplitLine,width:1}}},MI),FI={category:NI,value:PI,time:Ce({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},PI),log:P({logBase:10},PI)};function II(e,t,n,r){F(wD,function(i,a){var o=Ce(Ce({},FI[a],!0),r,!0),s=function(e){D(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=X_(this),r=n?Q_(e):{};Ce(e,t.getTheme().get(a+`Axis`)),Ce(e,this.getDefaultOption()),e.type=LI(e),n&&Z_(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=kE.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=$N();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,LI)}function LI(e){return e.type||(e.data?`category`:`value`)}var RI=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return I(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Me(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),zI=[`x`,`y`];function BI(e){return(e.type===`interval`||e.type===`time`)&&!kg(e)}var VI=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=oF,t.dimensions=zI,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!BI(e)||!BI(t))){var n=IE(e,null),r=IE(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(!(!o||!s)){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=Tn([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new K(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Pt(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Pt(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new K(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(RI);function HI(e,t){var n=e.scale,r=e.model,i=EO(n,r,r.ecModel,e,null),a=GE(n),o=GE(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=is(l[0].value-l[1].value),g=is(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(ne(),k=vs(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=vs(ss(C[0]/E)*E,D),O=vs(os(C[1]/E)*E,D);var e=as((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=os(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}BD(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}var UI=[[3,1],[0,2]],WI=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=zI,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;F(this._axesList,function(e){bO(e,1);var t=e.scale;KE(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=Pe(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):MO(i)}F(n,function(e){YI(e,e.__alignTo)?MO(e):HI(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};F(n.x,function(e){KI(n,`y`,e,i)}),F(n.y,function(e){KI(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=q_(e,t),i=this._rect=W_(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(ZI(a,i),!n){var c=nL(i,o,a,s,t),l=void 0;if(s)$I?($I(this._axesList,i),ZI(a,i)):l=tL(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=iL(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=tL(d,f,p,i,a,c,r))}rL(i,a,dk.determine,null,l,r),F(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}V(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];HE(a.scale)&&RD(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&F(r,function(e){e.__alignTo=n})}function YI(e,t){return kg(e.scale)||kg(t.scale)||t.scale.getTicks().length<2}function XI(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function ZI(e,t){F(e.x,function(e){return QI(e,t.x,t.width)}),F(e.y,function(e){return QI(e,t.y,t.height)})}function QI(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),XI(e,t)}var $I;function eL(e){$I=e}function tL(e,t,n,r,i,a,o){rL(r,i,dk.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=Ne(s,function(e){return e>0})==null;return mh(r,s,!0,!0,n),ZI(i,r),c;function l(e){F(i[X[e]],function(t){if(LD(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!Ge(t)&&t>1e-4&&(e/=t),e}}function nL(e,t,n,r,i){var a=new mP(aL);return F(n,function(n){return F(n,function(n){if(LD(n.model)){var o=!r;n.axisBuilder=GP(e,t,n.model,i,a,o)}})}),a}function rL(e,t,n,r,i,a){var o=n===dk.determine;F(t,function(t){return F(t,function(t){LD(t.model)&&(KP(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[X[1-t]]=e[Vm[t]]<=a.refContainer[Vm[t]]*.5?0:1-t==1?2:1}F(t,function(e,t){return F(e,function(e){LD(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function iL(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=W_(e.get(`outerBounds`,!0)||iF,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||De([`all`,`axisLabel`],a)<0?`all`:a,s=[hs(H(e.get(`outerBoundsClampWidth`,!0),aF[0]),t.width),hs(H(e.get(`outerBoundsClampHeight`,!0),aF[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var aL=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;vP(e,t,n,r,i,a),ID(e.nameLocation)||F(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&bP(e.labelInfoList,e.dirVec,r,i)})};function oL(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return sL(n,e,t),n.seriesInvolved&&lL(n,e),n}function sL(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];F(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=gL(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(F(n.getAxes(),Ie(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&F(f.baseAxes,Ie(p,d?`cross`:!0,u)),d&&F(f.otherAxes,Ie(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!hL(d))){s??=d.get(`triggerTooltip`),d=r?cL(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=gL(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:hL(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=uL(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function cL(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};F(s,function(e){c[e]=M(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&P(l,u.textStyle)}return e.model.getModel(`axisPointer`,new og(c,n,r))}function lL(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);!n||!n.model||r===`none`||r===!1||r===`item`||i===!1||t.get([`axisPointer`,`show`],!0)===!1||F(e.coordSysAxesInfo[gL(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function uL(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function fL(e){var t=pL(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=hL(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o0;return o&&s}var PL=xc();function FL(e,t,n,r){if(e instanceof XN&&e.scale.type!==`ordinal`)return n;var i=e.model,a=i.get(`jitter`);if(!(a>0))return n;var o=i.get(`jitterOverlap`),s=i.get(`jitterMargin`)||0,c=KE(e.scale)?Mk(e).w:null;return o?IL(n,a,c,r):LL(e,t,n,r,a,s)}function IL(e,t,n,r){if(n===null)return e+(Math.random()-.5)*t;var i=n-r*2,a=Math.min(Math.max(0,t),i);return e+(Math.random()-.5)*a}function LL(e,t,n,r,i,a){var o=PL(e);o.items||=[];var s=o.items,c=RL(s,t,n,r,i,a,1),l=RL(s,t,n,r,i,a,-1),u=Math.abs(c-n)i/2||d&&f>d/2-r?IL(n,i,d,r):(s.push({fixedCoord:t,floatCoord:u,r}),u)}function RL(e,t,n,r,i,a,o){for(var s=n,c=0;ci/2)return Number.MAX_VALUE;if(o===1&&m>s||o===-1&&m0&&!f.min?f.min=0:f.min!=null&&f.min<0&&!f.max&&(f.max=0);var p=s;f.color!=null&&(p=P({color:f.color},s));var m=Ce(M(f),{boundaryGap:e,splitNumber:t,clockwise:n,scale:r,axisLine:i,axisTick:a,axisLabel:o,name:f.text,showName:c,nameLocation:`end`,nameGap:u,nameTextStyle:p,triggerEvent:d},!1);if(B(l)){var h=m.name;m.name=l.replace(`{value}`,h??``)}else z(l)&&(m.name=l(m.name,m));var g=new og(m,null,this.ecModel);return ke(g,UD.prototype),g.mainType=`radar`,g.componentIndex=this.componentIndex,g.uid=cg(`ec_radar`),g},this);this._indicatorModels=f},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type=JL,t.defaultOption={z:0,center:[`50%`,`50%`],radius:`50%`,startAngle:90,clockwise:!1,axisName:{show:!0,color:Z.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:`polygon`,axisLine:Ce({lineStyle:{color:Z.color.neutral20}},KL.axisLine),axisLabel:XL(KL.axisLabel,!1),axisTick:XL(KL.axisTick,!1),splitLine:XL(KL.splitLine,!0),splitArea:XL(KL.splitArea,!0),indicator:[]},t}(tv),QL=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeAll(),this._buildAxes(e,n),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e,t){var n=e.coordinateSystem;F(I(n.getIndicatorAxes(),function(e){var r=e.model.get(`showName`)?e.name:``;return new xP(e.model,t,{axisName:r,position:[n.cx,n.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(e){e.build(),this.group.add(e.group)},this)},t.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(!n.length)return;var r=e.get(`shape`),i=e.getModel(`splitLine`),a=e.getModel(`splitArea`),o=i.getModel(`lineStyle`),s=a.getModel(`areaStyle`),c=i.get(`show`),l=a.get(`show`),u=o.get(`color`),d=s.get(`color`),f=R(u)?u:[u],p=R(d)?d:[d],m=[],h=[];function g(e,t,n){var r=n%t.length;return e[r]=e[r]||[],r}if(r===`circle`)for(var _=n[0].getTicksCoords(),v=t.cx,y=t.cy,b=0;b<_.length;b++){if(c){var x=g(m,f,b);m[x].push(new Ap({shape:{cx:v,cy:y,r:_[b].coord}}))}if(l&&b<_.length-1){var x=g(h,p,b);h[x].push(new Zp({shape:{cx:v,cy:y,r0:_[b].coord,r:_[b+1].coord}}))}}else for(var S,C=I(n,function(e,n){var r=e.getTicksCoords();return S=S==null?r.length-1:Math.min(r.length-1,S),I(r,function(e){return t.coordToPoint(e.coord,n)})}),w=[],b=0;b<=S;b++){for(var T=[],E=0;E3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(uR(this._zr,`globalPan`)||mR(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(dn(r.event),r.__ecRoamConsumed=!0,xR(e,t,n,r,i))},t}(zt);function mR(e){return e.__ecRoamConsumed}var hR=xc();function gR(e){var t=hR(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function _R(e,t,n,r){for(var i=gR(e).roam,a=i[t]=i[t]||[],o=0;o=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&o!=null&&s!=null&&(u=JR(l,{x:0,y:0,width:o,height:s}),!t.ignoreViewBox)){var f=r;r=new q,r.add(f),f.scaleX=f.scaleY=u.scale,f.x=u.x,f.y=u.y}return!t.ignoreRootClip&&o!=null&&s!=null&&r.setClipPath(new vd({shape:{x:0,y:0,width:o,height:s}})),{root:r,width:o,height:s,viewBoxRect:l,viewBoxTransform:u,named:i}},e.prototype._parseNode=function(e,t,n,r,i,a){var o=e.nodeName.toLowerCase(),s,c=r;if(o===`defs`&&(i=!0),o===`text`&&(a=!0),o===`defs`||o===`switch`)s=t;else{if(!i){var l=wR[o];if(l&&W(wR,o)){s=l.call(this,e,t);var u=e.getAttribute(`name`);if(u){var d={name:u,namedFrom:null,svgNodeTagLower:o,el:s};n.push(d),o===`g`&&(c=d)}else r&&n.push({name:r.name,namedFrom:r,svgNodeTagLower:o,el:s});t.add(s)}}var f=AR[o];if(f&&W(AR,o)){var p=f.call(this,e),m=e.getAttribute(`id`);m&&(this._defs[m]=p)}}if(s&&s.isGroup)for(var h=e.firstChild;h;)h.nodeType===1?this._parseNode(h,s,n,c,i,a):h.nodeType===3&&a&&this._parseText(h,s),h=h.nextSibling},e.prototype._parseText=function(e,t){var n=new od({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});NR(t,n),FR(e,n,this._defsUsePending,!1,!1),IR(n,t);var r=n.style,i=r.fontSize;i&&i<9&&(r.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9),r.font=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+`px`,r.fontFamily||`sans-serif`].join(` `);var a=n.getBoundingRect();return this._textX+=a.width,t.add(n),n},e.internalField=(function(){wR={g:function(e,t){var n=new q;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new vd;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute(`x`)||`0`),y:parseFloat(e.getAttribute(`y`)||`0`),width:parseFloat(e.getAttribute(`width`)||`0`),height:parseFloat(e.getAttribute(`height`)||`0`)}),n.silent=!0,n},circle:function(e,t){var n=new Ap;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute(`cx`)||`0`),cy:parseFloat(e.getAttribute(`cy`)||`0`),r:parseFloat(e.getAttribute(`r`)||`0`)}),n.silent=!0,n},line:function(e,t){var n=new om;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute(`x1`)||`0`),y1:parseFloat(e.getAttribute(`y1`)||`0`),x2:parseFloat(e.getAttribute(`x2`)||`0`),y2:parseFloat(e.getAttribute(`y2`)||`0`)}),n.silent=!0,n},ellipse:function(e,t){var n=new Mp;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute(`cx`)||`0`),cy:parseFloat(e.getAttribute(`cy`)||`0`),rx:parseFloat(e.getAttribute(`rx`)||`0`),ry:parseFloat(e.getAttribute(`ry`)||`0`)}),n.silent=!0,n},polygon:function(e,t){var n=e.getAttribute(`points`),r;n&&(r=PR(n));var i=new tm({shape:{points:r||[]},silent:!0});return NR(t,i),FR(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n=e.getAttribute(`points`),r;n&&(r=PR(n));var i=new rm({shape:{points:r||[]},silent:!0});return NR(t,i),FR(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new ud;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute(`xlink:href`)||e.getAttribute(`href`),x:+e.getAttribute(`x`),y:+e.getAttribute(`y`),width:+e.getAttribute(`width`),height:+e.getAttribute(`height`)}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute(`x`)||`0`,r=e.getAttribute(`y`)||`0`,i=e.getAttribute(`dx`)||`0`,a=e.getAttribute(`dy`)||`0`;this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(r)+parseFloat(a);var o=new q;return NR(t,o),FR(e,o,this._defsUsePending,!1,!0),o},tspan:function(e,t){var n=e.getAttribute(`x`),r=e.getAttribute(`y`);n!=null&&(this._textX=parseFloat(n)),r!=null&&(this._textY=parseFloat(r));var i=e.getAttribute(`dx`)||`0`,a=e.getAttribute(`dy`)||`0`,o=new q;return NR(t,o),FR(e,o,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(a),o},path:function(e,t){var n=Tp(e.getAttribute(`d`)||``);return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}})(),e}(),AR={lineargradient:function(e){var t=new hm(parseInt(e.getAttribute(`x1`)||`0`,10),parseInt(e.getAttribute(`y1`)||`0`,10),parseInt(e.getAttribute(`x2`)||`10`,10),parseInt(e.getAttribute(`y2`)||`0`,10));return jR(e,t),MR(e,t),t},radialgradient:function(e){var t=new gm(parseInt(e.getAttribute(`cx`)||`0`,10),parseInt(e.getAttribute(`cy`)||`0`,10),parseInt(e.getAttribute(`r`)||`0`,10));return jR(e,t),MR(e,t),t}};function jR(e,t){e.getAttribute(`gradientUnits`)===`userSpaceOnUse`&&(t.global=!0)}function MR(e,t){for(var n=e.firstChild;n;){if(n.nodeType===1&&n.nodeName.toLocaleLowerCase()===`stop`){var r=n.getAttribute(`offset`),i=void 0;i=r&&r.indexOf(`%`)>0?parseInt(r,10)/100:r?parseFloat(r):0;var a={};KR(n,a,a);var o=a.stopColor||n.getAttribute(`stop-color`)||`#000000`,s=a.stopOpacity||n.getAttribute(`stop-opacity`);if(s){var c=hi(o);c&&c[3]&&(c[3]*=si(s),o=Ei(c,`rgba`))}t.colorStops.push({offset:i,color:o})}n=n.nextSibling}}function NR(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||={},P(t.__inheritedStyle,e.__inheritedStyle))}function PR(e){for(var t=VR(e),n=[],r=0;r0;a-=2){var o=r[a],s=r[a-1],c=VR(o);switch(i||=vn(),s){case`translate`:Sn(i,i,[parseFloat(c[0]),parseFloat(c[1]||`0`)]);break;case`scale`:wn(i,i,[parseFloat(c[0]),parseFloat(c[1]||c[0])]);break;case`rotate`:Cn(i,i,-parseFloat(c[0])*UR,[parseFloat(c[1]||`0`),parseFloat(c[2]||`0`)]);break;case`skewX`:var l=Math.tan(parseFloat(c[0])*UR);xn(i,[1,0,l,1,0,0],i);break;case`skewY`:var u=Math.tan(parseFloat(c[0])*UR);xn(i,[1,u,0,1,0,0],i);break;case`matrix`:i[0]=parseFloat(c[0]),i[1]=parseFloat(c[1]),i[2]=parseFloat(c[2]),i[3]=parseFloat(c[3]),i[4]=parseFloat(c[4]),i[5]=parseFloat(c[5]);break}}t.setLocalTransform(i)}}var GR=/([^\s:;]+)\s*:\s*([^:;]+)/g;function KR(e,t,n){var r=e.getAttribute(`style`);if(r){GR.lastIndex=0;for(var i;(i=GR.exec(r))!=null;){var a=i[1],o=W(TR,a)?TR[a]:null;o&&(t[o]=i[2]);var s=W(DR,a)?DR[a]:null;s&&(n[s]=i[2])}}}function qR(e,t,n){for(var r=0;r1e-6;sB[0]=o?(i[0]-r.x)/a:i[0],sB[1]=o?(i[1]-r.y)/a:i[1],Pt(sB,sB,e.mtRawInv);var s=rB(e,sB);cB(t,s,a),F(n,function(e){e!==t&&cB(e,s.slice(),a)})}var sB=[];function cB(e,t,n){var r=e.option;r.center=t,r.zoom=n}function lB(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function uB(e,t){var n=t.getShallow(`nodeScaleRatio`,!0)||1,r=gz(e);return((r.zoom-1)*n+1)/(r.trans[2].scaleX||1)}function dB(e,t,n,r,i,a,o,s){if(!Qz(e)){n.disable();return}n.enable(H(e.get(`roam`),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:r,isInClip:function(e,t,n){return!i||i.contain(t,n)}}});function c(n){var r=e.mainType,i=Oh(P({type:hB(r,e.subType,qd)},n));s&&(i.componentType=r),i[r+`Id`]=e.id,t.dispatchAction(i)}n.off(`pan`).off(`zoom`).on(`pan`,function(e){a&&a(`pan`),c({dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){a&&a(`zoom`),c({zoom:e.scale,originX:e.originX,originY:e.originY})})}function fB(e){return function(t,n,r){return pB.copy(e.getBoundingRect()),pB.applyTransform(e.getComputedTransform()),pB.contain(n,r)}}var pB=new K(0,0,0,0);function mB(e,t,n){var r=hB(t,n,qd);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Oc(e,t,n),function(t){Zz(e,t),$z(e,t,r,i)})})}function hB(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function gB(e){return e.zoom!=null}function _B(e,t,n,r,i,a,o){var s=new vz(null,aB(e.ecModel,t));return Az(s,n,r,i,a),o?jz(s,o.x,o.y,o.width,o.height):jz(s,n,r,i,a),kz(s,e),s}var vB=[`rect`,`circle`,`line`,`ellipse`,`polygon`,`polyline`,`path`],yB=U(vB),bB=U(vB.concat([`g`])),xB=U(vB.concat([`g`])),SB=xc();function CB(e){var t=e.getItemStyle(),n=e.get(`areaColor`);return n!=null&&(t.fill=n),t}function wB(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var TB=function(){function e(e){var t=this.group=new q,n=this._transformGroup=new q;t.add(n),this.uid=cg(`ec_map_draw`),this._controller=new pR(e.getZr()),n.add(this._regionsGroup=new q),n.add(this._svgGroup=new q)}return e.prototype.draw=function(e,t,n,r,i){var a=this,o=e.getData&&e.getData();MB(e)&&t.eachComponent({mainType:`series`,subType:`map`},function(t){!o&&t.getHostGeoModel()===e&&(o=t.getData())});var s=e.coordinateSystem,c=s.view,l=this._regionsGroup,u=this._transformGroup,d=!l.childAt(0)||i,f;s.shouldClip()?(f=Cz(null,c),this.group.setClipPath(new vd({shape:f.clone()}))):this.group.removeClipPath(),qz(u,1,c,d?null:e);var p=o&&o.getVisual(`visualMeta`)&&o.getVisual(`visualMeta`).length>0;s.resourceType===`geoJSON`?this._buildGeoJSON(c,n,s,e,o,p):s.resourceType===`geoSVG`&&this._buildSVG(c,n,s,e,o,p),dB(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},f,function(){a._mouseDownFlag=!1},!1,!0),this._updateMapSelectHandler(e,l,n,r)},e.prototype.__updateOnOwnRoam=function(e){qz(this._transformGroup,1,e.coordinateSystem.view,null)},e.prototype._buildGeoJSON=function(e,t,n,r,i,a){var o=this._regionsGroupByName=U(),s=U(),c=this._regionsGroup,l=n.projection,u=l&&l.stream,d=no(wz(null,e,0));function f(e,t){return t&&(e=t(e)),e&&Pt([],e,d)}function p(e){for(var t=[],n=!u&&l&&l.project,r=0;r=0)&&(u=e);var d=o?{normal:{align:`center`,verticalAlign:`middle`}}:null;Fh(n,Ih(i),{labelFetcher:u,labelDataIndex:l,defaultText:r},d);var f=n.getTextContent();if(f&&(SB(f).ignore=f.ignore,n.textConfig&&o)){var p=n.getBoundingRect().clone();n.textConfig.layoutRect=p,n.textConfig.position=[(o[0]-p.x)/p.width*100+`%`,(o[1]-p.y)/p.height*100+`%`]}n.disableLabelAnimation=!0}else n.removeTextContent(),n.removeTextConfig(),n.disableLabelAnimation=null}function OB(e,t,n,r,i,a){t?t.setItemGraphicEl(a,n):Y(n).eventData={componentType:`geo`,componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:r,region:i&&i.option||{}}}function kB(e,t,n,r,i){t||_h({el:n,componentModel:e,itemName:r,itemTooltipOption:i.get(`tooltip`)})}function AB(e,t,n,r){t.highDownSilentOnTouch=!!e.get(`selectedMode`);var i=r.getModel(`emphasis`),a=i.get(`focus`);return Jf(t,a,i.get(`blurScope`),i.get(`disabled`)),MB(e)&&tp(t,e,n),a}function jB(e,t,n){var r=[],i;function a(){i=[]}function o(){i.length&&(r.push(i),i=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(e,t){isFinite(e)&&isFinite(t)&&i.push([e,t])},sphere:function(){}});return!n&&s.polygonStart(),F(e,function(e){s.lineStart();for(var t=0;t-1&&(n.style.stroke=n.style.fill,n.style.fill=Z.color.neutral00,n.style.lineWidth=2),n},t.prototype.__ownRoamView=function(){return FB(this)?this.coordinateSystem.view:null},t.type=`series.map`,t.dependencies=[`geo`],t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystem:`geo`,map:``,left:`center`,top:`center`,aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:Z.color.tertiary},itemStyle:{borderWidth:.5,borderColor:Z.color.border,areaColor:Z.color.background},emphasis:{label:{show:!0,color:Z.color.primary},itemStyle:{areaColor:Z.color.highlight}},select:{label:{show:!0,color:Z.color.primary},itemStyle:{color:Z.color.highlight}},nameProperty:`name`},t}(lx);function PB(e){return e.indexOf(`i`)===0}function FB(e){return IB(e.seriesGroup)===e&&!e.getHostGeoModel()}function IB(e){return e.f[0]}function LB(e,t){var n={};return e.eachRawSeriesByType(`map`,function(r){var i=r.getHostGeoModel(),a=i?`o`+i.id:`i`+r.getMapType(),o=n[a]=n[a]||{f:[],r:[]};!e.isSeriesFiltered(r)&&!t&&o.f.push(r),o.r.push(r)}),n}var RB=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`map`,t}return t.prototype.render=function(e,t,n,r){if(!(r&&r.type===`mapToggleSelect`&&r.from===this.uid)){var i=this.group;if(i.removeAll(),!e.getHostGeoModel()){var a=this._mapDraw;a&&r&&r.type===`geoRoam`&&a.resetForLabelLayout(),r&&r.type===`geoRoam`&&r.componentType===`series`&&r.seriesId===e.id?a&&i.add(a.group):FB(e)?(a||=this._mapDraw=new TB(n),i.add(a.group),a.draw(e,t,n,this,r)):this._clearMapDraw(),e.get(`showLegendSymbol`)&&t.getComponent(`legend`)&&this._renderSymbols(e)}}},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=this._mapDraw;FB(t)&&r&&r.__updateOnOwnRoam(t)},t.prototype.remove=function(){this._clearMapDraw(),this.group.removeAll()},t.prototype.dispose=function(){this._clearMapDraw()},t.prototype._clearMapDraw=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e){var t=e.originalData,n=this.group;t.each(t.mapDimension(`value`),function(r,i){if(!isNaN(r)){var a=t.getItemLayout(i);if(!(!a||!a.point)){var o=a.point,s=a.offset,c=new Ap({style:{fill:e.getData().getVisual(`style`).fill},shape:{cx:o[0]+s*9,cy:o[1],r:3},silent:!0,z2:8+(s?0:11)});if(!s){var l=IB(e.seriesGroup).getData(),u=t.getName(i),d=l.indexOfName(u),f=t.getItemModel(i),p=f.getModel(`label`),m=l.getItemGraphicEl(d);Fh(c,Ih(f),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(d,n)}},defaultText:u}),c.disableLabelAnimation=!0,p.get(`position`)||c.setTextConfig({position:`bottom`}),m.onHoverStateChange=function(e){bf(c,e)}}n.add(c)}}})},t.type=`map`,t}(Sx),zB={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},BB=[`lng`,`lat`],VB=function(e){D(t,e);function t(t,n,r){var i=e.call(this)||this;i.dimensions=BB,i.type=`geo`,i._nameCoordMap=U(),i.name=t;var a=r.projection,o=hz.load(n,r.nameMap,r.nameProperty),s=hz.getGeoResource(n);i.resourceType=s?s.type:null;var c=i.regions=o.regions,l=zB[s.type];i._clip=r.clip,i.view=new vz(a?!1:l.invertLongitute,aB(r.ecModel,r.api),i),i.map=n,i._regionsMap=o.regionsMap,i.regions=o.regions,i.projection=a;var u;if(a)for(var d=0;d1?(b.width=y,b.height=y/g):(b.height=y,b.width=y*g),b.y=v[1]-b.height/2,b.x=v[0]-b.width/2;else{var x=e.getBoxLayoutParams();x.aspect=g,b=W_(x,h),b=G_(e,b,g)}jz(n,b.x,b.y,b.width,b.height),kz(n,e)}function WB(e,t){F(t.get(`geoCoord`),function(t,n){e.addGeoCoord(n,t)})}var GB=new(function(){function e(){this.dimensions=BB}return e.prototype.create=function(e,t){var n=[];function r(e){return{nameProperty:e.get(`nameProperty`),aspectScale:e.get(`aspectScale`),projection:e.get(`projection`),clip:e.getShallow(`clip`,!0)}}return e.eachComponent(`geo`,function(i,a){var o=i.get(`map`),s=new VB(o+a,o,N({nameMap:i.get(`nameMap`),api:t,ecModel:e},r(i)));n.push(s),i.coordinateSystem=s,s.model=i,s.resize=UB,s.resize(i,t)}),e.eachSeries(function(e){P_({targetModel:e,coordSysType:`geo`,coordSysProvider:function(){var t=e.subType===`map`?e.getHostGeoModel():e.getReferringComponents(`geo`,Tc).models[0];return t&&t.coordinateSystem},allowNotFound:!0})}),F(LB(e,!0),function(i,a){if(PB(a)){var o=i.r[0],s=[];F(i.r,function(e){s.push(e.get(`nameMap`)),e.seriesGroup=null});var c=a.slice(1),l=new VB(c,c,N({nameMap:we(s),api:t,ecModel:e},r(o))),u;F(i.r,function(e){u=H(u,e.get(`scaleLimit`))}),n.push(l),l.resize=UB,l.resize(o,t),F(i.r,function(e){e.coordinateSystem=l,WB(l,e)})}}),n},e.prototype.getFilledRegions=function(e,t,n,r){for(var i=(e||[]).slice(),a=U(),o=0;o=0;a--){var o=i[a];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},n.push(o)}}function rV(e,t){var n=e.isExpand?e.children:[],r=e.parentNode.children,i=e.hierNode.i?r[e.hierNode.i-1]:null;if(n.length){sV(e);var a=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-a):e.hierNode.prelim=a}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=cV(e,i,e.parentNode.hierNode.defaultAncestor||r[0],t)}function iV(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function aV(e){return arguments.length?e:pV}function oV(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function sV(e){for(var t=e.children,n=t.length,r=0,i=0;--n>=0;){var a=t[n];a.hierNode.prelim+=r,a.hierNode.modifier+=r,i+=a.hierNode.change,r+=a.hierNode.shift+i}}function cV(e,t,n,r){if(t){for(var i=e,a=e,o=a.parentNode.children[0],s=t,c=i.hierNode.modifier,l=a.hierNode.modifier,u=o.hierNode.modifier,d=s.hierNode.modifier;s=lV(s),a=uV(a),s&&a;){i=lV(i),o=uV(o),i.hierNode.ancestor=e;var f=s.hierNode.prelim+d-a.hierNode.prelim-l+r(s,a);f>0&&(fV(dV(s,e,n),e,f),l+=f,c+=f),d+=s.hierNode.modifier,l+=a.hierNode.modifier,c+=i.hierNode.modifier,u+=o.hierNode.modifier}s&&!lV(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=d-c),a&&!uV(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=l-u,n=e)}return n}function lV(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function uV(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function dV(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function fV(e,t,n){var r=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=r,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=r}function pV(e,t){return e.parentNode===t.parentNode?1:2}var mV=xc();function hV(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,SV(t,n,e),F(n,function(n){F(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,Ie(gV,e))})}),t.wrapMethod(`cloneShallow`,Ie(vV,e)),F(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,Ie(_V,e))}),Xe(n[t.dataType]===t)}function gV(e,t){if(xV(this)){var n=N({},mV(this).datas);n[this.dataType]=t,SV(t,n,e)}else CV(t,this.dataType,mV(this).mainData,e);return t}function _V(e,t){return e.struct&&e.struct.update(),t}function vV(e,t){return F(mV(t).datas,function(n,r){n!==t&&CV(n.cloneShallow(),r,t,e)}),t}function yV(e){var t=mV(this).mainData;return e==null||t==null?t:mV(t).datas[e]}function bV(){var e=mV(this).mainData;return e==null?[{data:e}]:I(Pe(mV(e).datas),function(t){return{type:t,data:mV(e).datas[t]}})}function xV(e){return mV(e).mainData===e}function SV(e,t,n){mV(e).datas={},F(t,function(t,r){CV(t,r,e,n)})}function CV(e,t,n,r){mV(n).datas[t]=e,mV(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=yV,e.getLinkedDataAll=bV}var wV=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||``,this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){z(e)&&(n=t,t=e,e=null),e||={},B(e)&&(e={order:e});var r=e.order||`preorder`,i=this[e.attr||`children`],a;r===`preorder`&&(a=t.call(n,this));for(var o=0;!a&&ot&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var r=n.getData().tree.root,i=e.targetNode;if(B(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=r.getNodeById(a)))return{node:i}}}function OV(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function kV(e,t){return De(OV(e),t)>=0}function AV(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var jV=`tree`,MV=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.ignoreStyleOnData=!0,n}return t.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},n=new og(e.leaves||{},this,this.ecModel),r=TV.createTree(t,this,i);function i(e){e.wrapMethod(`getItemModel`,function(e,t){var i=r.getNodeByDataIndex(t);return i&&i.children.length&&i.isExpand||(e.parentModel=n),e})}var a=0;r.eachNode(`preorder`,function(e){e.depth>a&&(a=e.depth)});var o=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:a;return r.root.eachNode(`preorder`,function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&t.collapsed!=null?!t.collapsed:e.depth<=o}),r.data},t.prototype.getOrient=function(){var e=this.get(`orient`);return e===`horizontal`?e=`LR`:e===`vertical`&&(e=`TB`),e},t.prototype.formatTooltip=function(e,t,n){for(var r=this.getData().tree,i=r.root.children[0],a=r.getNodeByDataIndex(e),o=a.getValue(),s=a.name;a&&a!==i;)s=a.parentNode.name+`.`+s,a=a.parentNode;return Hb(`nameValue`,{name:s,value:o,noValue:isNaN(o)||o==null})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=AV(r,this),n.collapsed=!r.isExpand,n},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type=`series.`+jV,t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystemUsage:`box`,left:`12%`,top:`12%`,right:`12%`,bottom:`12%`,layout:`orthogonal`,edgeShape:`curve`,edgeForkPosition:`50%`,roam:!1,roamTrigger:`global`,nodeScaleRatio:.4,center:null,zoom:1,orient:`LR`,symbol:`emptyCircle`,symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:Z.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:`lightsteelblue`,borderWidth:1.5},label:{show:!0},animationEasing:`linear`,animationDuration:700,animationDurationUpdate:500},t}(lx),NV=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),PV=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new NV},t.prototype.buildPath=function(e,t){var n=t.childPoints,r=n.length,i=t.parentPoint,a=n[0],o=n[r-1];if(r===1){e.moveTo(i[0],i[1]),e.lineTo(a[0],a[1]);return}var s=t.orient,c=s===`TB`||s===`BT`?0:1,l=1-c,u=J(t.forkPosition,1),d=[];d[c]=i[c],d[l]=i[l]+(o[l]-i[l])*u,e.moveTo(i[0],i[1]),e.lineTo(d[0],d[1]),e.moveTo(a[0],a[1]),d[c]=a[c],e.lineTo(d[0],d[1]),d[c]=o[c],e.lineTo(d[0],d[1]),e.lineTo(o[0],o[1]);for(var f=1;fv.x,x||(b-=Math.PI));var C=x?`left`:`right`,w=s.getModel(`label`),T=w.get(`rotate`),E=Math.PI/180*T,D=g.getTextContent();D&&(g.setTextConfig({position:w.get(`position`)||C,rotation:T==null?-b:E,origin:`center`}),D.setStyle(`verticalAlign`,`middle`))}var O=s.get([`emphasis`,`focus`]),k=O===`relative`?at(o.getAncestorsIndices(),o.getDescendantIndices()):O===`ancestor`?o.getAncestorsIndices():O===`descendant`?o.getDescendantIndices():null;k&&(Y(n).focus=k),RV(i,o,u,n,m,p,h,r),n.__edge&&(n.onHoverStateChange=function(t){if(t!==`blur`){var r=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);r&&r.hoverState===1||bf(n.__edge,t)}})}function RV(e,t,n,r,i,a,o,s){var c=t.getModel(),l=e.get(`edgeShape`),u=e.get(`layout`),d=e.getOrient(),f=e.get([`lineStyle`,`curveness`]),p=e.get(`edgeForkPosition`),m=c.getModel(`lineStyle`).getLineStyle(),h=r.__edge;if(l===`curve`)t.parentNode&&t.parentNode!==n&&(h||=r.__edge=new um({shape:HV(u,d,f,i,i)}),jm(h,{shape:HV(u,d,f,a,o)},e));else if(l===`polyline`&&u===`orthogonal`&&t!==n&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,_=[],v=0;v=0;a--)n.push(i[a])}}function GV(e,t){e.eachSeriesByType(`tree`,function(e){KV(e,t)})}function KV(e,t){var n=q_(e,t).refContainer,r=W_(e.getBoxLayoutParams(),n);e.layoutInfo=r;var i=e.get(`layout`),a=0,o=0,s=null;i===`radial`?(a=2*Math.PI,o=Math.min(r.height,r.width)/2,s=aV(function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth})):(a=r.width,o=r.height,s=aV());var c=e.getData().tree.root,l=c.children[0];if(l){nV(c),UV(l,rV,s),c.hierNode.modifier=-l.hierNode.prelim,WV(l,iV);var u=l,d=l,f=l;WV(l,function(e){var t=e.getLayout().x;td.getLayout().x&&(d=e),e.depth>f.depth&&(f=e)});var p=u===d?1:s(u,d)/2,m=p-u.getLayout().x,h=0,g=0,_=0,v=0;if(i===`radial`)h=a/(d.getLayout().x+p+m),g=o/(f.depth-1||1),WV(l,function(e){_=(e.getLayout().x+m)*h,v=(e.depth-1)*g;var t=oV(_,v);e.setLayout({x:t.x,y:t.y,rawX:_,rawY:v},!0)});else{var y=e.getOrient();y===`RL`||y===`LR`?(g=o/(d.getLayout().x+p+m),h=a/(f.depth-1||1),WV(l,function(e){v=(e.getLayout().x+m)*g,_=y===`LR`?(e.depth-1)*h:a-(e.depth-1)*h,e.setLayout({x:_,y:v},!0)})):(y===`TB`||y===`BT`)&&(h=a/(d.getLayout().x+p+m),g=o/(f.depth-1||1),WV(l,function(e){_=(e.getLayout().x+m)*h,v=y===`TB`?(e.depth-1)*g:o-(e.depth-1)*g,e.setLayout({x:_,y:v},!0)}))}}}function qV(e){e.registerAction({type:`treeExpandAndCollapse`,event:`treeExpandAndCollapse`,update:`update`},function(e,t){t.eachComponent({mainType:Rd,subType:jV,query:e},function(t){var n=e.dataIndex,r=t.getData().tree.getNodeByDataIndex(n);r.isExpand=!r.isExpand})}),mB(e,Rd,jV)}var JV=Qc(jV,YV);function YV(e){e.eachSeriesByType(jV,function(e){var t=e.getData();t.tree.eachNode(function(e){var n=e.getModel().getModel(`itemStyle`).getItemStyle();N(t.ensureUniqueItemVisual(e.dataIndex,`style`),n)})})}function XV(e){e.registerChartView(FV),e.registerSeriesModel(MV),e.registerLayout(GV),e.registerVisual(JV),qV(e)}var ZV=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function QV(e){for(var t=0;t1;)r=r.parentNode;var i=Ev(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var eH=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};tH(n);var r=e.levels||[],i=new og({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=nH(r,t);var a=I(r||[],function(e){return new og(e,i,t)},this),o=TV.createTree(n,this,s);function s(e){e.wrapMethod(`getItemModel`,function(e,t){var n=o.getNodeByDataIndex(t);return e.parentModel=(n?a[n.depth]:null)||i,e})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e);return Hb(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=AV(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},N(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=U(),this._idIndexMapCount=0);var n=t.get(e);return n??t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){$V(this)},t.type=`series.treemap`,t.layoutMode=`box`,t.defaultOption={progressive:0,coordinateSystemUsage:`box`,left:Z.size.l,top:Z.size.xxxl,right:Z.size.l,bottom:Z.size.xxxl,sort:!0,clipWindow:`origin`,squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:`▶`,zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:`global`,nodeClick:`zoomToNode`,animation:!0,animationDurationUpdate:900,animationEasing:`quinticInOut`,breadcrumb:{show:!0,height:22,left:`center`,bottom:Z.size.m,emptyItemWidth:25,itemStyle:{color:Z.color.backgroundShade,textStyle:{color:Z.color.secondary}},emphasis:{itemStyle:{color:Z.color.background}}},label:{show:!0,distance:0,padding:5,position:`inside`,color:Z.color.neutral00,overflow:`truncate`},upperLabel:{show:!1,position:[0,`50%`],height:20,overflow:`truncate`,verticalAlign:`middle`},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:Z.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,`50%`],overflow:`truncate`,verticalAlign:`middle`}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:`index`,visibleMin:10,childrenVisibleMin:null,levels:[]},t}(lx);function tH(e){var t=0;F(e.children,function(e){tH(e);var n=e.value;R(n)&&(n=n[0]),t+=n});var n=e.value;R(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),R(e.value)?e.value[0]=n:e.value=n}function nH(e,t){var n=$s(t.get(`color`)),r=$s(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;F(e,function(e){var t=new og(e),n=t.get(`color`),r=t.get(`decal`);(t.get([`itemStyle`,`color`])||n&&n!==`none`)&&(i=!0),(t.get([`itemStyle`,`decal`])||r&&r!==`none`)&&(a=!0)});var o=e[0]||={};return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}}var rH=8,iH=8,aH=5,oH=function(){function e(e){this.group=new q,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel(`breadcrumb`),a=this.group;if(a.removeAll(),!(!i.get(`show`)||!n)){var o=i.getModel(`itemStyle`),s=i.getModel(`emphasis`),c=o.getModel(`textStyle`),l=s.getModel([`itemStyle`,`textStyle`]),u=q_(e,t).refContainer,d={left:i.get(`left`),right:i.get(`right`),top:i.get(`top`),bottom:i.get(`bottom`)},f={emptyItemWidth:i.get(`emptyItemWidth`),totalWidth:0,renderList:[]},p=W_(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),J_(a,d,u)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=pc(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+rH*2,t.emptyItemWidth);t.totalWidth+=o+iH,t.renderList.push({node:r,text:i,width:o})}},e.prototype._renderContent=function(e,t,n,r,i,a,o,s){for(var c=0,l=t.emptyItemWidth,u=e.get([`breadcrumb`,`height`]),d=t.totalWidth,f=t.renderList,p=i.getModel(`itemStyle`).getItemStyle(),m=f.length-1;m>=0;m--){var h=f[m],g=h.node,_=h.width,v=h.text;d>n.width&&(d-=_-l,_=l,v=null);var y=new tm({shape:{points:sH(c,0,_,u,m===f.length-1,m===0)},style:P(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new Cd({style:Lh(a,{text:v})}),textConfig:{position:`inside`},z2:10*1e4,onclick:Ie(s,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=Lh(o,{text:v}),y.ensureState(`emphasis`).style=p,Jf(y,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(y),cH(y,e,g),c+=_+iH}},e.prototype.remove=function(){this.group.removeAll()},e}();function sH(e,t,n,r,i,a){var o=[[i?e:e-aH,t],[e+n,t],[e+n,t+r],[i?e:e-aH,t+r]];return!a&&o.splice(2,0,[e+n+aH,t+r/2]),!i&&o.push([e,t+r/2]),o}function cH(e,t,n){Y(e).eventData={componentType:`series`,componentSubType:`treemap`,componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:`treemap`,selfType:`breadcrumb`,nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&AV(n,t)}}var lH=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;r=0;c--){var l=i[r===`asc`?o-c-1:c].getValue();l/n*ts[1]&&(s[1]=t)})),{sum:r,dataExtent:s}}function wH(e,t,n){for(var r=0,i=1/0,a=0,o=void 0,s=e.length;ar&&(r=o));var c=e.area*e.area,l=t*t*n;return c?dH(l*r/c,c/(l*i)):1/0}function TH(e,t,n,r,i){var a=t===n.width?0:1,o=1-a,s=[`x`,`y`],c=[`width`,`height`],l=n[s[a]],u=t?e.area/t:0;(i||u>n[c[o]])&&(u=n[c[o]]);for(var d=0,f=e.length;dOs&&(u=Os),i=c}uPH||Math.abs(e.dy)>PH)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:`treemapMove`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale,i=this.seriesModel;if(this._state!==`animating`){var a=i.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new K(o.x,o.y,o.width,o.height),c=i.layoutInfo,l=AH(c,o),u=l*r;u=jH(u,i);var d=u/l;t-=c.x,n-=c.y;var f=vn();Sn(f,f,[-t,-n]),wn(f,f,[d,d]),Sn(f,f,[t,n]),s.applyTransform(f),this.api.dispatchAction({type:`treemapRender`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var t=this;e.on(`click`,function(e){if(t._state===`ready`){var n=t.seriesModel.get(`nodeClick`,!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if(n===`zoomToNode`)t._zoomToNode(r);else if(n===`link`){var a=i.hostTree.data.getItemModel(i.dataIndex),o=a.get(`link`,!0),s=a.get(`target`,!0)||`blank`;o&&T_(o,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=e.get(`leafDepth`,!0)==null?this.findTarget(t.getWidth()/2,t.getHeight()/2):{node:e.getViewRoot()},n||={node:e.getData().tree.root}),(this._breadcrumb||=new oH(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&(kV(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=WH(),this._state=`ready`,this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:`treemapZoomToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:`treemapRootToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:`viewChildren`,order:`preorder`},function(r){var i=this._storage.background[r.getRawIndex()];if(i){var a=i.transformCoordToLocal(e,t),o=i.shape;if(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height)n={node:r,offsetX:a[0],offsetY:a[1]};else return!1}},this),n},t.type=`treemap`,t}(Sx);function WH(){return{nodeGroup:[],background:[],content:[]}}function GH(e,t,n,r,i,a,o,s,c,l){if(!o)return;var u=o.getLayout(),d=e.getData(),f=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!u||!u.isInView)return;var p=u.width,m=u.height,h=u.borderWidth,g=u.invisible,_=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,b=u.upperHeight,x=y&&y.length,S=f.getModel(`itemStyle`),C=f.getModel([`emphasis`,`itemStyle`]),w=f.getModel([`blur`,`itemStyle`]),T=f.getModel([`select`,`itemStyle`]),E=S.get(`borderRadius`)||0,D=le(`nodeGroup`,MH);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),HH(D).nodeWidth=p,HH(D).nodeHeight=m,u.isAboveViewRoot)return D;var O=le(`background`,NH,l,RH);O&&ie(D,O,x&&u.upperLabelHeight);var k=f.getModel(`emphasis`),A=k.get(`focus`),j=k.get(`blurScope`),ee=k.get(`disabled`),te=A===`ancestor`?o.getAncestorsIndices():A===`descendant`?o.getDescendantIndices():A;if(x)ep(D)&&$f(D,!1),O&&($f(O,!ee),d.setItemGraphicEl(o.dataIndex,O),Yf(O,te,j));else{var ne=le(`content`,NH,l,zH);ne&&ae(D,ne),O.disableMorphing=!0,O&&ep(O)&&$f(O,!1),$f(D,!ee),d.setItemGraphicEl(o.dataIndex,D);var re=f.getShallow(`cursor`);re&&ne.attr(`cursor`,re),Yf(D,te,j)}return D;function ie(t,n,r){var i=Y(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)oe(n);else{n.invisible=!1;var a=o.getVisual(`style`),s=a.stroke,c=VH(S);c.fill=s;var l=BH(C);l.fill=C.get(`borderColor`);var u=BH(w);u.fill=w.get(`borderColor`);var d=BH(T);if(d.fill=T.get(`borderColor`),r){var f=p-2*h;se(n,s,a.opacity,{x:h,y:0,width:f,height:b})}else n.removeTextContent();n.setStyle(c),n.ensureState(`emphasis`).style=l,n.ensureState(`blur`).style=u,n.ensureState(`select`).style=d,Ef(n)}t.add(n)}function ae(t,n){var r=Y(n);r.dataIndex=o.dataIndex,r.seriesIndex=e.seriesIndex;var i=Math.max(p-2*h,0),a=Math.max(m-2*h,0);if(n.culling=!0,n.setShape({x:h,y:h,width:i,height:a,r:E}),g)oe(n);else{n.invisible=!1;var s=o.getVisual(`style`),c=s.fill,l=VH(S);l.fill=c,l.decal=s.decal;var u=BH(C),d=BH(w),f=BH(T);se(n,c,s.opacity,null),n.setStyle(l),n.ensureState(`emphasis`).style=u,n.ensureState(`blur`).style=d,n.ensureState(`select`).style=f,Ef(n)}t.add(n)}function oe(e){!e.invisible&&a.push(e)}function se(t,n,r,i){var a=f.getModel(i?IH:FH),s=pc(f.get(`name`),null),c=a.getShallow(`show`);Fh(t,Ih(f,i?IH:FH),{defaultText:c?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:o.dataIndex});var l=t.getTextContent();if(l){var d=l.style,p=Ye(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),l.disableLabelLayout=!0),l.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);(d.width!==e||d.height!==n)&&l.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow=`truncate`,ce(d,i,u);var m=l.getState(`emphasis`);ce(m?m.style:null,i,u)}}function ce(t,n,r){var i=t?t.text:null;if(!n&&r.isLeafRoot&&i!=null){var a=e.get(`drillDownIcon`,!0);t.text=a?a+` `+i:i}}function le(e,r,a,o){var s=v!=null&&n[e][v],c=i[e];return s?(n[e][v]=null,ue(c,s)):g||(s=new r,s instanceof Xl&&(s.z2=KH(a,o)),de(c,s)),t[e][_]=s}function ue(e,t){var n=e[_]={};t instanceof MH?(n.oldX=t.x,n.oldY=t.y):n.oldShape=N({},t.shape)}function de(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof q;if(a&&(!r||r.direction===`drillDown`)){var c=0,l=0,u=i.background[a.getRawIndex()];!r&&u&&u.oldShape&&(c=u.oldShape.width,l=u.oldShape.height),s?(n.oldX=0,n.oldY=l):n.oldShape={x:c,y:l,width:0,height:0}}n.fadein=!s}}function KH(e,t){return e*LH+t}var qH=F,JH=V,YH=-1,XH=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=M(t);this.type=r,this.mappingMethod=n,this._normalizeData=cU[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?($H(i),ZH(i)):n===`category`?i.categories?QH(i):$H(i,!0):(Xe(n!==`linear`||i.dataExtent),$H(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return L(this._normalizeData,this)},e.listVisualTypes=function(){return Pe(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){V(e)?F(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=R(t)?[]:V(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&qH(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(R(e))e=e.slice();else if(JH(e)){var t=[];qH(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a=0;a--)r[a]??(delete n[t[a]],t.pop())}function $H(e,t){var n=e.visual,r=[];V(n)?qH(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),sU(e,r)}function eU(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:aU([0,1])}}function tU(e){var t=this.option.visual;return t[Math.round(ps(e,[0,1],[0,t.length-1],!0))]||{}}function nU(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function rU(e){var t=this.option.visual;return t[this.option.loop&&e!==YH?e%t.length:e]}function iU(){return this.option.visual[0]}function aU(e){return{linear:function(t){return ps(t,e,this.option.visual,!0)},category:rU,piecewise:function(t,n){var r=oU.call(this,n);return r??=ps(t,e,this.option.visual,!0),r},fixed:iU}}function oU(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[XH.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function sU(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=I(t,function(e){return hi(e)||[0,0,0,1]})),t}var cU={linear:function(e){return ps(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=XH.findPieceIndex(e,t,!0);if(n!=null)return ps(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??YH},fixed:ct};function lU(e,t,n){return e?t<=n:t=n.length||e===n[e.depth])&&pU(e,bU(i,c,e,t,m,r),n,r)})}}}function mU(e,t,n){var r=N({},t),i=n.designatedVisualItemStyle;return F([`color`,`colorAlpha`,`colorSaturation`],function(n){i[n]=t[n];var a=e.get(n);i[n]=null,a!=null&&(r[n]=a)}),r}function hU(e){var t=_U(e,`color`);if(t){var n=_U(e,`colorAlpha`),r=_U(e,`colorSaturation`);return r&&(t=wi(t,null,null,r)),n&&(t=Ti(t,n)),t}}function gU(e,t){return t==null?null:wi(t,null,null,e)}function _U(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function vU(e,t,n,r,i,a){if(!(!a||!a.length)){var o=yU(t,`color`)||i.color!=null&&i.color!==`none`&&(yU(t,`colorAlpha`)||yU(t,`colorSaturation`));if(o){var s=t.get(`visualMin`),c=t.get(`visualMax`),l=n.dataExtent.slice();s!=null&&sl[1]&&(l[1]=c);var u=t.get(`colorMappingBy`),d={type:o.name,dataExtent:l,visual:o.range};d.type===`color`&&(u===`index`||u===`id`)?(d.mappingMethod=`category`,d.loop=!0):d.mappingMethod=`linear`;var f=new XH(d);return dU(f).drColorMappingBy=u,f}}}function yU(e,t){var n=e.get(t);return R(n)&&n.length?{name:t,range:n}:null}function bU(e,t,n,r,i,a){var o=N({},t);if(i){var s=i.type,c=s===`color`&&dU(i).drColorMappingBy,l=c===`index`?r:c===`id`?a.mapIdToIndex(n.getId()):n.getValue(e.get(`visualDimension`));o[s]=i.mapValueToVisual(l)}return o}function xU(e){e.registerSeriesModel(eH),e.registerChartView(UH),e.registerVisual(fU),e.registerLayout(vH),QV(e)}function SU(e){return`_EC_`+e}var CU=function(){function e(e){this.type=`graph`,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=e==null?``+t:``+e;var n=this._nodesMap;if(!n[SU(e)]){var r=new wU(e,t);return r.hostGraph=this,this.nodes.push(r),n[SU(e)]=r,r}},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[SU(e)]},e.prototype.addEdge=function(e,t,n){var r=this._nodesMap,i=this._edgesMap;if(Re(e)&&(e=this.nodes[e]),Re(t)&&(t=this.nodes[t]),e instanceof wU||(e=r[SU(e)]),t instanceof wU||(t=r[SU(t)]),!(!e||!t)){var a=e.id+`-`+t.id,o=new TU(e,t,n);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),i[a]=o,o}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof wU&&(e=e.id),t instanceof wU&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+`-`+t]:n[e+`-`+t]||n[t+`-`+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,r=n.length,i=0;i=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof wU||(t=this._nodesMap[SU(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),TU=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=U(),t=U();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function EU(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}ke(wU,EU(`hostGraph`,`data`)),ke(TU,EU(`hostGraph`,`edgeData`));function DU(e,t,n,r,i){for(var a=new CU(r),o=0;o `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=wE(e,n);else{var h=O_.get(p),g=h&&h.dimensions||[];De(g,`value`)<0&&g.concat([`value`]);var _=dE(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new lE(_,n),m.initData(e)}var v=new lE([`value`],n);return v.initData(c,s),i&&i(m,v),hV({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var OU=`-->`,kU=function(e){return e.get(`autoCurveness`)||null},AU=function(e,t){var n=kU(e),r=20,i=[];if(Re(n))r=n;else if(R(n)){e.__curvenessList=n;return}t>r&&(r=t);var a=r%2?r+2:r+3;i=[];for(var o=0;o `),value:i.value,noValue:i.value==null})}return ix({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=I(this.option.categories||[],function(e){return e.value==null?N({value:0},e):e}),t=new lE([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))},t.prototype.__ownRoamView=function(){var e=this.coordinateSystem;return Kz(e)&&e},t.type=`series.`+zU,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.defaultOption={z:2,coordinateSystem:`view`,legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:`center`,top:`center`,symbol:`circle`,symbolSize:10,edgeSymbol:[`none`,`none`],edgeSymbolSize:10,edgeLabel:{position:`middle`,distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:`{b}`},itemStyle:{},lineStyle:{color:Z.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:Z.color.primary}}},t}(lx);function VU(e){return e instanceof Array||(e=[e,e]),e}var HU=Qc(zU,UU);function UU(e){e.eachSeriesByType(zU,function(e){var t=e.getGraph(),n=e.getEdgeData(),r=VU(e.get(`edgeSymbol`)),i=VU(e.get(`edgeSymbolSize`));n.setVisual(`fromSymbol`,r&&r[0]),n.setVisual(`toSymbol`,r&&r[1]),n.setVisual(`fromSymbolSize`,i&&i[0]),n.setVisual(`toSymbolSize`,i&&i[1]),n.setVisual(`style`,e.getModel(`lineStyle`).getLineStyle()),n.each(function(e){var r=n.getItemModel(e),i=t.getEdgeByIndex(e),a=VU(r.getShallow(`symbol`,!0)),o=VU(r.getShallow(`symbolSize`,!0)),s=r.getModel(`lineStyle`).getLineStyle(),c=n.ensureUniqueItemVisual(e,`style`);switch(N(c,s),c.stroke){case`source`:var l=i.node1.getVisual(`style`);c.stroke=l&&l.fill;break;case`target`:var l=i.node2.getVisual(`style`);c.stroke=l&&l.fill;break}a[0]&&i.setVisual(`fromSymbol`,a[0]),a[1]&&i.setVisual(`toSymbol`,a[1]),o[0]&&i.setVisual(`fromSymbolSize`,o[0]),o[1]&&i.setVisual(`toSymbolSize`,o[1])})})}function WU(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`)){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get(`x`),+t.get(`y`)])}),GU(n,e)}}function GU(e,t){e.eachEdge(function(e,n){var r=qe(e.getModel().get([`lineStyle`,`curveness`]),-RU(e,t,n,!0),0),i=mt(e.node1.getLayout()),a=mt(e.node2.getLayout()),o=[i,a];+r&&o.push([(i[0]+a[0])/2-(i[1]-a[1])*r,(i[1]+a[1])/2-(a[0]-i[0])*r]),e.setLayout(o)})}var KU=Qc(zU,qU);function qU(e,t){e.eachSeriesByType(zU,function(e){var t=e.get(`layout`),n=e.coordinateSystem;if(n&&n.type!==`view`){var r=e.getData(),i=[];F(n.dimensions,function(e){i=i.concat(r.mapDimensionsAll(e))});for(var a=0;a0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0].8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C;break}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(q),xW=function(){function e(e){this.group=new q,this._LineCtor=e||bW}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=CW(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=CW(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!SW(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i0}function CW(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Ih(t)}}function wW(e){return isNaN(e[0])||isNaN(e[1])}function TW(e){return e&&!wW(e[0])&&!wW(e[1])}var EW=[],DW=[],OW=[],kW=Hr,AW=jt,jW=Math.abs;function MW(e,t,n){for(var r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1,u=.1;u<=.9;u+=.1){EW[0]=kW(r[0],i[0],a[0],u),EW[1]=kW(r[1],i[1],a[1],u);var d=jW(AW(EW,t)-c);d=0?s+=l:s-=l:m>=0?s-=l:s+=l}return s}function NW(e,t){var n=[],r=Kr,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){var c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[mt(c[0]),mt(c[1])],c[2]&&c.__original.push(mt(c[2])));var d=c.__original;if(c[2]!=null){if(pt(i[0],d[0]),pt(i[1],d[2]),pt(i[2],d[1]),l&&l!==`none`){var f=YU(e.node1),p=MW(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){var f=YU(e.node2),p=MW(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}pt(c[0],i[0]),pt(c[1],i[2]),pt(c[2],i[1])}else{if(pt(a[0],d[0]),pt(a[1],d[1]),vt(o,a[1],a[0]),Dt(o,o),l&&l!==`none`){var f=YU(e.node1);_t(a[0],a[0],o,f*t)}if(u&&u!==`none`){var f=YU(e.node2);_t(a[1],a[1],o,-f*t)}pt(c[0],a[0]),pt(c[1],a[1])}})}var PW=xc();function FW(e){if(e)return PW(e).bridge}function IW(e,t){e&&(PW(e).bridge=t)}var LW=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=zU,t}return t.prototype.init=function(e,t){var n=new QM,r=new xW,i=this.group,a=new q;this._controller=new pR(t.getZr()),a.add(n.group),a.add(r.group),i.add(a),this._symbolDraw=n,this._lineDraw=r,this._mainGroup=a,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=Qz(e),a=!1;this._model=e,this._api=n,this._active=!0;var o=this._mainGroup,s=this._getThumbnailInfo();s&&s.bridge.reset(n);var c=this._symbolDraw,l=this._lineDraw;i&&qz(o,2,i,this._firstRender?null:e),NW(e.getGraph(),JU(e));var u=e.getData();c.updateData(u);var d=e.getEdgeData();l.updateData(d),this._updateNodeAndLinkScale(),i&&dB(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},null),clearTimeout(this._layoutTimeout);var f=e.forceLayout,p=e.get([`force`,`layoutAnimation`]);f&&(a=!0,this._startForceLayoutIteration(f,n,p));var m=e.get(`layout`);u.graph.eachNode(function(t){var i=t.dataIndex,a=t.getGraphicEl(),o=t.getModel();if(a){a.off(`drag`).off(`dragend`);var s=o.get(`draggable`);s&&a.on(`drag`,function(o){switch(m){case`force`:f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,n,p),f.setFixed(i),u.setItemLayout(i,[a.x,a.y]);break;case`circular`:u.setItemLayout(i,[a.x,a.y]),t.setLayout({fixed:!0},!0),QU(e,`symbolSize`,t,[o.offsetX,o.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(i,[a.x,a.y]),GU(e.getGraph(),e),r.updateLayout(e);break}}).on(`dragend`,function(){f&&f.setUnfixed(i)}),a.setDraggable(s,!!o.get(`cursor`)),o.get([`emphasis`,`focus`])===`adjacency`&&(Y(a).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&(Y(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var h=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),g=u.getLayout(`cx`),_=u.getLayout(`cy`);u.graph.eachNode(function(e){eW(e,h,g,_)}),this._firstRender=!1,a||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(e,t,n){var r=this,i=!1;(function a(){e.step(function(e){r.updateLayout(r._model),(e||!i)&&(i=!0,r._renderThumbnail(r._model,t,r._symbolDraw,r._lineDraw)),(r._layouting=!e)&&(n?r._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=Qz(t);!this._active||!r||(qz(this._mainGroup,2,r,null),gB(e)&&(this._updateNodeAndLinkScale(),NW(t.getGraph(),JU(t)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=JU(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(NW(e.getGraph(),JU(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,t=e.coordinateSystem;if(t.type===`view`){var n=FW(e);if(n)return{bridge:n,coordSys:t}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(bz(null,e.coordSys),this._api)},t.prototype._renderThumbnail=function(e,t,n,r){var i=this._getThumbnailInfo();if(i){var a=new q,o=n.group.children(),s=r.group.children(),c=new q,l=new q;a.add(l),a.add(c);for(var u=0;u `),value:r.value,noValue:r.value==null})}return Hb(`nameValue`,{name:r.name,value:r.value,noValue:r.value==null})},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);if(n===`node`){var i=this.getData(),a=this.getGraph().getNodeByIndex(t);r.name??=i.getName(t),r.value??=a.getLayout().value}return r},t.type=`series.`+UW,t.defaultOption={z:2,coordinateSystem:`none`,legendHoverLink:!0,colorBy:`data`,left:0,top:0,right:0,bottom:0,width:null,height:null,center:[`50%`,`50%`],radius:[`70%`,`80%`],clockwise:!0,startAngle:90,endAngle:`auto`,minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:`source`,opacity:.2},label:{show:!0,position:`outside`,distance:5},emphasis:{focus:`adjacency`,lineStyle:{opacity:.5}}},t}(lx),GW=function(e){D(t,e);function t(t,n,r){var i=e.call(this)||this;Y(i).dataType=`node`,i.z2=2;var a=new Cd;return i.setTextContent(a),i.updateData(t,n,r,!0),i}return t.prototype.updateData=function(e,t,n,r){var i=this,a=e.graph.getNodeByIndex(t),o=e.hostModel,s=a.getModel(),c=s.getModel(`emphasis`),l=e.getItemLayout(t),u=N(OF(s.getModel(`itemStyle`),l,!0),l),d=this;if(isNaN(u.startAngle)){d.setShape(u);return}r?d.setShape(u):jm(d,{shape:u},o,t);var f=N(OF(s.getModel(`itemStyle`),l,!0),l);i.setShape(f),i.useStyle(e.getItemVisual(t,`style`)),Qf(i,s),this._updateLabel(o,s,a),e.setItemGraphicEl(t,d),Qf(d,s,`itemStyle`);var p=c.get(`focus`);Jf(this,p===`adjacency`?a.getAdjacentDataIndices():p,c.get(`blurScope`),c.get(`disabled`))},t.prototype._updateLabel=function(e,t,n){var r=this.getTextContent(),i=n.getLayout(),a=(i.startAngle+i.endAngle)/2,o=Math.cos(a),s=Math.sin(a),c=t.getModel(`label`);r.ignore=!c.get(`show`);var l=Ih(t),u=n.getVisual(`style`);Fh(r,l,{labelFetcher:{getFormattedLabel:function(n,r,i,a,o,s){return e.getFormattedLabel(n,r,`node`,a,qe(o,l.normal&&l.normal.get(`formatter`),t.get(`name`)),s)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+``,inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:`startArc`});var d=c.get(`position`)||`outside`,f=c.get(`distance`)||0,p=d===`outside`?i.r+f:(i.r+i.r0)/2;this.textConfig={inside:d!==`outside`};var m=d===`outside`?o>0?`left`:`right`:c.get(`align`)||`center`,h=d===`outside`?s>0?`top`:`bottom`:c.get(`verticalAlign`)||`middle`;r.attr({x:o*p+i.cx,y:s*p+i.cy,rotation:0,style:{align:m,verticalAlign:h}})},t}(Yp);(function(){function e(){this.s1=[0,0],this.s2=[0,0],this.sStartAngle=0,this.sEndAngle=0,this.t1=[0,0],this.t2=[0,0],this.tStartAngle=0,this.tEndAngle=0,this.cx=0,this.cy=0,this.r=0,this.clockwise=!0}return e})();var KW=function(e){D(t,e);function t(t,n,r,i){var a=e.call(this)||this;return Y(a).dataType=`edge`,a.updateData(t,n,r,i,!0),a}return t.prototype.buildPath=function(e,t){e.moveTo(t.s1[0],t.s1[1]);var n=.7,r=t.clockwise;e.arc(t.cx,t.cy,t.r,t.sStartAngle,t.sEndAngle,!r),e.bezierCurveTo((t.cx-t.s2[0])*n+t.s2[0],(t.cy-t.s2[1])*n+t.s2[1],(t.cx-t.t1[0])*n+t.t1[0],(t.cy-t.t1[1])*n+t.t1[1],t.t1[0],t.t1[1]),e.arc(t.cx,t.cy,t.r,t.tStartAngle,t.tEndAngle,!r),e.bezierCurveTo((t.cx-t.t2[0])*n+t.t2[0],(t.cy-t.t2[1])*n+t.t2[1],(t.cx-t.s1[0])*n+t.s1[0],(t.cy-t.s1[1])*n+t.s1[1],t.s1[0],t.s1[1]),e.closePath()},t.prototype.updateData=function(e,t,n,r,i){var a=e.hostModel,o=t.graph.getEdgeByIndex(n),s=o.getLayout(),c=o.node1.getModel(),l=t.getItemModel(o.dataIndex),u=l.getModel(`lineStyle`),d=l.getModel(`emphasis`),f=d.get(`focus`),p=N(OF(c.getModel(`itemStyle`),s,!0),s),m=this;if(isNaN(p.sStartAngle)||isNaN(p.tStartAngle)){m.setShape(p);return}i?(m.setShape(p),qW(m,o,e,u)):(Lm(m),qW(m,o,e,u),jm(m,{shape:p},a,n)),Jf(this,f===`adjacency`?o.getAdjacentDataIndices():f,d.get(`blurScope`),d.get(`disabled`)),Qf(m,l,`lineStyle`),t.setItemGraphicEl(o.dataIndex,m)},t}(id);function qW(e,t,n,r){var i=t.node1,a=t.node2,o=e.style;switch(e.setStyle(r.getLineStyle()),r.get(`color`)){case`source`:o.fill=n.getItemVisual(i.dataIndex,`style`).fill,o.decal=i.getVisual(`style`).decal;break;case`target`:o.fill=n.getItemVisual(a.dataIndex,`style`).fill,o.decal=a.getVisual(`style`).decal;break;case`gradient`:var s=n.getItemVisual(i.dataIndex,`style`).fill,c=n.getItemVisual(a.dataIndex,`style`).fill;if(B(s)&&B(c)){var l=e.shape;o.fill=new hm((l.s1[0]+l.s2[0])/2,(l.s1[1]+l.s2[1])/2,(l.t1[0]+l.t2[0])/2,(l.t1[1]+l.t2[1])/2,[{offset:0,color:s},{offset:1,color:c}],!0)}break}}var JW=Math.PI/180,YW=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=UW,t}return t.prototype.init=function(e,t){},t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,a=this.group,o=-e.get(`startAngle`)*JW;if(r.diff(i).add(function(e){if(r.getItemLayout(e)){var t=new GW(r,e,o);Y(t).dataIndex=e,a.add(t)}}).update(function(t,n){var s=i.getItemGraphicEl(n);if(!r.getItemLayout(t)){s&&Im(s,e,n);return}s?s.updateData(r,t,o):s=new GW(r,t,o),a.add(s)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&Im(n,e,t)}).execute(),!i){var s=e.get(`center`);this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=J(s[0],n.getWidth()),this.group.originY=J(s[1],n.getHeight()),Mm(this.group,{scaleX:1,scaleY:1},e)}this._data=r,this.renderEdges(e,o)},t.prototype.renderEdges=function(e,t){var n=e.getData(),r=e.getEdgeData(),i=this._edgeData,a=this.group;r.diff(i).add(function(e){var i=new KW(n,r,e,t);Y(i).dataIndex=e,a.add(i)}).update(function(e,o){var s=i.getItemGraphicEl(o);s.updateData(n,r,e,t),a.add(s)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&Im(n,e,t)}).execute(),this._edgeData=r},t.prototype.dispose=function(){},t.type=UW,t}(Sx),XW=Math.PI/180,ZW=Qc(UW,QW);function QW(e,t){e.eachSeriesByType(UW,function(e){$W(e,t)})}function $W(e,t){var n=e.getData(),r=n.graph,i=e.getEdgeData();if(i.count()){var a=U_(e,t),o=a.cx,s=a.cy,c=a.r,l=a.r0,u=Math.max((e.get(`padAngle`)||0)*XW,0),d=Math.max((e.get(`minAngle`)||0)*XW,0),f=-e.get(`startAngle`)*XW,p=f+Math.PI*2,m=e.get(`clockwise`),h=m?1:-1,g=[f,p];Mu(g,!m);var _=g[0],v=g[1]-_,y=n.getSum(`value`)===0&&i.getSum(`value`)===0,b=[],x=0;r.eachEdge(function(e){var t=y?1:e.getValue(`value`);y&&(t>0||d)&&(x+=2);var n=e.node1.dataIndex,r=e.node2.dataIndex;b[n]=(b[n]||0)+t,b[r]=(b[r]||0)+t});var S=0;if(r.eachNode(function(e){var t=e.getValue(`value`);isNaN(t)||(b[e.dataIndex]=Math.max(t,b[e.dataIndex]||0)),!y&&(b[e.dataIndex]>0||d)&&x++,S+=b[e.dataIndex]||0}),!(x===0||S===0)){u*x>=Math.abs(v)&&(u=Math.max(0,(Math.abs(v)-d*x)/x)),(u+d)*x>=Math.abs(v)&&(d=(Math.abs(v)-u*x)/x);var C=(v-u*x*h)/S,w=0,T=0,E=0,D=1/0;r.eachNode(function(e){var t=b[e.dataIndex]||0,n=C*(S?t:1)*h;Math.abs(n)T){var k=w/T;r.eachNode(function(e){var t=e.getLayout().angle;Math.abs(t)>=d?e.setLayout({angle:t*k,ratio:k},!0):e.setLayout({angle:d,ratio:d===0?1:t/d},!0)})}else r.eachNode(function(e){if(!O){var t=e.getLayout().angle;t-Math.min(t/E,1)*wd&&d>0){var n=O?1:Math.min(t/E,1),r=t-d,i=Math.min(r,Math.min(A,w*n));A-=i,e.setLayout({angle:t-i,ratio:(t-i)/t},!0)}else d>0&&e.setLayout({angle:d,ratio:t===0?1:d/t},!0)}});var j=_,ee=[];r.eachNode(function(e){var t=Math.max(e.getLayout().angle,d);e.setLayout({cx:o,cy:s,r0:l,r:c,startAngle:j,endAngle:j+t*h,clockwise:m},!0),ee[e.dataIndex]=j,j+=(t+u)*h}),r.eachEdge(function(e){var t=y?1:e.getValue(`value`),n=C*(S?t:1)*h,r=e.node1.dataIndex,i=ee[r]||0,a=i+Math.abs((e.node1.getLayout().ratio||1)*n)*h,c=[o+l*Math.cos(i),s+l*Math.sin(i)],u=[o+l*Math.cos(a),s+l*Math.sin(a)],d=e.node2.dataIndex,f=ee[d]||0,p=f+Math.abs((e.node2.getLayout().ratio||1)*n)*h,g=[o+l*Math.cos(f),s+l*Math.sin(f)],_=[o+l*Math.cos(p),s+l*Math.sin(p)];e.setLayout({s1:c,s2:u,sStartAngle:i,sEndAngle:a,t1:g,t2:_,tStartAngle:f,tEndAngle:p,cx:o,cy:s,r:l,value:t,clockwise:m}),ee[r]=a,ee[d]=p})}}}function eG(e){e.registerChartView(YW),e.registerSeriesModel(WW),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,ZW),e.registerProcessor(tI(`chord`))}var tG=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),nG=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`pointer`,n}return t.prototype.getDefaultShape=function(){return new tG},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,i=t.r,a=t.width,o=t.angle,s=t.x-n(o)*a*(a>=i/3?1:2),c=t.y-r(o)*a*(a>=i/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,c),e.lineTo(t.x+n(o)*a,t.y+r(o)*a),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(o)*a,t.y-r(o)*a),e.lineTo(s,c)},t}(id);function rG(e,t){var n=e.get(`center`),r=t.getWidth(),i=t.getHeight(),a=Math.min(r,i);return{cx:J(n[0],t.getWidth()),cy:J(n[1],t.getHeight()),r:J(e.get(`radius`),a/2)}}function iG(e,t){var n=e==null?``:e+``;return t&&(B(t)?n=t.replace(`{value}`,n):z(t)&&(n=t(e))),n}var aG=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeAll();var r=e.get([`axisLine`,`lineStyle`,`color`]),i=rG(e,n);this._renderMain(e,t,n,r,i),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,i){var a=this.group,o=e.get(`clockwise`),s=-e.get(`startAngle`)/180*Math.PI,c=-e.get(`endAngle`)/180*Math.PI,l=e.getModel(`axisLine`),u=l.get(`roundCap`)?CF:Yp,d=l.get(`show`),f=l.getModel(`lineStyle`),p=f.get(`width`),m=[s,c];Mu(m,!o),s=m[0],c=m[1];for(var h=c-s,g=s,_=[],v=0;d&&v=e&&(t===0?0:r[t-1][0])Math.PI/2&&(oe+=Math.PI)):ae===`tangential`?oe=-S-Math.PI/2:Re(ae)&&(oe=ae*Math.PI/180),oe===0?l.add(new Cd({style:Lh(_,{text:te,x:re,y:ie,verticalAlign:k<-.8?`top`:k>.8?`bottom`:`middle`,align:O<-.4?`left`:O>.4?`right`:`center`},{inheritColor:ne}),silent:!0})):l.add(new Cd({style:Lh(_,{text:te,x:re,y:ie,verticalAlign:`middle`,align:`center`},{inheritColor:ne}),silent:!0,originX:re,originY:ie,rotation:oe}))}if(g.get(`show`)&&A!==v){var j=g.get(`distance`);j=j?j+c:c;for(var se=0;se<=y;se++){O=Math.cos(S),k=Math.sin(S);var ce=new om({shape:{x1:O*(f-j)+u,y1:k*(f-j)+d,x2:O*(f-x-j)+u,y2:k*(f-x-j)+d},silent:!0,style:E});E.stroke===`auto`&&ce.setStyle({stroke:r((A+se/y)/v)}),l.add(ce),S+=w}S-=w}else S+=C}},t.prototype._renderPointer=function(e,t,n,r,i,a,o,s,c){var l=this.group,u=this._data,d=this._progressEls,f=[],p=e.get([`pointer`,`show`]),m=e.getModel(`progress`),h=m.get(`show`),g=e.getData(),_=g.mapDimension(`value`),v=+e.get(`min`),y=+e.get(`max`),b=[v,y],x=[a,o];function S(t,n){var r=g.getItemModel(t).getModel(`pointer`),a=J(r.get(`width`),i.r),o=J(r.get(`length`),i.r),s=e.get([`pointer`,`icon`]),c=r.get(`offsetCenter`),l=J(c[0],i.r),u=J(c[1],i.r),d=r.get(`keepAspect`),f=s?WS(s,l-a/2,u-o,a,o,null,d):new nG({shape:{angle:-Math.PI/2,width:a,r:o,x:l,y:u}});return f.rotation=-(n+Math.PI/2),f.x=i.cx,f.y=i.cy,f}function C(e,t){var n=m.get(`roundCap`)?CF:Yp,r=m.get(`overlap`),o=r?m.get(`width`):c/g.count(),l=r?i.r-o:i.r-(e+1)*o,u=r?i.r:i.r-e*o,d=new n({shape:{startAngle:a,endAngle:t,cx:i.cx,cy:i.cy,clockwise:s,r0:l,r:u}});return r&&(d.z2=ps(g.get(_,e),[v,y],[100,0],!0)),d}(h||p)&&(g.diff(u).add(function(t){var n=g.get(_,t);if(p){var r=S(t,a);Mm(r,{rotation:-((isNaN(+n)?x[0]:ps(n,b,x,!0))+Math.PI/2)},e),l.add(r),g.setItemGraphicEl(t,r)}if(h){var i=C(t,a);Mm(i,{shape:{endAngle:ps(n,b,x,m.get(`clip`))}},e),l.add(i),Ld(e.seriesIndex,g.dataType,t,i),f[t]=i}}).update(function(t,n){var r=g.get(_,t);if(p){var i=u.getItemGraphicEl(n),o=i?i.rotation:a,s=S(t,o);s.rotation=o,jm(s,{rotation:-((isNaN(+r)?x[0]:ps(r,b,x,!0))+Math.PI/2)},e),l.add(s),g.setItemGraphicEl(t,s)}if(h){var c=d[n],v=C(t,c?c.shape.endAngle:a);jm(v,{shape:{endAngle:ps(r,b,x,m.get(`clip`))}},e),l.add(v),Ld(e.seriesIndex,g.dataType,t,v),f[t]=v}}).execute(),g.each(function(e){var t=g.getItemModel(e),n=t.getModel(`emphasis`),i=n.get(`focus`),a=n.get(`blurScope`),o=n.get(`disabled`),s=r(ps(g.get(_,e),b,[0,1],!0));if(p){var c=g.getItemGraphicEl(e),l=g.getItemVisual(e,`style`),u=l.fill;if(c instanceof ud){var d=c.style;c.useStyle(N({image:d.image,x:d.x,y:d.y,width:d.width,height:d.height},l))}else c.useStyle(l),c.type!==`pointer`&&c.setColor(u);c.setStyle(t.getModel([`pointer`,`itemStyle`]).getItemStyle()),c.style.fill===`auto`&&c.setStyle(`fill`,s),c.z2EmphasisLift=0,Qf(c,t),Jf(c,i,a,o)}if(h){var m=f[e];m.useStyle(g.getItemVisual(e,`style`)),m.setStyle(t.getModel([`progress`,`itemStyle`]).getItemStyle()),m.style.fill===`auto`&&m.setStyle(`fill`,s),m.z2EmphasisLift=0,Qf(m,t),Jf(m,i,a,o)}}),this._progressEls=f)},t.prototype._renderAnchor=function(e,t){var n=e.getModel(`anchor`);if(n.get(`show`)){var r=n.get(`size`),i=n.get(`icon`),a=n.get(`offsetCenter`),o=n.get(`keepAspect`),s=WS(i,t.cx-r/2+J(a[0],t.r),t.cy-r/2+J(a[1],t.r),r,r,null,o);s.z2=+!!n.get(`showAbove`),s.setStyle(n.getModel(`itemStyle`).getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,i){var a=this,o=e.getData(),s=o.mapDimension(`value`),c=+e.get(`min`),l=+e.get(`max`),u=new q,d=[],f=[],p=e.isAnimationEnabled(),m=e.get([`pointer`,`showAbove`]);o.diff(this._data).add(function(e){d[e]=new Cd({silent:!0}),f[e]=new Cd({silent:!0})}).update(function(e,t){d[e]=a._titleEls[t],f[e]=a._detailEls[t]}).execute(),o.each(function(t){var n=o.getItemModel(t),a=o.get(s,t),h=new q,g=r(ps(a,[c,l],[0,1],!0)),_=n.getModel(`title`);if(_.get(`show`)){var v=_.get(`offsetCenter`),y=i.cx+J(v[0],i.r),b=i.cy+J(v[1],i.r),x=d[t];x.attr({z2:m?0:2,style:Lh(_,{x:y,y:b,text:o.getName(t),align:`center`,verticalAlign:`middle`},{inheritColor:g})}),h.add(x)}var S=n.getModel(`detail`);if(S.get(`show`)){var C=S.get(`offsetCenter`),w=i.cx+J(C[0],i.r),T=i.cy+J(C[1],i.r),E=J(S.get(`width`),i.r),D=J(S.get(`height`),i.r),O=e.get([`progress`,`show`])?o.getItemVisual(t,`style`).fill:g,x=f[t],k=S.get(`formatter`);x.attr({z2:m?0:2,style:Lh(S,{x:w,y:T,text:iG(a,k),width:isNaN(E)?null:E,height:isNaN(D)?null:D,align:`center`,verticalAlign:`middle`},{inheritColor:O})}),qh(x,{normal:S},a,function(e){return iG(e,k)}),p&&Jh(x,t,o,e,{getFormattedLabel:function(e,t,n,r,i,o){return iG(o?o.interpolatedValue:a,k)}}),h.add(x)}u.add(h)}),this.group.add(u),this._titleEls=d,this._detailEls=f},t.type=`gauge`,t}(Sx),oG=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath=`itemStyle`,n}return t.prototype.getInitialData=function(e,t){return nI(this,[`value`])},t.type=`series.gauge`,t.defaultOption={z:2,colorBy:`data`,center:[`50%`,`50%`],legendHoverLink:!0,radius:`75%`,startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,Z.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:Z.color.axisTick,width:3,type:`solid`}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:Z.color.axisTickMinor,width:1,type:`solid`}},axisLabel:{show:!0,distance:15,color:Z.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:`60%`,width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:`circle`,offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:Z.color.neutral00,borderWidth:0,borderColor:Z.color.theme[0]}},title:{show:!0,offsetCenter:[0,`20%`],color:Z.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:Z.color.transparent,borderWidth:0,borderColor:Z.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,`40%`],color:Z.color.primary,fontSize:30,fontWeight:`bold`,lineHeight:30,valueAnimation:!1}},t}(lx);function sG(e){e.registerChartView(aG),e.registerSeriesModel(oG)}var cG=`funnel`,lG=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new rI(L(this.getData,this),L(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return nI(this,{coordDimensions:[`value`],encodeDefaulter:Ie(hv,this)})},t.prototype._defaultLabelLine=function(e){ec(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),i=n.mapDimension(`value`),a=n.getSum(i);return r.percent=a?+(n.get(i,t)/a*100).toFixed(2):0,r.$vars.push(`percent`),r},t.type=`series.`+cG,t.defaultOption={coordinateSystemUsage:`box`,z:2,legendHoverLink:!0,colorBy:`data`,left:80,top:60,right:80,bottom:65,minSize:`0%`,maxSize:`100%`,sort:`descending`,orient:`vertical`,gap:0,funnelAlign:`center`,label:{show:!0,position:`outer`},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:Z.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:Z.color.primary}}},t}(lx),uG=[`itemStyle`,`opacity`],dG=function(e){D(t,e);function t(t,n){var r=e.call(this)||this,i=r,a=new rm,o=new Cd;return i.setTextContent(o),r.setTextGuideLine(a),r.updateData(t,n,!0),r}return t.prototype.updateData=function(e,t,n){var r=this,i=e.hostModel,a=e.getItemModel(t),o=e.getItemLayout(t),s=a.getModel(`emphasis`),c=a.get(uG);c??=1,n||Lm(r),r.useStyle(e.getItemVisual(t,`style`)),r.style.lineJoin=`round`,n?(r.setShape({points:o.points}),r.style.opacity=0,Mm(r,{style:{opacity:c}},i,t)):jm(r,{style:{opacity:c},shape:{points:o.points}},i,t),Qf(r,a),this._updateLabel(e,t),Jf(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e,t){var n=this,r=this.getTextGuideLine(),i=n.getTextContent(),a=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,c=e.getItemVisual(t,`style`),l=c.fill;Fh(i,Ih(o),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:c.opacity,defaultText:e.getName(t)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}});var u=o.getModel(`label`).get(`color`)===`inherit`?l:null;n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var d=s.linePoints;r.setShape({points:d}),n.textGuideLineConfig={anchor:d?new G(d[0][0],d[0][1]):null},jm(i,{style:{x:s.x,y:s.y}},a,t),i.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),dA(n,fA(o),{stroke:l})},t}(tm),fG=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=cG,t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,a=this.group;r.diff(i).add(function(e){var t=new dG(r,e);r.setItemGraphicEl(e,t),a.add(t)}).update(function(e,t){var n=i.getItemGraphicEl(t);n.updateData(r,e),a.add(n),r.setItemGraphicEl(e,n)}).remove(function(t){Im(i.getItemGraphicEl(t),e,t)}).execute(),this._data=r},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type=cG,t}(Sx);function pG(e,t){for(var n=e.mapDimension(`value`),r=e.mapArray(n,function(e){return e}),i=[],a=t===`ascending`,o=0,s=e.count();o-1&&(i=`left`),n&&De([`left`,`right`],i)>-1&&(i=`bottom`)),i===`left`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,h=p-_,u=h-5,l=`right`):i===`right`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,h=p+_,u=h+5,l=`left`):i===`top`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,g=m-_,d=g-5,l=`center`):i===`bottom`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,g=m+_,d=g+5,l=`center`):i===`rightTop`?(p=n?s[3][0]:s[1][0],m=n?s[3][1]:s[1][1],n?(g=m-_,d=g-5,l=`center`):(h=p+_,u=h+5,l=`top`)):i===`rightBottom`?(p=s[2][0],m=s[2][1],n?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`bottom`)):i===`leftTop`?(p=s[0][0],m=n?s[0][1]:s[1][1],n?(g=m-_,d=g-5,l=`center`):(h=p-_,u=h-5,l=`right`)):i===`leftBottom`?(p=n?s[1][0]:s[3][0],m=n?s[1][1]:s[2][1],n?(g=m+_,d=g+5,l=`center`):(h=p-_,u=h-5,l=`right`)):(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,n?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`left`)),n?(h=p,u=h):(g=m,d=g),f=[[p,m],[h,g]]}o.label={linePoints:f,x:u,y:d,verticalAlign:`middle`,textAlign:l,inside:c}})}var hG=Qc(cG,gG);function gG(e,t){e.eachSeriesByType(cG,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=e.get(`sort`),a=q_(e,t),o=W_(e.getBoxLayoutParams(),a.refContainer),s=_G(e),c=o.width,l=o.height,u=pG(n,i),d=o.x,f=o.y,p=s?[J(e.get(`minSize`),l),J(e.get(`maxSize`),l)]:[J(e.get(`minSize`),c),J(e.get(`maxSize`),c)],m=n.getDataExtent(r),h=e.get(`min`),g=e.get(`max`);h??=Math.min(m[0],0),g??=m[1];var _=e.get(`funnelAlign`),v=e.get(`gap`),y=((s?c:l)-v*(n.count()-1))/n.count(),b=function(e,t){if(s){var i=ps(n.get(r,e)||0,[h,g],p,!0),a=void 0;switch(_){case`top`:a=f;break;case`center`:a=f+(l-i)/2;break;case`bottom`:a=f+(l-i);break}return[[t,a],[t,a+i]]}var o=ps(n.get(r,e)||0,[h,g],p,!0),u;switch(_){case`left`:u=d;break;case`center`:u=d+(c-o)/2;break;case`right`:u=d+c-o;break}return[[u,t],[u+o,t]]};i===`ascending`&&(y=-y,v=-v,s?d+=c:f+=l,u=u.reverse());for(var x=0;xFG)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);r.behavior!==`none`&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!(this._mouseDownPoint||!RG(this,`mousemove`))){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),r=n.behavior;r===`jump`&&this._throttledDispatchExpand.debounceNextCall(t.get(`axisExpandDebounce`)),this._throttledDispatchExpand(r===`none`?null:{axisExpandWindow:n.axisExpandWindow,animation:r===`jump`?null:{duration:0}})}}};function RG(e,t){var n=e._model;return n.get(`axisExpandable`)&&n.get(`axisExpandTriggerOn`)===t}var zG=`parallel`,BG=zG,VG=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&Ce(t,e,!0),this._initDimensions()},t.prototype.contains=function(e,t){var n=e.get(`parallelIndex`);return n!=null&&t.getComponent(`parallel`,n)===this},t.prototype.setAxisExpand=function(e){F([`axisExpandable`,`axisExpandCenter`,`axisExpandCount`,`axisExpandWidth`,`axisExpandWindow`],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[];F(Me(this.ecModel.queryComponents({mainType:`parallelAxis`}),function(e){return(e.get(`parallelIndex`)||0)===this.componentIndex},this),function(n){e.push(`dim`+n.get(`dim`)),t.push(n.componentIndex)})},t.type=BG,t.dependencies=[`parallelAxis`],t.layoutMode=`box`,t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:`horizontal`,axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:`click`,parallelAxisDefault:null},t}(tv),HG=function(e){D(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.type=i||`value`,o.axisIndex=a,o}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get(`layout`)!==`horizontal`},t}(Ik);function UG(e,t,n,r,i,a){e||=0;var o=Ds(n[1],-n[0]);if(i!=null&&(i=GG(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),r===`all`){var s=Math.abs(Ds(t[1],-t[0]));s=GG(s,[0,o]),i=a=GG(s,[i,a]),r=0}t[0]=GG(t[0],n),t[1]=GG(t[1],n);var c=WG(t,r);t[r]+=e;var l=i||0,u=n.slice();c.sign<0?u[0]=Ds(u[0],l):u[1]=Ds(u[1],-l),t[r]=GG(t[r],u);var d=WG(t,r);return i!=null&&(d.sign!==c.sign||d.spana&&(t[1-r]=Ds(t[r],d.sign*a)),t}function WG(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function GG(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var KG=function(){function e(e,t,n){this.type=zG,this._axesMap=U(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var r=e.dimensions,i=e.parallelAxisIndex;F(r,function(e,n){var r=i[n],a=t.getComponent(`parallelAxis`,r),o=ED(a),s=this._axesMap.set(e,new HG(e,DD(a,o,!1),[0,0],o,r));s.onBand=HD(s.scale,a),s.inverse=a.get(`inverse`),a.axis=s,s.model=a,s.coordinateSystem=a.coordinateSystem=this},this)},e.prototype.update=function(e,t){F(this.dimensions,function(e){var t=this._axesMap.get(e);bO(t,1),MO(t)},this)},e.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,r=t.layoutBase,i=t.pixelDimIndex,a=e[1-i],o=e[i];return a>=n&&a<=n+t.axisLength&&o>=r&&o<=r+t.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype.resize=function(e,t){var n=q_(e,t).refContainer;this._rect=W_(e.getBoxLayoutParams(),n),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=[`x`,`y`],r=[`width`,`height`],i=e.get(`layout`),a=i===`horizontal`?0:1,o=t[r[a]],s=[0,o],c=this.dimensions.length,l=qG(e.get(`axisExpandWidth`),s),u=qG(e.get(`axisExpandCount`)||0,[0,c]),d=e.get(`axisExpandable`)&&c>3&&c>u&&u>1&&l>0&&o>0,f=e.get(`axisExpandWindow`),p;f?(p=qG(f[1]-f[0],s),f[1]=f[0]+p):(p=qG(l*(u-1),s),f=[l*(e.get(`axisExpandCenter`)||os(c/2))-p/2],f[1]=f[0]+p);var m=(o-p)/(c-u);m<3&&(m=0);var h=[os(vs(f[0]/l,1))+1,ss(vs(f[1]/l,1))-1],g=m/l*f[0];return{layout:i,pixelDimIndex:a,layoutBase:t[n[a]],layoutLength:o,axisBase:t[n[1-a]],axisLength:t[r[1-a]],axisExpandable:d,axisExpandWidth:l,axisCollapseWidth:m,axisExpandWindow:f,axisCount:c,winInnerIndices:h,axisExpandWindow0Pos:g}},e.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,r=this._makeLayoutInfo(),i=r.layout;t.each(function(e){var t=[0,r.axisLength],n=+!!e.inverse;e.setExtent(t[n],t[1-n])}),F(n,function(t,n){var a=(r.axisExpandable?YG:JG)(n,r),o={horizontal:{x:a.position,y:r.axisLength},vertical:{x:0,y:a.position}},s={horizontal:ds/2,vertical:0},c=[o[i].x+e.x,o[i].y+e.y],l=s[i],u=vn();Cn(u,u,l),Sn(u,u,c),this._axesLayout[t]={position:c,rotation:l,transform:u,axisNameAvailableWidth:a.axisNameAvailableWidth,axisLabelShow:a.axisLabelShow,nameTruncateMaxWidth:a.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(e){return this._axesMap.get(e)},e.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},e.prototype.eachActiveState=function(e,t,n,r){n??=0,r??=e.count();var i=this._axesMap,a=this.dimensions,o=[],s=[];F(a,function(t){o.push(e.mapDimension(t)),s.push(i.get(t).model)});for(var c=this.hasAxisBrushed(),l=n;li*(1-u[0])?(c=`jump`,s=o-i*(1-u[2])):(s=o-i*u[1])>=0&&(s=o-i*(1-u[1]))<=0&&(s=0),s*=t.axisExpandWidth/l,s?UG(s,r,a,`all`):c=`none`;else{var f=r[1]-r[0];r=[rs(0,a[1]*o/f-f/2)],r[1]=ns(a[1],r[0]+f),r[0]=r[1]-f}return{axisExpandWindow:r,behavior:c}},e}();function qG(e,t){return ns(rs(e,t[0]),t[1])}function JG(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function YG(e,t){var n=t.layoutLength,r=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,c=a,l=!1,u;return e=0;n--)bs(t[n])},t.prototype.getActiveState=function(e){var t=this.activeIntervals;if(!t.length)return`normal`;if(e==null||isNaN(+e))return`inactive`;if(t.length===1){var n=t[0];if(n[0]<=e&&e<=n[1])return`active`}else for(var r=0,i=t.length;riK}function CK(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function wK(e,t,n,r){var i=new q;return i.add(new vd({name:`main`,style:OK(n),silent:!0,draggable:!0,cursor:`move`,drift:Ie(NK,e,t,i,[`n`,`s`,`w`,`e`]),ondragend:Ie(xK,t,{isEnd:!0})})),F(r,function(n){i.add(new vd({name:n.join(``),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ie(NK,e,t,i,n),ondragend:Ie(xK,t,{isEnd:!0})}))}),i}function TK(e,t,n,r){var i=r.brushStyle.lineWidth||0,a=tK(i,aK),o=n[0][0],s=n[1][0],c=o-i/2,l=s-i/2,u=n[0][1],d=n[1][1],f=u-a+i/2,p=d-a+i/2,m=u-o,h=d-s,g=m+i,_=h+i;DK(e,t,`main`,o,s,m,h),r.transformable&&(DK(e,t,`w`,c,l,a,_),DK(e,t,`e`,f,l,a,_),DK(e,t,`n`,c,l,g,a),DK(e,t,`s`,c,p,g,a),DK(e,t,`nw`,c,l,a,a),DK(e,t,`ne`,f,l,a,a),DK(e,t,`sw`,c,p,a,a),DK(e,t,`se`,f,p,a,a))}function EK(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(OK(n)),i.attr({silent:!r,cursor:r?`move`:`default`}),F([[`w`],[`e`],[`n`],[`s`],[`s`,`e`],[`s`,`w`],[`n`,`e`],[`n`,`w`]],function(n){var i=t.childOfName(n.join(``)),a=n.length===1?jK(e,n[0]):MK(e,n);i&&i.attr({silent:!r,invisible:!r,cursor:r?cK[a]+`-resize`:null})})}function DK(e,t,n,r,i,a,o){var s=t.childOfName(n);s&&s.setShape(LK(IK(e,t,[[r,i],[r+a,i+o]])))}function OK(e){return P({strokeNoScale:!0},e.brushStyle)}function kK(e,t,n,r){var i=[eK(e,n),eK(t,r)],a=[tK(e,n),tK(t,r)];return[[i[0],a[0]],[i[1],a[1]]]}function AK(e){return th(e.group)}function jK(e,t){return{left:`w`,right:`e`,top:`n`,bottom:`s`}[rh({w:`left`,e:`right`,n:`top`,s:`bottom`}[t],AK(e))]}function MK(e,t){var n=[jK(e,t[0]),jK(e,t[1])];return(n[0]===`e`||n[0]===`w`)&&n.reverse(),n.join(``)}function NK(e,t,n,r,i,a){var o=n.__brushOption,s=e.toRectRange(o.range),c=FK(t,i,a);F(r,function(e){var t=sK[e];s[t[0]][t[1]]+=c[t[0]]}),o.range=e.fromRectRange(kK(s[0][0],s[1][0],s[0][1],s[1][1])),gK(t,n),xK(t,{isEnd:!1})}function PK(e,t,n,r){var i=t.__brushOption.range,a=FK(e,n,r);F(i,function(e){e[0]+=a[0],e[1]+=a[1]}),gK(e,t),xK(e,{isEnd:!1})}function FK(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),a=r.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function IK(e,t,n){var r=yK(e,t);return r&&r!==$G?r.clipPath(n,e._transform):M(n)}function LK(e){var t=eK(e[0][0],e[1][0]),n=eK(e[0][1],e[1][1]),r=tK(e[0][0],e[1][0]),i=tK(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}function RK(e,t,n){if(!(!e._brushType||GK(e,t.offsetX,t.offsetY))){var r=e._zr,i=e._covers,a=vK(e,t,n);if(!e._dragging)for(var o=0;or.getWidth()||n<0||n>r.getHeight()}var KK={lineX:qK(0),lineY:qK(1),rect:{createCover:function(e,t){function n(e){return e}return wK({toRectRange:n,fromRectRange:n},e,t,[[`w`],[`e`],[`n`],[`s`],[`s`,`e`],[`s`,`w`],[`n`,`e`],[`n`,`w`]])},getCreatingRange:function(e){var t=CK(e);return kK(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){TK(e,t,n,r)},updateCommon:EK,contain:BK},polygon:{createCover:function(e,t){var n=new q;return n.add(new rm({name:`main`,style:OK(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new tm({name:`main`,draggable:!0,drift:Ie(PK,e,t),ondragend:Ie(xK,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:IK(e,t,n)})},updateCommon:EK,contain:BK}};function qK(e){return{createCover:function(t,n){return wK({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[[`w`],[`e`]],[[`n`],[`s`]]][e])},getCreatingRange:function(t){var n=CK(t);return[eK(n[0][e],n[1][e]),tK(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var a,o=yK(t,n);if(o!==$G&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var c=[r,a];e&&c.reverse(),TK(t,n,c,i)},updateCommon:EK,contain:BK}}function JK(e){return e=ZK(e),function(t){return sh(t,e)}}function YK(e,t){return e=ZK(e),function(n){var r=t??n,i=r?e.width:e.height,a=r?e.x:e.y;return[a,a+(i||0)]}}function XK(e,t,n){var r=ZK(e);return function(e,i){return r.contain(i[0],i[1])&&!fR(e,t,n)}}function ZK(e){return K.create(e)}var QK=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t,n){e.prototype.init.apply(this,arguments),(this._brushController=new dK(n.getZr())).on(`brush`,L(this._onBrush,this))},t.prototype.render=function(e,t,n,r){if(!$K(e,t,r)){this.axisModel=e,this.api=n,this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new q,this.group.add(this._axisGroup),e.get(`show`)){var a=tq(e,t),o=a.coordinateSystem,s=e.getAreaSelectStyle(),c=s.width,l=e.axis.dim,u=o.getAxisLayout(l),d=N({strokeContainThreshold:c},u),f=new xP(e,n,d);f.build(),this._axisGroup.add(f.group),this._refreshBrushController(d,s,e,a,c,n),oh(i,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,t,n,r,i,a){var o=n.axis.getExtent(),s=o[1]-o[0],c=Math.min(30,Math.abs(s)*.1),l=K.create({x:o[0],y:-i/2,width:s,height:i});l.x-=c,l.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:`pl`,clipPath:JK(l),isTargetByCursor:XK(l,a,r),getLinearBrushOtherExtent:YK(l,0)}]).enableBrush({brushType:`lineX`,brushStyle:t,removeOnClick:!0}).updateCovers(eq(n))},t.prototype._onBrush=function(e){var t=e.areas,n=this.axisModel,r=n.axis,i=I(t,function(e){return[r.coordToData(e.range[0],!0),r.coordToData(e.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:`axisAreaSelect`,parallelAxisId:n.id,intervals:i})},t.prototype.dispose=function(){this._brushController.dispose()},t.type=`parallelAxis`,t}(vx);function $K(e,t,n){return n&&n.type===`axisAreaSelect`&&t.findComponents({mainType:`parallelAxis`,query:n})[0]===e}function eq(e){var t=e.axis;return I(e.activeIntervals,function(e){return{brushType:`lineX`,panelId:`pl`,range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function tq(e,t){return t.getComponent(`parallel`,e.get(`parallelIndex`))}var nq={type:`axisAreaSelect`,event:`axisAreaSelected`};function rq(e){e.registerAction(nq,function(e,t){t.eachComponent({mainType:`parallelAxis`,query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),e.registerAction(`parallelAxisExpand`,function(e,t){t.eachComponent({mainType:`parallel`,query:e},function(t){t.setAxisExpand(e)})})}var iq={type:`value`,areaSelectStyle:{width:20,borderWidth:1,borderColor:`rgba(160,197,232)`,color:`rgba(160,197,232)`,opacity:.3},realtime:!0,z:10};function aq(e){e.registerComponentView(IG),e.registerComponentModel(VG),e.registerCoordinateSystem(`parallel`,ZG),e.registerPreprocessor(MG),e.registerComponentModel(QG),e.registerComponentView(QK),II(e,`parallel`,QG,iq),rq(e)}function oq(e){MT(aq),e.registerChartView(bG),e.registerSeriesModel(DG),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,jG)}var sq=`sankey`,cq=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[],i=e.levels||[];this.levelModels=[];for(var a=this.levelModels,o=0;o=0&&(a[i[o].depth]=new og(i[o],this,t));return DU(r,n,this,!0,s).data;function s(e,t){e.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getData().getItemLayout(t);if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e}),t.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e})}},t.prototype.setNodePosition=function(e,t){var n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function r(e){return isNaN(e)||e==null}if(n===`edge`){var i=this.getDataParams(e,n),a=i.data,o=i.value;return Hb(`nameValue`,{name:a.source+` -- `+a.target,value:o,noValue:r(o)})}else{var s=this.getGraph().getNodeByIndex(e).getLayout().value,c=this.getDataParams(e,n).data.name;return Hb(`nameValue`,{name:c==null?null:c+``,value:s,noValue:r(s)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);return r.value==null&&n===`node`&&(r.value=this.getGraph().getNodeByIndex(t).getLayout().value),r},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type=`series.`+sq,t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystemUsage:`box`,left:`5%`,top:`5%`,right:`20%`,bottom:`5%`,orient:`horizontal`,nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:`global`,center:null,zoom:1,label:{show:!0,position:`right`,fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:`justify`,lineStyle:{color:Z.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:Z.color.primary}},animationEasing:`linear`,animationDuration:1e3},t}(lx),lq=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),uq=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new lq},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),t.orient===`vertical`?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){kf(this)},t.prototype.downplay=function(){Af(this)},t}(id),dq=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=sq,t._mainGroup=new q,t}return t.prototype.init=function(e,t){this._controller=new pR(t.getZr()),this.group.add(this._mainGroup),this._firstRender=!0},t.prototype.render=function(e,t,n){var r=e.getGraph(),i=this._mainGroup,a=e.layoutInfo,o=a.width,s=a.height,c=e.getData(),l=e.getData(`edge`),u=e.get(`orient`);i.removeAll(),i.x=a.x,i.y=a.y,this._updateViewCoordSys(e,n),dB(e,n,this._controller,fB(i),null),r.eachEdge(function(t){var n=new uq,r=Y(n);r.dataIndex=t.dataIndex,r.seriesIndex=e.seriesIndex,r.dataType=`edge`;var a=t.getModel(),c=a.getModel(`lineStyle`),d=c.get(`curveness`),f=t.node1.getLayout(),p=t.node1.getModel(),m=p.get(`localX`),h=p.get(`localY`),g=t.node2.getLayout(),_=t.node2.getModel(),v=_.get(`localX`),y=_.get(`localY`),b=t.getLayout(),x,S,C,w,T,E,D,O;n.shape.extent=Math.max(1,b.dy),n.shape.orient=u,u===`vertical`?(x=(m==null?f.x:m*o)+b.sy,S=(h==null?f.y:h*s)+f.dy,C=(v==null?g.x:v*o)+b.ty,w=y==null?g.y:y*s,T=x,E=S*(1-d)+w*d,D=C,O=S*d+w*(1-d)):(x=(m==null?f.x:m*o)+f.dx,S=(h==null?f.y:h*s)+b.sy,C=v==null?g.x:v*o,w=(y==null?g.y:y*s)+b.ty,T=x*(1-d)+C*d,E=S,D=x*d+C*(1-d),O=w),n.setShape({x1:x,y1:S,x2:C,y2:w,cpx1:T,cpy1:E,cpx2:D,cpy2:O}),n.useStyle(c.getItemStyle()),fq(n.style,u,t);var k=``+a.get(`value`),A=Ih(a,`edgeLabel`);Fh(n,A,{labelFetcher:{getFormattedLabel:function(t,n,r,i,a,o){return e.getFormattedLabel(t,n,`edge`,i,qe(a,A.normal&&A.normal.get(`formatter`),k),o)}},labelDataIndex:t.dataIndex,defaultText:k}),n.setTextConfig({position:`inside`});var j=a.getModel(`emphasis`);Qf(n,a,`lineStyle`,function(e){var n=e.getItemStyle();return fq(n,u,t),n}),i.add(n),l.setItemGraphicEl(t.dataIndex,n);var ee=j.get(`focus`);Jf(n,ee===`adjacency`?t.getAdjacentDataIndices():ee===`trajectory`?t.getTrajectoryDataIndices():ee,j.get(`blurScope`),j.get(`disabled`))}),r.eachNode(function(t){var n=t.getLayout(),r=t.getModel(),a=r.get(`localX`),l=r.get(`localY`),u=r.getModel(`emphasis`),d=r.get([`itemStyle`,`borderRadius`])||0,f=new vd({shape:{x:a==null?n.x:a*o,y:l==null?n.y:l*s,width:n.dx,height:n.dy,r:d},style:r.getModel(`itemStyle`).getItemStyle(),z2:10});Fh(f,Ih(r),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(t,n,`node`)}},labelDataIndex:t.dataIndex,defaultText:t.id}),f.disableLabelAnimation=!0,f.setStyle(`fill`,t.getVisual(`color`)),f.setStyle(`decal`,t.getVisual(`style`).decal),Qf(f,r),i.add(f),c.setItemGraphicEl(t.dataIndex,f),Y(f).dataType=`node`;var p=u.get(`focus`);Jf(f,p===`adjacency`?t.getAdjacentDataIndices():p===`trajectory`?t.getTrajectoryDataIndices():p,u.get(`blurScope`),u.get(`disabled`))}),c.eachItemGraphicEl(function(t,r){c.getItemModel(r).get(`draggable`)&&(t.drift=function(t,i){this.shape.x+=t,this.shape.y+=i,this.dirty(),n.dispatchAction({type:`dragNode`,seriesId:e.id,dataIndex:c.getRawIndex(r),localX:this.shape.x/o,localY:this.shape.y/s})},t.draggable=!0,t.cursor=`move`)}),!this._data&&e.isAnimationEnabled()&&i.setClipPath(pq(i.getBoundingRect(),e,function(){i.removeClipPath()})),this._data=e.getData(),this._firstRender=!1},t.prototype.__updateOnOwnRoam=function(e,t,n){qz(this.group,2,t.coordinateSystem,null)},t.prototype.dispose=function(){this._controller&&this._controller.dispose()},t.prototype._updateViewCoordSys=function(e,t){var n=e.layoutInfo,r=e.coordinateSystem=_B(e,t,n.x,n.y,n.width,n.height);qz(this.group,2,r,this._firstRender?null:e)},t.type=sq,t}(Sx);function fq(e,t,n){switch(e.fill){case`source`:e.fill=n.node1.getVisual(`color`),e.decal=n.node1.getVisual(`style`).decal;break;case`target`:e.fill=n.node2.getVisual(`color`),e.decal=n.node2.getVisual(`style`).decal;break;case`gradient`:var r=n.node1.getVisual(`color`),i=n.node2.getVisual(`color`);B(r)&&B(i)&&(e.fill=new hm(0,0,+(t===`horizontal`),+(t===`vertical`),[{color:r,offset:0},{color:i,offset:1}]))}}function pq(e,t,n){var r=new vd({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Mm(r,{shape:{width:e.width+20}},t,n),r}var mq=Qc(sq,hq);function hq(e,t){e.eachSeriesByType(sq,function(e){var n=e.get(`nodeWidth`),r=e.get(`nodeGap`),i=q_(e,t).refContainer,a=W_(e.getBoxLayoutParams(),i);e.layoutInfo=a;var o=a.width,s=a.height,c=e.getGraph(),l=c.nodes,u=c.edges;_q(l),gq(l,u,n,r,o,s,Me(l,function(e){return e.getLayout().value===0}).length===0?e.get(`layoutIterations`):0,e.get(`orient`),e.get(`nodeAlign`))})}function gq(e,t,n,r,i,a,o,s,c){vq(e,t,n,i,a,s,c),Cq(e,t,a,i,r,o,s),Iq(e,s)}function _q(e){F(e,function(e){var t=Pq(e.outEdges,Nq),n=Pq(e.inEdges,Nq),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)})}function vq(e,t,n,r,i,a,o){for(var s=[],c=[],l=[],u=[],d=0,f=0;f=0;_&&g.depth>p&&(p=g.depth),h.setLayout({depth:_?g.depth:d},!0),a===`vertical`?h.setLayout({dy:n},!0):h.setLayout({dx:n},!0);for(var v=0;vd-1?p:d-1;o&&o!==`left`&&bq(e,o,a,C),Sq(e,a===`vertical`?(i-n)/C:(r-n)/C,a)}function yq(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function bq(e,t,n,r){if(t===`right`){for(var i=[],a=e,o=0;a.length;){for(var s=0;s0;a--)c*=.99,Dq(s,c,o),Eq(s,i,n,r,o),Fq(s,c,o),Eq(s,i,n,r,o)}function wq(e,t){var n=[],r=t===`vertical`?`y`:`x`,i=Mc(e,function(e){return e.getLayout()[r]});return bs(i.keys),F(i.keys,function(e){n.push(i.buckets.get(e))}),n}function Tq(e,t,n,r,i,a){var o=1/0;F(e,function(e){var t=e.length,s=0;F(e,function(e){s+=e.getLayout().value});var c=a===`vertical`?(r-(t-1)*i)/s:(n-(t-1)*i)/s;c0&&(o=s.getLayout()[a]+c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]+s.getLayout()[d]+t;var p=i===`vertical`?r:n;if(c=l-t-p,c>0){o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0),l=o;for(var f=u-2;f>=0;--f)s=e[f],c=s.getLayout()[a]+s.getLayout()[d]+t-l,c>0&&(o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]}})}function Dq(e,t,n){F(e.slice().reverse(),function(e){F(e,function(e){if(e.outEdges.length){var r=Pq(e.outEdges,Oq,n)/Pq(e.outEdges,Nq);if(isNaN(r)){var i=e.outEdges.length;r=i?Pq(e.outEdges,kq,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-Mq(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-Mq(e,n))*t;e.setLayout({y:o},!0)}}})})}function Oq(e,t){return Mq(e.node2,t)*e.getValue()}function kq(e,t){return Mq(e.node2,t)}function Aq(e,t){return Mq(e.node1,t)*e.getValue()}function jq(e,t){return Mq(e.node1,t)}function Mq(e,t){return t===`vertical`?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function Nq(e){return e.getValue()}function Pq(e,t,n){for(var r=0,i=e.length,a=-1;++aa&&(a=t)}),F(n,function(t){var n=new XH({type:`color`,mappingMethod:`linear`,dataExtent:[i,a],visual:e.get(`color`)}).mapValueToVisual(t.getLayout().value),r=t.getModel().get([`itemStyle`,`color`]);r==null?(t.setVisual(`color`,n),t.setVisual(`style`,{fill:n})):(t.setVisual(`color`,r),t.setVisual(`style`,{fill:r}))})}r.length&&F(r,function(e){var t=e.getModel().get(`lineStyle`);e.setVisual(`style`,t)})})}function zq(e){e.registerChartView(dq),e.registerSeriesModel(cq),e.registerLayout(mq),e.registerVisual(Lq),e.registerAction({type:`dragNode`,event:`dragnode`,update:`update`},function(e,t){t.eachComponent({mainType:Rd,subType:sq,query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),mB(e,Rd,sq)}var Bq=function(){function e(){}return e.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},e.prototype.getInitialData=function(e,t){var n,r=t.getComponent(`xAxis`,this.get(`xAxisIndex`)),i=t.getComponent(`yAxis`,this.get(`yAxisIndex`)),a=r.get(`type`),o=i.get(`type`),s,c=e.layout;a===`category`?(c=`horizontal`,n=r.getOrdinalMeta(),s=!this._hasEncodeRule(`x`)):o===`category`&&(c=`vertical`,n=i.getOrdinalMeta(),s=!this._hasEncodeRule(`y`)),c||=o===`time`?`vertical`:`horizontal`,this._layout=c;var l=[`x`,`y`],u=c===`horizontal`?0:1,d=this._baseAxisDim=l[u],f=l[1-u],p=[r,i],m=p[u].get(`type`),h=p[1-u].get(`type`),g=e.data;if(g&&s){var _=[];F(g,function(e,t){var n;R(e)?(n=e.slice(),e.unshift(t)):R(e.value)?(n=N({},e),n.value=n.value.slice(),e.value.unshift(t)):n=e,_.push(n)}),e.data=_}var v=this.defaultValueDimensions,y=[{name:d,type:zT(m),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:[`base`]},{name:f,type:zT(h),dimsDef:v.slice()}];return nI(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:Ie(mv,y,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+`Axis`,this.get(e+`AxisIndex`)).axis},e.prototype.getWhiskerBoxesLayout=function(){return this._layout},e}();function Vq(e,t){for(var n=t.ends.length,r=0,i=0;ih){var b=[_,y];r.push(b)}}}return{boxData:n,outliers:r}}var rJ={type:`echarts:boxplot`,transform:function(e){var t=e.upstream;t.sourceFormat!==`arrayRows`&&Ys(``);var n=nJ(t.getRawData(),e.config);return[{dimensions:[`ItemName`,`Low`,`Q1`,`Q2`,`Q3`,`High`],data:n.boxData},{data:n.outliers}]}};function iJ(e){e.registerSeriesModel(Uq),e.registerChartView(Wq),e.registerLayout(Zq),e.registerTransform(rJ),tJ(e)}var aJ=`candlestick`,oJ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:`open`,defaultTooltip:!0},{name:`close`,defaultTooltip:!0},{name:`lowest`,defaultTooltip:!0},{name:`highest`,defaultTooltip:!0}],n}return t.prototype.getShadowDim=function(){return`open`},t.prototype.brushSelector=function(e,t,n){var r=t.getItemLayout(e);return r&&n.rect(r.brushRect)},t.type=`series.`+aJ,t.dependencies=[`xAxis`,`yAxis`,`grid`],t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:`#eb5454`,color0:`#47b262`,borderColor:`#eb5454`,borderColor0:`#47b262`,borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:`mod`,animationEasing:`linear`,animationDuration:300},t}(lx);ke(oJ,Bq,!0);var sJ=[`itemStyle`,`borderColor`],cJ=[`itemStyle`,`borderColor0`],lJ=[`itemStyle`,`borderColorDoji`],uJ=[`itemStyle`,`color`],dJ=[`itemStyle`,`color0`];function fJ(e,t){return t.get(e>0?uJ:dJ)}function pJ(e,t){return t.get(e===0?lJ:e>0?sJ:cJ)}var mJ={seriesType:aJ,plan:yx(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){for(var n;(n=e.next())!=null;){var r=t.getItemModel(n),i=t.getItemLayout(n).sign,a=r.getItemStyle();a.fill=fJ(i,r),a.stroke=pJ(i,r)||a.fill,N(t.ensureUniqueItemVisual(n,`style`),a)}}}}},hJ=[`color`,`borderColor`],gJ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,t,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,t,n,r){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},t.prototype.eachRendered=function(e){yh(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e){var t=e.getData(),n=this._data,r=this.group,i=t.getLayout(`isSimpleBox`),a=e.get(`clip`,!0),o=e.coordinateSystem,s=o.getArea&&o.getArea(),c=a&&vN(o,!1,e);this._data||r.removeAll();var l=SJ(e);t.diff(n).add(function(n){if(t.hasValue(n)){var o=t.getItemLayout(n),u=a?Vq(s,o):0;if(u===2)return;var d=yJ(o,n,l,!0);Mm(d,{shape:{points:o.ends}},e,n),yN(u===1,d,c),bJ(d,t,n,i),r.add(d),t.setItemGraphicEl(n,d)}}).update(function(o,u){var d=n.getItemGraphicEl(u);if(!t.hasValue(o)){r.remove(d);return}var f=t.getItemLayout(o),p=a?Vq(s,f):0;if(p===2){r.remove(d);return}d?(jm(d,{shape:{points:f.ends}},e,o),Lm(d)):d=yJ(f,o,l),bJ(d,t,o,i),yN(p===1,d,c),r.add(d),t.setItemGraphicEl(o,d)}).remove(function(e){var t=n.getItemGraphicEl(e);t&&r.remove(t)}).execute(),this._data=t},t.prototype._renderLarge=function(e){this._clear(),TJ(e,this.group);var t=e.get(`clip`,!0)?vN(e.coordinateSystem,!1,e):null;yN(!!t,this.group,t)},t.prototype._incrementalRenderNormal=function(e,t){for(var n=t.getData(),r=n.getLayout(`isSimpleBox`),i=SJ(t),a;(a=e.next())!=null;){var o=yJ(n.getItemLayout(a),a,i);bJ(o,n,a,r),o.incremental=Xc(t),this.group.add(o),this._progressiveEls.push(o)}},t.prototype._incrementalRenderLarge=function(e,t){TJ(t,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),yN(!1,this.group,null),this._data=null},t.type=aJ,t}(Sx),_J=function(){function e(){}return e}(),vJ=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`normalCandlestickBox`,n}return t.prototype.getDefaultShape=function(){return new _J},t.prototype.buildPath=function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t}(id);function yJ(e,t,n,r){var i=e.ends;return new vJ({shape:{points:r?xJ(i,n,e):i},z2:100})}function bJ(e,t,n,r){var i=t.getItemModel(n);e.useStyle(t.getItemVisual(n,`style`)),e.style.strokeNoScale=!0;var a=i.getShallow(`cursor`);a&&e.attr(`cursor`,a),e.__simpleBox=r,Qf(e,i);var o=t.getItemLayout(n).sign;F(e.states,function(e,t){var n=i.getModel(t),r=fJ(o,n),a=pJ(o,n)||r,s=e.style||={};r&&(s.fill=r),a&&(s.stroke=a)});var s=i.getModel(`emphasis`);Jf(e,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))}function xJ(e,t,n){return I(e,function(e){return e=e.slice(),e[t]=n.initBaseline,e})}function SJ(e){return+(e.getWhiskerBoxesLayout()===`horizontal`)}var CJ=function(){function e(){}return e}(),wJ=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeCandlestickBox`,n}return t.prototype.getDefaultShape=function(){return new CJ},t.prototype.buildPath=function(e,t){for(var n=t.points,r=0;rh?x[a]:b[a],ends:w,brushRect:O(g,_,p)})}function E(e,n){var r=[];return r[i]=n,r[a]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(r)}function D(e,t,n){var a=t.slice(),o=t.slice();a[i]=eh(a[i]+r/2,1,!1),o[i]=eh(o[i]-r/2,1,!0),n?e.push(a,o):e.push(o,a)}function O(e,t,n){var o=E(e,n),s=E(t,n);return o[i]-=r/2,s[i]-=r/2,{x:o[0],y:o[1],width:a?r:s[0]-o[0],height:a?s[1]-o[1]:r}}function k(e){return e[i]=eh(e[i],1),e}}function m(n,r){for(var o=aN(n.count*4),c=0,p,m=[],h=[],g,_=r.getStore(),v=!!e.get([`itemStyle`,`borderColorDoji`]);(g=n.next())!=null;){var y=_.get(s,g),b=_.get(l,g),x=_.get(u,g),S=_.get(d,g),C=_.get(f,g);if(isNaN(y)||isNaN(S)||isNaN(C)){o[c++]=NaN,c+=3;continue}o[c++]=AJ(_,g,b,x,u,v),m[i]=y,m[a]=S,p=t.dataToPoint(m,null,h),o[c++]=p?p[0]:NaN,o[c++]=p?p[1]:NaN,m[a]=C,p=t.dataToPoint(m,null,h),o[c++]=p?p[1]:NaN}r.setLayout(`largePoints`,o)}}};function AJ(e,t,n,r,i,a){return n>r?-1:n0?e.get(i,t-1)<=r?1:-1:1}function jJ(e,t){var n=Mk(e.getBaseAxis(),{fromStat:{key:QP(aJ)},min:1}).w,r=J(H(e.get(`barMaxWidth`),n),n),i=J(H(e.get(`barMinWidth`),1),n),a=e.get(`barWidth`);return a==null?rs(ns(n/2,r),i):J(a,n)}function MJ(e){OJ(e,function(){var t=QP(aJ);lO(e,{key:t,seriesType:aJ,getMetrics:eF}),wO(t,ZP(t))})}function NJ(e){e.registerChartView(gJ),e.registerSeriesModel(oJ),e.registerPreprocessor(DJ),e.registerVisual(mJ),e.registerLayout(kJ),MJ(e)}function PJ(e,t){var n=t.rippleEffectColor||t.color;e.eachChild(function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType===`stroke`?n:null,fill:t.brushType===`fill`?n:null}})})}var FJ=function(e){D(t,e);function t(t,n){var r=e.call(this)||this,i=new KM(t,n),a=new q;return r.add(i),r.add(a),r.updateData(t,n),r}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,r=e.rippleNumber,i=this.childAt(1),a=0;a0&&(a=this._getLineLength(r)/c*1e3),a!==this._period||o!==this._loop||s!==this._roundTrip){r.stopAnimation();var u=void 0;u=z(l)?l(n):l,r.__t>0&&(u=-a*r.__t),this._animateSymbol(r,a,u,o,s)}this._period=a,this._loop=o,this._roundTrip=s}},t.prototype._animateSymbol=function(e,t,n,r,i){if(t>0){e.__t=0;var a=this,o=e.animate(``,r).when(i?t*2:t,{__t:i?2:1}).delay(n).during(function(){a._updateSymbolPosition(e)});r||o.done(function(){a.remove(e)}),o.start()}},t.prototype._getLineLength=function(e){return kt(e.__p1,e.__cp1)+kt(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},t.prototype.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},t.prototype._updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,r=e.__cp1,i=e.__t<=1?e.__t:2-e.__t,a=[e.x,e.y],o=a.slice(),s=Hr,c=Ur;a[0]=s(t[0],r[0],n[0],i),a[1]=s(t[1],r[1],n[1],i);var l=e.__t<=1?c(t[0],r[0],n[0],i):c(n[0],r[0],t[0],1-i),u=e.__t<=1?c(t[1],r[1],n[1],i):c(n[1],r[1],t[1],1-i);e.rotation=-Math.atan2(u,l)-Math.PI/2,(this._symbolType===`line`||this._symbolType===`rect`||this._symbolType===`roundRect`)&&(e.__lastT!==void 0&&e.__lastT=0&&!(r[o]<=t);o--);o=Math.min(o,i-2)}else{for(o=a;ot);o++);o=Math.min(o-1,i-2)}var s=(t-r[o])/(r[o+1]-r[o]),c=n[o],l=n[o+1];e.x=c[0]*(1-s)+s*l[0],e.y=c[1]*(1-s)+s*l[1];var u=e.__t<=1?l[0]-c[0]:c[0]-l[0],d=e.__t<=1?l[1]-c[1]:c[1]-l[1];e.rotation=-Math.atan2(d,u)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},t}(BJ),UJ=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),WJ=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new UJ},t.prototype.buildPath=function(e,t){var n=t.segs,r=t.curveness,i;if(t.polyline)for(i=this._off;i0){e.moveTo(n[i++],n[i++]);for(var o=1;o0){var d=(s+l)/2-(c-u)*r,f=(c+u)/2-(l-s)*r;e.quadraticCurveTo(d,f,l,u)}else e.lineTo(l,u)}this.incremental&&(this._off=i,this.notClear=!0)},t.prototype.findDataIndex=function(e,t){var n=this.shape,r=n.segs,i=n.curveness,a=this.style.lineWidth;if(n.polyline)for(var o=0,s=0;s0)for(var l=r[s++],u=r[s++],d=1;d0){if(Iu(l,u,(l+f)/2-(u-p)*i,(u+p)/2-(f-l)*i,f,p,a,e,t))return o}else if(Pu(l,u,f,p,a,e,t))return o;o++}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape.segs,n=1/0,r=1/0,i=-1/0,a=-1/0,o=0;o0&&(a.dataIndex=n+e.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),KJ={seriesType:`lines`,plan:yx(),reset:function(e){var t=e.coordinateSystem;if(t){var n=e.get(`polyline`),r=e.pipelineContext.large;return{progress:function(i,a){var o=[];if(r){var s=void 0,c=i.end-i.start;if(n){for(var l=0,u=i.start;u0&&c&&s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)}),i.updateData(r);var l=e.get(`clip`,!0)&&vN(e.coordinateSystem,!1,e);l?this.group.setClipPath(l):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateLineDraw(r,e).incrementalPrepareUpdate(r),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData(),Xc(t)),this._finished=e.end===t.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,t,n){var r=e.getData(),i=this._lineDraw;if(!this._finished||!i||!i.updateLayout)return{update:!0};var a=KJ.reset(e,t,n);a.progress&&a.progress({start:0,end:r.count(),count:r.count()},r),i.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,t){var n=this._lineDraw,r=this._showEffect(t),i=!!t.get(`polyline`),a=t.pipelineContext.large;return(!n||r!==this._hasEffet||i!==this._isPolyline||a!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=a?new GJ:new xW(i?r?HJ:VJ:r?BJ:bW),this._hasEffet=r,this._isPolyline=i,this._isLargeDraw=a),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get([`effect`,`show`])},t.prototype._clearLayer=function(e){var t=jh(e);t&&this._lastZlevel!=null&&t.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.type=`lines`,t}(Sx),JJ=typeof Uint32Array>`u`?Array:Uint32Array,YJ=typeof Float64Array>`u`?Array:Float64Array;function XJ(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=I(t,function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),we([t,e[0],e[1]])}))}var ZJ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath=`lineStyle`,n.visualDrawType=`stroke`,n}return t.prototype.init=function(t){t.data=t.data||[],XJ(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(t){if(XJ(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=at(this._flatCoords,t.flatCoords),this._flatCoordsOffset=at(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var t=this.getData().getItemModel(e);return t.option instanceof Array?t.option:t.getShallow(`coords`)},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[e*2],r=this._flatCoordsOffset[e*2+1],i=0;i `)}return Hb(`nameValue`,{name:o,value:i,noValue:i==null||isNaN(i)})},t.prototype.preventIncremental=function(){return!!this.get([`effect`,`show`])},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?1e4:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?2e4:this.get(`progressiveThreshold`))},t.prototype.getZLevelKey=function(){var e=this.getModel(`effect`),t=e.get(`trailLength`);return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get(`show`)&&t>0?t+``:``},t.type=`series.lines`,t.dependencies=[`grid`,`polar`,`geo`,`calendar`],t.defaultOption={coordinateSystem:`geo`,z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:[`none`,`none`],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:`circle`,symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:`end`},lineStyle:{opacity:.5}},t}(lx);function QJ(e){return e instanceof Array||(e=[e,e]),e}var $J={seriesType:`lines`,reset:function(e){var t=QJ(e.get(`symbol`)),n=QJ(e.get(`symbolSize`)),r=e.getData();r.setVisual(`fromSymbol`,t&&t[0]),r.setVisual(`toSymbol`,t&&t[1]),r.setVisual(`fromSymbolSize`,n&&n[0]),r.setVisual(`toSymbolSize`,n&&n[1]);function i(e,t){var n=e.getItemModel(t),r=QJ(n.getShallow(`symbol`,!0)),i=QJ(n.getShallow(`symbolSize`,!0));r[0]&&e.setItemVisual(t,`fromSymbol`,r[0]),r[1]&&e.setItemVisual(t,`toSymbol`,r[1]),i[0]&&e.setItemVisual(t,`fromSymbolSize`,i[0]),i[1]&&e.setItemVisual(t,`toSymbolSize`,i[1])}return{dataEach:r.hasItemOption?i:null}}};function eY(e){e.registerChartView(qJ),e.registerSeriesModel(ZJ),e.registerLayout(KJ),e.registerVisual($J)}var tY=256,nY=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ae.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,a){var o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(var p=0;p0){var E=a(v)?s:c;v>0&&(v=v*w+C),b[x++]=E[T],b[x++]=E[T+1],b[x++]=E[T+2],b[x++]=E[T+3]*v*256}else x+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||=ae.createCanvas(),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=Z.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],a=0,o=0;o<256;o++)e[t](o/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r},e}();function rY(e,t,n){var r=e[1]-e[0];t=I(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(e){var r;for(r=a;r=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r=t[0]&&e<=t[1]}}var aY=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r;t.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):SN(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(SN(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){yh(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=xN(a,`cartesian2d`),s=xN(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=Mk(f).w+.5,l=Mk(p).w+.5,u=f.scale.getExtent(),d=p.scale.getExtent()}for(var m=this.group,h=e.getData(),g=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),_=e.getModel([`blur`,`itemStyle`]).getItemStyle(),v=e.getModel([`select`,`itemStyle`]).getItemStyle(),y=e.get([`itemStyle`,`borderRadius`]),b=Ih(e),x=e.getModel(`emphasis`),S=x.get(`focus`),C=x.get(`blurScope`),w=x.get(`disabled`),T=o||s?[h.mapDimension(`x`),h.mapDimension(`y`),h.mapDimension(`value`)]:[h.mapDimension(`time`),h.mapDimension(`value`)],E=n;Eu[1]||Ad[1])continue;var j=a.dataToPoint([k,A]);D=new vd({shape:{x:j[0]-c/2,y:j[1]-l/2,width:c,height:l},style:O})}else if(s){var ee=a.dataToLayout([h.get(T[0],E),h.get(T[1],E)]).rect;if(Ge(ee.x))continue;D=new vd({z2:1,shape:ee,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var te=a.dataToLayout([h.get(T[0],E)]),ee=te.contentRect||te.rect;if(Ge(ee.x)||Ge(ee.y))continue;D=new vd({z2:1,shape:ee,style:O})}if(h.hasItemOption){var ne=h.getItemModel(E),re=ne.getModel(`emphasis`);g=re.getModel(`itemStyle`).getItemStyle(),_=ne.getModel([`blur`,`itemStyle`]).getItemStyle(),v=ne.getModel([`select`,`itemStyle`]).getItemStyle(),y=ne.get([`itemStyle`,`borderRadius`]),S=re.get(`focus`),C=re.get(`blurScope`),w=re.get(`disabled`),b=Ih(ne)}D.shape.r=y;var ie=e.getRawValue(E),ae=`-`;ie&&ie[2]!=null&&(ae=ie[2]+``),Fh(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:ae}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,Jf(D,S,C,w),D.incremental=Xc(e,i),i&&(D.states.emphasis.hoverLayer=2),m.add(D),h.setItemGraphicEl(E,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new nY;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);var c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);var u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?iY(v,n.option.range):rY(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var b=new ud({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(Sx),oY=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return wE(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=O_.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`},t.type=`series.heatmap`,t.dependencies=[`grid`,`geo`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:Z.color.primary}}},t}(lx);function sY(e){e.registerChartView(aY),e.registerSeriesModel(oY)}var cY=[`itemStyle`,`borderWidth`],lY=[{xy:`x`,wh:`width`,index:0,posDesc:[`left`,`right`]},{xy:`y`,wh:`height`,index:1,posDesc:[`top`,`bottom`]}],uY=new Ap,dY=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=tF,t}return t.prototype.render=function(e,t,n){var r=this.group,i=e.getData(),a=this._data,o=e.coordinateSystem,s=o.getBaseAxis().isHorizontal(),c=o.master.getRect(),l={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:o,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:s,valueDim:lY[+s],categoryDim:lY[1-s]};i.diff(a).add(function(e){if(i.hasValue(e)){var t=fY(i,e,CY(i,e),l),n=EY(i,l,t);i.setItemGraphicEl(e,n),r.add(n),MY(n,l,t)}}).update(function(e,t){var n=a.getItemGraphicEl(t);if(!i.hasValue(e)){r.remove(n);return}var o=fY(i,e,CY(i,e),l),s=kY(i,o);n&&s!==n.__pictorialShapeStr&&(r.remove(n),i.setItemGraphicEl(e,null),n=null),n?DY(n,l,o):n=EY(i,l,o,!0),i.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=o,r.add(n),MY(n,l,o)}).remove(function(e){var t=a.getItemGraphicEl(e);t&&OY(a,e,t.__pictorialSymbolMeta.animationModel,t)}).execute();var u=e.get(`clip`,!0)?vN(e.coordinateSystem,!1,e):null;return u?r.setClipPath(u):r.removeClipPath(),this._data=i,this.group},t.prototype.remove=function(e,t){var n=this.group,r=this._data;e.get(`animation`)?r&&r.eachItemGraphicEl(function(t){OY(r,Y(t).dataIndex,e,t)}):n.removeAll()},t.type=tF,t}(Sx);function fY(e,t,n,r){var i=e.getItemLayout(t),a=n.get(`symbolRepeat`),o=n.get(`symbolClip`),s=n.get(`symbolPosition`)||`start`,c=(n.get(`symbolRotate`)||0)*Math.PI/180||0,l=n.get(`symbolPatternSize`)||2,u=n.isAnimationEnabled(),d={dataIndex:t,layout:i,itemModel:n,symbolType:e.getItemVisual(t,`symbol`)||`circle`,style:e.getItemVisual(t,`style`),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:n.get(`symbolRepeatDirection`),symbolPatternSize:l,rotation:c,animationModel:u?n:null,hoverScale:u&&n.get([`emphasis`,`scale`]),z2:n.getShallow(`z`,!0)||0};pY(n,a,i,r,d),hY(e,t,i,a,o,d.boundingLength,d.pxSign,l,r,d),gY(n,d.symbolScale,c,r,d);var f=d.symbolSize;return _Y(n,f,i,a,o,KS(n.get(`symbolOffset`),f),s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,r,d),d}function pY(e,t,n,r,i){var a=r.valueDim,o=e.get(`symbolBoundingData`),s=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),c=s.toGlobalCoord(s.dataToCoord(0)),l=1-(n[a.wh]<=0),u;if(R(o)){var d=[mY(s,o[0])-c,mY(s,o[1])-c];d[1]=0?1:-1:u>0?1:-1}function mY(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function hY(e,t,n,r,i,a,o,s,c,l){var u=c.valueDim,d=c.categoryDim,f=Math.abs(n[d.wh]),p=e.getItemVisual(t,`symbolSize`),m=R(p)?p.slice():p==null?[`100%`,`100%`]:[p,p];m[d.index]=J(m[d.index],f),m[u.index]=J(m[u.index],r?f:Math.abs(a)),l.symbolSize=m;var h=l.symbolScale=[m[0]/s,m[1]/s];h[u.index]*=(c.isHorizontal?-1:1)*o}function gY(e,t,n,r,i){var a=e.get(cY)||0;a&&(uY.attr({scaleX:t[0],scaleY:t[1],rotation:n}),uY.updateTransform(),a/=uY.getLineScale(),a*=t[r.valueDim.index]),i.valueLineWidth=a||0}function _Y(e,t,n,r,i,a,o,s,c,l,u,d){var f=u.categoryDim,p=u.valueDim,m=d.pxSign,h=Math.max(t[p.index]+s,0),g=h;if(r){var _=Math.abs(c),v=Ke(e.get(`symbolMargin`),`15%`)+``,y=!1;v.lastIndexOf(`!`)===v.length-1&&(y=!0,v=v.slice(0,v.length-1));var b=J(v,t[p.index]),x=Math.max(h+b*2,0),S=y?0:b*2,C=zs(r),w=C?r:NY((_+S)/x);b=(_-w*h)/2/(y?w:Math.max(w-1,1)),x=h+b*2,S=y?0:b*2,!C&&r!==`fixed`&&(w=l?NY((Math.abs(l)+S)/x):0),g=w*x-S,d.repeatTimes=w,d.symbolMargin=b}var T=g/2*m,E=d.pathPosition=[];E[f.index]=n[f.wh]/2,E[p.index]=o===`start`?T:o===`end`?c-T:c/2,a&&(E[0]+=a[0],E[1]+=a[1]);var D=d.bundlePosition=[];D[f.index]=n[f.xy],D[p.index]=n[p.xy];var O=d.barRectShape=N({},n);O[p.wh]=m*Math.max(Math.abs(n[p.wh]),Math.abs(E[p.index]+T)),O[f.wh]=n[f.wh];var k=d.clipShape={};k[f.xy]=-n[f.xy],k[f.wh]=u.ecSize[f.wh],k[p.xy]=0,k[p.wh]=n[p.wh]}function vY(e){var t=e.symbolPatternSize,n=WS(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),n.type!==`image`&&n.setStyle({strokeNoScale:!0}),n}function yY(e,t,n,r){var i=e.__pictorialBundle,a=n.symbolSize,o=n.valueLineWidth,s=n.pathPosition,c=t.valueDim,l=n.repeatTimes||0,u=0,d=a[t.valueDim.index]+o+n.symbolMargin*2;for(AY(e,function(e){e.__pictorialAnimationIndex=u,e.__pictorialRepeatTimes=l,u0:r<0)&&(i=l-1-e),t[c.index]=d*(i-l/2+.5)+s[c.index],{x:t[0],y:t[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function bY(e,t,n,r){var i=e.__pictorialBundle,a=e.__pictorialMainPath;a?jY(a,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,r):(a=e.__pictorialMainPath=vY(n),i.add(a),jY(a,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,r))}function xY(e,t,n){var r=N({},t.barRectShape),i=e.__pictorialBarRect;i?jY(i,null,{shape:r},t,n):(i=e.__pictorialBarRect=new vd({z2:2,shape:r,silent:!0,style:{stroke:`transparent`,fill:`transparent`,lineWidth:0}}),i.disableMorphing=!0,e.add(i))}function SY(e,t,n,r){if(n.symbolClip){var i=e.__pictorialClipPath,a=N({},n.clipShape),o=t.valueDim,s=n.animationModel,c=n.dataIndex;if(i)jm(i,{shape:a},s,c);else{a[o.wh]=0,i=new vd({shape:a}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var l={};l[o.wh]=n.clipShape[o.wh],zm[r?`updateProps`:`initProps`](i,{shape:l},s,c)}}}function CY(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=wY,n.isAnimationEnabled=TY,n}function wY(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function TY(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow(`animation`)}function EY(e,t,n,r){var i=new q,a=new q;return i.add(a),i.__pictorialBundle=a,a.x=n.bundlePosition[0],a.y=n.bundlePosition[1],n.symbolRepeat?yY(i,t,n):bY(i,t,n),xY(i,n,r),SY(i,t,n,r),i.__pictorialShapeStr=kY(e,n),i.__pictorialSymbolMeta=n,i}function DY(e,t,n){var r=n.animationModel,i=n.dataIndex,a=e.__pictorialBundle;jm(a,{x:n.bundlePosition[0],y:n.bundlePosition[1]},r,i),n.symbolRepeat?yY(e,t,n,!0):bY(e,t,n,!0),xY(e,n,!0),SY(e,t,n,!0)}function OY(e,t,n,r){var i=r.__pictorialBarRect;i&&i.removeTextContent();var a=[];AY(r,function(e){a.push(e)}),r.__pictorialMainPath&&a.push(r.__pictorialMainPath),r.__pictorialClipPath&&(n=null),F(a,function(e){Pm(e,{scaleX:0,scaleY:0},n,t,function(){r.parent&&r.parent.remove(r)})}),e.setItemGraphicEl(t,null)}function kY(e,t){return[e.getItemVisual(t.dataIndex,`symbol`)||`none`,!!t.symbolRepeat,!!t.symbolClip].join(`:`)}function AY(e,t,n){F(e.__pictorialBundle.children(),function(r){r!==e.__pictorialBarRect&&t.call(n,r)})}function jY(e,t,n,r,i,a){t&&e.attr(t),r.symbolClip&&!i?n&&e.attr(n):n&&zm[i?`updateProps`:`initProps`](e,n,r.animationModel,r.dataIndex,a)}function MY(e,t,n){var r=n.dataIndex,i=n.itemModel,a=i.getModel(`emphasis`),o=a.getModel(`itemStyle`).getItemStyle(),s=i.getModel([`blur`,`itemStyle`]).getItemStyle(),c=i.getModel([`select`,`itemStyle`]).getItemStyle(),l=i.getShallow(`cursor`),u=a.get(`focus`),d=a.get(`blurScope`),f=a.get(`scale`);AY(e,function(e){if(e instanceof ud){var t=e.style;e.useStyle(N({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else e.useStyle(n.style);var r=e.ensureState(`emphasis`);r.style=o,f&&(r.scaleX=e.scaleX*1.1,r.scaleY=e.scaleY*1.1),e.ensureState(`blur`).style=s,e.ensureState(`select`).style=c,l&&(e.cursor=l),e.z2=n.z2});var p=t.valueDim.posDesc[+(n.boundingLength>0)],m=e.__pictorialBarRect;m.ignoreClip=!0,Fh(m,Ih(i),{labelFetcher:t.seriesModel,labelDataIndex:r,defaultText:WM(t.seriesModel.getData(),r),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),Jf(e,u,d,a.get(`disabled`))}function NY(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var PY=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.defaultSymbol=`roundRect`,n}return t.prototype.getInitialData=function(t){return t.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type=`series.`+tF,t.dependencies=[`grid`],t.defaultOption=dg(bF.defaultOption,{symbol:`circle`,symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:`end`,symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:`-100%`,clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:Z.color.primary}}}),t}(bF);function FY(e){e.registerChartView(dY),e.registerSeriesModel(PY),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,hF(tF)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,gF(tF)),yF(e)}var IY=2,LY=`themeRiver`,RY=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new rI(L(this.getData,this),L(this.getRawData,this))},t.prototype.fixData=function(e){var t=e.length,n={},r=Mc(e,function(e){return n.hasOwnProperty(e[0]+``)||(n[e[0]+``]=-1),e[2]}),i=[];r.buckets.each(function(e,t){i.push({name:t,dataList:e})});for(var a=i.length,o=0;oa&&(a=s),r.push(s)}for(var l=0;la&&(a=d)}return{y0:i,max:a}}function GY(e){e.registerChartView(zY),e.registerSeriesModel(RY),e.registerLayout(VY),e.registerProcessor(tI(LY))}var KY=2,qY=4,JY=function(e){D(t,e);function t(t,n,r,i){var a=e.call(this)||this;a.z2=KY,a.textConfig={inside:!0},Y(a).seriesIndex=n.seriesIndex;var o=new Cd({z2:qY,silent:t.getModel().get([`label`,`silent`])});return a.setTextContent(o),a.updateData(!0,t,n,r,i),a}return t.prototype.updateData=function(e,t,n,r,i){this.node=t,t.piece=this,n||=this._seriesModel,r||=this._ecModel;var a=this;Y(a).dataIndex=t.dataIndex;var o=t.getModel(),s=o.getModel(`emphasis`),c=t.getLayout(),l=N({},c);l.label=null;var u=t.getVisual(`style`);u.lineJoin=`bevel`;var d=t.getVisual(`decal`);d&&(u.decal=NC(d,i)),N(l,OF(o.getModel(`itemStyle`),l,!0)),F(tf,function(e){var t=a.ensureState(e),n=o.getModel([e,`itemStyle`]);t.style=n.getItemStyle();var r=OF(n,l);r&&(t.shape=r)}),e?(a.setShape(l),a.shape.r=c.r0,Mm(a,{shape:{r:c.r}},n,t.dataIndex)):(jm(a,{shape:l},n),Lm(a)),a.useStyle(u),this._updateLabel(n);var f=o.getShallow(`cursor`);f&&a.attr(`cursor`,f),this._seriesModel=n||this._seriesModel,this._ecModel=r||this._ecModel;var p=s.get(`focus`),m=p===`relative`?at(t.getAncestorsIndices(),t.getDescendantIndices()):p===`ancestor`?t.getAncestorsIndices():p===`descendant`?t.getDescendantIndices():p;Jf(this,m,s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e){var t=this,n=this.node.getModel(),r=n.getModel(`label`),i=this.node.getLayout(),a=i.endAngle-i.startAngle,o=(i.startAngle+i.endAngle)/2,s=Math.cos(o),c=Math.sin(o),l=this,u=l.getTextContent(),d=this.node.dataIndex,f=r.get(`minAngle`)/180*Math.PI;u.ignore=!(r.get(`show`)&&!(f!=null&&Math.abs(a)T&&!As(D-T)&&D0?(i.virtualPiece?i.virtualPiece.updateData(!1,r,e,t,n):(i.virtualPiece=new JY(r,e,t,n),c.add(i.virtualPiece)),a.piece.off(`click`),i.virtualPiece.on(`click`,function(e){i._rootToNode(a.parentNode)})):i.virtualPiece&&=(c.remove(i.virtualPiece),null)}},t.prototype._initEvents=function(){var e=this;this.group.off(`click`),this.group.on(`click`,function(t){var n=!1;e.seriesModel.getViewRoot().eachNode(function(r){if(!n&&r.piece&&r.piece===t.target){var i=r.getModel().get(`nodeClick`);if(i===`rootToNode`)e._rootToNode(r);else if(i===`link`){var a=r.getModel(),o=a.get(`link`);o&&T_(o,a.get(`target`,!0)||`_blank`)}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:QY,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}},t.type=YY,t}(Sx),rX=Qc(YY,iX);function iX(e){var t={};function n(e,n,r){if(e.depth===0)return Z.color.neutral50;for(var i=e;i&&i.depth>1;)i=i.parentNode;var a=n.getColorFromPalette(i.name||i.dataIndex+``,t);return e.depth>1&&B(a)&&(a=vi(a,(e.depth-1)/(r-1)*.5)),a}e.eachSeriesByType(YY,function(e){var t=e.getData(),r=t.tree;r.eachNode(function(i){var a=i.getModel().getModel(`itemStyle`).getItemStyle();a.fill||=n(i,e,r.root.height),N(t.ensureUniqueItemVisual(i.dataIndex,`style`),a)})})}var aX=Math.PI/180,oX=Qc(YY,sX);function sX(e,t){e.eachSeriesByType(YY,function(e){var n=e.get(`center`),r=e.get(`radius`);R(r)||(r=[0,r]),R(n)||(n=[n,n]);var i=t.getWidth(),a=t.getHeight(),o=Math.min(i,a),s=J(n[0],i),c=J(n[1],a),l=J(r[0],o/2),u=J(r[1],o/2),d=-e.get(`startAngle`)*aX,f=e.get(`minAngle`)*aX,p=e.getData().tree.root,m=e.getViewRoot(),h=m.depth,g=e.get(`sort`);g!=null&&cX(m,g);var _=0;F(m.children,function(e){!isNaN(e.getValue())&&_++});var v=m.getValue(),y=Math.PI/(v||_)*2,b=m.depth>0,x=m.height-(b?-1:1),S=(u-l)/(x||1),C=e.get(`clockwise`),w=e.get(`stillShowZeroSum`),T=C?1:-1,E=function(t,n){if(t){var r=n;if(t!==p){var i=t.getValue(),a=v===0&&w?y:i*y;ar[1]&&r.reverse(),{coordSys:{type:`polar`,cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=t.dataToRadius(r[0]),a=n.dataToAngle(r[1]),o=e.coordToPoint([i,a]);return o.push(i,a*Math.PI/180),o},size:L(xX,e)}}}function CX(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:`calendar`,x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}function wX(e){var t=e.getRect();return{coordSys:{type:`matrix`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}var TX={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},EX=Pe(TX);je(io,function(e,t){return e[t]=1,e},{}),io.join(`, `);var DX=[``,`style`,`shape`,`extra`],OX=xc();function kX(e,t,n,r,i){var a=e+`Animation`,o=km(e,r,i)||{},s=OX(t).userDuring;return o.duration>0&&(o.during=s?L(zX,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),N(o,n[a]),o}function AX(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=OX(e),l=t.style;c.userDuring=t.during;var u={},d={};if(UX(e,t,d),e.type===`compound`)for(var f=e.shape.paths,p=t.shape.paths,m=0;m0&&e.animateFrom(g,_)}else FX(e,t,i||0,n,u);jX(e,t),l?e.dirty():e.markRedraw()}function jX(e,t){for(var n=OX(e).leaveToProps,r=0;r0&&e.animateFrom(i,a)}}function IX(e,t){W(t,`silent`)&&(e.silent=t.silent),W(t,`ignore`)&&(e.ignore=t.ignore),e instanceof Xl&&W(t,`invisible`)&&(e.invisible=t.invisible),e instanceof id&&W(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}var LX={},RX={setTransform:function(e,t){return LX.el[e]=t,this},getTransform:function(e){return LX.el[e]},setShape:function(e,t){var n=LX.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=LX.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=LX.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=LX.el.style;if(t)return t[e]},setExtra:function(e,t){var n=LX.el.extra||(LX.el.extra={});return n[e]=t,this},getExtra:function(e){var t=LX.el.extra;if(t)return t[e]}};function zX(){var e=this,t=e.el;if(t){var n=OX(t).userDuring,r=e.userDuring;if(n!==r){e.el=e.userDuring=null;return}LX.el=t,r(RX)}}function BX(e,t,n,r){var i=n[e];if(i){var a=t[e],o;if(a){var s=n.transition,c=i.transition;if(c)if(!o&&(o=r[e]={}),NX(c))N(o,a);else for(var l=$s(c),u=0;u=0){!o&&(o=r[e]={});for(var p=Pe(a),u=0;u=0)){var f=e.getAnimationStyleProps(),p=f?f.style:null;if(p){!a&&(a=r.style={});for(var m=Pe(n),l=0;l=0?t.getStore().get(i,n):void 0}var a=t.get(r.name,n),o=r&&r.ordinalMeta;return o?o.categories[a]:a}function C(n,r){r??=u;var i=t.getItemVisual(r,`style`),a=i&&i.fill,o=i&&i.opacity,s=y(r,ZX).getItemStyle();a!=null&&(s.fill=a),o!=null&&(s.opacity=o);var c={inheritColor:B(a)?a:Z.color.neutral99},l=b(r,ZX),d=Lh(l,null,c,!1,!0);d.text=l.getShallow(`show`)?H(e.getFormattedLabel(r,ZX),WM(t,r)):null;var f=Rh(l,c,!1);return E(n,s),s=EN(s,d,f),n&&T(s,n),s.legacy=!0,s}function w(n,r){r??=u;var i=y(r,XX).getItemStyle(),a=b(r,XX),o=Lh(a,null,null,!0,!0);o.text=a.getShallow(`show`)?qe(e.getFormattedLabel(r,XX),e.getFormattedLabel(r,ZX),WM(t,r)):null;var s=Rh(a,null,!0);return E(n,i),i=EN(i,o,s),n&&T(i,n),i.legacy=!0,i}function T(e,t){for(var n in t)W(t,n)&&(e[n]=t[n])}function E(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}function D(e,n){if(n??=u,W(dX,e)){var r=t.getItemVisual(n,`style`);return r?r[dX[e]]:null}if(W(fX,e))return t.getItemVisual(n,e)}function O(e){if(o.type===`cartesian2d`)return dF(P({axis:o.getBaseAxis()},e))}function k(){return n.getCurrentSeriesIndices()}function A(e){return Gh(e,n)}}function _Z(e){var t={};return F(e.dimensions,function(n){var r=e.getDimensionInfo(n);if(!r.isExtraCoord){var i=r.coordDim,a=t[i]=t[i]||[];a[r.coordDimIndex]=e.getDimensionIndex(n)}}),t}function vZ(e,t,n,r,i,a,o){if(!r){a.remove(t);return}var s=yZ(e,t,n,r,i,a);return s&&o.setItemGraphicEl(n,s),s&&Jf(s,r.focus,r.blurScope,r.emphasisDisabled),s}function yZ(e,t,n,r,i,a){var o=-1,s=t;t&&bZ(t,r,i)&&(o=De(a.childrenRef(),t),t=null);var c=!t,l=t;l?l.clearStates():(l=dZ(r),s&&lZ(s,l)),r.morph===!1?l.disableMorphing=!0:l.disableMorphing&&=!1,r.tooltipDisabled&&(l.tooltipDisabled=!0),aZ.normal.cfg=aZ.normal.conOpt=aZ.emphasis.cfg=aZ.emphasis.conOpt=aZ.blur.cfg=aZ.blur.conOpt=aZ.select.cfg=aZ.select.conOpt=null,aZ.isLegacy=!1,SZ(l,n,r,i,c,aZ),xZ(l,n,r,i,c),fZ(e,l,n,r,aZ,i,c),W(r,`info`)&&(pX(l).info=r.info);for(var u=0;u=0?a.replaceAt(l,o):a.add(l),l}function bZ(e,t,n){var r=pX(e),i=t.type,a=t.shape,o=t.style;return n.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i===`path`&&NZ(a)&&MZ(a)!==r.customPathData||i===`image`&&W(o,`image`)&&o.image!==r.customImagePath}function xZ(e,t,n,r,i){var a=n.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&bZ(o,a,r)&&(o=null),o||(o=dZ(a),e.setClipPath(o)),fZ(null,o,t,a,null,r,i)}}function SZ(e,t,n,r,i,a){if(!(e.isGroup||e.type===`compoundPath`)){CZ(n,null,a),CZ(n,XX,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,c=a.blur.conOpt,l=a.select.conOpt;if(o!=null||s!=null||l!=null||c!=null){var u=e.getTextContent();if(o===!1)u&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:`text`},u?u.clearStates():(u=dZ(o),e.setTextContent(u)),fZ(null,u,t,o,null,r,i);for(var d=o&&o.style,f=0;f=u;p--)DZ(t,t.childAt(p),i)}}function DZ(e,t,n){t&&MX(t,pX(e).option,n)}function OZ(e){new FT(e.oldChildren,e.newChildren,kZ,kZ,e).add(AZ).update(AZ).remove(jZ).execute()}function kZ(e,t){return(e&&e.name)??iZ+t}function AZ(e,t){var n=this.context,r=e==null?null:n.newChildren[e],i=t==null?null:n.oldChildren[t];yZ(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function jZ(e){var t=this.context,n=t.oldChildren[e];n&&MX(n,pX(n).option,t.seriesModel)}function MZ(e){return e&&(e.pathData||e.d)}function NZ(e){return e&&(W(e,`pathData`)||W(e,`d`))}function PZ(e){e.registerChartView(uZ),e.registerSeriesModel(mX)}var FZ=xc(),IZ=M,LZ=L,RZ=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!r&&this._lastValue===i&&this._lastStatus===a)){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new q,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=Ie(zZ,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}UZ(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&Mk(r).w>o)return!0;if(a){var s=pL(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=FZ(e).pointerEl=new zm[i.type](IZ(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=FZ(e).labelEl=new Cd(IZ(t.label));e.add(i),VZ(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=FZ(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=FZ(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),VZ(i,r))},e.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=lh(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){dn(e.event)},onmousedown:LZ(this._onHandleDragMove,this,0,0),drift:LZ(this._onHandleDragMove,this),ondragend:LZ(this._onHandleDragEnd,this)}),n.add(r)),UZ(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);R(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Nx(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){zZ(this._axisPointerModel,!t&&this._moveAnimation,this._handle,HZ(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(HZ(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(HZ(r)),FZ(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Px(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function zZ(e,t,n,r){BZ(FZ(n).lastProp,r)||(FZ(n).lastProp=r,t?jm(n,r,e):(n.stopAnimation(),n.attr(r)))}function BZ(e,t){if(V(e)&&V(t)){var n=!0;return F(t,function(t,r){n&&=BZ(e[r],t)}),!!n}else return e===t}function VZ(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function HZ(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function UZ(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function WZ(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function GZ(e,t,n,r,i){var a=qZ(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=h_(o.get(`padding`)||0),c=o.getFont(),l=ho(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),KZ(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Lh(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function KZ(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function qZ(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:MD(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};F(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),B(o)?a=o.replace(`{value}`,a):z(o)&&(a=o(s))}return a}function JZ(e,t,n){var r=vn();return Cn(r,r,n.rotation),Sn(r,r,n.position),nh([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function YZ(e,t,n,r,i,a){var o=xP.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),GZ(t,r,i,a,{position:JZ(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function XZ(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function ZZ(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function QZ(e,t,n,r,i,a){return{cx:e,cy:t,r0:n,r,startAngle:i,endAngle:a,clockwise:!0}}function $Z(e,t,n){return Mk(e,{fromStat:{sers:I(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function eQ(e,t,n){return[rs(ns(t[0],t[1]),e-n/2),ns(e+n/2,rs(t[0],t[1]))]}var tQ=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=nQ(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=WZ(r),f=rQ[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}YZ(t,e,HP(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=HP(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=JZ(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=nQ(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=ns(o[1],l[c]),l[c]=rs(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(RZ);function nQ(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var rQ={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:XZ([t,r[0]],[t,r[1]],iQ(e))}},shadow:function(e,t,n,r,i,a){var o=$Z(e,i,a),s=r[1]-r[0],c=eQ(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:ZZ([l,r[0]],[u-l,s],iQ(e))}}};function iQ(e){return e.dim===`x`?0:1}var aQ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Z.color.border,width:1,type:`dashed`},shadowStyle:{color:Z.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Z.color.neutral00,padding:[5,7,5,7],backgroundColor:Z.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:Z.color.accent40,throttle:40}},t}(tv),oQ=xc(),sQ=F;function cQ(e,t,n){if(!k.node){var r=t.getZr();oQ(r).records||(oQ(r).records={}),lQ(r,t);var i=oQ(r).records[e]||(oQ(r).records[e]={});i.handler=n}}function lQ(e,t){if(oQ(e).initialized)return;oQ(e).initialized=!0,n(`click`,Ie(fQ,`click`)),n(`mousemove`,Ie(fQ,`mousemove`)),n(`mousewheel`,Ie(fQ,`mousewheel`)),n(`globalout`,dQ);function n(n,r){e.on(n,function(n){var i=pQ(t);sQ(oQ(e).records,function(e){e&&r(e,n,i.dispatchAction)}),uQ(i.pendings,t)})}}function uQ(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function dQ(e,t,n){e.handler(`leave`,null,n)}function fQ(e,t,n,r){t.handler(e,n,r)}function pQ(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function mQ(e,t){if(!k.node){var n=t.getZr();(oQ(n).records||{})[e]&&(oQ(n).records[e]=null)}}var hQ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;cQ(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){mQ(`axisPointer`,t)},t.prototype.dispose=function(e,t){mQ(`axisPointer`,t)},t.type=`axisPointer`,t}(vx);function gQ(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=bc(a,e);if(o==null||o<0||R(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint)if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(I(c.dimensions,function(e){return a.mapDimension(e)}),o))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var _Q=xc();function vQ(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||L(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){OQ(i)&&(i=gQ({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=OQ(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||OQ(i),f={},p={},m={list:[],map:{}},h={showPointer:Ie(xQ,p),showTooltip:Ie(SQ,m)};F(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);F(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=EQ(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&yQ(e,o,h,!1,f)}})});var g={};return F(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&F(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,DQ(t),DQ(e)))),g[e.key]=a}})}),F(g,function(e,t){yQ(u[t],e,h,!0,f)}),CQ(p,u,f),wQ(m,i,e,o),TQ(u,o,n),f}}function yQ(e,t,n,r,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){n.showPointer(e,t);return}var o=bQ(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&N(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function bQ(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return F(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Us(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),F(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function xQ(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function SQ(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var c=t.coordSys.model,l=gL(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function CQ(e,t,n){var r=n.axesInfo=[];F(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function wQ(e,t,n,r){if(OQ(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function TQ(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=_Q(r)[i]||{},o=_Q(r)[i]={};F(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&F(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}F(a,function(e,t){!o[t]&&c.push(l(e))}),F(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function EQ(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function DQ(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function OQ(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function kQ(e){vL.registerAxisPointerClass(`CartesianAxisPointer`,tQ),e.registerComponentModel(aQ),e.registerComponentView(hQ),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!R(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=oL(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},vQ)}function AQ(e){MT(kL),MT(kQ)}var jQ=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis;a.dim===`angle`&&(this.animationThreshold=Math.PI/18);var o=a.polar,s=a.getExtent(),c=o.getOtherAxis(a).getExtent(),l=a.dataToCoord(t),u=r.get(`type`);if(u&&u!==`none`){var d=WZ(r),f=NQ[u](a,o,l,s,c,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}GZ(e,n,r,i,MQ(t,n,r,o,r.get([`label`,`margin`])))},t}(RZ);function MQ(e,t,n,r,i){var a=t.axis,o=a.dataToCoord(e),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var c=r.getRadiusAxis().getExtent(),l,u,d;if(a.dim===`radius`){var f=vn();Cn(f,f,s),Sn(f,f,[r.cx,r.cy]),l=nh([o,-i],f);var p=t.getModel(`axisLabel`).get(`rotate`)||0,m=xP.innerTextLayout(s,p*Math.PI/180,-1);u=m.textAlign,d=m.textVerticalAlign}else{var h=c[1];l=r.coordToPoint([h+i,o]);var g=r.cx,_=r.cy;u=Math.abs(l[0]-g)/h<.3?`center`:l[0]>g?`left`:`right`,d=Math.abs(l[1]-_)/h<.3?`middle`:l[1]>_?`top`:`bottom`}return{position:l,align:u,verticalAlign:d}}var NQ={line:function(e,t,n,r,i){return e.dim===`angle`?{type:`Line`,shape:XZ(t.coordToPoint([i[0],n]),t.coordToPoint([i[1],n]))}:{type:`Circle`,shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,r,i,a,o){var s=Math.PI/180,c=$Z(e,a,o),l;if(e.dim===`angle`)l=QZ(t.cx,t.cy,i[0],i[1],(-n-c/2)*s,(-n+c/2)*s);else{var u=eQ(n,r,c),d=u[0],f=u[1];l=QZ(t.cx,t.cy,d,f,0,Math.PI*2)}return{type:`Sector`,shape:l}}},PQ=`polar`,FQ=PQ,IQ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.findAxisModel=function(e){var t;return this.ecModel.eachComponent(e,function(e){e.getCoordSysModel()===this&&(t=e)},this),t},t.type=PQ,t.dependencies=[`radiusAxis`,`angleAxis`],t.defaultOption={z:0,center:[`50%`,`50%`],radius:`80%`},t}(tv),LQ=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`polar`,Tc).models[0]},t.type=`polarAxis`,t}(tv);ke(LQ,UD);var RQ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`angleAxis`,t}(LQ),zQ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`radiusAxis`,t}(LQ),BQ=function(e){D(t,e);function t(t,n){return e.call(this,`radius`,t,n)||this}return t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)[this.dim===`radius`?0:1]},t}(Ik);BQ.prototype.dataToRadius=Ik.prototype.dataToCoord,BQ.prototype.radiusToData=Ik.prototype.coordToData;var VQ=xc(),HQ=function(e){D(t,e);function t(t,n){return e.call(this,`angle`,t,n||[0,360])||this}return t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)[this.dim===`radius`?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,t=e.getLabelModel(),n=e.scale,r=n.getExtent(),i=n.count();if(r[1]-r[0]<1)return 0;var a=r[0],o=e.dataToCoord(a+1)-e.dataToCoord(a),s=Math.abs(o),c=ho(a==null?``:a+``,t.getFont(),`center`,`top`),l=Math.max(c.height,7)/s;isNaN(l)&&(l=1/0);var u=Math.max(0,Math.floor(l)),d=VQ(e.model),f=d.lastAutoInterval,p=d.lastTickCount;return f!=null&&p!=null&&Math.abs(f-u)<=1&&Math.abs(p-i)<=1&&f>u?u=f:(d.lastTickCount=i,d.lastAutoInterval=u),u},t}(Ik);HQ.prototype.dataToAngle=Ik.prototype.dataToCoord,HQ.prototype.angleToData=Ik.prototype.coordToData;var UQ=[`radius`,`angle`],WQ=function(){function e(e){this.dimensions=UQ,this.type=PQ,this.cx=0,this.cy=0,this._radiusAxis=new BQ,this._angleAxis=new HQ,this.axisPointerEnabled=!0,this.name=e||``,this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){var t=`_`+e+`Axis`;return this[t]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,r=this._radiusAxis;return n.scale.type===e&&t.push(n),r.scale.type===e&&t.push(r),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=e!=null&&e!==`auto`?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],n)},e.prototype.pointToData=function(e,t,n){n||=[];var r=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(r[0],t),n[1]=this._angleAxis.angleToData(r[1],t),n},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,r=this.getAngleAxis(),i=r.getExtent(),a=Math.min(i[0],i[1]),o=Math.max(i[0],i[1]);r.inverse?a=o-360:o=a+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var c=Math.atan2(-n,t)/Math.PI*180,l=co;)c+=l*360;return[s,c]},e.prototype.coordToPoint=function(e,t){t||=[];var n=e[0],r=e[1]/180*Math.PI;return t[0]=Math.cos(r)*n+this.cx,t[1]=-Math.sin(r)*n+this.cy,t},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),r=Math.PI/180,i=1e-4;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*r,endAngle:-n[1]*r,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,r=t-this.cy,a=n*n+r*r,o=this.r,s=this.r0;return o!==s&&a-i<=o*o&&a+i>=s*s},x:this.cx-t[1],y:this.cy-t[1],width:t[1]*2,height:t[1]*2}},e.prototype.convertToPixel=function(e,t,n){return GQ(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return GQ(t)===this?this.pointToData(n):null},e}();function GQ(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function KQ(e,t,n){var r=t.get(`center`),i=q_(t,n).refContainer;e.cx=J(r[0],i.width)+i.x,e.cy=J(r[1],i.height)+i.y;var a=e.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=t.get(`radius`);s==null?s=[0,`100%`]:R(s)||(s=[0,s]);var c=[J(s[0],o),J(s[1],o)];a.inverse?a.setExtent(c[1],c[0]):a.setExtent(c[0],c[1])}function qQ(e,t){var n=this,r=n.getAngleAxis(),i=n.getRadiusAxis();if(bO(r,1),bO(i,1),MO(r),MO(i),r.type===`category`&&!r.onBand){var a=r.getExtent(),o=360/r.scale.count();r.inverse?a[1]+=o:a[1]-=o,r.setExtent(a[0],a[1])}}function JQ(e){return e.mainType===`angleAxis`}function YQ(e,t){if(e.type=ED(t),e.scale=DD(t,e.type,!1),e.onBand=HD(e.scale,t),e.inverse=t.get(`inverse`),JQ(t)){e.inverse=e.inverse!==t.get(`clockwise`);var n=t.get(`startAngle`),r=t.get(`endAngle`)??n+(e.inverse?-360:360);e.setExtent(n,r)}t.axis=e,e.model=t}var XQ={dimensions:UQ,create:function(e,t){var n=[];return e.eachComponent(FQ,function(e,r){var i=new WQ(r+``);i.update=qQ;var a=i.getRadiusAxis(),o=i.getAngleAxis(),s=e.findAxisModel(`radiusAxis`),c=e.findAxisModel(`angleAxis`);YQ(a,s),YQ(o,c),KQ(i,e,t),n.push(i),e.coordinateSystem=i,i.model=e}),e.eachSeries(function(e){if(e.get(`coordinateSystem`)===`polar`){var t=e.coordinateSystem=e.getReferringComponents(FQ,Tc).models[0].coordinateSystem;t&&(sO(t.getRadiusAxis(),e,PQ),sO(t.getAngleAxis(),e,PQ))}}),n}},ZQ=[`axisLine`,`axisLabel`,`axisTick`,`minorTick`,`splitLine`,`minorSplitLine`,`splitArea`];function QQ(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var r=e.coordToPoint([t[0],n]),i=e.coordToPoint([t[1],n]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function $Q(e){return+!e.getRadiusAxis().inverse}function e$(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var t$=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`PolarAxisPointer`,n}return t.prototype.render=function(e,t){if(this.group.removeAll(),e.get(`show`)){var n=e.axis,r=n.polar,i=r.getRadiusAxis().getExtent(),a=n.getTicksCoords({breakTicks:`none`}),o=n.getMinorTicksCoords(),s=[];F(n.getViewLabels(),function(e){if(!e.tick.offInterval){e=M(e);var t=n.scale;e.coord=n.dataToCoord(VD(t,e.tick)),s.push(e)}}),e$(s),e$(a),F(ZQ,function(t){e.get([t,`show`])&&(!n.scale.isBlank()||t===`axisLine`)&&n$[t](this.group,e,r,a,o,i,s)},this)}},t.type=`angleAxis`,t}(vL),n$={axisLine:function(e,t,n,r,i,a){var o=t.getModel([`axisLine`,`lineStyle`]),s=n.getAngleAxis(),c=Math.PI/180,l=s.getExtent(),u=$Q(n),d=+!u,f,p=Math.abs(l[1]-l[0])===360?`Circle`:`Arc`;f=a[d]===0?new zm[p]({shape:{cx:n.cx,cy:n.cy,r:a[u],startAngle:-l[0]*c,endAngle:-l[1]*c,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):new Zp({shape:{cx:n.cx,cy:n.cy,r:a[u],r0:a[d]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,e.add(f)},axisTick:function(e,t,n,r,i,a){var o=t.getModel(`axisTick`),s=(o.get(`inside`)?-1:1)*o.get(`length`),c=a[$Q(n)],l=I(r,function(e){return new om({shape:QQ(n,[c,c+s],e.coord)})});e.add(Xm(l,{style:P(o.getModel(`lineStyle`).getLineStyle(),{stroke:t.get([`axisLine`,`lineStyle`,`color`])})}))},minorTick:function(e,t,n,r,i,a){if(i.length){for(var o=t.getModel(`axisTick`),s=t.getModel(`minorTick`),c=(o.get(`inside`)?-1:1)*s.get(`length`),l=a[$Q(n)],u=[],d=0;dm?`left`:`right`,_=Math.abs(p[1]-h)/f<.3?`middle`:p[1]>h?`top`:`bottom`;if(s&&s[d]){var v=s[d];V(v)&&v.textStyle&&(o=new og(v.textStyle,c,c.ecModel))}var y=new Cd({silent:xP.isLabelSilent(t),style:Lh(o,{x:p[0],y:p[1],fill:o.getTextColor()||t.get([`axisLine`,`lineStyle`,`color`]),text:r.formattedLabel,align:g,verticalAlign:_})});if(e.add(y),_h({el:y,componentModel:t,itemName:r.formattedLabel,formatterParamsExtra:{isTruncated:function(){return y.isTruncated},value:r.rawLabel,tickIndex:i}}),u){var b=xP.makeAxisEventDataBase(t);b.targetType=`axisLabel`,b.value=r.rawLabel,Y(y).eventData=b}},this)},splitLine:function(e,t,n,r,i,a){var o=t.getModel(`splitLine`).getModel(`lineStyle`),s=o.get(`color`),c=0;s=s instanceof Array?s:[s];for(var l=[],u=0;u=0?`p`:`n`,T=y;_&&(r[a][C]||(r[a][C]={p:y,n:y}),T=r[a][C][w]);var E=void 0,D=void 0,O=void 0,k=void 0;if(u.dim===`radius`){var A=u.dataToCoord(S)-y,j=e.dataToCoord(C);is(A)=k})}}function f$(e,t){var n=$P(t,PQ),r=Mk(e,{fromStat:{key:n},min:1}).w,i=r,a=0,o=`20%`,s=`30%`,c={};$D(e,n,function(e){var t=c$(e);c[t]||a++,c[t]=c[t]||{width:0,maxWidth:0};var n=J(e.get(`barWidth`),r),l=J(e.get(`barMaxWidth`),r),u=e.get(`barGap`),d=e.get(`barCategoryGap`);n&&!c[t].width&&(n=ns(i,n),c[t].width=n,i-=n),l&&(c[t].maxWidth=l),u!=null&&(s=u),d!=null&&(o=d)});var l={},u=J(o,r),d=J(s,1),f=(i-u)/(a+(a-1)*d);f=rs(f,0),F(c,function(e,t){var n=e.maxWidth;n&&n=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},e.prototype.pointToData=function(e,t,n){n||=[];var r=this.getAxis();return n[0]=r.coordToData(r.toLocalCoord(e[r.orient===`horizontal`?0:1])),n},e.prototype.dataToPoint=function(e,t,n){var r=this.getAxis(),i=this.getRect();n||=[];var a=r.orient===`horizontal`?0:1;return e instanceof Array&&(e=e[0]),n[a]=r.toGlobalCoord(r.dataToCoord(+e)),n[1-a]=a===0?i.y+i.height/2:i.x+i.width/2,n},e.prototype.convertToPixel=function(e,t,n){return T$(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return T$(t)===this?this.pointToData(n):null},e}();function T$(e){var t=e.seriesModel,n=e.singleAxisModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function E$(e,t){var n=[];return e.eachComponent(jL,function(r,i){var a=new w$(r,e,t);a.name=`single_`+i,a.resize(r,t),r.coordinateSystem=a,n.push(a)}),e.eachSeries(function(e){if(e.get(`coordinateSystem`)===`singleAxis`){var t=e.getReferringComponents(jL,Tc).models[0],n=e.coordinateSystem=t&&t.coordinateSystem;n&&sO(n.getAxis(),e,AL)}}),n}var D$={create:E$,dimensions:C$},O$=[`x`,`y`],k$=[`width`,`height`],A$=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.coordinateSystem,s=M$(a),c=N$(o,s),l=N$(o,1-s),u=o.dataToPoint(t)[0],d=r.get(`type`);if(d&&d!==`none`){var f=WZ(r),p=j$[d](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);p.style=f,e.graphicKey=p.type,e.pointer=p}YZ(t,e,v$(n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=v$(t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=JZ(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.coordinateSystem,o=M$(i),s=N$(a,o),c=[e.x,e.y];c[o]+=t[o],c[o]=Math.min(s[1],c[o]),c[o]=Math.max(s[0],c[o]);var l=N$(a,1-o),u=(l[1]+l[0])/2,d=[u,u];return d[o]=c[o],{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:d,tooltipOption:{verticalAlign:`middle`}}},t}(RZ),j$={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:XZ([t,r[0]],[t,r[1]],M$(e))}},shadow:function(e,t,n,r,i,a){var o=$Z(e,i,a),s=r[1]-r[0],c=eQ(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:ZZ([l,r[0]],[u-l,s],M$(e))}}};function M$(e){return+!e.isHorizontal()}function N$(e,t){var n=e.getRect();return[n[O$[t]],n[O$[t]]+n[k$[t]]]}var P$=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`single`,t}(vx);function F$(e){MT(kQ),vL.registerAxisPointerClass(`SingleAxisPointer`,A$),e.registerComponentView(P$),e.registerComponentView(b$),e.registerComponentModel(ML),II(e,`single`,ML,ML.defaultOption),e.registerCoordinateSystem(`single`,D$)}var I$=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t,n,r){var i=Q_(t);e.prototype.init.apply(this,arguments),L$(t,i)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),L$(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type=`calendar`,t.layoutMode=`box`,t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:`horizontal`,splitLine:{show:!0,lineStyle:{color:Z.color.axisLine,width:1,type:`solid`}},itemStyle:{color:Z.color.neutral00,borderWidth:1,borderColor:Z.color.neutral10},dayLabel:{show:!0,firstDay:0,position:`start`,margin:Z.size.s,color:Z.color.secondary},monthLabel:{show:!0,position:`start`,margin:Z.size.s,align:`center`,formatter:null,color:Z.color.secondary},yearLabel:{show:!0,position:null,margin:Z.size.xl,formatter:null,color:Z.color.quaternary,fontFamily:`sans-serif`,fontWeight:`bolder`,fontSize:20}},t}(tv);function L$(e,t){var n=e.cellSize,r=R(n)?n:e.cellSize=[n,n];r.length===1&&(r[1]=r[0]),Z_(e,t,{type:`box`,ignoreSize:I([0,1],function(e){return Y_(t,e)&&(r[e]=`auto`),r[e]!=null&&r[e]!==`auto`})})}var R$=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=this.group;r.removeAll();var i=e.coordinateSystem,a=i.getRangeInfo(),o=i.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,a,r),this._renderLines(e,a,o,r),this._renderYearText(e,a,o,r),this._renderMonthText(e,s,o,r),this._renderWeekText(e,s,a,o,r)},t.prototype._renderDayRect=function(e,t,n){for(var r=e.coordinateSystem,i=e.getModel(`itemStyle`).getItemStyle(),a=r.getCellWidth(),o=r.getCellHeight(),s=t.start.time;s<=t.end.time;s=r.getNextNDay(s,1).time){var c=r.dataToCalendarLayout([s],!1).tl,l=new vd({shape:{x:c[0],y:c[1],width:a,height:o},cursor:`default`,style:i});n.add(l)}},t.prototype._renderLines=function(e,t,n,r){var i=this,a=e.coordinateSystem,o=e.getModel([`splitLine`,`lineStyle`]).getLineStyle(),s=e.get([`splitLine`,`show`]),c=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var l=t.start,u=0;l.time<=t.end.time;u++){f(l.formatedDate),u===0&&(l=a.getDateInfo(t.start.y+`-`+t.start.m));var d=l.date;d.setMonth(d.getMonth()+1),l=a.getDateInfo(d)}f(a.getNextNDay(t.end.time,1).formatedDate);function f(t){i._firstDayOfMonth.push(a.getDateInfo(t)),i._firstDayPoints.push(a.dataToCalendarLayout([t],!1).tl);var c=i._getLinePointsOfOneWeek(e,t,n);i._tlpoints.push(c[0]),i._blpoints.push(c[c.length-1]),s&&i._drawSplitline(c,o,r)}s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,c,n),o,r),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,c,n),o,r)},t.prototype._getEdgesPoints=function(e,t,n){var r=[e[0].slice(),e[e.length-1].slice()],i=n===`horizontal`?0:1;return r[0][i]=r[0][i]-t/2,r[1][i]=r[1][i]+t/2,r},t.prototype._drawSplitline=function(e,t,n){var r=new rm({z2:20,shape:{points:e},style:t});n.add(r)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var r=e.coordinateSystem,i=r.getDateInfo(t),a=[],o=0;o<7;o++){var s=r.getNextNDay(i.time,o),c=r.dataToCalendarLayout([s.time],!1);a[2*s.day]=c.tl,a[2*s.day+1]=c[n===`horizontal`?`bl`:`tr`]}return a},t.prototype._formatterLabel=function(e,t){return B(e)&&e?b_(e,t):z(e)?e(t):t.nameMap},t.prototype._yearTextPositionControl=function(e,t,n,r,i){var a=t[0],o=t[1],s=[`center`,`bottom`];r===`bottom`?(o+=i,s=[`center`,`top`]):r===`left`?a-=i:r===`right`?(a+=i,s=[`center`,`top`]):o-=i;var c=0;return(r===`left`||r===`right`)&&(c=Math.PI/2),{rotation:c,x:a,y:o,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,n,r){var i=e.getModel(`yearLabel`);if(i.get(`show`)){var a=i.get(`margin`),o=i.get(`position`);o||=n===`horizontal`?`left`:`top`;var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(s[0][0]+s[1][0])/2,l=(s[0][1]+s[1][1])/2,u=n===`horizontal`?0:1,d={top:[c,s[u][1]],bottom:[c,s[1-u][1]],left:[s[1-u][0],l],right:[s[u][0],l]},f=t.start.y;+t.end.y>+t.start.y&&(f=f+`-`+t.end.y);var p=i.get(`formatter`),m={start:t.start.y,end:t.end.y,nameMap:f},h=new Cd({z2:30,style:Lh(i,{text:this._formatterLabel(p,m)}),silent:i.get(`silent`)});h.attr(this._yearTextPositionControl(h,d[o],n,o,a)),r.add(h)}},t.prototype._monthTextPositionControl=function(e,t,n,r,i){var a=`left`,o=`top`,s=e[0],c=e[1];return n===`horizontal`?(c+=i,t&&(a=`center`),r===`start`&&(o=`bottom`)):(s+=i,t&&(o=`middle`),r===`start`&&(a=`right`)),{x:s,y:c,align:a,verticalAlign:o}},t.prototype._renderMonthText=function(e,t,n,r){var i=e.getModel(`monthLabel`);if(i.get(`show`)){var a=i.get(`nameMap`),o=i.get(`margin`),s=i.get(`position`),c=i.get(`align`),l=[this._tlpoints,this._blpoints];(!a||B(a))&&(a&&(t=Sg(a)||t),a=t.get([`time`,`monthAbbr`])||[]);var u=s===`start`?0:1,d=n===`horizontal`?0:1;o=s===`start`?-o:o;for(var f=c===`center`,p=i.get(`silent`),m=0;m=i.start.time&&r.timeo.end.time&&t.reverse(),t},e.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var r=Math.floor(t[1].time/z$)-Math.floor(t[0].time/z$)+1,i=new Date(t[0].time),a=i.getDate(),o=t[1].date.getDate();i.setDate(a+r-1);var s=i.getDate();if(s!==o)for(var c=i.getTime()-t[1].time>0?1:-1;(s=i.getDate())!==o&&(i.getTime()-t[1].time)*c>0;)r-=c,i.setDate(s-c);var l=Math.floor((r+t[0].day+6)/7),u=n?-l+1:l-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var r=this._getRangeInfo(n);if(e>r.weeks||e===0&&tr.lweek)return null;var i=(e-1)*7-r.fweek+t,a=new Date(r.start.time);return a.setDate(+r.start.d+i),this.getDateInfo(a)},e.create=function(t,n){var r=[];return t.eachComponent(`calendar`,function(i){var a=new e(i,t,n);r.push(a),i.coordinateSystem=a}),t.eachComponent(function(e,t){P_({targetModel:t,coordSysType:`calendar`,coordSysProvider:F_})}),r},e.dimensions=[`time`,`value`],e}();function V$(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function H$(e){e.registerComponentModel(I$),e.registerComponentView(R$),e.registerCoordinateSystem(`calendar`,B$)}var U$={level:1,leaf:2,nonLeaf:3},W$={none:0,all:1,body:2,corner:3};function G$(e,t,n){var r=t[X[n]].getCell(e);return!r&&Re(e)&&e<0&&(r=t[X[1-n]].getUnitLayoutInfo(n,Math.round(e))),r}function K$(e){var t=e||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function q$(e,t,n,r,i){J$(e[0],t,i,n,r,0),J$(e[1],t,i,n,r,1)}function J$(e,t,n,r,i,a){e[0]=1/0,e[1]=-1/0;var o=r[a],s=R(o)?o:[o],c=s.length,l=!!n;if(c>=1?(Y$(e,t,s,l,i,a,0),c>1&&Y$(e,t,s,l,i,a,c-1)):e[0]=e[1]=NaN,l){var u=-i[X[1-a]].getLocatorCount(a),d=i[X[a]].getLocatorCount(a)-1;n===W$.body?u=rs(0,u):n===W$.corner&&(d=ns(-1,d)),d=t[0]&&e[0]<=t[1]}function t1(e,t){e.id.set(t[0][0],t[1][0]),e.span.set(t[0][1]-e.id.x+1,t[1][1]-e.id.y+1)}function n1(e,t){e[0][0]=t[0][0],e[0][1]=t[0][1],e[1][0]=t[1][0],e[1][1]=t[1][1]}function r1(e,t,n,r){var i=G$(t[r][0],n,r),a=G$(t[r][1],n,r);e[X[r]]=e[Vm[r]]=NaN,i&&a&&(e[X[r]]=i.xy,e[Vm[r]]=a.xy+a.wh-i.xy)}function i1(e,t,n,r){return e[X[t]]=n,e[X[1-t]]=r,e}function a1(e){return e&&(e.type===U$.leaf||e.type===U$.nonLeaf)?e:null}function o1(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var s1=function(){function e(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e===`x`?0:1,this._model=t,this._uniqueValueGen=c1(e);var n=t.get(`data`,!0),r=t.get(`length`,!0);if(n!=null&&!R(n)&&(n=[]),n)this._initByDimModelData(n);else if(r!=null){n=Array(r);for(var i=0;i=1,y=n[X[r]],b=a.getLocatorCount(r)-1,x=new Pc;for(o.resetLayoutIterator(x,r);x.next();)S(x.item);for(a.resetLayoutIterator(x,r);x.next();)S(x.item);function S(e){Ge(e.wh)&&(e.wh=_),e.xy=y,e.id[X[r]]===b&&!v&&(e.wh=n[X[r]]+n[Vm[r]]-e.xy),y+=e.wh}}function R1(e,t){for(var n=t[X[e]].resetCellIterator();n.next();){var r=n.item;B1(r.rect,e,r.id,r.span,t),B1(r.rect,1-e,r.id,r.span,t),r.type===U$.nonLeaf&&(r.xy=r.rect[X[e]],r.wh=r.rect[Vm[e]])}}function z1(e,t){e.travelExistingCells(function(e){var n=e.span;if(n){var r=e.spanRect,i=e.id;B1(r,0,i,n,t),B1(r,1,i,n,t)}})}function B1(e,t,n,r,i){e[Vm[t]]=0;var a=n[X[t]]<0?i[X[1-t]]:i[X[t]],o=a.getUnitLayoutInfo(t,n[X[t]]);if(e[X[t]]=o.xy,e[Vm[t]]=o.wh,r[X[t]]>1){var s=a.getUnitLayoutInfo(t,n[X[t]]+r[X[t]]-1);e[Vm[t]]=s.xy+s.wh-o.xy}}function V1(e,t,n){return H1(hs(e,n[Vm[t]]),n[Vm[t]])}function H1(e,t){return Math.max(Math.min(e,H(t,1/0)),0)}function U1(e){var t=e.matrixModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}var W1={inBody:1,inCorner:2,outside:3},G1={x:null,y:null,point:[]};function K1(e,t,n,r,i){var a=n[X[t]],o=n[X[1-t]],s=a.getUnitLayoutInfo(t,a.getLocatorCount(t)-1),c=a.getUnitLayoutInfo(t,0),l=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),u=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,d=e.point[t]=r[t];if(!c&&!u){e[X[t]]=W1.outside;return}if(i===W$.body){c?(e[X[t]]=W1.inBody,d=ns(s.xy+s.wh,rs(c.xy,d)),e.point[t]=d):e[X[t]]=W1.outside;return}else if(i===W$.corner){u?(e[X[t]]=W1.inCorner,d=ns(u.xy+u.wh,rs(l.xy,d)),e.point[t]=d):e[X[t]]=W1.outside;return}var f=c?c.xy:u?u.xy+u.wh:NaN,p=l?l.xy:f,m=s?s.xy+s.wh:f;if(dm){if(!i){e[X[t]]=W1.outside;return}d=m}e.point[t]=d,e[X[t]]=f<=d&&d<=m?W1.inBody:p<=d&&d<=f?W1.inCorner:W1.outside}function q1(e,t,n,r){var i=1-n;if(e[X[n]]!==W1.outside)for(r[X[n]].resetCellIterator(I1);I1.next();){var a=I1.item;if(X1(e.point[n],a.rect,n)&&X1(e.point[i],a.rect,i)){t[n]=a.ordinal,t[i]=a.id[X[i]];return}}}function J1(e,t,n,r){if(e[X[n]]!==W1.outside){for((e[X[n]]===W1.inCorner?r[X[1-n]]:r[X[n]]).resetLayoutIterator(F1,n);F1.next();)if(Y1(e.point[n],F1.item)){t[n]=F1.item.id[X[n]];return}}}function Y1(e,t){return t.xy<=e&&e<=t.xy+t.wh}function X1(e,t,n){return t[X[n]]<=e&&e<=t[X[n]]+t[Vm[n]]}function Z1(e){e.registerComponentModel(g1),e.registerComponentView(C1),e.registerCoordinateSystem(`matrix`,N1)}function Q1(e,t){var n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),t.parentId==null){var r=t.parentOption;r?t.parentId=r.id:n&&(t.parentId=n.parentId)}t.parentOption=null}function $1(e,t){var n;return F(t,function(t){e[t]!=null&&e[t]!==`auto`&&(n=!0)}),n}function e0(e,t,n){var r=N({},n),i=e[t],a=n.$action||`merge`;a===`merge`?i?(Ce(i,r,!0),Z_(i,r,{ignoreSize:!0}),$_(n,i),r0(n,i),r0(n,i,`shape`),r0(n,i,`style`),r0(n,i,`extra`),n.clipPath=i.clipPath):e[t]=r:a===`replace`?e[t]=r:a===`remove`&&i&&(e[t]=null)}var t0=[`transition`,`enterFrom`,`leaveTo`],n0=t0.concat([`enterAnimation`,`updateAnimation`,`leaveAnimation`]);function r0(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),!(!e||!t))for(var r=n?t0:n0,i=0;i=0;c--){var l=n[c],u=pc(l.id,null),d=u==null?null:i.get(u);if(d){var f=d.parent,h=s0(f),g=f===r?{width:a,height:o}:{width:h.width,height:h.height},_={},v=J_(d,l,g,null,{hv:l.hv,boundingMode:l.bounding},_);if(!s0(d).isNew&&v){for(var y=l.transition,b={},x=0;x=0)?b[S]=C:d[S]=C}jm(d,b,e,0)}else d.attr(_)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each(function(n){d0(n,s0(n).option,t,e._lastGraphicModel)}),this._elMap=U()},t.prototype.dispose=function(){this._clear()},t.type=`graphic`,t}(vx);function l0(e){var t=new(W(o0,e)?o0[e]:Km(e))({});return s0(t).type=e,t}function u0(e,t,n,r){var i=l0(n);return t.add(i),r.set(e,i),s0(i).id=e,s0(i).isNew=!0,i}function d0(e,t,n,r){e&&e.parent&&(e.type===`group`&&e.traverse(function(e){d0(e,t,n,r)}),MX(e,t,r),n.removeKey(s0(e).id))}function f0(e,t,n,r){e.isGroup||F([[`cursor`,Xl.prototype.cursor],[`zlevel`,r||0],[`z`,n||0],[`z2`,0]],function(n){var r=n[0];W(t,r)?e[r]=H(t[r],n[1]):e[r]??(e[r]=n[1])}),F(Pe(t),function(n){if(n.indexOf(`on`)===0){var r=t[n];e[n]=z(r)?r:null}}),W(t,`draggable`)&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function p0(e){return e=N({},e),F([`id`,`parentId`,`$action`,`hv`,`bounding`,`textContent`,`clipPath`].concat(L_),function(t){delete e[t]}),e}function m0(e,t,n){var r=Y(e).eventData;!e.silent&&!e.ignore&&!r&&(r=Y(e).eventData={componentType:`graphic`,componentIndex:t.componentIndex,name:e.name}),r&&(r.info=n.info)}function h0(e){e.registerComponentModel(a0),e.registerComponentView(c0),e.registerPreprocessor(function(e){var t=e.graphic;R(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var g0=[`x`,`y`,`radius`,`angle`,`single`],_0=xc(),v0=[`cartesian2d`,`polar`,`singleAxis`];function y0(e){return De(v0,e.get(`coordinateSystem`))>=0}function b0(e){return e+`Axis`}function x0(e,t){var n=U(),r=[],i=U();e.eachComponent({mainType:`dataZoom`,query:t},function(e){i.get(e.uid)||s(e)});var a;do a=!1,e.eachComponent(`dataZoom`,o);while(a);function o(e){!i.get(e.uid)&&c(e)&&(s(e),a=!0)}function s(e){i.set(e.uid,!0),r.push(e),l(e)}function c(e){var t=!1;return e.eachTargetAxis(function(e,r){var i=n.get(e);i&&i[r]&&(t=!0)}),t}function l(e){e.eachTargetAxis(function(e,t){(n.get(e)||n.set(e,[]))[t]=!0})}return r}function S0(e){var t=e.ecModel,n={infoList:[],infoMap:U()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(b0(e),r);if(i){var a=i.getCoordSysModel();if(a){var o=a.uid,s=n.infoMap.get(o);s||(s={model:a,axisModels:[]},n.infoList.push(s),n.infoMap.set(o,s)),s.axisModels.push(i)}}}),n}function C0(e){var t=_0(NS(e));return t.axisProxyMap||=U()}function w0(e){if(e)return C0(e.ecModel).get(e.uid)}function T0(e,t){C0(e.ecModel).set(e.uid,t)}function E0(e,t){var n=t.getAxisModel().axis.__alignTo;return n&&e.getAxisProxy(n.dim,n.model.componentIndex)?w0(n.model):null}var D0=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),O0=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=[`percent`,`percent`],n}return t.prototype.init=function(e,t,n){var r=k0(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=k0(e);Ce(this.option,e,!0),Ce(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;F([[`start`,`startValue`],[`end`,`endValue`]],function(e,r){this._rangePropMode[r]===`value`&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get(`orient`,!0),t=this._targetAxisInfoMap=U();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||`horizontal`,this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return F(g0,function(n){var r=this.getReferringComponents(b0(n),Ec);if(r.specified){t=!0;var i=new D0;F(r.models,function(e){i.add(e.componentIndex)}),e.set(n,i)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i=t===`vertical`?`y`:`x`,a=n.findComponents({mainType:i+`Axis`});o(a,i)}if(r){var a=n.findComponents({mainType:`singleAxis`,filter:function(e){return e.get(`orient`,!0)===t}});o(a,`single`)}function o(t,n){var i=t[0];if(i){var a=new D0;if(a.add(i.componentIndex),e.set(n,a),r=!1,n===`x`||n===`y`){var o=i.getReferringComponents(`grid`,Tc).models[0];o&&F(t,function(e){i.componentIndex!==e.componentIndex&&o===e.getReferringComponents(`grid`,Tc).models[0]&&a.add(e.componentIndex)})}}}r&&F(g0,function(t){if(r){var i=n.findComponents({mainType:b0(t),filter:function(e){return e.get(`type`,!0)===`category`}});if(i[0]){var a=new D0;a.add(i[0].componentIndex),e.set(t,a),r=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){!e&&(e=t)},this),e===`y`?`vertical`:`horizontal`},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty(`throttle`)&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get(`rangeMode`);F([[`start`,`startValue`],[`end`,`endValue`]],function(r,i){var a=e[r[0]]!=null,o=e[r[1]]!=null;a&&!o?t[i]=`percent`:!a&&o?t[i]=`value`:n?t[i]=n[i]:a&&(t[i]=`percent`)})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){e??=this.ecModel.getComponent(b0(t),n)},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){F(n.indexList,function(n){e.call(t,r,n)})})},t.prototype.getAxisProxy=function(e,t){return w0(this.getAxisModel(e,t))},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(b0(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;F([[`start`,`startValue`],[`end`,`endValue`]],function(r){(e[r[0]]!=null||e[r[1]]!=null)&&(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;F([`start`,`startValue`,`end`,`endValue`],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent},t.prototype.getValueRange=function(e,t){if(e==null&&t==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getWindow().value}else return this.getAxisProxy(e,t).getWindow().value},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return w0(e);for(var t,n=this._targetAxisInfoMap.keys(),r=0;ra[1];if(u&&!d&&!f)return!0;u&&(i=!0),d&&(t=!0),f&&(n=!0)}return i&&t&&n})}else F(r,function(n){if(i===`empty`)e.setData(t=t.map(n,function(e){return o(e)?e:NaN}));else{var r={};r[n]=a,t.selectRange(r)}});F(r,function(e){t.setApproximateExtent(a,e)})}});function o(e){return e>=a[0]&&e<=a[1]}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._extent;F([`min`,`max`],function(r){var i=t.get(r+`Span`),a=t.get(r+`ValueSpan`);a!=null&&(a=this.getAxisModel().axis.scale.parse(a)),a==null?i!=null&&(a=ps(i,[0,100],n,!0)-n[0]):i=ps(n[0]+a,n,[0,100],!0),e[r+`Span`]=i,e[r+`ValueSpan`]=a},this)},e}(),P0={dirtyOnOverallProgress:!0,getTargetSeries:function(e){function t(t){e.eachComponent(`dataZoom`,function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(b0(r),i),n)})})}var n=[];t(function(t,r,i,a){if(!w0(i)){var o=new N0(t,r,a,e);n.push(o),T0(i,o)}});var r=U();return F(n,function(e){F(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset:function(e,t){e.eachComponent(`dataZoom`,function(e){var n=[];e.eachTargetAxis(function(t,r){var i=e.getAxisProxy(t,r),a=E0(e,i);a?n.push([i,a]):i.reset(e,null)}),F(n,function(t){t[0].reset(e,t[1].getWindow().percentInverted)}),e.eachTargetAxis(function(n,r){e.getAxisProxy(n,r).filterData(e,t)})}),e.eachComponent(`dataZoom`,function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getWindow(),r=n.percent,i=n.value;e.setCalculatedRange({start:r[0],end:r[1],startValue:i[0],endValue:i[1]})}})}};function F0(e){e.registerAction(`dataZoom`,function(e,t){F(x0(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var I0=Gc();function L0(e){I0(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,P0),F0(e),e.registerSubTypeDefaulter(`dataZoom`,function(){return`slider`})})}function R0(e){e.registerComponentModel(A0),e.registerComponentView(M0),L0(e)}var z0=function(){function e(){}return e}(),B0={};function V0(e,t){B0[e]=t}function H0(e){return B0[e]}var U0=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t,n,r){var i=r.getTheme().get(`toolbox`),a=i?i.feature:null;a&&(this._themeFeatureOption=N({},a),i.feature={}),e.prototype.init.call(this,t,n,r),a&&(i.feature=a)},t.prototype.optionUpdated=function(){F(this.option.feature,function(e,t){var n=this._themeFeatureOption,r=H0(t);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(this.ecModel)),n&&n[t]&&(Ce(e,n[t]),n[t]=null),Ce(e,r.defaultOption))},this)},t.type=`toolbox`,t.layoutMode={type:`box`,ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:`horizontal`,left:`right`,top:`top`,backgroundColor:`transparent`,borderColor:Z.color.border,borderRadius:0,borderWidth:0,padding:Z.size.m,itemSize:15,itemGap:Z.size.s,showTitle:!0,iconStyle:{borderColor:Z.color.accent50,color:`none`},emphasis:{iconStyle:{borderColor:Z.color.accent70}},tooltip:{show:!1,position:`bottom`}},t}(tv);function W0(e,t){var n=h_(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new vd({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var G0=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n,r){var i=this.group;if(i.removeAll(),!e.get(`show`))return;var a=+e.get(`itemSize`),o=e.get(`orient`)===`vertical`,s=e.get(`feature`)||{},c=this._features||=U(),l=[];F(s,function(e,t){l.push(t)}),new FT(this._featureNames||[],l).add(u).update(u).remove(Ie(u,null)).execute(),this._featureNames=Me(l,function(e){return c.hasKey(e)});function u(i,a){var o=i!=null&&a==null,u=i!=null&&a!=null,f=i==null,p=o||u?l[i]:l[a],m=s[p],h=o||u?new og(m,e,t):null,g=h&&h.get(`show`),_;if(o){if(!g)return;if(K0(p))_={onclick:h.option.onclick,featureName:p};else{var v=H0(p);if(!v)return;_=new v}c.set(p,_)}else _=c.get(p);if(f||!g){q0(_)&&_.dispose&&_.dispose(t,n),c.removeKey(p);return}r&&r.newTitle!=null&&r.featureName===p&&(m.title=r.newTitle),o&&(_.uid=cg(`toolbox-feature`)),_.model=h,_.ecModel=t,_.api=n,d(h,_,p),h.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&(t===`emphasis`?kf:Af)(r[e])},q0(_)&&_.render&&_.render(h,t,n,r)}function d(r,s,c){var l=r.getModel(`iconStyle`),u=r.getModel([`emphasis`,`iconStyle`]),d=s instanceof z0&&s.getIcons?s.getIcons():r.get(`icon`),f=r.get(`title`)||{},p,m;B(d)?(p={},p[c]=d):p=d,B(f)?(m={},m[c]=f):m=f;var h=r.iconPaths={};F(p,function(c,d){var f=lh(c,{},{x:-a/2,y:-a/2,width:a,height:a});f.setStyle(l.getItemStyle());var p=f.ensureState(`emphasis`);p.style=u.getItemStyle();var g=new Cd({style:{text:m[d],align:u.get(`textAlign`),borderRadius:u.get(`textBorderRadius`),padding:u.get(`textPadding`),fill:null,font:Gh({fontStyle:u.get(`textFontStyle`),fontFamily:u.get(`textFontFamily`),fontSize:u.get(`textFontSize`),fontWeight:u.get(`textFontWeight`)},t)},ignore:!0});f.setTextContent(g),_h({el:f,componentModel:e,itemName:d,formatterParamsExtra:{title:m[d]}}),f.__title=m[d],f.on(`mouseover`,function(){var t=u.getItemStyle(),r=o?e.get(`right`)==null&&e.get(`left`)!==`right`?`right`:`left`:e.get(`bottom`)==null&&e.get(`top`)!==`bottom`?`bottom`:`top`;g.setStyle({fill:u.get(`textFill`)||t.fill||t.stroke||Z.color.neutral99,backgroundColor:u.get(`textBackgroundColor`)}),f.setTextConfig({position:u.get(`textPosition`)||r}),g.ignore=!e.get(`showTitle`),n.enterEmphasis(this)}).on(`mouseout`,function(){r.get([`iconStatus`,d])!==`emphasis`&&n.leaveEmphasis(this),g.hide()}),(r.get([`iconStatus`,d])===`emphasis`?kf:Af)(f),i.add(f),f.on(`click`,L(s.onclick,s,t,n,d)),h[d]=f})}var f=q_(e,n).refContainer,p=e.getBoxLayoutParams(),m=e.get(`padding`),h=W_(p,f,m);B_(e.get(`orient`),i,e.get(`itemGap`),h.width,h.height),J_(i,p,f,m),i.add(W0(i.getBoundingRect(),e)),o||i.eachChild(function(e){var t=e.__title,r=e.ensureState(`emphasis`),o=r.textConfig||={},s=e.getTextContent(),c=s&&s.ensureState(`emphasis`);if(c&&!z(c)&&t){var l=c.style||={},u=ho(t,Cd.makeFont(l)),d=e.x+i.x,f=e.y+i.y+a,p=!1;f+u.height>n.getHeight()&&(o.position=`top`,p=!0);var m=p?-5-u.height:a+10;d+u.width/2>n.getWidth()?(o.position=[`100%`,m],l.align=`right`):d-u.width/2<0&&(o.position=[0,m],l.align=`left`)}})},t.prototype.updateView=function(e,t,n,r){F(this._features,function(e){e&&e instanceof z0&&e.updateView&&e.updateView(e.model,t,n,r)})},t.prototype.dispose=function(e,t){F(this._features,function(n){n&&n instanceof z0&&n.dispose&&n.dispose(e,t)})},t.type=`toolbox`,t}(vx);function K0(e){return e.indexOf(`my`)===0}function q0(e){return e instanceof z0}var J0=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(e,t){var n=this.model,r=n.get(`name`)||e.get(`title.0.text`)||`echarts`,i=t.getZr().painter.getType()===`svg`,a=i?`svg`:n.get(`type`,!0)||`png`,o=t.getConnectedDataURL({type:a,backgroundColor:n.get(`backgroundColor`,!0)||e.get(`backgroundColor`)||Z.color.neutral00,connectedBackgroundColor:n.get(`connectedBackgroundColor`),excludeComponents:n.get(`excludeComponents`),pixelRatio:n.get(`pixelRatio`)}),s=k.browser;if(typeof MouseEvent==`function`&&(s.newEdge||!s.ie&&!s.edge)){var c=document.createElement(`a`);c.download=r+`.`+a,c.target=`_blank`,c.href=o;var l=new MouseEvent(`click`,{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(l)}else if(window.navigator.msSaveOrOpenBlob||i){var u=o.split(`,`),d=u[0].indexOf(`base64`)>-1,f=i?decodeURIComponent(u[1]):u[1];d&&(f=window.atob(f));var p=r+`.`+a;if(window.navigator.msSaveOrOpenBlob){for(var m=f.length,h=new Uint8Array(m);m--;)h[m]=f.charCodeAt(m);var g=new Blob([h]);window.navigator.msSaveOrOpenBlob(g,p)}else{var _=document.createElement(`iframe`);document.body.appendChild(_);var v=_.contentWindow,y=v.document;y.open(`image/svg+xml`,`replace`),y.write(f),y.close(),v.focus(),y.execCommand(`SaveAs`,!0,p),document.body.removeChild(_)}}else{var b=n.get(`lang`),x=``,S=window.open();S.document.write(x),S.document.title=r}},t.getDefaultOption=function(e){return{show:!0,icon:`M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0`,title:e.getLocaleModel().get([`toolbox`,`saveAsImage`,`title`]),type:`png`,connectedBackgroundColor:Z.color.neutral00,name:``,excludeComponents:[`toolbox`],lang:e.getLocaleModel().get([`toolbox`,`saveAsImage`,`lang`])}},t}(z0),Y0=`__ec_magicType_stack__`,X0=[[`line`,`bar`],[`stack`]],Z0=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,t=e.get(`icon`),n={};return F(e.get(`type`),function(e){t[e]&&(n[e]=t[e])}),n},t.getDefaultOption=function(e){return{show:!0,type:[],icon:{line:`M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4`,bar:`M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7`,stack:`M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z`},title:e.getLocaleModel().get([`toolbox`,`magicType`,`title`]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,t,n){var r=this.model,i=r.get([`seriesIndex`,n]);if(Q0[n]){var a={series:[]};F(X0,function(e){De(e,n)>=0&&F(e,function(e){r.setIconStatus(e,`normal`)})}),r.setIconStatus(n,`emphasis`),e.eachComponent({mainType:`series`,query:i==null?null:{seriesIndex:i}},function(e){var t=e.subType,i=e.id,o=Q0[n](t,i,e,r);o&&(P(o,e.option),a.series.push(o));var s=e.coordinateSystem;if(s&&s.type===`cartesian2d`&&(n===`line`||n===`bar`)){var c=s.getAxesByScale(`ordinal`)[0];if(c){var l=c.dim+`Axis`,u=e.getReferringComponents(l,Tc).models[0].componentIndex;a[l]=a[l]||[];for(var d=0;d<=u;d++)a[l][u]=a[l][u]||{};a[l][u].boundaryGap=n===`bar`}}});var o,s=n;n===`stack`&&(o=Ce({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),r.get([`iconStatus`,n])!==`emphasis`&&(s=`tiled`)),t.dispatchAction({type:`changeMagicType`,currentType:s,newOption:a,newTitle:o,featureName:`magicType`})}},t}(z0),Q0={line:function(e,t,n,r){if(e===`bar`)return Ce({id:t,type:`line`,data:n.get(`data`),stack:n.get(`stack`),markPoint:n.get(`markPoint`),markLine:n.get(`markLine`)},r.get([`option`,`line`])||{},!0)},bar:function(e,t,n,r){if(e===`line`)return Ce({id:t,type:`bar`,data:n.get(`data`),stack:n.get(`stack`),markPoint:n.get(`markPoint`),markLine:n.get(`markLine`)},r.get([`option`,`bar`])||{},!0)},stack:function(e,t,n,r){var i=n.get(`stack`)===Y0;if(e===`line`||e===`bar`)return r.setIconStatus(`stack`,i?`normal`:`emphasis`),Ce({id:t,stack:i?``:Y0},r.get([`option`,`stack`])||{},!0)}};hT({type:`changeMagicType`,event:`magicTypeChanged`,update:`prepareAndUpdate`},function(e,t){t.mergeOption(e.newOption)});var $0=Array(60).join(`-`),e2=` `;function t2(e){var t={},n=[],r=[];return e.eachRawSeries(function(e){var i=e.coordinateSystem;if(i&&(i.type===`cartesian2d`||i.type===`polar`)){var a=i.getBaseAxis();if(a.type===`category`){var o=qP(a);t[o]||(t[o]={categoryAxis:a,valueAxis:i.getOtherAxis(a),series:[]},r.push({axisDim:a.dim,axisIndex:a.index})),t[o].series.push(e)}else n.push(e)}else n.push(e)}),{seriesGroupByCategoryAxis:t,other:n,meta:r}}function n2(e){var t=[];return F(e,function(e,n){var r=e.categoryAxis,i=e.valueAxis.dim,a=[` `].concat(I(e.series,function(e){return e.name})),o=[r.model.getCategories()];F(e.series,function(e){var t=e.getRawData();o.push(e.getRawData().mapArray(t.mapDimension(i),function(e){return e}))});for(var s=[a.join(e2)],c=0;c=0)return!0}var s2=RegExp(`[`+e2+`]+`,`g`);function c2(e){for(var t=e.split(/\n+/g),n=a2(t.shift()).split(s2),r=[],i=I(n,function(e){return{name:e,data:[]}}),a=0;a=0&&!n[i][r];i--);if(i<0){var a=e.queryComponents({mainType:`dataZoom`,subType:`select`,id:r})[0];if(a){var o=a.getPercentRange();n[0][r]={dataZoomId:r,start:o[0],end:o[1]}}}}),n.push(t)}function g2(e){var t=y2(e),n=t[t.length-1];t.length>1&&t.pop();var r={};return p2(n,function(e,n){for(var i=t.length-1;i>=0;i--)if(e=t[i][n],e){r[n]=e;break}}),r}function _2(e){m2(e).snapshots=null}function v2(e){return y2(e).length}function y2(e){var t=m2(e);return t.snapshots||=[{}],t.snapshots}var b2=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(e,t){_2(e),t.dispatchAction({type:`restore`,from:this.uid})},t.getDefaultOption=function(e){return{show:!0,icon:`M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5`,title:e.getLocaleModel().get([`toolbox`,`restore`,`title`])}},t}(z0);hT({type:`restore`,event:`restore`,update:`prepareAndUpdate`},function(e,t){t.resetOption(`recreate`)});var x2=[`grid`,`xAxis`,`yAxis`,`geo`,`graph`,`polar`,`radiusAxis`,`angleAxis`,`bmap`],S2=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=w2(t,e);F(T2,function(e,t){(!n||!n.include||De(n.include,t)>=0)&&e(i,r._targetInfoList)})}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(e,t,n){if((e.coordRanges||=[]).push(t),!e.coordRange){e.coordRange=t;var r=O2[e.brushType](0,n,t);e.__rangeOffset={offset:A2[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}}),e},e.prototype.matchOutputRanges=function(e,t,n){F(e,function(e){var r=this.findTargetInfo(e,t);r&&r!==!0&&F(r.coordSyses,function(r){n(e,O2[e.brushType](1,r,e.range,!0).values,r,t)})},this)},e.prototype.setInputRanges=function(e,t){F(e,function(e){var n=this.findTargetInfo(e,t);if(e.range=e.range||[],n&&n!==!0){e.panelId=n.panelId;var r=O2[e.brushType](0,n.coordSys,e.coordRange),i=e.__rangeOffset;e.range=i?A2[e.brushType](r.values,i.offset,M2(r.xyMinMax,i.xyMinMax)):r.values}},this)},e.prototype.makePanelOpts=function(e,t){return I(this._targetInfoList,function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:JK(r),isTargetByCursor:XK(r,e,n.coordSysModel),getLinearBrushOtherExtent:YK(r)}})},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return r===!0||r&&De(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=w2(t,e),i=0;ie[1]&&e.reverse(),e}function w2(e,t){return Cc(e,t,{includeMainTypes:x2})}var T2={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,a=U(),o={},s={};!n&&!r&&!i||(F(n,function(e){var t=e.axis.grid.model;a.set(t.id,t),o[t.id]=!0}),F(r,function(e){var t=e.axis.grid.model;a.set(t.id,t),s[t.id]=!0}),F(i,function(e){a.set(e.id,e),o[e.id]=!0,s[e.id]=!0}),a.each(function(e){var i=e.coordinateSystem,a=[];F(i.getCartesians(),function(e,t){(De(n,e.getAxis(`x`).model)>=0||De(r,e.getAxis(`y`).model)>=0)&&a.push(e)}),t.push({panelId:`grid--`+e.id,gridModel:e,coordSysModel:e,coordSys:a[0],coordSyses:a,getPanelRect:D2.grid,xAxisDeclared:o[e.id],yAxisDeclared:s[e.id]})}))},geo:function(e,t){F(e.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:`geo--`+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:D2.geo})})}},E2=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],D2={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys.view,t=Sz(null,e);return Wn(t,t,bz(null,e)),t}},O2={lineX:Ie(k2,0),lineY:Ie(k2,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),a=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),o=[C2([i[0],a[0]]),C2([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,n,r){var i=[Ic(),Ic()];return{values:I(n,function(n){var a=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],a[0]),i[1][0]=Math.min(i[1][0],a[1]),i[0][1]=Math.max(i[0][1],a[0]),i[1][1]=Math.max(i[1][1],a[1]),a}),xyMinMax:i}}};function k2(e,t,n,r){var i=n.getAxis([`x`,`y`][e]),a=C2(I([0,1],function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))})),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}var A2={lineX:Ie(j2,0),lineY:Ie(j2,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return I(e,function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]})}};function j2(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function M2(e,t){var n=N2(e),r=N2(t),i=[n[0]/r[0],n[1]/r[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function N2(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var P2=F,F2=gc(`toolbox-dataZoom_`),I2={x:`width`,y:`height`},L2=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n,r){this._brushController||(this._brushController=new dK(n.getZr()),this._brushController.on(`brush`,L(this._onBrush,this)).mount()),V2(e,t,this,r,n),B2(e,t)},t.prototype.onclick=function(e,t,n){R2[n].call(this)},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(!e.isEnd||!t.length)return;var n={},r=this.ecModel;this._brushController.updateCovers([]),new S2(z2(this.model),r,{include:[`grid`]}).matchOutputRanges(t,r,function(e,t,n){if(n.type===`cartesian2d`){var r=n.master.getRect().clone(),a=e.brushType;a===`rect`?(i(`x`,n,r,t[0]),i(`y`,n,r,t[1])):i({lineX:`x`,lineY:`y`}[a],n,r,t)}}),h2(r,n),this._dispatchZoomAction(n);function i(e,t,i,o){var s=t.getAxis(e),c=s.model,l=a(e,c,r),u=l.findRepresentativeAxisProxy(c).getMinMaxSpan(),d=s.scale.getExtent();(u.minValueSpan!=null||u.maxValueSpan!=null)&&(o=UG(0,o.slice(),d,0,u.minValueSpan,u.maxValueSpan));var f=ws(d,i[I2[e]],.5);l&&(n[l.id]={dataZoomId:l.id,startValue:isFinite(f)?vs(o[0],f):o[0],endValue:isFinite(f)?vs(o[1],f):o[1]})}function a(e,t,n){var r;return n.eachComponent({mainType:`dataZoom`,subType:`select`},function(n){n.getAxisModel(e,t.componentIndex)&&(r=n)}),r}},t.prototype._dispatchZoomAction=function(e){var t=[];P2(e,function(e,n){t.push(M(e))}),t.length&&this.api.dispatchAction({type:`dataZoom`,from:this.uid,batch:t})},t.getDefaultOption=function(e){return{show:!0,filterMode:`filter`,icon:{zoom:`M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1`,back:`M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26`},title:e.getLocaleModel().get([`toolbox`,`dataZoom`,`title`]),brushStyle:{borderWidth:0,color:Z.color.backgroundTint}}},t}(z0),R2={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:`takeGlobalCursor`,key:`dataZoomSelect`,dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(g2(this.ecModel))}};function z2(e){var t={xAxisIndex:e.get(`xAxisIndex`,!0),yAxisIndex:e.get(`yAxisIndex`,!0),xAxisId:e.get(`xAxisId`,!0),yAxisId:e.get(`yAxisId`,!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex=`all`),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex=`all`),t}function B2(e,t){e.setIconStatus(`back`,v2(t)>1?`emphasis`:`normal`)}function V2(e,t,n,r,i){var a=n._isZoomActive;r&&r.type===`takeGlobalCursor`&&(a=r.key===`dataZoomSelect`?r.dataZoomSelectActive:!1),n._isZoomActive=a,e.setIconStatus(`zoom`,a?`emphasis`:`normal`);var o=new S2(z2(e),t,{include:[`grid`]}).makePanelOpts(i,function(e){return e.xAxisDeclared&&!e.yAxisDeclared?`lineX`:!e.xAxisDeclared&&e.yAxisDeclared?`lineY`:`rect`});n._brushController.setPanels(o).enableBrush(a&&o.length?{brushType:`auto`,brushStyle:e.getModel(`brushStyle`).getItemStyle()}:!1)}xv(`dataZoom`,function(e){var t=e.getComponent(`toolbox`,0),n=[`feature`,`dataZoom`];if(!t||t.get(n)==null)return;var r=t.getModel(n),i=[],a=Cc(e,z2(r));P2(a.xAxisModels,function(e){return o(e,`xAxis`,`xAxisIndex`)}),P2(a.yAxisModels,function(e){return o(e,`yAxis`,`yAxisIndex`)});function o(e,t,n){var a=e.componentIndex,o={type:`select`,$fromToolbox:!0,filterMode:r.get(`filterMode`,!0)||`filter`,id:F2+t+a};o[n]=a,i.push(o)}return i});function H2(e){e.registerComponentModel(U0),e.registerComponentView(G0),V0(`saveAsImage`,J0),V0(`magicType`,Z0),V0(`dataView`,d2),V0(`dataZoom`,L2),V0(`restore`,b2),MT(R0)}var U2=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Z.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Z.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Z.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Z.color.tertiary,fontSize:14}},t}(tv);function W2(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function G2(e){if(k.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function t4(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(k.transformSupported?``+Z2+i:`,left`+i+`,top`+i)),X2+`:`+a}function n4(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!k.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=k.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+Z2+`:`+o+`;`:[[`top`,0],[`left`,0],[K2,o]]}function r4(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=H(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),F([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function i4(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=nx(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(t4(a,n,r)),o&&i.push(`background-color:`+o),F([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=m_(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(r4(d)),f!=null&&i.push(`padding:`+h_(f).join(`px `)+`px`),i.join(`;`)+`;`}function a4(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Gt(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var o4=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,k.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(B(i)?document.querySelector(i):Ve(i)?i:z(i)&&i(e.getDom()));a4(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;sn(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=Y2(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=Q2+i4(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+n4(i[0],i[1],!0)+(`border-color:`+w_(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(B(i)&&n.get(`trigger`)===`item`&&!W2(n)&&(o=e4(n,r,i)),B(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,R(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(!(r.from===this.uid||k.node||!n.getDom())){var i=m4(r,n);this._ticket=``;var a=r.dataByCoordSys,o=y4(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=d4;c.x=r.x,c.y=r.y,c.update(),Y(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=gQ(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(m4(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(!(i==null||a==null||o==null)){var s=t.getSeriesByIndex(i);if(s&&p4([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(Y(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;SS(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Y(e).dataIndex==null?Y(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=L(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=p4([t.tooltipOption],r),o=this._renderMode,s=[],c=Hb(`section`,{blocks:[],noHeader:!0}),l=[],u=new rx;F(e,function(e){F(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(!(!t||i==null)){var f=qZ(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=Hb(`section`,{header:f,noHeader:!Ze(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),F(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=MD(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,w_(m.color),o);var h=Qy(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=p4([a],r).get(`valueFormatter`);p.blocks.push(_?N({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=Jb(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` - -`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Y(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=p4([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(!(m!=null&&m!==`item`)){var h=s.getDataParams(c,l),g=new rx;h.marker=g.makeTooltipMarker(`item`,w_(h.color),d);var _=Qy(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?Jb(y?N({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Y(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(B(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=M(a),a.content=$t(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=p4(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new rx;this._showOrMove(d,function(){var n=M(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,!(!e.get(`showContent`)||!e.get(`show`))){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u)if(B(u)){var p=e.ecModel.get(`useUTC`),m=R(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=Jg(m.axisValue,d,p)),d=y_(d,n,!0)}else if(z(u)){var g=L(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u;l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||R(t))return{color:r||i};if(!R(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),z(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),R(t))n=J(t[0],s),r=J(t[1],c);else if(V(t)){var p=t;p.width=l[0],p.height=l[1];var m=W_(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(B(t)&&o){var h=_4(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=h4(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=v4(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=v4(d)?l[1]/2:d===`bottom`?l[1]:0),W2(e)){var h=g4(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&F(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&F(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&F(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&F(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){k.node||!t.getDom()||(Px(this,`_updatePosition`),this._tooltipContent.dispose(),mQ(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(vx);function p4(e,t,n){var r=t.ecModel,i;n?(i=new og(n,r,r),i=new og(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof og&&(o=o.get(`tooltip`,!0)),B(o)&&(o={formatter:o}),o&&(i=new og(o,i,r)))}return i}function m4(e,t){return e.dispatchAction||L(t.dispatchAction,t)}function h4(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function g4(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function _4(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function v4(e){return e===`center`||e===`middle`}function y4(e,t,n){var r=wc(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=Dc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Y(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function b4(e){MT(kQ),e.registerComponentModel(U2),e.registerComponentView(f4),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},ct),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},ct)}var x4=[`rect`,`polygon`,`keep`,`clear`];function S4(e,t){var n=$s(e?e.brush:[]);if(n.length){var r=[];F(n,function(e){var t=e.hasOwnProperty(`toolbox`)?e.toolbox:[];t instanceof Array&&(r=r.concat(t))});var i=e&&e.toolbox;R(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||={},o=a.brush||={},s=o.type||=[];s.push.apply(s,r),qc(s,function(e){return e+``},null),t&&!s.length&&s.push.apply(s,x4)}}var C4=F;function w4(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function T4(e,t,n){var r={};return C4(t,function(t){var a=r[t]=i();C4(e[t],function(e,r){if(XH.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new XH(i),r===`opacity`&&(i=M(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new XH(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function E4(e,t,n){var r;F(n,function(e){t.hasOwnProperty(e)&&w4(t[e])&&(r=!0)}),r&&F(n,function(n){t.hasOwnProperty(n)&&w4(t[n])?e[n]=M(t[n]):delete e[n]})}function D4(e,t,n,r,i,a){var o={};F(e,function(e){o[e]=XH.prepareVisualTypes(t[e])});var s;function c(e){return gS(n,s,e)}function l(e,t){vS(n,s,e,t)}a==null?n.each(u):n.each([a],u);function u(e,u){s=a==null?e:u;var d=n.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var f=r.call(i,e),p=t[f],m=o[f],h=0,g=m.length;ht[0][1]&&(t[0][1]=a[0]),a[1]t[1][1]&&(t[1][1]=a[1])}return t&&W4(t)}};function W4(e){return new K(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var G4=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new dK(t.getZr())).on(`brush`,L(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){I4(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:`brush`,brushId:t,areas:M(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:`brushEnd`,brushId:t,areas:M(n),$from:t})},t.type=`brush`,t}(vx),K4=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&E4(n,e,[`inBrush`,`outOfBrush`]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},r.hasOwnProperty(`liftZ`)||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=I(e,function(e){return q4(this.option,e)},this))},t.prototype.setBrushOption=function(e){this.brushOption=q4(this.option,e),this.brushType=this.brushOption.brushType},t.type=`brush`,t.dependencies=[`geo`,`grid`,`xAxis`,`yAxis`,`parallel`,`series`],t.defaultOption={seriesIndex:`all`,brushType:`rect`,brushMode:`single`,transformable:!0,brushStyle:{borderWidth:1,color:Z.color.backgroundTint,borderColor:Z.color.borderTint},throttleType:`fixRate`,throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:Z.color.disabled},t}(tv);function q4(e,t){return Ce({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new og(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var J4=[`rect`,`polygon`,`lineX`,`lineY`,`keep`,`clear`],Y4=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n){var r,i,a;t.eachComponent({mainType:`brush`},function(e){r=e.brushType,i=e.brushOption.brushMode||`single`,a||=!!e.areas.length}),this._brushType=r,this._brushMode=i,F(e.get(`type`,!0),function(t){e.setIconStatus(t,(t===`keep`?i===`multiple`:t===`clear`?a:t===r)?`emphasis`:`normal`)})},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get(`icon`,!0),n={};return F(e.get(`type`,!0),function(e){t[e]&&(n[e]=t[e])}),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,i=this._brushMode;n===`clear`?(t.dispatchAction({type:`axisAreaSelect`,intervals:[]}),t.dispatchAction({type:`brush`,command:`clear`,areas:[]})):t.dispatchAction({type:`takeGlobalCursor`,key:`brush`,brushOption:{brushType:n===`keep`?r:r===n?!1:n,brushMode:n===`keep`?i===`multiple`?`single`:`multiple`:i}})},t.getDefaultOption=function(e){return{show:!0,type:J4.slice(),icon:{rect:`M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13`,polygon:`M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2`,lineX:`M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4`,lineY:`M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4`,keep:`M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z`,clear:`M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2`},title:e.getLocaleModel().get([`toolbox`,`brush`,`title`])}},t}(z0);function X4(e){e.registerComponentView(G4),e.registerComponentModel(K4),e.registerPreprocessor(S4),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,L4),e.registerAction({type:`brush`,event:`brush`,update:`updateVisual`},function(e,t){t.eachComponent({mainType:`brush`,query:e},function(t){t.setAreas(e.areas)})}),e.registerAction({type:`brushSelect`,event:`brushSelected`,update:`none`},ct),e.registerAction({type:`brushEnd`,event:`brushEnd`,update:`none`},ct),V0(`brush`,Y4)}var Z4=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.type=`title`,t.defaultOption={z:6,show:!0,text:``,target:`blank`,subtext:``,subtarget:`blank`,left:`center`,top:Z.size.m,backgroundColor:Z.color.transparent,borderColor:Z.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:`bold`,color:Z.color.primary},subtextStyle:{fontSize:12,color:Z.color.quaternary}},t}(tv),Q4=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=H(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new Cd({style:Lh(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new Cd({style:Lh(a,{text:u,fill:a.getTextColor(),y:l.height+e.get(`itemGap`),verticalAlign:`top`},{disableBox:!0}),z2:10}),f=e.get(`link`),p=e.get(`sublink`),m=e.get(`triggerEvent`,!0);c.silent=!f&&!m,d.silent=!p&&!m,f&&c.on(`click`,function(){T_(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){T_(p,`_`+e.get(`subtarget`))}),Y(c).eventData=Y(d).eventData=m?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(d);var h=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=h.width,g.height=h.height;var _=W_(g,q_(e,n).refContainer,e.get(`padding`));o||(o=e.get(`left`)||e.get(`right`),o===`middle`&&(o=`center`),o===`right`?_.x+=_.width:o===`center`&&(_.x+=_.width/2)),s||(s=e.get(`top`)||e.get(`bottom`),s===`center`&&(s=`middle`),s===`bottom`?_.y+=_.height:s===`middle`&&(_.y+=_.height/2),s||=`top`),r.x=_.x,r.y=_.y,r.markRedraw();var v={align:o,verticalAlign:s};c.setStyle(v),d.setStyle(v),h=r.getBoundingRect();var y=_.margin,b=e.getItemStyle([`color`,`opacity`]);b.fill=e.get(`backgroundColor`);var x=new vd({shape:{x:h.x-y[3],y:h.y-y[0],width:h.width+y[1]+y[3],height:h.height+y[0]+y[2],r:e.get(`borderRadius`)},style:b,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type=`title`,t}(vx);function $4(e){e.registerComponentModel(Z4),e.registerComponentView(Q4)}var e3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode=`box`,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e??=this.option.currentIndex;var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,t=e.data||[],n=e.axisType,r=this._names=[],i;n===`category`?(i=[],F(t,function(e,t){var n=pc(nc(e),``),a;V(e)?(a=M(e),a.value=t):a=t,i.push(a),r.push(n)})):i=t;var a={category:`ordinal`,time:`time`,value:`number`}[n]||`number`;(this._data=new lE([{name:`value`,type:a}],this)).initData(i,r)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get(`axisType`)===`category`)return this._names.slice()},t.type=`timeline`,t.defaultOption={z:4,show:!0,axisType:`time`,realtime:!0,left:`20%`,top:null,right:`20%`,bottom:0,width:null,height:40,padding:Z.size.m,controlPosition:`left`,autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:Z.color.secondary},data:[]},t}(tv),t3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`timeline.slider`,t.defaultOption=dg(e3.defaultOption,{backgroundColor:`rgba(0,0,0,0)`,borderColor:Z.color.border,borderWidth:0,orient:`horizontal`,inverse:!1,tooltip:{trigger:`item`},symbol:`circle`,symbolSize:12,lineStyle:{show:!0,width:2,color:Z.color.accent10},label:{position:`auto`,show:!0,interval:`auto`,rotate:0,color:Z.color.tertiary},itemStyle:{color:Z.color.accent20,borderWidth:0},checkpointStyle:{symbol:`circle`,symbolSize:15,color:Z.color.accent50,borderColor:Z.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`rgba(0, 0, 0, 0)`,animation:!0,animationDuration:300,animationEasing:`quinticInOut`},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:`left`,playIcon:`path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z`,stopIcon:`path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z`,nextIcon:`path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z`,prevIcon:`path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z`,prevBtnSize:18,nextBtnSize:18,color:Z.color.accent50,borderColor:Z.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:Z.color.accent60},itemStyle:{color:Z.color.accent60,borderColor:Z.color.accent60},controlStyle:{color:Z.color.accent70,borderColor:Z.color.accent70}},progress:{lineStyle:{color:Z.color.accent30},itemStyle:{color:Z.color.accent40}},data:[]}),t}(e3);ke(t3,Zy.prototype);var n3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`timeline`,t}(vx),r3=function(e){D(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r)||this;return a.type=i||`value`,a}return t.prototype.getLabelModel=function(){return this.model.getModel(`label`)},t.prototype.isHorizontal=function(){return this.model.get(`orient`)===`horizontal`},t}(Ik),i3=Math.PI,a3=xc(),o3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){this.api=t},t.prototype.render=function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get(`show`,!0)){var r=this._layout(e,n),i=this._createGroup(`_mainGroup`),a=this._createGroup(`_labelGroup`),o=this._axis=this._createAxis(r,e);e.formatTooltip=function(e){return Hb(`nameValue`,{noName:!0,value:o.scale.getLabel({value:e})})},F([`AxisLine`,`AxisTick`,`Control`,`CurrentPointer`],function(t){this[`_render`+t](r,i,o,e)},this),this._renderAxisLabel(r,a,o,e),this._position(r,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,t){var n=e.get([`label`,`position`]),r=e.get(`orient`),i=s3(e,t),a=n==null||n===`auto`?r===`horizontal`?i.y+i.height/2=0||a===`+`?`left`:`right`},s={horizontal:a>=0||a===`+`?`top`:`bottom`,vertical:`middle`},c={horizontal:0,vertical:i3/2},l=r===`vertical`?i.height:i.width,u=e.getModel(`controlStyle`),d=u.get(`show`,!0),f=d?u.get(`itemSize`):0,p=d?u.get(`itemGap`):0,m=f+p,h=e.get([`label`,`rotate`])||0;h=h*i3/180;var g,_,v,y=u.get(`position`,!0),b=d&&u.get(`showPlayBtn`,!0),x=d&&u.get(`showPrevBtn`,!0),S=d&&u.get(`showNextBtn`,!0),C=0,w=l;y===`left`||y===`bottom`?(b&&(g=[0,0],C+=m),x&&(_=[C,0],C+=m),S&&(v=[w-f,0],w-=m)):(b&&(g=[w-f,0],w-=m),x&&(_=[0,0],C+=m),S&&(v=[w-f,0],w-=m));var T=[C,w];return e.get(`inverse`)&&T.reverse(),{viewRect:i,mainLength:l,orient:r,rotation:c[r],labelRotation:h,labelPosOpt:a,labelAlign:e.get([`label`,`align`])||o[r],labelBaseline:e.get([`label`,`verticalAlign`])||e.get([`label`,`baseline`])||s[r],playPosition:g,prevBtnPosition:_,nextBtnPosition:v,axisExtent:T,controlSize:f,controlGap:p}},t.prototype._position=function(e,t){var n=this._mainGroup,r=this._labelGroup,i=e.viewRect;if(e.orient===`vertical`){var a=vn(),o=i.x,s=i.y+i.height;Sn(a,a,[-o,-s]),Cn(a,a,-i3/2),Sn(a,a,[o,s]),i=i.clone(),i.applyTransform(a)}var c=g(i),l=g(n.getBoundingRect()),u=g(r.getBoundingRect()),d=[n.x,n.y],f=[r.x,r.y];f[0]=d[0]=c[0][0];var p=e.labelPosOpt;if(p==null||B(p)){var m=p===`+`?0:1;_(d,l,c,1,m),_(f,u,c,1,1-m)}else{var m=p>=0?0:1;_(d,l,c,1,m),f[1]=d[1]+p}n.setPosition(d),r.setPosition(f),n.rotation=r.rotation=e.rotation,h(n),h(r);function h(e){e.originX=c[0][0]-e.x,e.originY=c[1][0]-e.y}function g(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function _(e,t,n,r,i){e[r]+=n[r][i]-t[r][i]}},t.prototype._createAxis=function(e,t){var n=t.getData(),r=t.get(`axisType`)||t.get(`type`);r!==`category`&&r!==`time`&&(r=`value`);var i=DD(t,r,!1);i.getTicks=function(){return n.mapArray([`value`],function(e){return{value:e}})};var a=n.getDataExtent(`value`);i.setExtent(a[0],a[1]),PO(i,{fixMinMax:[!0,!0]});var o=new r3(`value`,i,e.axisExtent,r);return o.model=t,o},t.prototype._createGroup=function(e){var t=this[e]=new q;return this.group.add(t),t},t.prototype._renderAxisLine=function(e,t,n,r){var i=n.getExtent();if(r.get([`lineStyle`,`show`])){var a=new om({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:N({lineCap:`round`},r.getModel(`lineStyle`).getLineStyle()),silent:!0,z2:1});t.add(a);var o=this._progressLine=new om({shape:{x1:i[0],x2:this._currentPointer?this._currentPointer.x:i[0],y1:0,y2:0},style:P({lineCap:`round`,lineWidth:a.style.lineWidth},r.getModel([`progress`,`lineStyle`]).getLineStyle()),silent:!0,z2:1});t.add(o)}},t.prototype._renderAxisTick=function(e,t,n,r){var i=this,a=r.getData(),o=n.scale.getTicks();this._tickSymbols=[],F(o,function(e){var o=n.dataToCoord(e.value),s=a.getItemModel(e.value),c=s.getModel(`itemStyle`),l=s.getModel([`emphasis`,`itemStyle`]),u=s.getModel([`progress`,`itemStyle`]),d=l3(s,c,t,{x:o,y:0,onclick:L(i._changeTimeline,i,e.value)});d.ensureState(`emphasis`).style=l.getItemStyle(),d.ensureState(`progress`).style=u.getItemStyle(),Kf(d);var f=Y(d);s.get(`tooltip`)?(f.dataIndex=e.value,f.dataModel=r):f.dataIndex=f.dataModel=null,i._tickSymbols.push(d)})},t.prototype._renderAxisLabel=function(e,t,n,r){var i=this;if(n.getLabelModel().get(`show`)){var a=r.getData(),o=n.getViewLabels();this._tickLabels=[],F(o,function(r){if(!r.tick.offInterval){var o=r.tick.value,s=a.getItemModel(o),c=s.getModel(`label`),l=s.getModel([`emphasis`,`label`]),u=s.getModel([`progress`,`label`]),d=new Cd({x:n.dataToCoord(o),y:0,rotation:e.labelRotation-e.rotation,onclick:L(i._changeTimeline,i,o),silent:!1,style:Lh(c,{text:r.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});d.ensureState(`emphasis`).style=Lh(l),d.ensureState(`progress`).style=Lh(u),t.add(d),Kf(d),a3(d).dataIndex=o,i._tickLabels.push(d)}})}},t.prototype._renderControl=function(e,t,n,r){var i=e.controlSize,a=e.rotation,o=r.getModel(`controlStyle`).getItemStyle(),s=r.getModel([`emphasis`,`controlStyle`]).getItemStyle(),c=r.getPlayState(),l=r.get(`inverse`,!0);u(e.nextBtnPosition,`next`,L(this._changeTimeline,this,l?`-`:`+`)),u(e.prevBtnPosition,`prev`,L(this._changeTimeline,this,l?`+`:`-`)),u(e.playPosition,c?`stop`:`play`,L(this._handlePlayClick,this,!c),!0);function u(e,n,c,l){if(e){var u=yo(H(r.get([`controlStyle`,n+`BtnSize`]),i),i),d=[0,-u/2,u,u],f=c3(r,n+`Icon`,d,{x:e[0],y:e[1],originX:i/2,originY:0,rotation:l?-a:0,rectHover:!0,style:o,onclick:c});f.ensureState(`emphasis`).style=s,t.add(f),Kf(f)}}},t.prototype._renderCurrentPointer=function(e,t,n,r){var i=r.getData(),a=r.getCurrentIndex(),o=i.getItemModel(a).getModel(`checkpointStyle`),s=this,c={onCreate:function(e){e.draggable=!0,e.drift=L(s._handlePointerDrag,s),e.ondragend=L(s._handlePointerDragend,s),u3(e,s._progressLine,a,n,r,!0)},onUpdate:function(e){u3(e,s._progressLine,a,n,r)}};this._currentPointer=l3(o,o,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:`timelinePlayChange`,playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,t){var n=this._toAxisCoord(e)[0],r=this._axis,i=bs(r.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var T3={min:Ie(w3,`min`),max:Ie(w3,`max`),average:Ie(w3,`average`),median:Ie(w3,`median`)};function E3(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!C3(t)&&!R(t.coord)&&R(i)){var a=D3(t,n,r,e);if(t=M(t),t.type&&T3[t.type]&&a.baseAxis&&a.valueAxis){var o=De(i,a.baseAxis.dim),s=De(i,a.valueAxis.dim),c=T3[t.type](n,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=c[0],t.value=c[1]}else t.coord=[t.xAxis==null?t.radiusAxis:t.xAxis,t.yAxis==null?t.angleAxis:t.yAxis]}if(t.coord==null||!R(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&T3[t.type]){var u=r.getOtherAxis(l);u&&(t.value=M3(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)T3[d[f]]&&(d[f]=M3(n,n.mapDimension(i[f]),d[f]));return t}}function D3(e,t,n,r){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex==null?e.valueDim:t.getDimension(e.valueIndex),i.valueAxis=n.getAxis(O3(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function O3(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function k3(e,t){return e&&e.containData&&t.coord&&!S3(t)?e.containData(t.coord):!0}function A3(e,t,n){return e&&e.containZone&&t.coord&&n.coord&&!S3(t)&&!S3(n)?e.containZone(t.coord,n.coord):!0}function j3(e,t){return e?function(e,n,r,i){return nb(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return nb(e.value,t[i])}}function M3(e,t,n){if(n===`average`){var r=0,i=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,i++)}),r/i}else if(n===`median`)return e.getMedian(t);else return e.getDataExtent(t)[+(n===`max`)]}var N3=xc(),P3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this.markerGroupMap=U()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){N3(e).keep=!1}),t.eachSeries(function(e){var i=b3.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!N3(e).keep&&r.group.remove(e.group)}),F3(t,i,this.type)},t.prototype.markKeep=function(e){N3(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;F(e,function(e){var r=b3.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?jf(e):Mf(e))})})},t.type=`marker`,t}(vx);function F3(e,t,n){e.eachSeries(function(e){var r=b3.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=wh(r),o=a.z,s=a.zlevel;Eh(i.group,o,s)}})}function I3(e,t,n){var r=t.coordinateSystem,i=n.getWidth(),a=n.getHeight(),o=r&&r.getArea&&r.getArea();e.each(function(n){var s=e.getItemModel(n),c=s.get(`relativeTo`)===`coordinate`,l=c?o?o.width:0:i,u=c?o?o.height:0:a,d=c&&o?o.x:0,f=c&&o?o.y:0,p,m=J(s.get(`x`),l)+d,h=J(s.get(`y`),u)+f;if(!isNaN(m)&&!isNaN(h))p=[m,h];else if(t.getMarkerPosition)p=t.getMarkerPosition(e.getValues(e.dimensions,n));else if(r){var g=e.get(r.dimensions[0],n),_=e.get(r.dimensions[1],n);p=r.dataToPoint([g,_])}isNaN(m)||(p[0]=m),isNaN(h)||(p[1]=h),e.setItemLayout(n,p)})}var L3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=b3.getMarkerModelFromSeries(e,`markPoint`);t&&(I3(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new QM),l=R3(i,e,t);t.setData(l),I3(t.getData(),e,r),l.each(function(e){var n=l.getItemModel(e),r=n.getShallow(`symbol`),i=n.getShallow(`symbolSize`),a=n.getShallow(`symbolRotate`),s=n.getShallow(`symbolOffset`),c=n.getShallow(`symbolKeepAspect`);if(z(r)||z(i)||z(a)||z(s)){var u=t.getRawValue(e),d=t.getDataParams(e);z(r)&&(r=r(u,d)),z(i)&&(i=i(u,d)),z(a)&&(a=a(u,d)),z(s)&&(s=s(u,d))}var f=n.getModel(`itemStyle`).getItemStyle(),p=n.get(`z2`),m=_S(o,`color`);f.fill||=m,l.setItemVisual(e,{z2:H(p,0),symbol:r,symbolSize:i,symbolRotate:a,symbolOffset:s,symbolKeepAspect:c,style:f})}),c.updateData(l),this.group.add(c.group),l.eachItemGraphicEl(function(e){e.traverse(function(e){Y(e).dataModel=t})}),this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markPoint`,t}(P3);function R3(e,t,n){var r=e?I(e&&e.dimensions,function(e){var n=t.getData();return N(N({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new lE(r,n),a=I(n.get(`data`),Ie(E3,t));e&&(a=Me(a,Ie(k3,e)));var o=j3(!!e,r);return i.initData(a,null,o),i}function z3(e){e.registerComponentModel(x3),e.registerComponentView(L3),e.registerPreprocessor(function(e){_3(e.series,`markPoint`)&&(e.markPoint=e.markPoint||{})})}var B3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markLine`,t.defaultOption={z:5,symbol:[`circle`,`arrow`],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:`item`},label:{show:!0,position:`end`,distance:5},lineStyle:{type:`dashed`},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:`linear`},t}(b3),V3=xc(),H3=function(e,t,n,r){var i=e.getData(),a;if(R(r))a=r;else{var o=r.type;if(o===`min`||o===`max`||o===`average`||o===`median`||r.xAxis!=null||r.yAxis!=null){var s=void 0,c=void 0;if(r.yAxis!=null||r.xAxis!=null)s=t.getAxis(r.yAxis==null?`x`:`y`),c=Ke(r.yAxis,r.xAxis);else{var l=D3(r,i,t,e);s=l.valueAxis,c=M3(i,xE(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=M(r),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var m=n.get(`precision`);m>=0&&Re(c)&&(c=+c.toFixed(Math.min(m,20))),f.coord[u]=p.coord[u]=c,a=[f,p,{type:o,valueIndex:r.valueIndex,value:c}]}else a=[]}var h=[E3(e,a[0]),E3(e,a[1]),N({},a[2])];return h[2].type=h[2].type||null,Ce(h[2],h[0]),Ce(h[2],h[1]),h};function U3(e){return!isNaN(e)&&!isFinite(e)}function W3(e,t,n,r){var i=1-e,a=r.dimensions[e];return U3(t[i])&&U3(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function G3(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(W3(1,n,r,e)||W3(0,n,r,e)))return!0}return k3(e,t[0])&&k3(e,t[1])}function K3(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=J(o.get(`x`),i.getWidth()),l=J(o.get(`y`),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition)s=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=a.dimensions,d=e.get(u[0],t),f=e.get(u[1],t);s=a.dataToPoint([d,f])}if(xN(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;U3(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):U3(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var q3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=b3.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=V3(t).from,a=V3(t).to;i.each(function(t){K3(i,t,!0,e,n),K3(a,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),a.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new xW);this.group.add(c.group);var l=J3(i,e,t),u=l.from,d=l.to,f=l.line;V3(t).from=u,V3(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);R(p)||(p=[p,p]),R(m)||(m=[m,m]),R(h)||(h=[h,h]),R(g)||(g=[g,g]),l.from.each(function(e){_(u,e,!0),_(d,e,!1)}),f.each(function(e){var t=f.getItemModel(e),n=t.getModel(`lineStyle`).getLineStyle();f.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]);var r=t.get(`z2`);n.stroke??=u.getItemVisual(e,`style`).fill,f.setItemVisual(e,{z2:H(r,0),fromSymbolKeepAspect:u.getItemVisual(e,`symbolKeepAspect`),fromSymbolOffset:u.getItemVisual(e,`symbolOffset`),fromSymbolRotate:u.getItemVisual(e,`symbolRotate`),fromSymbolSize:u.getItemVisual(e,`symbolSize`),fromSymbol:u.getItemVisual(e,`symbol`),toSymbolKeepAspect:d.getItemVisual(e,`symbolKeepAspect`),toSymbolOffset:d.getItemVisual(e,`symbolOffset`),toSymbolRotate:d.getItemVisual(e,`symbolRotate`),toSymbolSize:d.getItemVisual(e,`symbolSize`),toSymbol:d.getItemVisual(e,`symbol`),style:n})}),c.updateData(f),l.line.eachItemGraphicEl(function(e){Y(e).dataModel=t,e.traverse(function(e){Y(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);K3(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=_S(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:H(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:H(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:H(a.get(`symbolSize`),m[+!i]),symbol:H(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(P3);function J3(e,t,n){var r=e?I(e&&e.dimensions,function(e){var n=t.getData();return N(N({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new lE(r,n),a=new lE(r,n),o=new lE([],n),s=I(n.get(`data`),Ie(H3,t,e,n));e&&(s=Me(s,Ie(G3,e)));var c=j3(!!e,r);return i.initData(I(s,function(e){return e[0]}),null,c),a.initData(I(s,function(e){return e[1]}),null,c),o.initData(I(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function Y3(e){e.registerComponentModel(B3),e.registerComponentView(q3),e.registerPreprocessor(function(e){_3(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var X3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markArea`,t.defaultOption={z:1,tooltip:{trigger:`item`},animation:!1,label:{show:!0,position:`top`},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:`top`}}},t}(b3),Z3=xc(),Q3=function(e,t,n,r){var i=r[0],a=r[1];if(!(!i||!a)){var o=E3(e,i),s=E3(e,a),c=o.coord,l=s.coord;c[0]=Ke(c[0],-1/0),c[1]=Ke(c[1],-1/0),l[0]=Ke(l[0],1/0),l[1]=Ke(l[1],1/0);var u=we([{},o,s]);return u.coord=[o.coord,s.coord],u.x0=o.x,u.y0=o.y,u.x1=s.x,u.y1=s.y,u}};function $3(e){return!isNaN(e)&&!isFinite(e)}function e6(e,t,n,r){var i=1-e;return $3(t[i])&&$3(n[i])}function t6(e,t){var n=t.coord[0],r=t.coord[1],i={coord:n,x:t.x0,y:t.y0},a={coord:r,x:t.x1,y:t.y1};return xN(e,`cartesian2d`)?n&&r&&(e6(1,n,r,e)||e6(0,n,r,e))?!0:A3(e,i,a):k3(e,i)||k3(e,a)}function n6(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=J(o.get(n[0]),i.getWidth()),l=J(o.get(n[1]),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition){var u=e.getValues([`x0`,`y0`],t),d=e.getValues([`x1`,`y1`],t),f=a.clampData(u),p=a.clampData(d),m=[];n[0]===`x0`?m[0]=f[0]>p[0]?d[0]:u[0]:m[0]=f[0]>p[0]?u[0]:d[0],n[1]===`y0`?m[1]=f[1]>p[1]?d[1]:u[1]:m[1]=f[1]>p[1]?u[1]:d[1],s=r.getMarkerPosition(m,n,!0)}else{var h=e.get(n[0],t),g=e.get(n[1],t),_=[h,g];a.clampData&&a.clampData(_,_),s=a.dataToPoint(_,!0)}if(xN(a,`cartesian2d`)){var v=a.getAxis(`x`),y=a.getAxis(`y`),h=e.get(n[0],t),g=e.get(n[1],t);$3(h)?s[0]=v.toGlobalCoord(v.getExtent()[n[0]===`x0`?0:1]):$3(g)&&(s[1]=y.toGlobalCoord(y.getExtent()[n[1]===`y0`?0:1]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}return s}var r6=[[`x0`,`y0`],[`x1`,`y0`],[`x1`,`y1`],[`x0`,`y1`]],i6=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=b3.getMarkerModelFromSeries(e,`markArea`);if(t){var r=t.getData();r.each(function(t){var i=I(r6,function(i){return n6(r,t,i,e,n)});r.setItemLayout(t,i),r.getItemGraphicEl(t).setShape(`points`,i)})}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,{group:new q});this.group.add(c.group),this.markKeep(c);var l=a6(i,e,t);t.setData(l),l.each(function(t){var n=I(r6,function(n){return n6(l,t,n,e,r)}),a=i.getAxis(`x`).scale,s=i.getAxis(`y`).scale,c=a.getExtent(),u=s.getExtent(),d=[a.parse(l.get(`x0`,t)),a.parse(l.get(`x1`,t))],f=[s.parse(l.get(`y0`,t)),s.parse(l.get(`y1`,t))];bs(d),bs(f);var p=c[0]>d[1]||c[1]f[1]||u[1]=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Z.size.m,align:`auto`,backgroundColor:Z.color.transparent,borderColor:Z.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Z.color.disabled,inactiveBorderColor:Z.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:Z.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Z.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Z.color.tertiary,borderWidth:1,borderColor:Z.color.border},emphasis:{selectorLabel:{show:!0,color:Z.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(tv),l6=Ie,u6=F,d6=q,f6=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new d6),this.group.add(this._selectorGroup=new d6),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=q_(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=W_(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=W_(P({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=W0(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=U(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),u6(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` -`)){var p=new d6;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f))if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,l6(h6,f,null,r,d)).on(`mouseover`,l6(g6,m.name,null,r,d)).on(`mouseout`,l6(_6,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Y(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=hi(h.fill);_&&_[3]===0&&(_[3]=.2,h=N(N({},h),{fill:Ei(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,l6(h6,null,f,r,d)).on(`mouseover`,l6(g6,null,f,r,d)).on(`mouseout`,l6(_6,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Y(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Y(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();u6(e,function(e){var r=e.type,i=new Cd({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Fh(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),Kf(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=p6(c,r,o,s,d,m,u),y=new d6,b=r.getModel(`textStyle`);if(z(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(m6({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;B(w)&&w?T=w.replace(`{name}`,t??``):z(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Cd({style:Lh(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new vd({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&_h({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),Kf(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();B_(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){B_(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}else return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(vx);function p6(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),u6(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:NC(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function m6(e){var t=e.icon||`roundRect`,n=WS(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Z.color.neutral00,n.style.lineWidth=2),n}function h6(e,t,n,r){_6(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),g6(e,t,n,r)}function g6(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function _6(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function v6(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),y6(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){F(i,function(t,n){e[t?`select`:`unSelect`](n)}),y6(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function y6(e,t){var n=t||{};return F(e.getData(),function(t){var r=t.get(`name`);if(!(r===` -`||r===``)){var i=e.isSelected(r);W(n,r)?n[r]=n[r]&&i:n[r]=i}}),n}function b6(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,Ie(v6,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,Ie(v6,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,Ie(v6,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,Ie(v6,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,Ie(v6,`unSelect`))}var x6=$c(S6);function S6(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=H(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new vd({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&jm(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;F([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,B(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=D6[i],o=O6[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(f6);function A6(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function j6(e){MT(C6),e.registerComponentModel(w6),e.registerComponentView(k6),A6(e)}function M6(e){MT(C6),MT(j6)}var N6=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.inside`,t.defaultOption=dg(O0.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(O0),P6=xc();function F6(e,t,n){P6(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function I6(e,t){for(var n=P6(e).coordSysRecordMap,r=n.keys(),i=0;ia[i+r]&&(r=n),o&&=t.get(`preventDefaultMouseMove`,!0),s=H(t.get(`cursorGrab`,!0),s),c=H(t.get(`cursorGrabbing`,!0),c)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:s,cursorGrabbing:c}}}function H6(e){e.registerUpdateLifecycle(`coordsys:aftercreate`,function(e,t){var n=P6(t),r=n.coordSysRecordMap||=U();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){F(S0(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,R6(t,n.model));(a.dataZoomInfoMap||=U()).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var n=e.controller,i,a=e.dataZoomInfoMap;if(a){var o=a.keys()[0];o!=null&&(i=a.get(o))}if(!i){L6(r,e);return}var s=V6(a,e,t);n.enable(s.controlType,s.opt),Nx(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)})})}var U6=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataZoom.inside`,t}return t.prototype.render=function(t,n,r){if(e.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),F6(r,t,{pan:L(W6.pan,this),zoom:L(W6.zoom,this),scrollMove:L(W6.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){I6(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(j0),W6={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=K6[t](null,[r.originX,r.originY],o,n,e),c=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],l=Math.max(1/r.scale,0);a[0]=(a[0]-c)*l+c,a[1]=(a[1]-c)*l+c;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(UG(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:G6(function(e,t,n,r,i,a){var o=K6[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:G6(function(e,t,n,r,i,a){return K6[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function G6(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(UG(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}var K6={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return e||=[0,0],a.dim===`x`?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem,c=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),n.mainType===`radiusAxis`?(o.pixel=t[0]-e[0],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,n,r,i){var a=n.axis,o=i.model.coordinateSystem.getRect(),s={};return e||=[0,0],a.orient===`horizontal`?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function q6(e){L0(e),e.registerComponentModel(N6),e.registerComponentView(U6),H6(e)}var J6=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.slider`,t.layoutMode=`box`,t.defaultOption=dg(O0.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:Z.color.accent10,borderRadius:0,backgroundColor:Z.color.transparent,dataBackground:{lineStyle:{color:Z.color.accent30,width:.5},areaStyle:{color:Z.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:Z.color.accent40,width:.5},areaStyle:{color:Z.color.accent20,opacity:.3}},fillerColor:`rgba(135,175,274,0.2)`,handleIcon:`path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z`,handleSize:`100%`,handleStyle:{color:Z.color.neutral00,borderColor:Z.color.accent20},moveHandleSize:7,moveHandleIcon:`path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z`,moveHandleStyle:{color:Z.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:Z.color.tertiary},brushSelect:!0,brushStyle:{color:Z.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:Z.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(O0),Y6=vd,X6=1,Z6=30,Q6=7,$6=`horizontal`,e8=`vertical`,t8=5,n8=[`line`,`bar`,`candlestick`,`scatter`],r8={easing:`cubicOut`,duration:100,delay:0},i8=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return t.prototype.init=function(e,t){this.api=t,this._onBrush=L(this._onBrush,this),this._onBrushEnd=L(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),Nx(this,`_dispatchZoomAction`,t.get(`throttle`),`fixRate`),this._orient=t.getOrient(),t.get(`show`)===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!==`dataZoom`||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Px(this,`_dispatchZoomAction`);var e=this.api.getZr();e.off(`mousemove`,this._onBrush),e.off(`mouseup`,this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new q;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get(`brushSelect`)?Q6:0,r=q_(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===$6?{right:r.width-i.x-i.width,top:r.height-Z6-a-n,width:i.width,height:Z6}:{right:a,top:i.y,width:Z6,height:i.height},s=Q_(e.option);F([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=W_(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===e8&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get(`inverse`),a=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n===$6&&!i?{scaleY:o?1:-1,scaleX:1}:n===$6&&i?{scaleY:o?1:-1,scaleX:-1}:n===e8&&!i?{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2});var s=e.getBoundingRect([a]),c=isNaN(s.x)?0:s.x,l=isNaN(s.y)?0:s.y;e.x=t.x-c,e.y=t.y-l,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get(`brushSelect`);n.add(new Y6({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new Y6({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:L(this._onClickPanel,this)}),a=this.api.getZr();r?(i.on(`mousedown`,this._onBrushStart,this),i.cursor=`crosshair`,a.on(`mousemove`,this._onBrush),a.on(`mouseup`,this._onBrushEnd)):(a.off(`mousemove`,this._onBrush),a.off(`mouseup`,this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),o=a&&i.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(o==null)return;var s=this._shadowPolygonPts,c=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var l=i.getDataExtent(e.thisDim),u=i.getDataExtent(o),d=(u[1]-u[0])*.3;u=[u[0]-d,u[1]+d];var f=[0,t[1]],p=[0,t[0]],m=[[t[0],0],[0,0]],h=[],g=p[1]/Math.max(1,i.count()-1),_=t[0]/(l[1]-l[0]),v=e.thisAxis.type===`time`,y=-g,b=Math.round(i.count()/t[0]),x;i.each([e.thisDim,o],function(e,t,n){if(b>0&&n%b){v||(y+=g);return}y=v?(+e-l[0])*_:y+g;var r=t==null||isNaN(t)||t===``,i=r?0:ps(t,u,f,!0);r&&!x&&n?(m.push([m[m.length-1][0],0]),h.push([h[h.length-1][0],0])):!r&&x&&(m.push([y,0]),h.push([y,0])),r||(m.push([y,i]),h.push([y,i])),x=r}),s=this._shadowPolygonPts=m,c=this._shadowPolylinePts=h}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];var S=this.dataZoomModel;function C(e){var t=S.getModel(e?`selectedDataBackground`:`dataBackground`),n=new q,r=new tm({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new rm({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel(`lineStyle`).getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}for(var w=0;w<3;w++){var T=C(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get(`showDataShadow`);if(t!==!1){var n,r=this.ecModel;return e.eachTargetAxis(function(i,a){F(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!n&&!(t!==!0&&De(n8,e.get(`type`))<0)){var o=r.getComponent(b0(i),a).axis,s=o8(i),c,l=e.coordinateSystem;s!=null&&l.getOtherAxis&&(c=l.getOtherAxis(o).inverse),s=e.getData().mapDimension(s),n={thisAxis:o,series:e,thisDim:e.getData().mapDimension(i),otherDim:s,otherAxisInverse:c}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,a=this._size,o=this.dataZoomModel,s=this.api,c=o.get(`borderRadius`)||0,l=o.get(`brushSelect`),u=t.filler=new Y6({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new Y6({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1],r:c},style:{stroke:o.get(`dataBackgroundColor`)||o.get(`borderColor`),lineWidth:X6,fill:Z.color.transparent}})),F([0,1],function(t){var a=o.get(`handleIcon`);!VS[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=WS(a,-1,0,2,2,null,!0);s.attr({cursor:s8(this._orient),draggable:!0,drift:L(this._onDragMove,this,t),ondragend:L(this._onDragEnd,this),onmouseover:L(this._onOverDataInfoTriggerArea,this,!0),onmouseout:L(this._onOverDataInfoTriggerArea,this,!1),z2:5});var c=s.getBoundingRect(),l=o.get(`handleSize`);this._handleHeight=J(l,this._size[1]),this._handleWidth=c.width/c.height*this._handleHeight,s.setStyle(o.getModel(`handleStyle`).getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState(`emphasis`).style=o.getModel([`emphasis`,`handleStyle`]).getItemStyle(),Kf(s);var u=o.get(`handleColor`);u!=null&&(s.style.fill=u),i.add(n[t]=s);var d=o.getModel(`textStyle`),f=(o.get(`handleLabel`)||{}).show||!1;e.add(r[t]=new Cd({silent:!0,invisible:!f,style:Lh(d,{x:0,y:0,text:``,verticalAlign:`middle`,align:`center`,fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var d=u;if(l){var f=J(o.get(`moveHandleSize`),a[1]),p=t.moveHandle=new vd({style:o.getModel(`moveHandleStyle`).getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:a[1]-.5,height:f}}),m=f*.8,h=t.moveHandleIcon=WS(o.get(`moveHandleIcon`),-m/2,-m/2,m,m,Z.color.neutral00,!0);h.silent=!0,h.y=a[1]+f/2-.5,p.ensureState(`emphasis`).style=o.getModel([`emphasis`,`moveHandleStyle`]).getItemStyle();var g=Math.min(a[1]/2,Math.max(f,10));d=t.moveZone=new vd({invisible:!0,shape:{y:a[1]-g,height:f+g}}),d.on(`mouseover`,function(){s.enterEmphasis(p)}).on(`mouseout`,function(){s.leaveEmphasis(p)}),i.add(p),i.add(h),i.add(d)}d.attr({draggable:!0,cursor:`grab`,drift:L(this._onActualMoveZoneDrift,this),ondragstart:L(this._onActualMoveZoneDragStart,this),ondragend:L(this._onActualMoveZoneDragEnd,this),onmouseover:L(this._onOverDataInfoTriggerArea,this,!0),onmouseout:L(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[ps(e[0],[0,100],t,!0),ps(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];UG(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:ps(a.minSpan,o,i,!0),a.maxSpan==null?null:ps(a.maxSpan,o,i,!0));var s=this._range,c=this._range=bs([ps(r[0],i,o,!0),ps(r[1],i,o,!0)]);return!s||s[0]!==c[0]||s[1]!==c[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=bs(n.slice()),i=this._size;F([0,1],function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scaleX:a/2,scaleY:a/2,x:n[e]+(e?-1:1),y:i[1]/2-a/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var a={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(a),t.moveZone.setShape(a),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr(`x`,a.x+a.width/2));for(var o=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],c=0;ct[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval(`all`,n[0]-i);this._updateView(),a&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new G(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr(`ignore`,!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100],a=this._handleEnds=[n.x,n.x+n.width],o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();UG(0,a,r,0,o.minSpan==null?null:ps(o.minSpan,i,r,!0),o.maxSpan==null?null:ps(o.maxSpan,i,r,!0)),this._range=bs([ps(a[0],r,i,!0),ps(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(dn(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new Y6({silent:!0,style:r.getModel(`brushStyle`).getItemStyle()}),n.sliderGroup.add(i)),i.attr(`ignore`,!1);var a=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),c=o.transformCoordToLocal(a.x,a.y),l=this._size;s[0]=Math.max(Math.min(l[0],s[0]),0),i.setShape({x:c[0],y:0,width:s[0]-c[0],height:l[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:`dataZoom`,from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?r8:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=S0(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:r*.2,y:i*.2,width:r*.6,height:i*.6}}return e},t.type=`dataZoom.slider`,t}(j0);function a8(e,t,n,r){var i=e.get(`labelFormatter`),a=e.get(`labelPrecision`);(a==null||a===`auto`)&&(a=n.valuePrecision);var o=n.value[t],s=o==null||isNaN(o)?``:KE(r)||WE(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?vs(o,a,!0):o+``;return z(i)?i(o,s):B(i)?i.replace(`{value}`,s):s}function o8(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function s8(e){return e===`vertical`?`ns-resize`:`ew-resize`}function c8(e){e.registerComponentModel(J6),e.registerComponentView(i8),L0(e)}function l8(e){MT(q6),MT(c8)}var u8={get:function(e,t,n){var r=M((d8[e]||{})[t]);return n&&R(r)?r[r.length-1]:r}},d8={color:{active:[`#006edd`,`#e0ffff`],inactive:[Z.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},f8=XH.mapVisual,p8=XH.eachVisual,m8=R,h8=F,g8=bs,_8=ps,v8=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&E4(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=L(e,this),this.controllerVisuals=T4(this.option.controller,t,e),this.targetVisuals=T4(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return h8(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=Dc(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return I(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){F(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],R(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(B(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(z(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=g8([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=Ne(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};Ce(r,n),Ce(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){m8(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},h8(r,function(e,t){if(XH.isValidType(t)){var n=u8.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;h8(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??=t&&M(t)||(a?i:[i]),c.symbolSize??=n&&M(n)||(a?s[0]:[s[0],s[0]]),c.symbol=f8(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;p8(l,function(e){e>u&&(u=e)}),c.symbolSize=f8(l,function(e){return _8(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Z.color.transparent,borderColor:Z.color.borderTint,contentColor:Z.color.theme[0],inactiveColor:Z.color.disabled,borderWidth:0,padding:Z.size.m,textGap:10,precision:0,textStyle:{color:Z.color.secondary}},t}(tv),y8=[20,140],b8=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=y8[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=y8[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):R(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),F(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=bs((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=x8(this,`outOfRange`,this.getExtent()),n=x8(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new q(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);D8([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=E8(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=nh(n.handleLabelPoints[l],th(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=E8(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=nh(c.indicatorLabelPoint,th(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||F8(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=yc(u,d);this._dispatchHighDown(`downplay`,T8(f[0],n)),this._dispatchHighDown(`highlight`,T8(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(SS(e.target,function(e){var n=Y(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function B8(e,t,n,r){for(var i=t.targetVisuals[r],a=XH.prepareVisualTypes(i),o={color:_S(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(L8,R8),F(z8,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(H8))}function K8(e){e.registerComponentModel(b8),e.registerComponentView(M8),G8(e)}var q8=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],J8[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=M(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=I(this._pieceList,function(e){return e=M(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=XH.listVisualTypes(),i=this.isCategory();F(t.pieces,function(e){F(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),F(n,function(e,n){var r=!1;F(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&F(this.stateList,function(e){(t[e]||(t[e]={}))[n]=u8.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,F(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;F(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=M(e)},t.prototype.getValueState=function(e){var t=XH.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){XH.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return F(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=dg(v8.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(v8),J8={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function Y8(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var X8=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Ke(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),F(o.viewPieceList,function(o){var s=o.piece,u=new q;u.onclick=L(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Cd({style:Lh(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:H(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),B_(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:T8(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return w8(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new q,o=this.visualMapModel.textStyleModel;a.add(new Cd({style:Lh(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=I(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=WS(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=M(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,F(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(S8);function Z8(e){e.registerComponentModel(q8),e.registerComponentView(X8),G8(e)}function Q8(e){MT(K8),MT(Z8)}var $8=function(){function e(e){this._thumbnailModel=e}return e.prototype.reset=function(e){this._renderVersion=e.getECUpdateCycleVersion()},e.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:Th(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},e.prototype.updateWindow=function(e,t){var n=t.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},e}(),e5=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return t.prototype.optionUpdated=function(e,t){this._updateBridge()},t.prototype._updateBridge=function(){var e=this._birdge=this._birdge||new $8(this);this._target=null,this.ecModel.eachSeries(function(e){IW(e,null)}),this.shouldShow()&&IW(this.getTarget().baseMapProvider,e)},t.prototype.shouldShow=function(){return this.getShallow(`show`,!0)},t.prototype.getBridge=function(){return this._birdge},t.prototype.getTarget=function(){if(this._target)return this._target;var e=this.getReferringComponents(`series`,{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return e?e.subType!==`graph`&&(e=null):e=this.ecModel.queryComponents({mainType:`series`,subType:`graph`})[0],this._target={baseMapProvider:e},this._target},t.type=`thumbnail`,t.layoutMode=`box`,t.dependencies=[`series`,`geo`],t.defaultOption={show:!0,right:1,bottom:1,height:`25%`,width:`25%`,itemStyle:{borderColor:Z.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:Z.color.neutral30,borderColor:Z.color.neutral40,opacity:.3},z:10},t}(tv),t5=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this._api=n,this._model=e,this._coordSys||=new vz,!this._isEnabled()){this._clear();return}this._renderVersion=n.getECUpdateCycleVersion();var r=this.group;r.removeAll();var i=e.getModel(`itemStyle`),a=i.getItemStyle();a.fill??=t.get(`backgroundColor`)||Z.color.neutral00;var o=q_(e,n).refContainer,s=W_(V_(e,!0),o),c=a.lineWidth||0,l=this._contentRect=mh(s.clone(),c/2,!0,!0),u=new q;r.add(u),u.setClipPath(new vd({shape:l.plain()}));var d=this._targetGroup=new q;u.add(d);var f=s.plain();f.r=i.getShallow(`borderRadius`,!0),r.add(this._bgRect=new vd({style:a,shape:f,silent:!1,cursor:`grab`}));var p=e.getModel(`windowStyle`),m=p.getShallow(`borderRadius`,!0);u.add(this._windowRect=new vd({shape:{x:0,y:0,width:0,height:0,r:m},style:p.getItemStyle(),silent:!1,cursor:`grab`})),this._dealRenderContent(),this._dealUpdateWindow(),r5(e,this)},t.prototype.renderContent=function(e){this._bridgeRendered=e,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),r5(this._model,this))},t.prototype._dealRenderContent=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var t=this._targetGroup,n=this._coordSys,r=this._contentRect;if(t.removeAll(),e){var i=e.group,a=i.getBoundingRect();t.add(i),this._bgRect.z2=e.z2Range.min-10,Az(n,a.x,a.y,a.width,a.height);var o=W_({left:`center`,top:`center`,aspect:a.width/a.height},r);jz(n,o.x,o.y,o.width,o.height),wz(i,n,0),i.dirty(),this._windowRect.z2=e.z2Range.max+10,this._resetRoamController(e.roamType)}}},t.prototype.updateWindow=function(e){var t=this._bridgeRendered;t&&t.renderVersion===e.renderVersion&&(t.targetTrans=e.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var t=Tn([],e.targetTrans),n=xn([],bz(null,this._coordSys),t);this._transThisToTarget=Tn([],n);var r=e.viewportRect;r=r?r.clone():new K(0,0,this._api.getWidth(),this._api.getHeight()),r.applyTransform(n);var i=this._windowRect,a=i.shape.r;i.setShape(P({r:a},r))}},t.prototype._resetRoamController=function(e){var t=this,n=this._api,r=this._roamController;if(r||=this._roamController=new pR(n.getZr()),!e||!this._isEnabled()){r.disable();return}r.enable(e,{api:n,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(e,n,r){return t._contentRect.contain(n,r)}}}),r.off(`pan`).off(`zoom`).on(`pan`,L(this._onPan,this)).on(`zoom`,L(this._onZoom,this))},t.prototype._onPan=function(e){var t=this._transThisToTarget;if(!(!this._isEnabled()||!t)){var n=Pt([],[e.oldX,e.oldY],t),r=Pt([],[e.oldX-e.dx,e.oldY-e.dy],t);this._api.dispatchAction(n5(this._model.getTarget().baseMapProvider,{dx:r[0]-n[0],dy:r[1]-n[1]}))}},t.prototype._onZoom=function(e){var t=this._transThisToTarget;if(!(!this._isEnabled()||!t)){var n=Pt([],[e.originX,e.originY],t);this._api.dispatchAction(n5(this._model.getTarget().baseMapProvider,{zoom:1/e.scale,originX:n[0],originY:n[1]}))}},t.prototype._isEnabled=function(){var e=this._model;return!(!e||!e.shouldShow()||!e.getTarget().baseMapProvider)},t.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},t.prototype.remove=function(){this._clear()},t.prototype.dispose=function(){this._clear()},t.type=`thumbnail`,t}(vx);function n5(e,t){var n={type:e.mainType===`series`?e.subType+`Roam`:e.mainType+`Roam`};return n[e.mainType+`Id`]=e.id,N(n,t),n}function r5(e,t){var n=wh(e);Eh(t.group,n.z,n.zlevel)}function i5(e){e.registerComponentModel(e5),e.registerComponentView(t5)}var a5={label:{enabled:!0},decal:{show:!1}},o5=xc(),s5=xc(),c5=$c(l5);function l5(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=s5(e).scope||(s5(e).scope={}),i=M(a5);Ce(i.label,e.getLocaleModel().get(`aria`),!1),Ce(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=U();e.eachSeries(function(e){e.isColorBySeries()||(o5(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(z(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=Ev(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=o5(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=Ev(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?N(N({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=P(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_":`gt`,">=":`gte`,"=":`eq`,"!=":`ne`,"<>":`ne`},p5=function(){function e(e){(this._condVal=B(e)?new RegExp(e):We(e)?e:null)??Ys(``)}return e.prototype.evaluate=function(e){var t=typeof e;return B(t)?this._condVal.test(e):Re(t)?this._condVal.test(e+``):!1},e}(),m5=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),h5=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&r.push(i),i=[e,t]}function u(e,t,n,r){N5(e,n)&&N5(t,r)||i.push(e,t,n,r,n,r)}function d(e,t,n,r,a,o){var s=Math.abs(t-e),c=Math.tan(s/4)*4/3,l=tw:D2&&r.push(i),r}function F5(e,t,n,r,i,a,o,s,c,l){if(N5(e,n)&&N5(t,r)&&N5(i,o)&&N5(a,s)){c.push(o,s);return}var u=2/l,d=u*u,f=o-e,p=s-t,m=Math.sqrt(f*f+p*p);f/=m,p/=m;var h=n-e,g=r-t,_=i-o,v=a-s,y=h*h+g*g,b=_*_+v*v;if(y=0&&w=0){c.push(o,s);return}var T=[],E=[];zr(e,n,i,o,.5,T),zr(t,r,a,s,.5,E),F5(T[0],E[0],T[1],E[1],T[2],E[2],T[3],E[3],c,l),F5(T[4],E[4],T[5],E[5],T[6],E[6],T[7],E[7],c,l)}function I5(e,t){var n=P5(e),r=[];t||=1;for(var i=0;i0)for(var l=0;lMath.abs(l),d=L5([c,l],+!u,t),f=(u?s:l)/d.length,p=0;pi,o=L5([r,i],+!a,t),s=a?`width`:`height`,c=a?`height`:`width`,l=a?`x`:`y`,u=a?`y`:`x`,d=e[s]/o.length,f=0;f1?null:new G(p*c+e,p*l+t)}function H5(e,t,n){var r=new G;G.sub(r,n,t),r.normalize();var i=new G;return G.sub(i,e,t),i.dot(r)}function U5(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function W5(e,t,n){for(var r=e.length,i=[],a=0;ao?(l.x=u.x=s+a/2,l.y=c,u.y=c+o):(l.y=u.y=c+o/2,l.x=s,u.x=s+a),W5(t,l,u)}function K5(e,t,n,r){if(n===1)r.push(t);else{var i=Math.floor(n/2),a=e(t);K5(e,a[0],i,r),K5(e,a[1],n-i,r)}return r}function q5(e,t){for(var n=[],r=0;r0)for(var x=r/n,S=-r/2;S<=r/2;S+=x){for(var C=Math.sin(S),w=Math.cos(S),T=0,y=0;y0;l/=2){var u=0,d=0;(e&l)>0&&(u=1),(t&l)>0&&(d=1),s+=l*l*(3*u^d),d===0&&(u===1&&(e=l-1-e,t=l-1-t),c=e,e=t,t=c)}return s}function f7(e){var t=1/0,n=1/0,r=-1/0,i=-1/0;return I(I(e,function(e){var a=e.getBoundingRect(),o=e.getComputedTransform(),s=a.x+a.width/2+(o?o[4]:0),c=a.y+a.height/2+(o?o[5]:0);return t=Math.min(s,t),n=Math.min(c,n),r=Math.max(s,r),i=Math.max(c,i),[s,c]}),function(a,o){return{cp:a,z:d7(a[0],a[1],t,n,r,i),path:e[o]}}).sort(function(e,t){return e.z-t.z}).map(function(e){return e.path})}function p7(e){return X5(e.path,e.count)}function m7(){return{fromIndividuals:[],toIndividuals:[],count:0}}function h7(e,t,n){var r=[];function i(e){for(var t=0;t=0;i--)if(!n[i].many.length){var c=n[s].many;if(c.length<=1)if(s)s=0;else return n;var a=c.length,l=Math.ceil(a/2);n[i].many=c.slice(l,a),n[s].many=c.slice(0,l),s++}return n}var y7={clone:function(e){for(var t=[],n=1-(1-e.path.style.opacity)**(1/e.count),r=0;r0))return;var s=r.getModel(`universalTransition`).get(`delay`),c=N({setToFinal:!0},o),l,u;_7(e)&&(l=e,u=t),_7(t)&&(l=t,u=e);function d(e,t,r,i,o){var l=e.many,u=e.one;if(l.length===1&&!o){var f=t?l[0]:u,p=t?u:l[0];if(i7(f))d({many:[f],one:p},!0,r,i,!0);else{var m=s?P({delay:s(r,i)},c):c;u7(f,p,m),a(f,p,f,p,m)}}else for(var h=P({dividePath:y7[n],individualDelay:s&&function(e,t,n,a){return s(e+r,i)}},c),g=t?h7(l,u,h):g7(u,l,h),_=g.fromIndividuals,v=g.toIndividuals,y=_.length,b=0;bt.length,p=l?v7(u,l):v7(f?t:e,[f?e:t]),m=0,h=0;hS7))for(var i=n.getIndices(),a=0;a0&&r.group.traverse(function(e){e instanceof id&&!e.animators.length&&e.animateFrom({style:{opacity:0}},i)})})}function L7(e){return e.getModel(`universalTransition`).get(`seriesKey`)||e.id}function R7(e){return R(e)?e.sort().join(`,`):e}function z7(e){if(e.hostModel)return e.hostModel.getModel(`universalTransition`).get(`divideShape`)}function B7(e,t){var n=U(),r=U(),i=U();return F(e.oldSeries,function(t,n){var a=e.oldDataGroupIds[n],o=e.oldData[n],s=L7(t),c=R7(s);r.set(c,{dataGroupId:a,data:o}),R(s)&&F(s,function(e){i.set(e,{key:c,dataGroupId:a,data:o})})}),F(t.updatedSeries,function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get(`dataGroupId`),a=e.getData(),o=L7(e),s=R7(o),c=r.get(s);if(c)n.set(s,{oldSeries:[{dataGroupId:c.dataGroupId,divide:z7(c.data),data:c.data}],newSeries:[{dataGroupId:t,divide:z7(a),data:a}]});else if(R(o)){var l=[];F(o,function(e){var t=r.get(e);t.data&&l.push({dataGroupId:t.dataGroupId,divide:z7(t.data),data:t.data})}),l.length&&n.set(s,{oldSeries:l,newSeries:[{dataGroupId:t,data:a,divide:z7(a)}]})}else{var u=i.get(o);if(u){var d=n.get(u.key);d||(d={oldSeries:[{dataGroupId:u.dataGroupId,data:u.data,divide:z7(u.data)}],newSeries:[]},n.set(u.key,d)),d.newSeries.push({dataGroupId:t,data:a,divide:z7(a)})}}}}),n}function V7(e,t){for(var n=0;n=0&&i.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:z7(t.oldData[n]),groupIdDim:e.dimension})}),F($s(e.to),function(e){var r=V7(n.updatedSeries,e);if(r>=0){var i=n.updatedSeries[r].getData();a.push({dataGroupId:t.oldDataGroupIds[r],data:i,divide:z7(i),groupIdDim:e.dimension})}}),i.length>0&&a.length>0&&I7(i,a,r)}function U7(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){F($s(n.seriesTransition),function(e){F($s(e.to),function(e){for(var t=n.updatedSeries,r=0;ro.vmin?n+=o.vmin-r+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:n+=e-r,r=o.vmax,i=!1;break}n+=o.vmin-r+o.gapReal,r=o.vmax}return i&&(n+=e-r),n},transformOut:function(e,t){if(t&&t.depth===2)return e;for(var n=K7,r=q7,i=!0,a=0,o=0;oc?s.vmin+(e-c)/(l-c)*(s.vmax-s.vmin):r+e-n,r=s.vmax,i=!1;break}n=l,r=s.vmax}return i&&(a=r+e-n),a}},e}();function G7(e,t){return new W7(e,t)}var K7=0,q7=0;function J7(e,t){var n=0,r={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};F(e.breaks,function(e){var i=e.gapParsed;i.type===`tpPrct`&&(n+=i.val);var o=Z7(e,t);if(o){var s=o.vmin!==e.vmin,c=o.vmax!==e.vmax,l=o.vmax-o.vmin;if(!(s&&c))if(s||c){var u=s?`S`:`E`;a[u][i.type].has=!0,a[u][i.type].span=l,a[u][i.type].inExtFrac=l/(e.vmax-e.vmin),a[u][i.type].val=i.val}else r[i.type].span+=l,r[i.type].val+=i.val}});var o=n*(0+(t[1]-t[0])+(r.tpAbs.val-r.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-r.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-r.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));F(e.breaks,function(e){var t=e.gapParsed;t.type===`tpPrct`&&(e.gapReal=n===0?0:rs(o,0)*t.val/n),t.type===`tpAbs`&&(e.gapReal=t.val),e.gapReal??=0})}function Y7(e,t,n,r,i,a){e!==`no`&&F(n,function(n){var o=Z7(n,a);if(o)for(var s=t.length-1;s>=0;s--){var c=t[s],l=r(c),u=i*3/4;l>o.vmin-u&&lt[0]&&n=0&&e<.99999}F(e,function(e){if(!(!e||e.start==null||e.end==null)&&!e.isExpanded){var a={breakOption:M(e),vmin:t.parse(e.start),vmax:t.parse(e.end),gapParsed:{type:`tpAbs`,val:0},gapReal:null};if(e.gap!=null){var o=!1;if(B(e.gap)){var s=Ze(e.gap);if(s.match(/%$/)){var c=parseFloat(s)/100;i(c,`Percent gap`)||(c=0),a.gapParsed.type=`tpPrct`,a.gapParsed.val=c,o=!0}}if(!o){var l=t.parse(e.gap);(!isFinite(l)||l<0)&&(l=0),a.gapParsed.type=`tpAbs`,a.gapParsed.val=l}}if(a.vmin===a.vmax&&(a.gapParsed.type=`tpAbs`,a.gapParsed.val=0),n&&n.noNegative&&F([`vmin`,`vmax`],function(e){a[e]<0&&(a[e]=0)}),a.vmin>a.vmax){var u=a.vmax;a.vmax=a.vmin,a.vmin=u}r.push(a)}}),r.sort(function(e,t){return e.vmin-t.vmin});var a=-1/0;return F(r,function(e,t){a>e.vmin&&(r[t]=null),a=e.vmax}),{breaks:Me(r,function(e){return!!e})}}function $7(e,t){return e9(t)===e9(e)}function e9(e){return e.start+`_\0_`+e.end}function t9(e,t,n){var r=[];F(e,function(e,n){var i=t(e);i&&i.type===`vmin`&&r.push([n])}),F(e,function(n,i){var a=t(n);if(a&&a.type===`vmax`){var o=Ne(r,function(n){return $7(t(e[n[0]]).parsedBreak.breakOption,a.parsedBreak.breakOption)});o&&o.push(i)}});var i=[];return F(r,function(t){t.length===2&&i.push(n?t:[e[t[0]],e[t[1]]])}),i}function n9(e,t,n,r){if(t.break){var i=t.break.parsedBreak,a=Ne(n,function(e){return $7(e.breakOption,t.break.parsedBreak.breakOption)}),o={lookup:r,depth:2},s={vmin:e.transformOut(i.vmin,o),vmax:e.transformOut(i.vmax,o),breakOption:i.breakOption,gapParsed:M(a.gapParsed),gapReal:i.gapReal};return{tickVal:s[t.break.type],vBreak:{type:t.break.type,parsedBreak:s}}}}function r9(e,t,n,r,i){i.original=Q7(e,t,n);var a=i.transformed=Q7(e,t,n),o=i.lookup;a.breaks=I(a.breaks,function(e,n){var i={depth:2},a=t.transformIn(e.vmin,i),s=t.transformIn(e.vmax,i),c={type:e.gapParsed.type,val:e.gapParsed.type===`tpAbs`?t.transformIn(e.vmin+e.gapParsed.val,i)-a:e.gapParsed.val};return o.from[r+n]=a,o.to[r+n]=e.vmin,o.from[r+n+1]=s,o.to[r+n+1]=e.vmax,{vmin:a,vmax:s,gapParsed:c,gapReal:e.gapReal,breakOption:e.breakOption}})}var i9={vmin:`start`,vmax:`end`};function a9(e,t){return t&&(e||={},e.break={type:i9[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function o9(){Tg({createBreakScaleMapper:G7,pruneTicksByBreak:Y7,addBreaksToTicks:X7,parseAxisBreakOption:Q7,identifyAxisBreak:$7,serializeAxisBreakIdentifier:e9,retrieveAxisBreakPairs:t9,getTicksBreakOutwardTransform:n9,parseAxisBreakOptionInwardTransform:r9,makeAxisLabelFormatterParamBreak:a9})}var s9=xc();function c9(e,t){var n=Ne(e,function(e){return Eg().identifyAxisBreak(e.parsedBreak.breakOption,t.breakOption)});return n||e.push(n={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),n}function l9(e){F(e,function(e){return e.shouldRemove=!0})}function u9(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function d9(e,t,n,r,i){var a=n.axis;if(a.scale.isBlank()||!Eg())return;var o=Eg().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:`only_break`}),function(e){return e.break},!1);if(!o.length)return;var s=n.getModel(`breakArea`),c=s.get(`zigzagAmplitude`),l=s.get(`zigzagMinSpan`),u=s.get(`zigzagMaxSpan`);l=Math.max(2,l||0),u=Math.max(l,u||0);var d=s.get(`expandOnClick`),f=s.get(`zigzagZ`),p=s.getModel(`itemStyle`).getItemStyle(),m=p.stroke,h=p.lineWidth,g=p.lineDash,_=p.fill,v=new q({ignoreModelZ:!0}),y=a.isHorizontal(),b=s9(t).visualList||(s9(t).visualList=[]);l9(b);for(var x=function(e){var t=o[e][0].break.parsedBreak,r=[];r[0]=a.toGlobalCoord(a.dataToCoord(t.vmin,!0)),r[1]=a.toGlobalCoord(a.dataToCoord(t.vmax,!0)),r[1]=y;D&&(w=y);var O=[],k=[];O[d]=n,k[d]=i,!E&&!D&&(O[d]+=C?-c:c,k[d]-=C?c:-c),O[v]=w,k[v]=w,x.push(O),S.push(k);var A=void 0;if(Tn[1]&&n.reverse(),{coordPair:n,brkId:Eg().serializeAxisBreakIdentifier(t.breakOption)}});s.sort(function(e,t){return e.coordPair[0]-t.coordPair[0]});for(var c=o[0],l=null,u=0;u=0?c[0].width:c[1].width)+u.x)/2-l.x,f=Math.min(d,d-u.x),p=Math.max(d,d-u.x);s=(d-(p<0?p:f>0?f:0))/u.x}var m=new G,h=new G;G.scale(m,r,-s),G.scale(h,r,1-s),CA(n[0],m),CA(n[1],h)}function m9(e,t){var n={breaks:[]};return F(t.breaks,function(r){if(r){var i=Ne(e.get(`breaks`,!0),function(e){return Eg().identifyAxisBreak(e,r)});if(i){var a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===`expandAxisBreak`?!0:a===`collapseAxisBreak`?!1:a===`toggleAxisBreak`?!i.isExpanded:i.isExpanded,n.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),n}function h9(){QN({adjustBreakLabelPair:p9,buildAxisBreakLine:f9,rectCoordBuildBreakAxis:d9,updateModelAxisBreak:m9})}function g9(e){cP(e),o9(),h9()}function _9(){eL(v9)}function v9(e,t){F(e,function(e){if(!e.model.get([`axisLabel`,`inside`])){var n=y9(e);if(n){var r=e.isHorizontal()?`height`:`width`,i=e.model.get([`axisLabel`,`margin`]);t[r]-=n[r]+i,e.position===`top`?t.y+=n.height+i:e.position===`left`&&(t.x+=n.width+i)}}})}function y9(e){var t=e.model,n=e.scale;if(!t.get([`axisLabel`,`show`])||n.isBlank())return;var r,i,a=n.getExtent();n instanceof tD?i=n.count():(r=n.getTicks(),i=r.length);var o=e.getLabelModel(),s=jD(e),c,l=1;i>40&&(l=Math.ceil(i/40));for(var u=0;uIk,ChartView:()=>Sx,ComponentModel:()=>tv,ComponentView:()=>vx,List:()=>lE,Model:()=>og,PRIORITY:()=>ow,SeriesModel:()=>lx,color:()=>ti,connect:()=>rT,dataTool:()=>kT,dependencies:()=>HC,disConnect:()=>aT,disconnect:()=>iT,dispose:()=>oT,env:()=>k,extendChartView:()=>Hk,extendComponentModel:()=>zk,extendComponentView:()=>Bk,extendSeriesModel:()=>Vk,format:()=>sk,getCoordinateSystemDimensions:()=>_T,getInstanceByDom:()=>sT,getInstanceById:()=>cT,getMap:()=>ET,graphic:()=>ok,helper:()=>IO,init:()=>nT,innerDrawElementOnCanvas:()=>EC,matrix:()=>_n,number:()=>ik,parseGeoJSON:()=>rk,parseGeoJson:()=>rk,registerAction:()=>hT,registerCoordinateSystem:()=>gT,registerCustomSeries:()=>vT,registerLayout:()=>yT,registerLoading:()=>CT,registerLocale:()=>bg,registerMap:()=>TT,registerPostInit:()=>fT,registerPostUpdate:()=>pT,registerPreprocessor:()=>uT,registerProcessor:()=>dT,registerTheme:()=>lT,registerTransform:()=>DT,registerUpdateLifecycle:()=>mT,registerVisual:()=>bT,setCanvasCreator:()=>wT,setPlatformAPI:()=>oe,throttle:()=>Mx,time:()=>ak,use:()=>MT,util:()=>ck,vector:()=>dt,version:()=>VC,zrUtil:()=>se,zrender:()=>Ro});MT([HM]),MT([vM]),MT([YN,eI,CI,BL,oR,tV,XV,xU,HW,eG,sG,vG,oq,zq,iJ,NJ,zJ,eY,sY,FY,GY,uX,PZ]),MT(AQ),MT(_$),MT(YB),MT(F$),MT(aq),MT(H$),MT(Z1),MT(h0),MT(H2),MT(b4),MT(kQ),MT(X4),MT($4),MT(g3),MT(z3),MT(Y3),MT(o6),MT(M6),MT(l8),MT(q6),MT(c8),MT(Q8),MT(K8),MT(Z8),MT(i5),MT(d5),MT(O5),MT(j5),MT(U7),MT(BA),MT(g9),MT(_9),MT(VL);var x9=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=1;e.default=function(){return`${t++}`}})),S9=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,n=null;return function(){var r=this,i=[...arguments];clearTimeout(n),n=setTimeout(function(){e.apply(r,i)},t)}}})),C9=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SizeSensorId=e.SensorTabIndex=e.SensorClassName=void 0,e.SizeSensorId=`size-sensor-id`,e.SensorClassName=`size-sensor-object`,e.SensorTabIndex=`-1`})),w9=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSensor=void 0;var t=r(S9()),n=C9();function r(e){return e&&e.__esModule?e:{default:e}}e.createSensor=function(e,r){var i=void 0,a=[],o=function(){getComputedStyle(e).position===`static`&&(e.style.position=`relative`);var t=document.createElement(`object`);return t.onload=function(){t.contentDocument.defaultView.addEventListener(`resize`,s),s()},t.style.display=`block`,t.style.position=`absolute`,t.style.top=`0`,t.style.left=`0`,t.style.height=`100%`,t.style.width=`100%`,t.style.overflow=`hidden`,t.style.pointerEvents=`none`,t.style.zIndex=`-1`,t.style.opacity=`0`,t.setAttribute(`class`,n.SensorClassName),t.setAttribute(`tabindex`,n.SensorTabIndex),t.type=`text/html`,e.appendChild(t),t.data=`about:blank`,t},s=(0,t.default)(function(){a.forEach(function(t){t(e)})}),c=function(e){i||=o(),a.indexOf(e)===-1&&a.push(e)},l=function(){i&&i.parentNode&&(i.contentDocument&&i.contentDocument.defaultView.removeEventListener(`resize`,s),i.parentNode.removeChild(i),e.removeAttribute(n.SizeSensorId),i=void 0,a=[],r&&r())};return{element:e,bind:c,destroy:l,unbind:function(e){var t=a.indexOf(e);t!==-1&&a.splice(t,1),a.length===0&&i&&l()}}}})),T9=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSensor=void 0;var t=C9(),n=r(S9());function r(e){return e&&e.__esModule?e:{default:e}}e.createSensor=function(e,r){var i=void 0,a=[],o=(0,n.default)(function(){a.forEach(function(t){t(e)})}),s=function(){var t=new ResizeObserver(o);return t.observe(e),o(),t},c=function(e){i||=s(),a.indexOf(e)===-1&&a.push(e)},l=function(){i&&i.disconnect(),a=[],i=void 0,e.removeAttribute(t.SizeSensorId),r&&r()};return{element:e,bind:c,destroy:l,unbind:function(e){var t=a.indexOf(e);t!==-1&&a.splice(t,1),a.length===0&&i&&l()}}}})),E9=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSensor=void 0;var t=w9(),n=T9();e.createSensor=typeof ResizeObserver<`u`?n.createSensor:t.createSensor})),D9=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.removeSensor=e.getSensor=e.Sensors=void 0;var t=i(x9()),n=E9(),r=C9();function i(e){return e&&e.__esModule?e:{default:e}}var a=e.Sensors={};function o(e){e&&a[e]&&delete a[e]}e.getSensor=function(e){var i=e.getAttribute(r.SizeSensorId);if(i&&a[i])return a[i];var s=(0,t.default)();e.setAttribute(r.SizeSensorId,s);var c=(0,n.createSensor)(e,function(){return o(s)});return a[s]=c,c},e.removeSensor=function(e){var t=e.element.getAttribute(r.SizeSensorId);e.destroy(),o(t)}})),O9=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ver=e.clear=e.bind=void 0;var t=D9();e.bind=function(e,n){var r=(0,t.getSensor)(e);return r.bind(n),function(){r.unbind(n)}},e.clear=function(e){var n=(0,t.getSensor)(e);(0,t.removeSensor)(n)},e.ver=`1.0.3`}))();function k9(e,t){var n={};return t.forEach(function(t){n[t]=e[t]}),n}function A9(e){return typeof e==`function`}function j9(e){return typeof e==`string`}var M9=n(t(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}}))()),N9=function(e){C(t,e);function t(t){var n=e.call(this,t)||this;return n.echarts=b9,n}return t}(function(e){C(t,e);function t(t){var n=e.call(this,t)||this;return n.echarts=t.echarts,n.ele=null,n.isInitialResize=!0,n.eventHandlerRefs={},n}return t.prototype.componentDidMount=function(){this.renderNewEcharts()},t.prototype.componentDidUpdate=function(e){var t=this.props.shouldSetOption;if(!(A9(t)&&!t(e,this.props))){if(!(0,M9.default)(e.theme,this.props.theme)||!(0,M9.default)(e.opts,this.props.opts)){this.dispose(),this.renderNewEcharts();return}var n=this.getEchartsInstance();(0,M9.default)(e.onEvents,this.props.onEvents)||(this.unbindEvents(n),this.bindEvents(n,this.props.onEvents));var r=[`option`,`notMerge`,`replaceMerge`,`lazyUpdate`,`showLoading`,`loadingOption`];(0,M9.default)(k9(this.props,r),k9(e,r))||this.updateEChartsOption(),(!(0,M9.default)(e.style,this.props.style)||!(0,M9.default)(e.className,this.props.className))&&this.resize()}},t.prototype.componentWillUnmount=function(){this.dispose()},t.prototype.initEchartsInstance=function(){return S(this,void 0,void 0,function(){var e=this;return x(this,function(t){return[2,new Promise(function(t){e.echarts.init(e.ele,e.props.theme,e.props.opts),e.getEchartsInstance().on(`finished`,function(){var n=e.ele.clientWidth,r=e.ele.clientHeight;e.echarts.dispose(e.ele);var i=w({width:n,height:r},e.props.opts);t(e.echarts.init(e.ele,e.props.theme,i))})})]})})},t.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)},t.prototype.dispose=function(){if(this.ele){try{(0,O9.clear)(this.ele)}catch(e){console.warn(e)}this.echarts.dispose(this.ele)}},t.prototype.renderNewEcharts=function(){return S(this,void 0,void 0,function(){var e,t,n,r,i,a,o=this;return x(this,function(s){switch(s.label){case 0:return e=this.props,t=e.onEvents,n=e.onChartReady,r=e.autoResize,i=r===void 0?!0:r,[4,this.initEchartsInstance()];case 1:return s.sent(),a=this.updateEChartsOption(),this.bindEvents(a,t||{}),A9(n)&&n(a),this.ele&&i&&(0,O9.bind)(this.ele,function(){o.resize()}),[2]}})})},t.prototype.bindEvents=function(e,t){var n=this,r=function(t,r){if(j9(t)&&A9(r)){var i=function(t){r(t,e)};e.on(t,i),n.eventHandlerRefs[t]=i}};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&r(i,t[i])},t.prototype.unbindEvents=function(e){for(var t=0,n=Object.entries(this.eventHandlerRefs);t{let{token:e}=P9(),{t}=v(),n={xAxis:{type:`category`,show:!1,data:[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`]},yAxis:{show:!1,type:`value`},series:[{data:[120,88,116,60,70],type:`bar`,itemStyle:{color:e.colorPrimary},barWidth:10}]},r={xAxis:{show:!1,type:`category`,data:[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`]},yAxis:{show:!1,type:`value`},series:[{data:[1,2,3,2,3,2,1],type:`line`,itemStyle:{color:e.colorPrimary}}]},i={title:{text:t(`dashboard.analysis.annualSales`),textStyle:{color:e.colorText,fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong}},tooltip:{trigger:`axis`,axisPointer:{type:`cross`,label:{backgroundColor:e.colorPrimaryBg,color:e.colorPrimary}},borderWidth:0,backgroundColor:e.colorPrimaryBg,textStyle:{color:e.colorText}},legend:{data:[t(`dashboard.analysis.grossProfit`),t(`dashboard.analysis.netProfit`),t(`dashboard.analysis.totalExpense`)],textStyle:{color:e.colorText}},grid:{left:`3%`,right:`4%`,bottom:`3%`,containLabel:!0},xAxis:[{type:`category`,boundaryGap:!1,data:[t(`dashboard.analysis.january`),t(`dashboard.analysis.february`),t(`dashboard.analysis.march`),t(`dashboard.analysis.april`),t(`dashboard.analysis.may`),t(`dashboard.analysis.june`),t(`dashboard.analysis.july`),t(`dashboard.analysis.august`),t(`dashboard.analysis.september`),t(`dashboard.analysis.october`),t(`dashboard.analysis.november`),t(`dashboard.analysis.december`)]}],yAxis:[{type:`value`,splitLine:{lineStyle:{color:e.colorBorder}}}],series:[{name:t(`dashboard.analysis.grossProfit`),type:`line`,stack:`Total`,areaStyle:{color:e.colorPrimaryBorder},emphasis:{focus:`series`},itemStyle:{color:e.colorPrimary},data:[30,36,42,33,21,26,29,35,42,32,28,26]},{name:t(`dashboard.analysis.netProfit`),type:`line`,stack:`Total`,areaStyle:{color:e.colorSuccessBorder},emphasis:{focus:`series`},itemStyle:{color:e.colorSuccess},data:[32,16,18,30,15,19,22,17,24,19,30,31]},{name:t(`dashboard.analysis.totalExpense`),type:`line`,stack:`Total`,areaStyle:{color:e.colorWarningBorder},emphasis:{focus:`series`},itemStyle:{color:e.colorWarning},data:[36,24,36,36,39,56,24,23,21,12,16,19]}]},_={title:{text:t(`dashboard.analysis.accessFrom`),textStyle:{color:e.colorText,fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong}},tooltip:{trigger:`item`},legend:{bottom:`0%`,left:`center`,textStyle:{color:e.colorText}},series:[{name:t(`dashboard.analysis.accessFrom`),type:`pie`,radius:[`40%`,`70%`],avoidLabelOverlap:!1,itemStyle:{borderRadius:e.borderRadius,borderColor:e.colorBorder,borderWidth:2},label:{show:!1,position:`center`},emphasis:{label:{show:!0,fontSize:40,fontWeight:`bold`}},labelLine:{show:!1},data:[{value:1048,name:t(`dashboard.analysis.searchEngine`)},{value:735,name:t(`dashboard.analysis.direct`)},{value:580,name:t(`dashboard.analysis.email`)},{value:484,name:t(`dashboard.analysis.unionAds`)},{value:300,name:t(`dashboard.analysis.videoAds`)}]}]};return(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(y,{gutter:[20,20],children:[(0,$.jsx)(h,{xxl:6,lg:12,xs:24,children:(0,$.jsxs)(s,{variant:`borderless`,children:[(0,$.jsx)(`div`,{children:t(`dashboard.analysis.totalRevenue`)}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between pt-4 pb-2`,children:[(0,$.jsx)(`div`,{className:`text-4xl flex-0`,children:`¥3,415.00`}),(0,$.jsx)(N9,{style:{width:120,height:80},option:n})]}),(0,$.jsxs)(`div`,{children:[t(`dashboard.since.lastWeek`),` `,(0,$.jsxs)(`span`,{style:{color:e.colorError},children:[(0,$.jsx)(u,{}),`11.28%`]})]})]})}),(0,$.jsx)(h,{xxl:6,lg:12,xs:24,children:(0,$.jsxs)(s,{variant:`borderless`,children:[(0,$.jsx)(`div`,{children:t(`dashboard.analysis.totalExpenses`)}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between pt-4 pb-2`,children:[(0,$.jsx)(`div`,{className:`text-4xl flex-0`,children:`¥8,425.00`}),(0,$.jsx)(N9,{style:{width:120,height:80},option:r})]}),(0,$.jsxs)(`div`,{children:[t(`dashboard.since.lastWeek`),` `,(0,$.jsxs)(`span`,{style:{color:e.colorSuccess},children:[(0,$.jsx)(d,{}),`15.33%`]})]})]})}),(0,$.jsx)(h,{xxl:6,lg:12,xs:24,children:(0,$.jsxs)(s,{variant:`borderless`,children:[(0,$.jsx)(`div`,{children:t(`dashboard.analysis.visitors`)}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between pt-4 pb-2`,children:[(0,$.jsx)(`div`,{className:`text-4xl flex-0`,children:`1,128`}),(0,$.jsx)(`div`,{className:`text-4xl rounded-full flex items-center justify-center`,style:{height:80,width:80,background:e.colorPrimaryBg},children:(0,$.jsx)(l,{style:{color:e.colorPrimary}})})]}),(0,$.jsxs)(`div`,{children:[t(`dashboard.since.lastWeek`),` `,(0,$.jsxs)(`span`,{style:{color:e.colorError},children:[(0,$.jsx)(u,{}),`32.60%`]})]})]})}),(0,$.jsx)(h,{xxl:6,lg:12,xs:24,children:(0,$.jsxs)(s,{variant:`borderless`,children:[(0,$.jsx)(`div`,{children:t(`dashboard.analysis.likes`)}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between pt-4 pb-2`,children:[(0,$.jsx)(`div`,{className:`text-4xl flex-0`,children:`668`}),(0,$.jsx)(`div`,{className:`text-4xl rounded-full flex items-center justify-center`,style:{height:80,width:80,background:e.colorPrimaryBg},children:(0,$.jsx)(c,{style:{color:e.colorPrimary}})})]}),(0,$.jsxs)(`div`,{children:[t(`dashboard.since.lastWeek`),` `,(0,$.jsxs)(`span`,{style:{color:e.colorSuccess},children:[(0,$.jsx)(d,{}),`9.60%`]})]})]})}),(0,$.jsx)(h,{xl:18,xs:24,children:(0,$.jsx)(s,{variant:`borderless`,children:(0,$.jsx)(N9,{style:{width:`100%`,height:460},option:i})})}),(0,$.jsx)(h,{xl:6,xs:24,children:(0,$.jsx)(s,{variant:`borderless`,children:(0,$.jsx)(N9,{style:{width:`100%`,height:460},option:_})})}),(0,$.jsx)(h,{xl:12,xs:24,children:(0,$.jsxs)(s,{variant:`borderless`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between mb-5`,children:[(0,$.jsx)(`div`,{style:{fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong},children:t(`dashboard.analysis.salesRanking`)}),(0,$.jsx)(p.Group,{options:[{label:t(`dashboard.analysis.month`),value:`month`},{label:t(`dashboard.analysis.year`),value:`year`},{label:t(`dashboard.analysis.day`),value:`day`}],defaultValue:`day`,optionType:`button`,buttonStyle:`solid`})]}),(0,$.jsx)(a,{columns:[{title:t(`dashboard.analysis.article`),dataIndex:`name`,key:`name`,render:e=>(0,$.jsx)(`a`,{children:e})},{title:t(`dashboard.analysis.age`),dataIndex:`age`,key:`age`},{title:t(`dashboard.analysis.address`),dataIndex:`address`,key:`address`},{title:t(`dashboard.analysis.tags`),key:`tags`,dataIndex:`tags`,render:(e,{tags:t})=>(0,$.jsx)($.Fragment,{children:t.map(e=>{let t=e.length>5?`geekblue`:`green`;return e===`loser`&&(t=`volcano`),(0,$.jsx)(m,{color:t,children:e.toUpperCase()},e)})})},{title:t(`dashboard.analysis.action`),key:`action`,render:(e,n)=>(0,$.jsxs)(o,{size:`middle`,children:[(0,$.jsxs)(`a`,{children:[t(`dashboard.analysis.invite`),` `,n.name]}),(0,$.jsx)(`a`,{children:t(`dashboard.analysis.delete`)})]})}],dataSource:[{key:`1`,name:`John Brown`,age:32,address:`New York No. 1 Lake Park`,tags:[`nice`,`developer`]},{key:`2`,name:`Jim Green`,age:42,address:`London No. 1 Lake Park`,tags:[`loser`]},{key:`3`,name:`Joe Black`,age:32,address:`Sydney No. 1 Lake Park`,tags:[`cool`,`teacher`]},{key:`4`,name:`Jim Green`,age:42,address:`London No. 1 Lake Park`,tags:[`loser`]},{key:`5`,name:`Joe Black`,age:32,address:`Sydney No. 1 Lake Park`,tags:[`cool`,`teacher`]}],pagination:!1,scroll:{x:800}})]})}),(0,$.jsx)(h,{xl:12,xs:24,children:(0,$.jsxs)(s,{variant:`borderless`,children:[(0,$.jsx)(`div`,{className:`mb-5`,style:{fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong},children:t(`dashboard.analysis.userReviews`)}),(0,$.jsx)(f,{dataSource:[{title:`Ant Design Title 1`},{title:`Ant Design Title 2`},{title:`Ant Design Title 3`},{title:`Ant Design Title 4`},{title:`Ant Design Title 5`}],renderItem:(e,n)=>(0,$.jsx)(f.Item,{children:(0,$.jsx)(f.Item.Meta,{avatar:(0,$.jsx)(g,{src:`https://xsgames.co/randomusers/avatar.php?g=pixel&key=${n}`}),title:(0,$.jsx)(`a`,{href:`https://ant.design`,children:e.title}),description:t(`dashboard.analysis.reviewDescription`)})})})]})})]})})};export{F9 as default}; \ No newline at end of file diff --git a/public/assets/analysis-HuRsWqrh.js b/public/assets/analysis-HuRsWqrh.js new file mode 100644 index 0000000..1a505a7 --- /dev/null +++ b/public/assets/analysis-HuRsWqrh.js @@ -0,0 +1,40 @@ +import{i as e,r as t,t as n}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as r,t as i}from"./jsx-runtime-ADHq9IcL.js";import{t as a}from"./table-CG-GtmXj.js";import{t as o}from"./space-BqavXZJj.js";import{t as s}from"./avatar-ZeeUR_v9.js";import{t as c}from"./radio-CFTLacYu.js";import{t as l}from"./card-BFxeciPE.js";import{n as u,t as d}from"./row-DQ81_S1d.js";import{t as f}from"./list-Ck0Qiowu.js";import{t as p}from"./tag-BMkLMUVK.js";import{t as m}from"./theme-D6zyXNMh.js";import{t as h}from"./ArrowDownOutlined-CH5xWTUL.js";import{t as g}from"./ArrowUpOutlined-BqDvHB4K.js";import{t as _}from"./LikeOutlined-BXSS7iVR.js";import{t as v}from"./TeamOutlined-CZDGTBQJ.js";import{t as y}from"./useTranslation-DIuTqE8W.js";import{a as b,i as x,n as S,r as C,t as w}from"./tslib.es6-5i5FW2KX.js";var T=e(r()),E=function(e,t){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},E(e,t)};function D(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);E(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var O=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),k=new(function(){function e(){this.browser=new O,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(k.wxa=!0,k.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?k.worker=!0:!k.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(k.node=!0,k.svgSupported=!0):A(navigator.userAgent,k);function A(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var j=`12px sans-serif`,ee=20,te=100,ne=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function re(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n=0)s=o*n.length;else for(var c=0;cut,HashMap:()=>it,RADIAN_TO_DEGREE:()=>lt,assert:()=>Xe,assignProps:()=>Te,bind:()=>L,clone:()=>M,concatArray:()=>at,createCanvas:()=>Ee,createHashMap:()=>U,createObject:()=>ot,curry:()=>Ie,defaults:()=>P,disableUserSelect:()=>st,each:()=>F,eqNaN:()=>Ge,extend:()=>N,filter:()=>Me,find:()=>Ne,guid:()=>xe,hasOwn:()=>W,indexOf:()=>De,inherits:()=>Oe,isArray:()=>R,isArrayLike:()=>Ae,isBuiltInObject:()=>ze,isDom:()=>Ve,isFunction:()=>z,isGradientObject:()=>He,isImagePatternObject:()=>Ue,isNumber:()=>Re,isObject:()=>V,isPrimitive:()=>et,isRegExp:()=>We,isString:()=>B,isStringSafe:()=>Le,isTypedArray:()=>Be,keys:()=>Pe,logError:()=>Se,map:()=>I,merge:()=>Ce,mergeAll:()=>we,mixin:()=>ke,noop:()=>ct,normalizeCssArray:()=>Ye,reduce:()=>je,retrieve:()=>Ke,retrieve2:()=>H,retrieve3:()=>qe,setAsPrimitive:()=>$e,slice:()=>Je,trim:()=>Ze}),ce=je([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),le=je([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),ue=Object.prototype.toString,de=Array.prototype,fe=de.forEach,pe=de.filter,me=de.slice,he=de.map,ge=function(){}.constructor,_e=ge?ge.prototype:null,ve=`__proto__`,ye=2311,be=2**53-1;function xe(){return ye>=be&&(ye=0),ye++}function Se(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function M(e){if(typeof e!=`object`||!e)return e;var t=e,n=ue.call(e);if(n===`[object Array]`){if(!et(e)){t=[];for(var r=0,i=e.length;rgt,applyTransform:()=>Pt,clone:()=>mt,copy:()=>pt,create:()=>ft,dist:()=>kt,distSquare:()=>jt,distance:()=>Ot,distanceSquare:()=>At,div:()=>wt,dot:()=>Tt,len:()=>yt,lenSquare:()=>xt,length:()=>bt,lengthSquare:()=>St,lerp:()=>Nt,max:()=>It,min:()=>Ft,mul:()=>Ct,negate:()=>Mt,normalize:()=>Dt,scale:()=>Et,scaleAndAdd:()=>_t,set:()=>ht,sub:()=>vt});function ft(e,t){return e??=0,t??=0,[e,t]}function pt(e,t){return e[0]=t[0],e[1]=t[1],e}function mt(e){return[e[0],e[1]]}function ht(e,t,n){return e[0]=t,e[1]=n,e}function gt(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function _t(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function vt(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function yt(e){return Math.sqrt(xt(e))}var bt=yt;function xt(e){return e[0]*e[0]+e[1]*e[1]}var St=xt;function Ct(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function wt(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function Tt(e,t){return e[0]*t[0]+e[1]*t[1]}function Et(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Dt(e,t){var n=yt(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Ot(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var kt=Ot;function At(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var jt=At;function Mt(e,t){return e[0]=-t[0],e[1]=-t[1],e}function Nt(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function Pt(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function Ft(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function It(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Lt=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),Rt=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Lt(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new Lt(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new Lt(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new Lt(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Lt(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new Lt(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),zt=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){F(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Yt(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Ht(s,o):Ht(o,s))}function Xt(e){return e.nodeName.toUpperCase()===`CANVAS`}var Zt=/([&<>"'])/g,Qt={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function $t(e){return e==null?``:(e+``).replace(Zt,function(e,t){return Qt[t]})}var en=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,tn=[],nn=k.browser.firefox&&+k.browser.version.split(`.`)[0]<39;function rn(e,t,n,r){return n||={},r?an(e,t,n):nn&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?an(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function an(e,t,n){if(k.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Xt(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}else if(qt(tn,e,r,i)){n.zrX=tn[0],n.zrY=tn[1];return}}n.zrX=n.zrY=0}function on(e){return e||window.event}function sn(e,t,n){if(t=on(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&rn(e,i,t,n)}else{rn(e,t,t,n);var a=cn(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&en.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function cn(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function ln(e,t,n,r){e.addEventListener(t,n,r)}function un(e,t,n,r){e.removeEventListener(t,n,r)}var dn=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function fn(e){return e.which===2||e.which===3}var pn=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=mn(r)/mn(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=hn(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},_n=t({clone:()=>En,copy:()=>bn,create:()=>vn,identity:()=>yn,invert:()=>Tn,mul:()=>xn,rotate:()=>Cn,scale:()=>wn,translate:()=>Sn});function vn(){return[1,0,0,1,0,0]}function yn(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function bn(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function xn(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function Sn(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Cn(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function wn(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function Tn(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function En(e){var t=vn();return bn(t,e),t}var G=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),Dn=Math.min,On=Math.max,kn=Math.abs,An=[`x`,`y`],jn=[`width`,`height`],Mn=new G,Nn=new G,Pn=new G,Fn=new G,In=Xn(),Ln=In.minTv,Rn=In.maxTv,zn=[0,0],K=function(){function e(e,t,n,r){Vn(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=Dn(e.x,this.x),n=Dn(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=On(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=On(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return Un(vn(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&G.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=Vn(Kn,t.x,t.y,t.width,t.height)),n instanceof e||(n=Vn(qn,n.x,n.y,n.width,n.height));var s=!!r;In.reset(i,s);var c=In.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){Hn(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n){e!==t&&Hn(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Mn.x=Pn.x=t.x,Mn.y=Fn.y=t.y,Nn.x=Fn.x=t.x+t.width,Nn.y=Pn.y=t.y+t.height,Mn.transform(n),Fn.transform(n),Nn.transform(n),Pn.transform(n),e.x=Dn(Mn.x,Nn.x,Pn.x,Fn.x),e.y=Dn(Mn.y,Nn.y,Pn.y,Fn.y);var s=On(Mn.x,Nn.x,Pn.x,Fn.x),c=On(Mn.y,Nn.y,Pn.y,Fn.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=yn(e||[]),Sn(e,e,ht(Jn,-t.x,-t.y)),wn(e,e,ht(Jn,r,i)),Sn(e,e,ht(Jn,n.x,n.y)),e},e}(),Bn=K.create,Vn=K.set,Hn=K.copy,Un=K.calculateTransform,Wn=K.applyTransform,Gn=K.contain,Kn=new K(0,0,0,0),qn=new K(0,0,0,0),Jn=[];function Yn(e,t,n,r,i,a,o,s){var c=kn(t-n),l=kn(r-e),u=Dn(c,l),d=An[i],f=An[1-i],p=jn[i];t=l||!In.bidirectional)&&(Ln[d]=-l,Ln[f]=0,In.useDir&&In.calcDirMTV())))}function Xn(){var e=0,t=new G,n=new G,r={minTv:new G,maxTv:new G,useDir:!1,dirMinTv:new G,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=On(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(rr.copy(u.getBoundingRect()),u.transform&&rr.applyTransform(u.transform),rr.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function ar(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||Zn}return!1}function or(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=ar(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==Zn)){t.target=o;break}}}function sr(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var cr=32,lr=7;function ur(e){for(var t=0;e>=cr;)t|=e&1,e>>=1;return e+t}function dr(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function fr(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function mr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function hr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function gr(e,t){var n=lr,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=lr||m>=lr);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-mr(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=lr||g>=lr);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),pr(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var vr=!1;function yr(){vr||(vr=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function br(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var xr=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=br}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Sr=k.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Cr={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=1.70158*1.525;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Cr.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Cr.bounceIn(e*2)*.5:Cr.bounceOut(e*2-1)*.5+.5}},wr=Math.pow,Tr=Math.sqrt,Er=1e-8,Dr=1e-4,Or=Tr(3),kr=1/3,Ar=ft(),jr=ft(),Mr=ft();function Nr(e){return e>-Er&&eEr||e<-Er}function Fr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function Ir(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function Lr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(Nr(u)&&Nr(d))if(Nr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}else{var h=d*d-4*u*f;if(Nr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=Tr(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-wr(-y,kr):wr(y,kr),b=b<0?-wr(-b,kr):wr(b,kr);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*Tr(u*u*u)),S=Math.acos(x)/3,C=Tr(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+Or*Math.sin(S)))/(3*o),T=(-s+C*(w-Or*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function Rr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(Nr(o)){if(Pr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(Nr(u))i[0]=-a/(2*o);else if(u>0){var d=Tr(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function zr(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function Br(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;Ar[0]=c,Ar[1]=l;for(var v=0;v<1;v+=.05)jr[0]=Fr(e,n,i,o,v),jr[1]=Fr(t,r,a,s,v),g=jt(Ar,jr),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(Nr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=Tr(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Gr(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Kr(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function qr(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;Ar[0]=o,Ar[1]=s;for(var f=0;f<1;f+=.05){jr[0]=Hr(e,n,i,f),jr[1]=Hr(t,r,a,f);var p=jt(Ar,jr);p=0&&p=1?1:Lr(0,r,a,1,e,s)&&Fr(0,i,o,1,s[0])}}}var Zr=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||ct,this.ondestroy=e.ondestroy||ct,this.onrestart=e.onrestart||ct,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1)if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=z(e)?e:Cr[e]||Xr(e)},e}(),Qr=function(){function e(e){this.value=e}return e}(),$r=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Qr(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),ei=function(){function e(e){this._list=new $r,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Qr(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),ti=t({fastLerp:()=>bi,fastMapToColor:()=>xi,lerp:()=>Si,lift:()=>vi,liftColor:()=>Ai,lum:()=>Di,mapToColor:()=>Ci,modifyAlpha:()=>Ti,modifyHSL:()=>wi,parse:()=>hi,parseCssFloat:()=>si,parseCssInt:()=>oi,random:()=>Oi,stringify:()=>Ei,toHex:()=>yi}),ni={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ri(e){return e=Math.round(e),e<0?0:e>255?255:e}function ii(e){return e=Math.round(e),e<0?0:e>360?360:e}function ai(e){return e<0?0:e>1?1:e}function oi(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?ri(parseFloat(t)/100*255):ri(parseInt(t,10))}function si(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?ai(parseFloat(t)/100):ai(parseFloat(t))}function ci(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function li(e,t,n){return e+(t-e)*n}function ui(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function di(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var fi=new ei(20),pi=null;function mi(e,t){pi&&di(pi,t),pi=fi.put(e,pi||t.slice())}function hi(e,t){if(e){t||=[];var n=fi.get(e);if(n)return di(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in ni)return di(t,ni[r]),mi(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){ui(t,0,0,0,1);return}return ui(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),mi(e,t),t}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){ui(t,0,0,0,1);return}return ui(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),mi(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?ui(t,+l[0],+l[1],+l[2],1):ui(t,0,0,0,1);u=si(l.pop());case`rgb`:if(l.length>=3)return ui(t,oi(l[0]),oi(l[1]),oi(l[2]),l.length===3?u:si(l[3])),mi(e,t),t;ui(t,0,0,0,1);return;case`hsla`:if(l.length!==4){ui(t,0,0,0,1);return}return l[3]=si(l[3]),gi(l,t),mi(e,t),t;case`hsl`:if(l.length!==3){ui(t,0,0,0,1);return}return gi(l,t),mi(e,t),t;default:return}}ui(t,0,0,0,1)}}function gi(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=si(e[1]),i=si(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],ui(t,ri(ci(o,a,n+1/3)*255),ri(ci(o,a,n)*255),ri(ci(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function _i(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function vi(e,t){var n=hi(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Ei(n,n.length===4?`rgba`:`rgb`)}}function yi(e){var t=hi(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function bi(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=ri(li(o[0],s[0],c)),n[1]=ri(li(o[1],s[1],c)),n[2]=ri(li(o[2],s[2],c)),n[3]=ai(li(o[3],s[3],c)),n}}var xi=bi;function Si(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=hi(t[i]),s=hi(t[a]),c=r-i,l=Ei([ri(li(o[0],s[0],c)),ri(li(o[1],s[1],c)),ri(li(o[2],s[2],c)),ai(li(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}var Ci=Si;function wi(e,t,n,r){var i=hi(e);if(e)return i=_i(i),t!=null&&(i[0]=ii(z(t)?t(i[0]):t)),n!=null&&(i[1]=si(z(n)?n(i[1]):n)),r!=null&&(i[2]=si(z(r)?r(i[2]):r)),Ei(gi(i),`rgba`)}function Ti(e,t){var n=hi(e);if(n&&t!=null)return n[3]=ai(t),Ei(n,`rgba`)}function Ei(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Di(e,t){var n=hi(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}function Oi(){return Ei([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],`rgb`)}var ki=new ei(100);function Ai(e){if(B(e)){var t=ki.get(e);return t||(t=vi(e,-.1),ki.put(e,t)),t}else if(He(e)){var n=N({},e);return n.colorStops=I(e.colorStops,function(e){return{offset:e.offset,color:vi(e.color,-.1)}}),n}return e}var ji=Math.round;function Mi(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=hi(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var Ni=1e-4;function Pi(e){return e-Ni}function Fi(e){return ji(e*1e3)/1e3}function Ii(e){return ji(e*1e4)/1e4}function Li(e){return`matrix(`+Fi(e[0])+`,`+Fi(e[1])+`,`+Fi(e[2])+`,`+Fi(e[3])+`,`+Ii(e[4])+`,`+Ii(e[5])+`)`}var Ri={left:`start`,right:`end`,center:`middle`,middle:`middle`};function zi(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function Bi(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function Vi(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function Hi(e){return e&&!!e.image}function Ui(e){return e&&!!e.svgElement}function Wi(e){return Hi(e)||Ui(e)}function Gi(e){return e.type===`linear`}function Ki(e){return e.type===`radial`}function qi(e){return e&&(e.type===`linear`||e.type===`radial`)}function Ji(e){return`url(#`+e+`)`}function Yi(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Xi(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*lt,i=H(e.scaleX,1),a=H(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+ji(o*lt)+`deg, `+ji(s*lt)+`deg)`),c.join(` `)}var Zi=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),Qi=Array.prototype.slice;function $i(e,t,n){return(t-e)*n+e}function ea(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=ha,s=t;if(Ae(t)){var c=ca(t);o=c,(c===1&&!Re(t[0])||c===2&&!Re(t[0][0]))&&(a=!0)}else if(Re(t)&&!Ge(t))o=la;else if(B(t))if(!isNaN(+t))o=la;else{var l=hi(t);l&&(s=l,o=fa)}else if(He(t)){var u=N({},s);u.colorStops=I(t.colorStops,function(e){return{offset:e.offset,color:hi(e.color)}}),Gi(t)?o=pa:Ki(t)&&(o=ma),s=u}i===0?this.valType=o:(o!==this.valType||o===ha)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=z(n)?n:Cr[n]||Xr(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=_a(r),c=ga(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?va:e[s];if((_a(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(_a(i))i===ua?ea(g,f[r],p[r],h):ta(g,f[r],p[r],h);else if(ga(i)){var _=f[r],v=p[r],y=i===pa;e[s]={type:y?`linear`:`radial`,x:$i(_.x,v.x,h),y:$i(_.y,v.y,h),colorStops:I(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:$i(e.offset,n.offset,h),color:sa(ea([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=$i(_.x2,v.x2,h),e[s].y2=$i(_.y2,v.y2,h)):e[s].r=$i(_.r,v.r,h)}else if(c)ea(g,f[r],p[r],h),n||(e[s]=sa(g));else{var b=$i(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===la?e[n]=e[n]+r:t===fa?(hi(e[n],va),na(va,va,r,1),e[n]=sa(va)):t===ua?na(e[n],e[n],r,1):t===da&&ra(e[n],e[n],r,1)},e}(),ba=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){Se(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Pe(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,oa(c),r),this._trackKeys.push(o)}s.addKeyframe(e,oa(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function xa(){return new Date().getTime()}var Sa=function(e){D(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=xa()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Sr(t),!e._paused&&e.update())}Sr(t)},t.prototype.start=function(){this._running||(this._time=xa(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=xa(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=xa()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new ba(e,t.loop);return this.addAnimator(n),n},t}(zt),Ca=300,wa=k.domSupported,Ta=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:I(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Ea={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Da=!1;function Oa(e){var t=e.pointerType;return t===`pen`||t===`touch`}function ka(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Aa(e){e&&(e.zrByTouch=!0)}function ja(e,t){return sn(e.dom,new Na(e,t),!0)}function Ma(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Na=function(){function e(e,t){this.stopPropagation=ct,this.stopImmediatePropagation=ct,this.preventDefault=ct,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Pa={mousedown:function(e){e=sn(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=sn(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=sn(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=sn(this.dom,e);var t=e.toElement||e.relatedTarget;Ma(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Da=!0,e=sn(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Da||(e=sn(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=sn(this.dom,e),Aa(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Pa.mousemove.call(this,e),Pa.mousedown.call(this,e)},touchmove:function(e){e=sn(this.dom,e),Aa(e),this.handler.processGesture(e,`change`),Pa.mousemove.call(this,e)},touchend:function(e){e=sn(this.dom,e),Aa(e),this.handler.processGesture(e,`end`),Pa.mouseup.call(this,e),new Date-+this.__lastTouchMomentYa||e<-Ya}var Za=[],Qa=[],$a=vn(),eo=Math.abs,to=function(){function e(){}return e.prototype.getLocalTransform=function(e){return no(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Xa(this.rotation)||Xa(this.x)||Xa(this.y)||Xa(this.scaleX-1)||Xa(this.scaleY-1)||Xa(this.skewX)||Xa(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(Ja(n),this.invTransform=null);return}n||=vn(),t?this.getLocalTransform(n):Ja(n),e&&(t?xn(n,e,n):bn(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||vn(),Tn(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Za);var n=Za[0]<0?-1:1,r=Za[1]<0?-1:1,i=((Za[0]-n)*t+n)/Za[0]||0,a=((Za[1]-r)*t+r)/Za[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||vn(),xn(Qa,e.invTransform,t),t=Qa);var n=this.originX,r=this.originY;(n||r)&&($a[4]=n,$a[5]=r,xn(Qa,t,$a),Qa[4]-=n,Qa[5]-=r,t=Qa),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Pt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Pt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&eo(e[0]-1)>1e-10&&eo(e[3]-1)>1e-10?Math.sqrt(eo(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){ao(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&Cn(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),no=to.getLocalTransform;function ro(){return new to}var io=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function ao(e,t){return Te(e,t,io)}function oo(e){so||=new ei(100),e||=`12px sans-serif`;var t=so.get(e);return t||(t={font:e,strWidthCache:new ei(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:ae.measureText(`国`,e).width,asciiCharWidth:ae.measureText(`a`,e).width},so.put(e,t)),t}var so;function co(e){if(!(lo>=uo)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=ae.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?lo=uo:i>2&&lo++,t}}var lo=0,uo=5;function fo(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=co(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function po(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=ae.measureText(t,e.font).width,n.put(t,r)),r}function mo(e,t,n,r){var i=po(oo(t),e),a=vo(t);return new K(go(0,i,n),_o(0,a,r),i,a)}function ho(e,t,n,r){var i=((e||``)+``).split(` +`);if(i.length===1)return mo(i[0],t,n,r);for(var a=new K(0,0,0,0),o=0;o=0?parseFloat(e)/100*t:parseFloat(e):e}function bo(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=yo(r[0],n.width),l+=yo(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`;break}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var xo=`__zr_normal__`,So=io.concat([`ignore`]),Co=je(io,function(e,t){return e[t]=!0,e},{ignore:!1}),wo={},To=new K(0,0,0,0),Eo=[],Do=function(){function e(e){this.id=xe(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0;break}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=To,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(wo,n,d):bo(wo,n,d),i.x=wo.x,i.y=wo.y,a=wo.align,o=wo.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=yo(f[0],d.width),m=yo(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||={};if(u){var _=g.overflowRect=g.overflowRect||new K(0,0,0,0);i.getLocalTransform(Eo),Tn(Eo,Eo),K.copy(_,d),_.applyTransform(Eo)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Ka:Ga},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&hi(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,Ei(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},N(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(V(e))for(var n=Pe(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(xo,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===xo;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(De(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){Se(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=Fo(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,Lo(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=De(r,e),a=De(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var q=function(e){D(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=De(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=De(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nGo,disposeAll:()=>Ko,getElementSSRData:()=>Xo,getInstance:()=>qo,init:()=>Wo,registerPainter:()=>Jo,registerSSRDataGetter:()=>Zo,version:()=>Qo}),zo={},Bo={};function Vo(e){delete Bo[e]}function Ho(e){if(!e)return!1;if(typeof e==`string`)return Di(e,1)0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var J=ms;function ms(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`;break}return hs(e,t,n)}function hs(e,t,n){return B(e)?_s(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function gs(e){return B(e)&&_s(e)}function _s(e){return!!ts(e).match(/%$/)}function vs(e,t,n){return isNaN(t)?n?``+e:+e:(t=ns(rs(0,t),es),e=(+e).toFixed(t),n?e:+e)}function ys(e,t,n){return t??=10,vs(e,t,n)}function bs(e){return e.sort(function(e,t){return e-t}),e}function xs(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(as(e*t)/t===e)return n}return Ss(e)}function Ss(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return rs(0,(a<0?0:i-1-a)-r)}function Cs(e,t){var n=os(ls(e[1]-e[0])/us),r=as(ls(is(t[1]-t[0]))/us),i=ns(rs(-n+r,0),es);return isFinite(i)?i:es}function ws(e,t,n){var r=is(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=ls(2*is(n||1)*is(r))/us,a=ls(is(t))/us,o=rs(0,ss(-i+a));return isFinite(o)||(o=NaN),o}function Ts(e,t,n){return e[t]&&Es(e,n)[t]||0}function Es(e,t){var n=je(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=cs(10,t),i=I(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=I(i,function(e){return os(e)}),s=je(o,function(e,t){return e+t},0),c=I(i,function(e,t){return e-o[t]});sl&&(l=c[d],u=d);++o[u],c[u]=0,++s}return I(o,function(e){return e/r})}function Ds(e,t){var n=rs(xs(e),xs(t)),r=e+t;return n>es?r:vs(r,n)}var Os=cs(2,53)-1;function ks(e){var t=ds*2;return(e%t+t)%t}function As(e){return e>-$o&&e<$o}var js=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Ms(e){if(e instanceof Date)return e;if(B(e)){var t=js.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(e==null)return new Date(NaN);return new Date(as(e))}function Ns(e){return cs(10,Ps(e))}function Ps(e){if(e===0)return 0;var t=os(ls(e)/us);return e/cs(10,t)>=10&&t++,t}function Fs(e,t){var n=Ps(e),r=cs(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,vs(e,-n)}function Is(e,t){var n=(e.length-1)*t+1,r=os(n),i=+e[r-1],a=n-r;return a?i+a*(e[r]-i):i}function Ls(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0):!1},e}();function Fc(e){e.option=e.parentModel=e.ecModel=null}function Ic(){return[1/0,-1/0]}function Lc(e,t){Vc(t)&&(te[1]&&(e[1]=t))}function Rc(e,t){Vc(t)&&te[1]&&(e[1]=t)}function Bc(e,t){Hc(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function Vc(e){return e!=null&&isFinite(e)}function Hc(e,t){return Vc(e)&&Vc(t)&&e<=t}function Uc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Wc(e){Hc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Gc(){var e=`__ec_once_`+Kc++;return function(t,n){W(t,e)||(t[e]=1,n())}}var Kc=Bs();function qc(e,t,n){var r=U(),i=0;F(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Jc(e){return e.value+``}function Yc(e){return e+``}function Xc(e,t){return H(t,!0)?e.seriesIndex+2:0}function Zc(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Qc(e,t){return{seriesType:e,overallReset:t}}function $c(e){return{overallReset:e}}var el=`.`,tl=`___EC__COMPONENT__CONTAINER___`,nl=`___EC__EXTENDED_CLASS___`;function rl(e){var t={main:``,sub:``};if(e){var n=e.split(el);t.main=n[0]||``,t.sub=n[1]||``}return t}function il(e){Xe(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function al(e){return!!(e&&e[nl])}function ol(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return sl(t)?n=function(e){D(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},Oe(n,this)),N(n.prototype,e),n[nl]=!0,n.extend=this.extend,n.superCall=dl,n.superApply=fl,n.superClass=t,n}}function sl(e){return z(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function cl(e,t){e.extend=t.extend}var ll=Math.round(Math.random()*10);function ul(e){var t=[`__\0is_clz`,ll++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function dl(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function fl(e,t,n){return this.superClass.prototype[t].apply(e,n)}function pl(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){il(r),e.prototype.type=r;var i=rl(r);if(!i.sub)t[i.main]=e;else if(i.sub!==tl){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[tl]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=rl(e),r=[],i=t[n.main];return i&&i[tl]?F(i,function(e,t){t!==tl&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[rl(e).main]},e.getAllClassMainTypes=function(){var e=[];return F(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[rl(e).main];return n&&n[tl]};function n(e){var n=t[e.main];return(!n||!n[tl])&&(n=t[e.main]={},n[tl]=!0),n}}function ml(e,t){for(var n=0;n=0||i&&De(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var hl=ml([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),gl=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return hl(this,e,t)},e}(),_l=new ei(50);function vl(e){if(typeof e==`string`){var t=_l.get(e);return t&&t.image}else return e}function yl(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=_l.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!xl(t)&&a.pending.push(o)):(t=ae.loadImage(e,bl,bl),t.__zrImageSrc=e,_l.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e}function bl(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;l++)c-=s;var u=po(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function El(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=po(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?Dl(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=po(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Dl(e,t,n){for(var r=0,i=0,a=e.length;ig&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=Tl(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)El(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=oo(l),S=0;S<_.length;S++)w=Math.max(po(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var kl=function(){function e(){}return e}(),Al=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),jl=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function Ml(e,t,n,r,i){var a=new jl,o=Vl(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=Sl.lastIndex=0,h;(h=Sl.exec(o))!=null;){var g=h.index;g>m&&Nl(a,o.substring(m,g),t,p),Nl(a,h[2],t,p,h[1]),m=Sl.lastIndex}md){var re=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length0&&m+r.accumWidth>r.width&&(u=t.split(` +`),l=!0),r.accumWidth=m}else{var h=Ll(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(` +`);for(var g=oo(c),_=0;_=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Fl=je(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Il(e){return!Pl(e)||!!Fl[e]}function Ll(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=oo(t),f=0;fn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Rl(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;K.set(zl,go(n,o,i),_o(r,s,a),o,s),K.intersect(t,zl,null,Bl);var c=Bl.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=go(c.x,c.width,i,!0),e.baseY=_o(c.y,c.height,a,!0)}}var zl=new K(0,0,0,0),Bl={outIntersectRect:{},clamp:!0};function Vl(e){return e==null?e=``:e+=``}function Hl(e){var t=Vl(e.text),n=e.font;return Ul(e,po(oo(n),t),vo(n),null)}function Ul(e,t,n,r){var i=new K(go(e.x||0,t,e.textAlign),_o(e.y||0,n,e.textBaseline),t,n),a=r??(Wl(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Wl(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var Gl=`__zr_style_`+Math.round(Math.random()*10),Kl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},ql={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Kl[Gl]=!0;var Jl=[`z`,`z2`,`invisible`],Yl=[`invisible`],Xl=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=Pe(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(au[0]=ru(i)*n+e,au[1]=nu(i)*r+t,ou[0]=ru(a)*n+e,ou[1]=nu(a)*r+t,l(s,au,ou),u(c,au,ou),i%=iu,i<0&&(i+=iu),a%=iu,a<0&&(a+=iu),i>a&&!o?a+=iu:ii&&(su[0]=ru(p)*n+e,su[1]=nu(p)*r+t,l(s,su,s),u(c,su,c))}var hu={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},gu=[],_u=[],vu=[],yu=[],bu=[],xu=[],Su=Math.min,Cu=Math.max,wu=Math.cos,Tu=Math.sin,Eu=Math.abs,Du=Math.PI,Ou=Du*2,ku=typeof Float32Array<`u`,Au=[];function ju(e){return Math.round(e/Du*1e8)/1e8%2*Du}function Mu(e,t){var n=ju(e[0]);n<0&&(n+=Ou);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Ou?i=n+Ou:t&&n-i>=Ou?i=n-Ou:!t&&n>i?i=n+(Ou-ju(n-i)):t&&n0&&(this._ux=Eu(n/Ua/e)||0,this._uy=Eu(n/Ua/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(hu.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Eu(e-this._xi),r=Eu(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(hu.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(hu.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(hu.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),Au[0]=r,Au[1]=i,Mu(Au,a),r=Au[0],i=Au[1];var o=i-r;return this.addData(hu.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=wu(i)*n+e,this._yi=Tu(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(hu.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(hu.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&ku&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){vu[0]=vu[1]=bu[0]=bu[1]=Number.MAX_VALUE,yu[0]=yu[1]=xu[0]=xu[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,r=0,i=0,a;for(a=0;an||Eu(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case hu.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=Vr(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case hu.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Jr(i,a,y,b,h,g,10),i=h,a=g;break;case hu.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=wu(D)*T+C,s=Tu(D)*E+w),m=Cu(T,E)*Su(Ou,Math.abs(O)),i=wu(k)*T+C,a=Tu(k)*E+w;break;case hu.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case hu.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s;break}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case hu.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case hu.L:u=n[x++],d=n[x++];var w=Eu(u-c),T=Eu(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case hu.C:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++],te=n[x++],ne=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;zr(c,k,j,te,D,gu),zr(l,A,ee,ne,D,_u),e.bezierCurveTo(gu[1],_u[1],gu[2],_u[2],gu[3],_u[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,ee,te,ne),c=te,l=ne;break;case hu.Q:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Kr(c,k,j,D,gu),Kr(l,A,ee,D,_u),e.quadraticCurveTo(gu[1],_u[1],gu[2],_u[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,ee),c=j,l=ee;break;case hu.A:var re=n[x++],ie=n[x++],ae=n[x++],oe=n[x++],se=n[x++],ce=n[x++],le=n[x++],ue=!n[x++],de=ae>oe?ae:oe,fe=Eu(ae-oe)>.001,pe=se+ce,me=!1;if(f){var E=p[g++];h+E>_&&(pe=se+ce*(_-h)/E,me=!0),h+=E}if(fe&&e.ellipse?e.ellipse(re,ie,ae,oe,le,se,pe,ue):e.arc(re,ie,de,se,pe,ue),me)break lo;C&&(o=wu(se)*ae+re,s=Tu(se)*oe+ie),c=wu(pe)*ae+re,l=Tu(pe)*oe+ie;break;case hu.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var he=n[x++],ge=n[x++];if(f){var E=p[g++];if(h+E>_){var _e=_-h;e.moveTo(u,d),e.lineTo(u+Su(_e,he),d),_e-=he,_e>0&&e.lineTo(u+he,d+Su(_e,ge)),_e-=ge,_e>0&&e.lineTo(u+Cu(he-_e,0),d+ge),_e-=he,_e>0&&e.lineTo(u,d+Cu(ge-_e,0));break lo}h+=E}e.rect(u,d,he,ge);break;case hu.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=hu,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function Pu(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=zu);var f=Math.atan2(c,s);return f<0&&(f+=zu),f>=r&&f<=i||f+zu>=r&&f+zu<=i}function Vu(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var Hu=Nu.CMD,Uu=Math.PI*2,Wu=1e-4;function Gu(e,t){return Math.abs(e-t)t&&l>r&&l>a&&l>s||l1&&Ju(),p=Fr(t,r,a,s,qu[0]),f>1&&(m=Fr(t,r,a,s,qu[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=Hr(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);Ku[0]=-c,Ku[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=Uu-1e-4){r=0,i=Uu;var u=a?1:-1;return o>=Ku[0]+e&&o<=Ku[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=Uu,i+=Uu);for(var f=0,p=0;p<2;p++){var m=Ku[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=Uu+h),(h>=r&&h<=i||h+Uu>=r&&h+Uu<=i)&&(h>Math.PI/2&&h1&&(n||(s+=Vu(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case Hu.M:u=a[m++],d=a[m++],c=u,l=d;break;case Hu.L:if(n){if(Pu(c,l,a[m],a[m+1],t,r,i))return!0}else s+=Vu(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Hu.C:if(n){if(Fu(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Yu(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Hu.Q:if(n){if(Iu(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Xu(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Hu.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=Vu(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(Bu(_,v,b,x,x+S,C,t,w,i))return!0}else s+=Zu(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case Hu.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(Pu(u,d,f,d,t,r,i)||Pu(f,d,f,p,t,r,i)||Pu(f,p,u,p,t,r,i)||Pu(u,p,u,d,t,r,i))return!0}else s+=Vu(f,d,f,p,r,i),s+=Vu(u,p,u,d,r,i);break;case Hu.Z:if(n){if(Pu(c,l,u,d,t,r,i))return!0}else s+=Vu(c,l,u,d,r,i);c=u,l=d;break}}return!n&&!Gu(l,d)&&(s+=Vu(c,l,u,d,r,i)||0),s!==0}function $u(e,t,n){return Qu(e,0,!1,t,n)}function ed(e,t,n,r){return Qu(e,t,!0,n,r)}var td=P({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Kl),nd={style:P({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ql.style)},rd=io.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),id=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Ga:t>.2?qa:Ka}else if(e)return Ka}return Ga},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(B(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Di(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Nu(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),ed(a,o/s,e,t)))return!0}if(this.hasFill())return $u(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:N(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return ot(td,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=N({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=N({},r.shape),N(c,n.shape)):(c=N({},i?this.shape:r.shape),N(c,n.shape)):s&&(c=r.shape),c)if(a){this.shape=N({},this.shape);for(var l={},u=Pe(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var fd=Math.round;function pd(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(fd(r*2)===fd(i*2)&&(e.x1=e.x2=hd(r,s,!0)),fd(a*2)===fd(o*2)&&(e.y1=e.y2=hd(a,s,!0)),e):e}}function md(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=hd(r,s,!0),e.y=hd(i,s,!0),e.width=Math.max(hd(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(hd(i+o,s,!1)-e.y,o===0?0:1),e):e}}function hd(e,t,n){if(!t)return e;var r=fd(e*2);return(r+fd(t))%2==0?r/2:(r+(n?1:-1))/2}var gd=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),_d={},vd=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new gd},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=md(_d,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?dd(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(id);vd.prototype.type=`rect`;var yd={fill:`#000`},bd=2,xd={},Sd={style:P({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ql.style)},Cd=function(e){D(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=yd,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&Id(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=Pd(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(od),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=Nd(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=Md(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=bd,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=qe(s.opacity,t.opacity,1),Od(p,s),y&&(p.lineWidth=qe(s.lineWidth,t.lineWidth,g),p.lineDash=H(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Ul(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(vd),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=H(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(ud),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=H(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=qe(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return kd(e)&&(t=[e.fontStyle,e.fontWeight,Dd(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&Ze(t)||e.textFont||e.font},t}(Xl),wd={left:!0,right:1,center:1},Td={top:1,bottom:1,middle:1},Ed=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Dd(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Od(e,t){for(var n=0;n=0,a=!1;if(e instanceof id){var o=$d(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(uf(s)||uf(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=N({},r),l=N({},l),l.fill=s):!uf(l.fill)&&uf(s)?(a=!0,r=N({},r),l=N({},l),l.fill=Ai(s)):!uf(l.stroke)&&uf(c)&&(a||(r=N({},r),l=N({},l)),l.stroke=Ai(c)),r.style=l}}if(r&&r.z2==null){a||(r=N({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Cf(e,t,n){if(n&&n.z2==null){n=N({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function wf(e,t,n){var r=De(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:xf(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=N({},n),o=N({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Tf(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Sf(this,e,t,n);if(e===`blur`)return wf(this,e,n);if(e===`select`)return Cf(this,e,n)}return n}function Ef(e){e.stateProxy=Tf;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Tf),n&&(n.stateProxy=Tf)}function Df(e,t){!Ff(e,t)&&!e.__highByOuter&&yf(e,ff)}function Of(e,t){!Ff(e,t)&&!e.__highByOuter&&yf(e,pf)}function kf(e,t){e.__highByOuter|=1<<(t||0),yf(e,ff)}function Af(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&yf(e,pf)}function jf(e){yf(e,mf)}function Mf(e){yf(e,hf)}function Nf(e){yf(e,gf)}function Pf(e){yf(e,_f)}function Ff(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function If(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=ef(i),o=Xd(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){hf(e)}),s&&n.push(i)),a.isBlured=!1}),F(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Lf(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function Kf(e,t,n){$f(e,!0),yf(e,Ef),Yf(e,t,n)}function qf(e){$f(e,!1)}function Jf(e,t,n,r){r?qf(e):Kf(e,t,n)}function Yf(e,t,n){var r=Y(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var Xf=[`emphasis`,`blur`,`select`],Zf={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function Qf(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=dp(m),s*=dp(m));var h=(i===a?-1:1)*dp((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+pp(d)*g-fp(d)*_,y=(t+r)/2+fp(d)*g+pp(d)*_,b=_p([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=_p(x,S);if(gp(x,S)<=-1&&(C=mp),gp(x,S)>=1&&(C=0),C<0){var w=Math.round(C/mp*1e6)/1e6;C=mp*2+w%2*mp}u.addData(l,v,y,o,s,b,C,d,a)}var yp=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,bp=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function xp(e){var t=new Nu;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=Nu.CMD,c=e.match(yp);if(!c)return t;for(var l=0;lA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function Kp(e){var t;if(R(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function qp(e,t){var n,r=Vp(t.r,0),i=Vp(t.r0||0,0),a=r>0;if(!(!a&&!(i>0))){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=zp(c-s),p=f>Pp&&f%Pp;if(p>Up&&(f=p),!(r>Up))e.moveTo(l,u);else if(f>Pp-Up)e.moveTo(l+r*Ip(s),u+r*Fp(s)),e.arc(l,u,r,s,c,!d),i>Up&&(e.moveTo(l+i*Ip(c),u+i*Fp(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Ip(s),j=r*Fp(s),ee=i*Ip(c),te=i*Fp(c),ne=f>Up;if(ne){var re=t.cornerRadius;re&&(n=Kp(re),m=n[0],h=n[1],g=n[2],_=n[3]);var ie=zp(r-i)/2;if(v=Hp(ie,g),y=Hp(ie,_),b=Hp(ie,m),x=Hp(ie,h),w=S=Vp(v,y),T=C=Vp(b,x),(S>Up||C>Up)&&(E=r*Ip(c),D=r*Fp(c),O=i*Ip(s),k=i*Fp(s),fUp){var fe=Hp(g,w),pe=Hp(_,w),me=Gp(O,k,A,j,r,fe,d),he=Gp(E,D,ee,te,r,pe,d);e.moveTo(l+me.cx+me.x0,u+me.cy+me.y0),w0&&e.arc(l+me.cx,u+me.cy,fe,Rp(me.y0,me.x0),Rp(me.y1,me.x1),!d),e.arc(l,u,r,Rp(me.cy+me.y1,me.cx+me.x1),Rp(he.cy+he.y1,he.cx+he.x1),!d),pe>0&&e.arc(l+he.cx,u+he.cy,pe,Rp(he.y1,he.x1),Rp(he.y0,he.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>Up)||!ne)e.lineTo(l+ee,u+te);else if(T>Up){var fe=Hp(m,T),pe=Hp(h,T),me=Gp(ee,te,E,D,i,-pe,d),he=Gp(A,j,O,k,i,-fe,d);e.lineTo(l+me.cx+me.x0,u+me.cy+me.y0),T0&&e.arc(l+me.cx,u+me.cy,pe,Rp(me.y0,me.x0),Rp(me.y1,me.x1),!d),e.arc(l,u,i,Rp(me.cy+me.y1,me.cx+me.x1),Rp(he.cy+he.y1,he.cx+he.x1),d),fe>0&&e.arc(l+he.cx,u+he.cy,fe,Rp(he.y1,he.x1),Rp(he.y0,he.x0),!d))}else e.lineTo(l+ee,u+te),e.arc(l,u,i,c,s,d)}e.closePath()}}}var Jp=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),Yp=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Jp},t.prototype.buildPath=function(e,t){qp(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(id);Yp.prototype.type=`sector`;var Xp=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),Zp=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Xp},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(id);Zp.prototype.type=`ring`;function Qp(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=Qp(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sxm[1]){if(i=!1,Sm.negativeSize||n)return i;var s=ym(xm[0]-bm[1]),c=ym(bm[0]-xm[1]);_m(s,c)>wm.len()&&(s=c||!Sm.bidirectional)&&(G.scale(Cm,o,-c*r),Sm.useDir&&Sm.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function jm(e,t,n,r,i,a){Am(`update`,e,t,n,r,i,a)}function Mm(e,t,n,r,i,a){Am(`enter`,e,t,n,r,i,a)}function Nm(e){if(!e.__zr)return!0;for(var t=0;tfm,BezierCurve:()=>um,BoundingRect:()=>K,Circle:()=>Ap,CompoundPath:()=>pm,Ellipse:()=>Mp,Group:()=>q,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>ud,IncrementalDisplayable:()=>Dm,Line:()=>om,LinearGradient:()=>hm,OrientedBoundingRect:()=>Tm,Path:()=>id,Point:()=>G,Polygon:()=>tm,Polyline:()=>rm,RadialGradient:()=>gm,Rect:()=>vd,Ring:()=>Zp,Sector:()=>Yp,Text:()=>Cd,WH:()=>Vm,XY:()=>X,applyTransform:()=>nh,calcZ2Range:()=>Th,clipPointsByRect:()=>sh,clipRectByRect:()=>ch,createIcon:()=>lh,decomposeTransform:()=>kh,ensureCopyRect:()=>Sh,ensureCopyTransform:()=>Ch,expandOrShrinkRect:()=>mh,extendPath:()=>Wm,extendShape:()=>Hm,getCurrentCanvasPainter:()=>jh,getShapeClass:()=>Km,getTransform:()=>th,groupTransition:()=>oh,initProps:()=>Mm,isBoundingRectAxisAligned:()=>bh,isElementRemoved:()=>Nm,lineLineIntersect:()=>dh,linePolygonIntersect:()=>uh,makeImage:()=>Jm,makePath:()=>qm,mergePath:()=>Xm,payloadDisableAnimation:()=>Oh,registerShape:()=>Gm,removeElement:()=>Pm,removeElementWithFadeOut:()=>Im,resizePath:()=>Zm,retrieveZInfo:()=>wh,setTooltipConfig:()=>_h,subPixelOptimize:()=>eh,subPixelOptimizeLine:()=>Qm,subPixelOptimizeRect:()=>$m,transformDirection:()=>rh,traverseElements:()=>yh,traverseUpdateZ:()=>Eh,updateProps:()=>jm}),Bm={},X=[`x`,`y`],Vm=[`width`,`height`];function Hm(e){return id.extend(e)}var Um=Ep;function Wm(e,t){return Um(e,t)}function Gm(e,t){Bm[e]=t}function Km(e){if(Bm.hasOwnProperty(e))return Bm[e]}function qm(e,t,n,r){var i=Tp(e,t);return n&&(r===`center`&&(n=Ym(n,i.getBoundingRect())),Zm(i,n)),i}function Jm(e,t,n){var r=new ud({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(Ym(t,i))}}});return r}function Ym(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var Xm=Dp;function Zm(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function Qm(e,t){return pd(e,e,{lineWidth:t}),e}function $m(e,t){return md(e,e,t),e}var eh=hd;function th(e,t){for(var n=yn([]);e&&e!==t;)xn(n,e.getLocalTransform(),n),e=e.parent;return n}function nh(e,t,n){return t&&!Ae(t)&&(t=to.getLocalTransform(t)),n&&(t=Tn([],t)),Pt([],e,t)}function rh(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:is(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:is(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=nh(a,t,n),is(a[0])>is(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function ih(e){return!e.isGroup}function ah(e){return e.shape!=null}function oh(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){ih(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return ah(e)&&(t.shape=M(e.shape)),t}var a=r(e);t.traverse(function(e){if(ih(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),jm(e,r,n,Y(e).dataIndex)}}})}function sh(e,t){return I(e,function(e){var n=e[0];n=rs(n,t.x),n=ns(n,t.x+t.width);var r=e[1];return r=rs(r,t.y),r=ns(r,t.y+t.height),[n,r]})}function ch(e,t){var n=rs(e.x,t.x),r=ns(e.x+e.width,t.x+t.width),i=rs(e.y,t.y),a=ns(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function lh(e,t,n){var r=N({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),P(i,n),new ud(r)):qm(e.replace(`path://`,``),r,n,`center`)}function uh(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=fh(p,m,u,d)/f;return!(g<0||g>1)}function fh(e,t,n,r){return e*r-n*t}function ph(e){return e<=1e-6&&e>=-1e-6}function mh(e,t,n,r,i){return t==null?e:(Re(t)?hh[0]=hh[1]=hh[2]=hh[3]=t:(hh[0]=t[0],hh[1]=t[1],hh[2]=t[2],hh[3]=t[3]),r&&(hh[0]=rs(0,hh[0]),hh[1]=rs(0,hh[1]),hh[2]=rs(0,hh[2]),hh[3]=rs(0,hh[3])),n&&(hh[0]=-hh[0],hh[1]=-hh[1],hh[2]=-hh[2],hh[3]=-hh[3]),gh(e,hh,`x`,`width`,3,1,i&&i[0]||0),gh(e,hh,`y`,`height`,0,2,i&&i[1]||0),e)}var hh=[0,0,0,0];function gh(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=rs(0,ns(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:is(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function _h(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=B(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&F(Pe(c),function(e){W(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Y(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:P({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function vh(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function yh(e,t){if(e)if(R(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Eh(e,t,n){Dh(e,t,n,-1/0)}function Dh(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s=0&&n.push(e)}),n}}function dg(e,t){return Ce(Ce({},e,!0),t,!0)}var fg={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},pg={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},mg=`ZH`,hg=`EN`,gg=hg,_g={},vg={},yg=k.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||gg).toUpperCase().indexOf(mg)>-1?mg:gg}():gg;function bg(e,t){e=e.toUpperCase(),vg[e]=new og(t),_g[e]=t}function xg(e){if(B(e)){var t=_g[e.toUpperCase()]||{};return e===mg||e===hg?M(t):Ce(M(t),M(_g[gg]),!1)}else return Ce(M(e),M(_g[gg]),!1)}function Sg(e){return vg[e]}function Cg(){return vg[gg]}bg(hg,fg),bg(mg,pg);var wg=null;function Tg(e){wg||=e}function Eg(){return wg}function Dg(e,t){var n=Eg(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function Og(e){var t=e.brk;return t?t.breaks:[]}function kg(e){var t=e.brk;return t?t.hasBreaks():!1}var Ag=1e3,jg=Ag*60,Mg=jg*60,Ng=Mg*24,Pg=Ng*365,Fg={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Ig={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},Lg=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,Rg=`{yyyy}-{MM}-{dd}`,zg={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:Rg,hour:Rg+` `+Ig.hour,minute:Rg+` `+Ig.minute,second:Rg+` `+Ig.second,millisecond:Lg},Bg=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],Vg=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function Hg(e){return!B(e)&&!z(e)?Ug(e):e}function Ug(e){e||={};var t={},n=!0;return F(Bg,function(t){n&&=e[t]==null}),F(Bg,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=Bg[s],l=V(a)&&!R(a)?a[c]:a,u=void 0;R(l)?(u=l.slice(),o=u[0]||``):B(l)?(o=l,u=[o]):(o==null?o=Ig[r]:Fg[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function Wg(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function Gg(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function Kg(e){return e===Gg(e)}function qg(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function Jg(e,t,n,r){var i=Ms(e),a=i[Qg(n)](),o=i[$g(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[e_(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[t_(n)](),d=(u-1)%12+1,f=i[n_(n)](),p=i[r_(n)](),m=i[i_(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof og?r:Sg(r||yg)||Cg()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,Wg(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,Wg(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,Wg(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,Wg(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,Wg(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,Wg(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,Wg(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,Wg(m,3)).replace(/{S}/g,m+``)}function Yg(e,t,n,r,i){var a=null;if(B(n))a=n;else if(z(n)){var o={time:e.time,level:e.time?e.time.level:0},s=Eg();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=Xg(e.value,i);a=n[u][u][0]}}return Jg(new Date(e.value),a,i,r)}function Xg(e,t){var n=Ms(e),r=n[$g(t)]()+1,i=n[e_(t)](),a=n[t_(t)](),o=n[n_(t)](),s=n[r_(t)](),c=n[i_(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function Zg(e,t,n){switch(t){case`year`:e[o_(n)](0);case`month`:e[s_(n)](1);case`day`:e[c_(n)](0);case`hour`:e[l_(n)](0);case`minute`:e[u_(n)](0);case`second`:e[d_(n)](0)}return e}function Qg(e){return e?`getUTCFullYear`:`getFullYear`}function $g(e){return e?`getUTCMonth`:`getMonth`}function e_(e){return e?`getUTCDate`:`getDate`}function t_(e){return e?`getUTCHours`:`getHours`}function n_(e){return e?`getUTCMinutes`:`getMinutes`}function r_(e){return e?`getUTCSeconds`:`getSeconds`}function i_(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function a_(e){return e?`setUTCFullYear`:`setFullYear`}function o_(e){return e?`setUTCMonth`:`setMonth`}function s_(e){return e?`setUTCDate`:`setDate`}function c_(e){return e?`setUTCHours`:`setHours`}function l_(e){return e?`setUTCMinutes`:`setMinutes`}function u_(e){return e?`setUTCSeconds`:`setSeconds`}function d_(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function f_(e,t,n,r,i,a,o,s){return new Cd({style:{text:e,font:t,align:n,verticalAlign:r,padding:i,rich:a,overflow:o?`truncate`:null,lineHeight:s}}).getBoundingRect()}function p_(e){if(!zs(e))return B(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function m_(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var h_=Ye;function g_(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&Ze(e)?e:`-`}function a(e){return Us(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Ms(e):e;if(!isNaN(+c))return Jg(c,r,n);if(s)return`-`}if(t===`ordinal`)return Le(e)?i(e):Re(e)&&a(e)?e+``:`-`;var l=Rs(e);return a(l)?p_(l):Le(e)?i(e):typeof e==`boolean`?e+``:`-`}var __=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],v_=function(e,t){return`{`+e+(t??``)+`}`};function y_(e,t,n){R(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function S_(e,t,n){(e===`week`||e===`month`||e===`quarter`||e===`half-year`||e===`year`)&&(e=`MM-dd +yyyy`);var r=Ms(t),i=n?`getUTC`:`get`,a=r[i+`FullYear`](),o=r[i+`Month`]()+1,s=r[i+`Date`](),c=r[i+`Hours`](),l=r[i+`Minutes`](),u=r[i+`Seconds`](),d=r[i+`Milliseconds`]();return e=e.replace(`MM`,Wg(o,2)).replace(`M`,o).replace(`yyyy`,a).replace(`yy`,Wg(a%100+``,2)).replace(`dd`,Wg(s,2)).replace(`d`,s).replace(`hh`,Wg(c,2)).replace(`h`,c).replace(`mm`,Wg(l,2)).replace(`m`,l).replace(`ss`,Wg(u,2)).replace(`s`,u).replace(`SSS`,Wg(d,3)),e}function C_(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function w_(e,t){return t||=`transparent`,B(e)?e:V(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function T_(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var E_={},D_={},O_=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(E_,!0),this._normalMasterList=n(D_,!1);function n(n,r){var i=[];return F(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){F(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){E_[e]=t;return}D_[e]=t},e.get=function(e){return D_[e]||E_[e]},e}();function k_(e){return!!E_[e]}function A_(e){j_.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var j_=U();function M_(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=j_.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function N_(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!k_(n)&&(i=0))}return{coordSysType:n,kind:i}}function P_(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=N_(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var F_=function(e,t){var n=t.getReferringComponents(e,Tc).models[0];return n&&n.coordinateSystem},I_=F,L_=[`left`,`right`,`top`,`bottom`,`width`,`height`],R_=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function z_(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var B_=z_;Ie(z_,`vertical`),Ie(z_,`horizontal`);function V_(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function H_(e,t){var n=q_(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===K_.point)a=n.refPoint,i=W_(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=R(o)?o:[o,o];i=W_(r,n.refContainer),a=n.boxCoordFrom===2?n.refPoint:[J(s[0],i.width)+i.x,J(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function U_(e,t){var n=H_(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);R(a)||(a=[0,a]);var o=J(r.width,t.getWidth()),s=J(r.height,t.getHeight()),c=Math.min(o,s),l=J(a[0],c/2),u=J(a[1],c/2);return{cx:i[0],cy:i[1],r0:l,r:u,viewRect:r}}function W_(e,t,n){n=h_(n||0);var r=t.width,i=t.height,a=J(e.left,r),o=J(e.top,i),s=J(e.right,r),c=J(e.bottom,i),l=J(e.width,r),u=J(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f;break}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d;break}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new K((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}function G_(e,t,n){var r=e.getShallow(`preserveAspect`,!0);if(!r)return t;var i=t.width/t.height;if(Math.abs(Math.atan(n)-Math.atan(i))<1e-9)return t;var a=e.getShallow(`preserveAspectAlign`,!0),o=e.getShallow(`preserveAspectVerticalAlign`,!0),s={width:t.width,height:t.height},c=r===`cover`;return i>n&&!c||i=u)return a;for(var d=0;d=0;o--)a=Ce(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return Dc(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return V_(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(og);cl(tv,og),pl(tv),lg(tv),ug(tv,nv);function nv(e){var t=[];return F(tv.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=I(t,function(e){return rl(e).main}),e!==`dataset`&&De(t,`dataset`)<=0&&t.unshift(`dataset`),t}var Z={color:{},darkColor:{},size:{}},rv=Z.color={theme:[`#5070dd`,`#b6d634`,`#505372`,`#ff994d`,`#0ca8df`,`#ffd10a`,`#fb628b`,`#785db0`,`#3fbe95`],neutral00:`#fff`,neutral05:`#f4f7fd`,neutral10:`#e8ebf0`,neutral15:`#dbdee4`,neutral20:`#cfd2d7`,neutral25:`#c3c5cb`,neutral30:`#b7b9be`,neutral35:`#aaacb2`,neutral40:`#9ea0a5`,neutral45:`#929399`,neutral50:`#86878c`,neutral55:`#797b7f`,neutral60:`#6d6e73`,neutral65:`#616266`,neutral70:`#54555a`,neutral75:`#48494d`,neutral80:`#3c3c41`,neutral85:`#303034`,neutral90:`#232328`,neutral95:`#17171b`,neutral99:`#000`,accent05:`#eff1f9`,accent10:`#e0e4f2`,accent15:`#d0d6ec`,accent20:`#c0c9e6`,accent25:`#b1bbdf`,accent30:`#a1aed9`,accent35:`#91a0d3`,accent40:`#8292cc`,accent45:`#7285c6`,accent50:`#6578ba`,accent55:`#5c6da9`,accent60:`#536298`,accent65:`#4a5787`,accent70:`#404c76`,accent75:`#374165`,accent80:`#2e3654`,accent85:`#252b43`,accent90:`#1b2032`,accent95:`#121521`,transparent:`rgba(0,0,0,0)`,highlight:`rgba(255,231,130,0.8)`};for(var iv in N(rv,{primary:rv.neutral80,secondary:rv.neutral70,tertiary:rv.neutral60,quaternary:rv.neutral50,disabled:rv.neutral20,border:rv.neutral30,borderTint:rv.neutral20,borderShade:rv.neutral40,background:rv.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:rv.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:rv.neutral70,axisLineTint:rv.neutral40,axisTick:rv.neutral70,axisTickMinor:rv.neutral60,axisLabel:rv.neutral70,axisSplitLine:rv.neutral15,axisMinorSplitLine:rv.neutral05}),rv)if(rv.hasOwnProperty(iv)){var av=rv[iv];iv===`theme`?Z.darkColor.theme=rv.theme.slice():iv===`highlight`?Z.darkColor.highlight=`rgba(255,231,130,0.4)`:iv.indexOf(`accent`)===0?Z.darkColor[iv]=wi(av,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Z.darkColor[iv]=wi(av,null,function(e){return e*.9},function(e){return 1-e**1.5})}Z.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var ov=``;typeof navigator<`u`&&(ov=navigator.platform||``);var sv=`rgba(0, 0, 0, 0.2)`,cv=Z.color.theme[0],lv=wi(cv,null,null,.9),uv={darkMode:`auto`,colorBy:`series`,color:Z.color.theme,gradientColor:[lv,cv],aria:{decal:{decals:[{color:sv,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:sv,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:sv,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:sv,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:sv,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:sv,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:ov.match(/^Win/)?`Microsoft YaHei`:`sans-serif`,fontSize:12,fontStyle:`normal`,fontWeight:`normal`},blendMode:null,stateAnimation:{duration:300,easing:`cubicOut`},animation:`auto`,animationDuration:1e3,animationDurationUpdate:500,animationEasing:`cubicInOut`,animationEasingUpdate:`cubicInOut`,animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},dv={Must:1,Might:2,Not:3},fv=xc();function pv(e){fv(e).datasetMap=U()}function mv(e,t,n){var r={},i=gv(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=fv(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),F(e,function(t,n){var i=V(t)?t:e[n]={name:t};i.type===`ordinal`&&u==null&&(u=n,d=m(i)),r[i.name]=[]});var f=c.get(l)||c.set(l,{categoryWayDim:d,valueWayDim:0});F(e,function(e,t){var n=e.name,i=m(e);if(u==null){var s=f.valueWayDim;p(r[n],s,i),p(o,s,i),f.valueWayDim+=i}else if(u===t)p(r[n],0,i),p(a,0,i);else{var s=f.categoryWayDim;p(r[n],s,i),p(o,s,i),f.categoryWayDim+=i}});function p(e,t,n){for(var r=0;rt)return e[r];return e[n-1]}function Ov(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:Dv(r,o);if(u||=n,!(!u||!u.length)){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function kv(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Av,jv,Mv,Nv=`\0_ec_inner`,Pv=1,Fv=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(e,t,n,r,i,a){r||={},this.option=null,this._theme=new og(r),this._locale=new og(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=Bv(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,Bv(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);!this.option||e===`recreate`?Mv(this,i):(this.restoreData(),this._mergeOption(i,t)),n=!0}if((e===`timeline`||e===`media`)&&this.restoreData(),!e||e===`recreate`||e===`timeline`){var a=r.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,t))}if(!e||e===`recreate`||e===`media`){var o=r.getMediaOption(this);o.length&&F(o,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=U(),s=t&&t.replaceMergeMainTypeMap;pv(this),F(e,function(e,t){e!=null&&(tv.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?M(e):Ce(n[t],e,!0))}),s&&s.each(function(e,t){tv.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),tv.topologicalTravel(a,tv.getAllClassMainTypes(),c,this);function c(t){var a=Sv(this,t,$s(e[t])),o=r.get(t),c=ic(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);_c(c,t,tv),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;F(c,function(e,n){var r=e.existing,i=e.newOption;if(!i)r&&(r.mergeOption({},this),r.optionUpdated({},!1));else{var a=t===`series`,o=tv.getClass(t,e.keyInfo.subType,!a);if(!o)return;if(t===`tooltip`){if(f)return;f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=N({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),N(r,s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}r?(l.push(r.option),u.push(r),d++):(l.push(void 0),u.push(void 0))},this),n[t]=l,r.set(t,u),i.set(t,d),t===`series`&&Av(this)}this._seriesIndices||Av(this)},t.prototype.getOption=function(){var e=M(this.option);return F(e,function(t,n){if(tv.hasClass(n)){for(var r=$s(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!hc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[Nv],e},t.prototype.setTheme=function(e){this._theme=new og(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function Kv(e,t){return e.join(`,`)===t.join(`,`)}var qv=F,Jv=V,Yv=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function Xv(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=Yv.length;n0?e[n-1].seriesModel:null)}),yy(e))})}function yy(e){F(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Ds(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var by=function(){function e(e){this.data=e.data||(e.sourceFormat===`keyedColumns`?{}:[]),this.sourceFormat=e.sourceFormat||`unknown`,this.seriesLayoutBy=e.seriesLayoutBy||`column`,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;nl&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Fy=(e={},e[Vd+`_`+Kd]={pure:!0,appendData:i},e[Vd+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[Hd]={pure:!0,appendData:i},e[Ud]={pure:!0,appendData:function(e){var t=this._data;F(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[Bd]={appendData:i},e[Wd]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;t=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return Yy(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function Qy(e){var t,n;return V(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function $y(e){return new eb(e)}var eb=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:at},gte:function(e,t){return e>=t}},ob=function(){function e(e,t){Re(t)||Ys(``),this._opFn=ab[e],this._rvalFloat=Rs(t)}return e.prototype.evaluate=function(e){return Re(e)?this._opFn(e,this._rvalFloat):this._opFn(Rs(e),this._rvalFloat)},e}(),sb=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=Re(e)?e:Rs(e),r=Re(t)?t:Rs(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=B(e),s=B(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}(),cb=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Rs(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Rs(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function lb(e,t){return e===`eq`||e===`ne`?new cb(e===`eq`,t):W(ab,e)?new ob(e,t):null}function ub(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function db(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,wb=typeof Uint16Array>`u`?Array:Uint16Array,Tb=typeof Int32Array>`u`?Array:Int32Array,Eb=typeof Float64Array>`u`?Array:Float64Array,Db={float:Eb,int:Tb,ordinal:Array,number:Array,time:Eb},Ob;function kb(e){return e>65535?Cb:wb}function Ab(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function jb(e,t,n,r,i){var a=Db[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=I(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f)if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(kb(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=h),d[f++]=g}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return nb(e[r],this._dimensions[r])}Ob={arrayRows:e,objectRows:function(e,t,n,r){return nb(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return nb(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),Nb=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(Fb(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=Be(o)?Wd:Bd,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=H(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=H(u.sourceHeader,d.sourceHeader),m=H(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Sy(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Sy(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&Ib(``);var i,a=[],o=[];return F(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&Ib(``),a.push(t),o.push(e._getVersionSign())}),n?i=bb(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[wy(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||n>0&&!e.noHeader;return F(e.blocks,function(e){var n=Gb(e);n>=t&&(t=n+ +(r&&(!n||Ub(e)&&!e.noHeader)))}),t}return 0}function Kb(e,t,n,r){var i=t.noHeader,a=Yb(Gb(t)),o=[],s=t.blocks||[];Xe(!s||R(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(W(l,c)){var u=new sb(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}F(s,function(n,i){var s=t.valueFormatter,c=Wb(n)(s?N(N({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):Xb(r,o.join(``),i?n:a.html);if(i)return d;var f=g_(t.header,`ordinal`,e.useUTC),p=zb(r,e.renderMode).nameStyle,m=Rb(r);return e.renderMode===`richText`?$b(e,f,p)+a.richText+d:Xb(r,`
`+$t(f)+`
`+d,n)}function qb(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=R(e)?e:[e],I(e,function(e,t){return g_(e,R(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Z.color.secondary,i),f=a?``:g_(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=zb(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:$b(e,f,v))+(o?``:ex(e,m,h,g,y)):Xb(r,(s?``:d)+(a?``:Zb(f,!s,v))+(o?``:Qb(m,h,g,y)),n)}}function Jb(e,t,n,r,i,a){if(e)return Wb(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function Yb(e){return{html:Bb[e],richText:Vb[e]}}function Xb(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=Rb(e);return`
`+t+r+`
`}function Zb(e,t,n){var r=t?`margin-left:2px`:``;return``+$t(e)+``}function Qb(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=R(e)?e:[e],``+I(e,function(e){return $t(e)}).join(`  `)+``}function $b(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function ex(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(R(t)?t.join(` `):t,a)}function tx(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return w_(n)}function nx(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var rx=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Bs()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=x_({color:t,type:e,renderMode:n,markerId:r});return B(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};R(t)?F(t,function(e){return N(n,e)}):N(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function ix(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=R(s),l=tx(t,n),u,d,f,p;if(o>1||c&&!o){var m=ax(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=Yy(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=mc(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return Hb(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[Hb(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!Ze(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function ax(e,t,n,r,i){var a=t.getData(),o=je(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?F(r,function(e){u(Yy(a,n,e),e)}):F(e,u);function u(e,t){var n=a.getDimensionInfo(t);!n||n.otherDims.tooltip===!1||(o?l.push(Hb(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var ox=xc();function sx(e,t){return e.getName(t)||e.getId(t)}var cx=`__universalTransitionEnabled`,lx=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=$y({count:fx,reset:px}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(ox(this).sourceManager=new Nb(this)).prepareSource();var r=this.getInitialData(e,n);hx(r,this),this.dataTask.context.data=r,ox(this).dataBeforeProcessed=r,ux(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=X_(this),r=n?Q_(e):{},i=this.subType;tv.hasClass(i)&&(i+=`Series`),Ce(e,t.getTheme().get(this.subType)),Ce(e,this.getDefaultOption()),ec(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&Z_(e,r,n)},t.prototype.mergeOption=function(e,t){e=Ce(this.option,e,!0),this.fillDataTextStyle(e.data);var n=X_(this);n&&Z_(this.option,e,n);var r=ox(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);hx(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,ox(this).dataBeforeProcessed=i,ux(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Be(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return ix({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(k.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=Tv.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[sx(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(!(!a||!o)){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){V(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return tv.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(tv);ke(lx,Zy),ke(lx,Tv),cl(lx,tv);function ux(e){var t=e.name;mc(e)||(e.name=dx(e)||t)}function dx(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return F(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function fx(e){return e.model.getRawData().count()}function px(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),mx}function mx(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function hx(e,t){F(at(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,Ie(gx,t))})}function gx(e,t){var n=_x(e);return n&&n.setOutputEnd((t||this).count()),t}function _x(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var vx=function(){function e(){this.group=new q,this.uid=cg(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();ol(vx),pl(vx);function yx(){var e=xc();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==o||a!==s)&&`reset`}}var bx=xc(),xx=yx(),Sx=function(){function e(){this.group=new q,this.uid=cg(`viewChart`),this.renderTask=$y({plan:Ex,reset:Dx}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&Tx(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&Tx(i,r,`normal`)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){yh(this.group,e)},e.markUpdateMethod=function(e,t){bx(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function Cx(e,t,n){e&&ep(e)&&(t===`emphasis`?kf:Af)(e,n)}function Tx(e,t,n){var r=bc(e,t),i=t&&t.highlightKey!=null?np(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){Cx(e,n,i)}):F($s(r),function(t){Cx(e.getItemGraphicEl(t),n,i)})}ol(Sx,[`dispose`]),pl(Sx);function Ex(e){return xx(e.model)}function Dx(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&bx(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),Ox[c]}var Ox={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},kx=`\0__throttleOriginMethod`,Ax=`\0__throttleRate`,jx=`\0__throttleType`;function Mx(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function Nx(e,t,n,r){var i=e[t];if(i){var a=i[kx]||i,o=i[jx];if(i[Ax]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Mx(a,n,r===`debounce`),i[kx]=a,i[jx]=r,i[Ax]=n}return i}}function Px(e,t){var n=e[t];n&&n[kx]&&(n.clear&&n.clear(),e[t]=n[kx])}var Fx=xc(),Ix={itemStyle:ml(rg,!0),lineStyle:ml(eg,!0)},Lx={lineStyle:`stroke`,itemStyle:`fill`};function Rx(e,t){return e.visualStyleMapper||Ix[t]||(console.warn(`Unknown style type '`+t+`'.`),Ix.itemStyle)}function zx(e,t){return e.visualDrawType||Lx[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var Bx={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=Rx(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=zx(e,r),c=a[s],l=z(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||z(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||z(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=N({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},Vx=new og,Hx={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=Rx(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){Vx.option=n[r];var o=i(Vx);N(e.ensureUniqueItemVisual(t,`style`),o),Vx.option.decal&&(e.setItemVisual(t,`decal`,Vx.option.decal),Vx.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},Ux={performRawSeries:!0,overallReset:function(e){var t=U();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();Fx(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=Fx(e).scope,a=zx(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},Wx=Math.PI;function Gx(e,t){t||={},P(t,{text:`loading`,textColor:Z.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Z.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new q,r=new vd({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Cd({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new vd({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new fm({shape:{startAngle:-Wx/2,endAngle:-Wx/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Wx*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:Wx*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var Kx=function(){function e(e,t,n,r){this._stageTaskMap=U(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):Zc(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=U();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;F(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});Xe(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;F(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=U(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||$y({plan:Zx,reset:Qx,count:tS}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||$y({reset:qx});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=U(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;Xe(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):F(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,$y({reset:Jx,onDirty:Xx})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return z(e)&&(e={overallReset:e,seriesType:nS(e)}),e.uid=cg(`stageHandler`),t&&(e.visualType=t),e},e}();function qx(e){e.overallReset(e.ecModel,e.api,e.payload)}function Jx(e){return e.dirtyOnOverallProgress&&Yx}function Yx(){this.agent.dirty(),this.getDownstream().dirty()}function Xx(){this.agent&&this.agent.dirty()}function Zx(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Qx(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=$s(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?I(t,function(e,t){return eS(t)}):$x}var $x=eS(0);function eS(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),fS=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],pS=fS.concat([`symbolKeepAspect`]),mS={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&qS(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function XS(e,t,n){for(var r=t.type===`radial`?YS(e,t,n):JS(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:Re(e)?[e]:R(e)?e:null}function tC(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&eC(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=I(n,function(e){return e/i}),r/=i)}return[n,r]}var nC=new Nu(!0);function rC(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function iC(e){return typeof e==`string`&&e!==`none`}function aC(e){var t=e.fill;return t!=null&&t!==`none`}function oC(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function sC(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function cC(e,t,n){var r=yl(t.image,t.__image,n);if(xl(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*lt),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function lC(e,t,n,r,i){var a,o=rC(n),s=aC(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||nC,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?XS(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?XS(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?cC(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?cC(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=tC(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&sC(e,n),s&&oC(e,n)):(s&&oC(e,n),o&&sC(e,n)),T&&e.setLineDash([])}function uC(e,t,n){var r=t.__image=yl(n.image,t.__image,t,t.onload);if(!(!r||!xl(r))){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function dC(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=tC(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(rC(n)&&e.strokeText(i,n.x,n.y),aC(n)&&e.fillText(i,n.x,n.y)):(aC(n)&&e.fillText(i,n.x,n.y),rC(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var fC=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],pC=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function mC(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){TC(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Kl.opacity:o}(r||t.blend!==n.blend)&&(a||=(TC(e,i),!0),e.globalCompositeOperation=t.blend||Kl.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[sw]){if(this._disposed){this.id;return}var r,i,a;if(V(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[sw]=!0,zw(this),!this._model||t){var o=new Hv(this._api),s=this._theme,c=this._model=new Fv;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},qw);var l={seriesTransition:a,optionChanged:!0};if(n)this[lw]={silent:r,updateParams:l},this[sw]=!1,this.getZr().wakeUp();else{try{xw(this),ww.update.call(this,null,l)}catch(e){throw this[lw]=null,this[sw]=!1,e}this._ssr||this._zr.flush(),this[lw]=null,this[sw]=!1,Ow.call(this,r),kw.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[sw]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[lw]&&(r??=this[lw].silent,i=this[lw].updateParams,this[lw]=null),this[sw]=!0,zw(this);try{this._updateTheme(e),n.setTheme(this._theme),xw(this),ww.update.call(this,{type:`setTheme`},i)}catch(e){throw this[sw]=!1,e}this[sw]=!1,Ow.call(this,r),kw.call(this,r)}}},t.prototype._updateTheme=function(e){B(e)&&(e=Yw[e]),e&&(e=M(e),e&&gy(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||k.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return F(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;F(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return F(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(Qw[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();F(Zw,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(M(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=ae.createCanvas(),h=Wo(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return F(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}else return e.connectedBackgroundColor&&h.add(new vd({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),F(u,function(e){var t=new ud({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return Tw(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return Tw(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return Tw(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return F(Cc(n,e),function(e,n){n.indexOf(`Models`)>=0&&F(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Cc(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?_S(i,t):gS(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;F(Hw,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&SS(i,function(e){var t=Y(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}else if(t.eventData)return a=N({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;F(Gw,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),xS(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&kc(this.getDom(),tT,``);var e=this,t=e._api,n=e._model;F(e._componentsViews,function(e){e.dispose(n,t)}),F(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete Zw[e.id]},t.prototype.resize=function(e){if(!this[sw]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[lw]&&(r??=this[lw].silent,n=!0,this[lw]=null),this[sw]=!0,zw(this);try{n&&xw(this),ww.update.call(this,{type:`resize`,animation:N({duration:0},e&&e.animation)})}catch(e){throw this[sw]=!1,e}this[sw]=!1,Ow.call(this,r),kw.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(V(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),Xw[e]){var n=Xw[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=N({},e);return t.type=Ww[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(V(t)||(t={silent:!!t}),Uw[e.type]&&this._model){if(this[sw]){this._pendingActions.push(e);return}var n=t.silent;Dw.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&k.browser.weChat&&this._throttledZrFlush(),Ow.call(this,n),kw.call(this,n)}},t.prototype.updateLabelLayout=function(){CS.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){xw=function(e){jS(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),Sw(e,!0),Sw(e,!1),t.plan()},Sw=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cH(t.get(`hoverLayerThreshold`),uv.hoverLayerThreshold)&&!k.node&&!k.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=wh(e);t.eachRendered(function(e){return Eh(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!Nm(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(Nm(e))return;if(e instanceof id&&ap(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}Fw=function(e){return new(function(t){D(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){kf(t,n),Lw(e)},n.prototype.leaveEmphasis=function(t,n){Af(t,n),Lw(e)},n.prototype.enterBlur=function(t){jf(t),Lw(e)},n.prototype.leaveBlur=function(t){Mf(t),Lw(e)},n.prototype.enterSelect=function(t){Nf(t),Lw(e)},n.prototype.leaveSelect=function(t){Pf(t),Lw(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[cw]},n.prototype.usingTHL=function(){return e._usingTHL},n}(Yd))(e)},Iw=function(e){function t(e,t){for(var n=0;n=0)){xT.push(n);var o=Kx.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function CT(e,t){Xw[e]=t}function wT(e){oe({createCanvas:e})}function TT(e,t,n){var r=ES(`registerMap`);r&&r(e,t,n)}function ET(e){var t=ES(`getMap`);return t&&t(e)}var DT=yb;bT(QC,Bx),bT(tw,Hx),bT(tw,Ux),bT(QC,mS),bT(tw,hS),bT(aw,zC),uT(gy),dT(GC,_y),CT(`default`,Gx),hT({type:rf,event:rf,update:rf},ct),hT({type:af,event:af,update:af},ct),hT({type:of,event:lf,update:of,action:ct,refineEvent:OT,publishNonRefinedEvent:!0}),hT({type:sf,event:lf,update:sf,action:ct,refineEvent:OT,publishNonRefinedEvent:!0}),hT({type:cf,event:lf,update:cf,action:ct,refineEvent:OT,publishNonRefinedEvent:!0});function OT(e,t,n,r){return{eventContent:{selected:Gf(n),isFromClick:t.isFromClick||!1}}}lT(`default`,{}),lT(`dark`,uS);var kT={},AT=[],jT={registerPreprocessor:uT,registerProcessor:dT,registerPostInit:fT,registerPostUpdate:pT,registerUpdateLifecycle:mT,registerAction:hT,registerCoordinateSystem:gT,registerLayout:yT,registerVisual:bT,registerTransform:DT,registerLoading:CT,registerMap:TT,registerImpl:TS,PRIORITY:ow,ComponentModel:tv,ComponentView:vx,SeriesModel:lx,ChartView:Sx,registerComponentModel:function(e){tv.registerClass(e)},registerComponentView:function(e){vx.registerClass(e)},registerSeriesModel:function(e){lx.registerClass(e)},registerChartView:function(e){Sx.registerClass(e)},registerCustomSeries:function(e,t){OS(e,t)},registerSubTypeDefaulter:function(e,t){tv.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Jo(e,t)}};function MT(e){if(R(e)){F(e,function(e){MT(e)});return}De(AT,e)>=0||(AT.push(e),z(e)&&(e={install:e}),e.install(jT))}function NT(e){return e==null?0:e.length||1}function PT(e){return e}var FT=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||PT,this._newKeyGetter=r||PT,this.context=i,this._diffModeMultiple=a===`multiple`}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?`_executeMultiple`:`_executeOneToOne`]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=Array(e.length),i=Array(t.length);this._initIndexMap(e,null,r,`_oldKeyGetter`),this._initIndexMap(t,n,i,`_newKeyGetter`);for(var a=0;a1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;o30}var YT=V,XT=I,ZT=typeof Int32Array>`u`?Array:Int32Array,QT=`e\0\0`,$T=-1,eE=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],tE=[`_approximateExtent`],nE,rE,iE,aE,oE,sE,cE,lE=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;GT(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),R(i)?i=i.slice():YT(i)&&(i=N({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,YT(t)?N(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){YT(e)?N(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?N(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){Ld(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){F(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:XT(this.dimensions,this._getDimInfo,this),this.hostModel),oE(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];z(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Je(arguments)))})},e.internalField=function(){nE=function(e){var t=e._invertedIndicesMap;F(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new ZT(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function uE(e,t){return dE(e,t).dimensions}function dE(e,t){xy(e)||(e=Cy(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=U(),a=[],o=fE(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&JT(o),c=r===e.dimensionsDefine,l=c?qT(e):KT(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=U(u),f=new Tb(o),p=0;p0&&(e.name+=t-1)}),new WT({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function fE(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return F(t,function(e){var t;V(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function pE(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var mE=function(){function e(e){this.coordSysDims=[],this.axisMap=U(),this.categoryAxisMap=U(),this.coordSysName=e}return e}();function hE(e){var t=e.get(`coordinateSystem`),n=new mE(t),r=gE[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var gE={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Tc).models[0],a=e.getReferringComponents(`yAxis`,Tc).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),_E(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),_E(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Tc).models[0];t.coordSysDims=[`single`],n.set(`single`,i),_E(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Tc).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),_E(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),_E(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();F(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),_E(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Tc).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function _E(e){return e.get(`type`)===`category`}function vE(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;yE(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(F(a,function(e,t){B(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),F(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;F(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function yE(e){return!GT(e.schema)}function bE(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function xE(e,t){return bE(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function SE(e,t){var n=e.get(`coordinateSystem`),r=O_.get(n),i;return t&&t.coordSysDims&&(i=I(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=zT(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function CE(e,t,n){var r,i;return n&&F(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function wE(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Cy(e)):(i=r.getSource(),a=i.sourceFormat===Bd);var o=hE(t),s=SE(t,o),c=n.useEncodeDefaulter,l=z(c)?c:c?Ie(mv,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=dE(i,u),f=CE(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=vE(t,{schema:d,store:p}),h=new lE(d,t);h.setCalculationInfo(m);var g=f!=null&&TE(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function TE(e){if(e.sourceFormat===`original`)return!R(nc(EE(e.data||[])))}function EE(e){for(var t=0;t=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){VE(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),VE(r,e,t,n)},freeze:function(){}};function VE(e,t,n,r){Hc(n,r)&&(e[t][0]=n,e[t][1]=r)}function HE(e){return UE(e)||GE(e)}function UE(e){return e.type===`interval`}function WE(e){return e.type===`time`}function GE(e){return e.type===`log`}function KE(e){return e.type===`ordinal`}function qE(e){var t=Ps(e),n=cs(10,t),r=as(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,vs(r*n,-t)}function JE(e){return xs(e)+2}function YE(e,t){return ls(e)/ls(t)}function XE(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var tD=function(e){D(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,NE(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new kE({}),R(i)&&(i=new kE({categories:I(i,function(e){return V(e)?e.value:e})})),r._ordinalMeta=i;var a=ME(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,PE(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:B(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=as(e),e},t.prototype.getTicks=function(){var e=[];return eD(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=ns(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=ns(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=vs(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=vs(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?vs(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return nD(this,e,Og(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=xs(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),p_(vs(e.value,n,!0))},t.type=`interval`,t}(DE);DE.registerClass(rD);var iD=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function lD(e){var t=30*Ng;return e/=t,e>6?6:e>3?3:e>2?2:1}function uD(e){return e/=Mg,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function dD(e,t){return e/=t?jg:Ag,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function fD(e){return rs(Fs(e,!0),1)}function pD(e,t,n){var r=Math.max(0,De(Bg,t)-1);return Zg(new Date(e),Bg[r],n).getTime()}function mD(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function hD(e,t,n,r,i,a){var o=Vg,s=0;function c(e,t,n,i,o,c,l){for(var u=mD(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!sD(Gg(e),r[0],r[1],n)){s&&(i=[{value:pD(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=Me(I(u,function(e){return Me(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=oD.length,l=Math.min(iD(oD,a,0,c),c-1),u=oD[l][1],d=oD[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};DE.registerClass(aD);var _D=0,vD=1,yD=2,bD=function(e){D(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=rD.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[_D]=i[vD]=a[_D]=a[vD]=NaN,NE(r,t.mapperMethods);var s=Eg(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},yD,l),r.powStub=new rD({breakParsed:l.original}),r.intervalStub=new rD({breakParsed:l.transformed}),PE(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Eg(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return I(i.getTicks(e||{}),function(e){var i=e.value,o=XE(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,Og(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return nD(this,e,Og(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(YE(e,this.base))},scale:function(e){return XE(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=YE(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return xD.depth=n,SD.lookup=this._lookup,XE(n===2?e:this.intervalStub.transformOut(e,xD),this.base,SD)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Hc(t,n)||t<=0||n<=0)){var r=CD,i=CD;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[_D]=t,r[vD]=n);var o=this.base;this.intervalStub.setExtent2(e,i[_D]=YE(t,o),i[vD]=YE(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Hc(t[0],t[1])&&Us(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(DE);DE.registerClass(bD);var xD={},SD={},CD=[],wD={value:1,category:1,time:1,log:1},TD=xc();function ED(e){var t=e.get(`type`);return(t==null||!W(wD,t)&&!DE.getClass(t))&&(t=`value`),t}function DD(e,t,n){var r=Eg(),i;switch(r&&(i=RD(e,t,n)),t){case`category`:return new tD({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Ic()});case`time`:return new aD({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new bD({logBase:e.get(`logBase`),breakOption:i});case`value`:return new rD({breakOption:i});default:return new((DE.getClass(t))||rD)({})}}function OD(e,t,n){var r=n?IE(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Hc(i,a)?i===t||a===t?2:it?1:3:3}function kD(e){TD(e).noOnMyZero=!0}function AD(e){return TD(e).noOnMyZero}function jD(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=Hg(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}else if(B(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};else if(z(t)){if(e.type===`category`)return function(n,r){return t(MD(e,n),n.value-e.scale.getExtent()[0],null)};var r=Eg();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(MD(e,n),i,a)}}else return function(t){return e.scale.getLabel(t)}}function MD(e,t){var n=e.scale;return KE(n)?n.getLabel(t):t.value}function ND(e){return e.get(`interval`)??`auto`}function PD(e){return e.type===`category`&&ND(e.getLabelModel())===0}function FD(e,t){var n={};return F(e.mapDimensionsAll(t),function(t){n[xE(e,t)]=!0}),Pe(n)}function ID(e){return e===`middle`||e===`center`}function LD(e){return e.getShallow(`show`)}function RD(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Eg()||!n||!zD(t)?void 0:r}function zD(e){return e!==`category`}function BD(e,t,n,r,i,a){var o=GE(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=QE(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function VD(e,t){return KE(e)?e.getRawOrdinalNumber(t.value):t.value}function HD(e,t){return KE(e)&&!!t.get(`boundaryGap`)}var UD=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),WD=Gc(),GD=xc(),KD=xc();function qD(e,t){var n=e.model,r=GD(PS(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function JD(e,t){return ZD(qD(e,t))}function YD(e,t){var n=[];return XD(e.model.ecModel,function(e){for(var r=0;r0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=hO(e,t.get(`startValue`,!0)),x=b!=null;!Us(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Us(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),mO(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),mO(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function mO(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Wc(t))}function hO(e,t){return t==null?null:Ge(t)?NaN:e.parse(t)}function gO(e,t){var n;if(KE(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=R(r)?r:[r,r]}return[_O(n[0]),_O(n[1])]}function _O(e){return yo(typeof e==`boolean`?0:e,1)||0}function vO(e){var t=dO(e.scale);return t.extent||=Ic(),t}function yO(e,t){vO(e).dimIdxInCoord=t.get(e.dim)}function bO(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||xO(n,e,i,r,t)}function xO(e,t,n,r,i){var a=vO(t),o=a.extent,s=!1;QD(t,function(r){if(r.boxCoordinateSystem){var i=M_(r).coord,c=a.dimIdxInCoord;if(c>=0&&R(i)){var l=i[c];l!=null&&!R(l)&&Lc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;F(FD(u,n),function(e){Bc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=DO(e,t,r);CO(e,new pO(e,r,o,s,c),i),a.extent=null}function SO(e,t){var n=e.scale;CO(n,new pO(n,e.model,t,!1,!1),fO)}function CO(e,t,n){e.rawExtentInfo=t,t.from=n}function wO(e,t){TO.set(e,t)}var TO=U();function EO(e,t,n,r,i){e.rawExtentInfo||SO({scale:e,model:t},i||Ic());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function DO(e,t,n){var r=HD(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return rO(t,function(e){a=!!TO.get(e)||a}),a}function OO(e,t,n,r){if(n.ctnShp){var i;if(rO(e,function(t){var n=TO.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Rc(i,a[0]),zc(i,a[1]),kD(e))}}),i){var a=t.getExtent();if(KE(t))e.onBand||t.setExtent2(1,ns(a[0],a[0]+i[0]),rs(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=ns(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=rs(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}function kO(e,t){var n=GE(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=ZE(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?jO(r,t):AO(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=JE(d)),i[0]||(s[0]=vs(os(s[0]/u)*u,l)),i[1]||(s[1]=vs(ss(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),BD(e,i,o,s,a,c)}function AO(e,t){var n=$E(t.splitNumber,5),r=RE(e),i=t.minInterval,a=t.maxInterval,o=Fs(r/n,!0);i!=null&&oa&&(o=a);var s=JE(o),c=e.getExtent(),l=[vs(ss(c[0]/o)*o,s),vs(os(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function jO(e,t){var n=$E(t.splitNumber,10),r=e.getExtent(),i=RE(e),a=rs(Ns(i),1);n/i*a<=.5&&(a*=10);var o=JE(a),s=[vs(ss(r[0]/a)*a,o),vs(os(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function MO(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;NO(t,n,r,i,null)}function NO(e,t,n,r,i){var a=EO(e,t,r,n,i),o=UE(e)||WE(e);PO(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&OO(n,e,a,r)}function PO(e,t){FO[e.type](e,t)}var FO={interval:kO,log:kO,time:gD,ordinal:ct},IO=t({createDimensions:()=>uE,createList:()=>LO,createScale:()=>zO,createSymbol:()=>WS,createTextStyle:()=>VO,dataStack:()=>RO,enableHoverEmphasis:()=>Kf,getECData:()=>Y,getLayoutRect:()=>W_,mixinAxisModelCommonMethods:()=>BO});function LO(e){return wE(null,e)}var RO={isDimensionStacked:bE,enableDataStack:vE,getStackedDimension:xE};function zO(e,t){var n=t;t instanceof og||(n=new og(t));var r=ED(n),i=DD(n,r,!1);return e[1]n&&(t=i,n=o)}if(t)return JO(t.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},t.prototype.getBoundingRect=function(e){var t=this._rect;if(t&&!e)return t;var n=[1/0,1/0],r=[-1/0,-1/0],i=this.geometries;return F(i,function(t){t.type===`polygon`?qO(t.exterior,n,r,e):F(t.points,function(t){qO(t,n,r,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(r[0])&&isFinite(r[1])||(n[0]=n[1]=r[0]=r[1]=0),t=new K(n[0],n[1],r[0]-n[0],r[1]-n[1]),e||(this._rect=t),t},t.prototype.contain=function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;loopGeo:for(var r=0,i=n.length;r>1^-(s&1),c=c>>1^-(c&1),s+=i,c+=a,i=s,a=c,r.push([s/n,c/n])}return r}function rk(e,t){return e=ek(e),I(Me(e.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,r=e.geometry,i=[];switch(r.type){case`Polygon`:var a=r.coordinates;i.push(new XO(a[0],a.slice(1)));break;case`MultiPolygon`:F(r.coordinates,function(e){e[0]&&i.push(new XO(e[0],e.slice(1)))});break;case`LineString`:i.push(new ZO([r.coordinates]));break;case`MultiLineString`:i.push(new ZO(r.coordinates))}var o=new QO(n[t||`name`],i,n.cp);return o.properties=n,o})}var ik=t({MAX_SAFE_INTEGER:()=>Os,asc:()=>bs,getPercentWithPrecision:()=>Ts,getPixelPrecision:()=>Cs,getPrecision:()=>xs,getPrecisionSafe:()=>Ss,isNumeric:()=>zs,isRadianAroundZero:()=>As,linearMap:()=>ps,nice:()=>Fs,numericToNumber:()=>Rs,parseDate:()=>Ms,parsePercent:()=>J,quantile:()=>Is,quantity:()=>Ns,quantityExponent:()=>Ps,reformIntervals:()=>Ls,remRadian:()=>ks,round:()=>ys}),ak=t({format:()=>Jg,parse:()=>Ms,roundTime:()=>Zg}),ok=t({Arc:()=>fm,BezierCurve:()=>um,BoundingRect:()=>K,Circle:()=>Ap,CompoundPath:()=>pm,Ellipse:()=>Mp,Group:()=>q,Image:()=>ud,IncrementalDisplayable:()=>Dm,Line:()=>om,LinearGradient:()=>hm,Polygon:()=>tm,Polyline:()=>rm,RadialGradient:()=>gm,Rect:()=>vd,Ring:()=>Zp,Sector:()=>Yp,Text:()=>Cd,clipPointsByRect:()=>sh,clipRectByRect:()=>ch,createIcon:()=>lh,extendPath:()=>Wm,extendShape:()=>Hm,getShapeClass:()=>Km,getTransform:()=>th,initProps:()=>Mm,makeImage:()=>Jm,makePath:()=>qm,mergePath:()=>Xm,registerShape:()=>Gm,resizePath:()=>Zm,updateProps:()=>jm}),sk=t({addCommas:()=>p_,capitalFirst:()=>C_,encodeHTML:()=>$t,formatTime:()=>S_,formatTpl:()=>y_,getTextRect:()=>f_,getTooltipMarker:()=>x_,normalizeCssArray:()=>h_,toCamelCase:()=>m_,truncateText:()=>Cl}),ck=t({bind:()=>L,clone:()=>M,curry:()=>Ie,defaults:()=>P,each:()=>F,extend:()=>N,filter:()=>Me,indexOf:()=>De,inherits:()=>Oe,isArray:()=>R,isFunction:()=>z,isObject:()=>V,isString:()=>B,map:()=>I,merge:()=>Ce,reduce:()=>je}),lk=xc(),uk=xc(),dk={estimate:1,determine:2};function fk(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function pk(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:I(hk(n,r),function(t,n){return{formattedLabel:jD(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?gk(e,t):yk(e)}function mk(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:hk(i,r)}:e.type===`category`?vk(e,t):{ticks:r.getTicks(n)}}function hk(e,t){var n=t.getExtent(),r=[];return F(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),qc(r,Yc,null),bs(r),I(r,function(e){return{value:e}})}function gk(e,t){var n=e.getLabelModel(),r=_k(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function _k(e,t,n){var r=xk(e),i=ND(t),a=n.kind===dk.estimate;if(!a){var o=Ck(r,i);if(o)return o}var s,c;z(i)?s=Ak(e,i,!1):(c=i===`auto`?Tk(e,n):i,s=Ak(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return wk(r,i,l),!0}):wk(r,i,l),l}function vk(e,t){var n=bk(e),r=ND(t),i=Ck(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),z(r))a=Ak(e,r,!0);else if(r===`auto`){var s=_k(e,e.getLabelModel(),fk(dk.determine));o=s.labelCategoryInterval,a=I(s.labels,function(e){return e.tick})}else o=r,a=Ak(e,o,!0);return wk(n,r,{ticks:a,tickCategoryInterval:o})}function yk(e){var t=e.scale.getTicks(),n=jD(e);return{labels:I(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var bk=Sk(`axisTick`),xk=Sk(`axisLabel`);function Sk(e){return function(t){return uk(t)[e]||(uk(t)[e]={list:[]})}}function Ck(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=ho(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===dk.estimate?(t.out.noPxChangeTryDetermine.push(L(Dk,null,e,S,c)),S):Ok(e,S,c)??S}function Dk(e,t,n){return Ok(e,t,n)==null}function Ok(e,t,n){var r=lk(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function kk(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function Ak(e,t,n){var r=jD(e),i=e.scale,a=[],o=z(t);return eD(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var jk=.8;function Mk(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=LE(r);Us(o)||(o=NaN);var s=e.getExtent(),c=is(s[1]-s[0]);return KE(r)?Nk(n,e,o,c):i&&Pk(n,e,o,c,i),a!=null&&(n.w=Us(n.w)?rs(a,n.w):a),n}function Nk(e,t,n,r){var i=t.onBand,a=n+ +!!i;a===0&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}function Pk(e,t,n,r,i){var a=!1,o=-1/0;F(i.key?[JD(t,i.key)]:YD(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Us(n)&&n>0&&Us(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*jk,e.w2=e.w*n/r)}var Fk=[0,1],Ik=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),ps(e,Fk,Lk(this),t)},e.prototype.coordToData=function(e,t){var n=ps(e,Lk(this),Fk,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=I(mk(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(VD(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=Rk(this,n,r);return I(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(KE(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),I(this.scale.getMinorTicks(e),function(e){return I(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=fk(dk.determine),pk(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return Mk(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=fk(dk.determine),Ek(this,e)},e}();function Lk(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function Rk(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=Mk(e).w;if(!i)return!1;F(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}function zk(e){var t=tv.extend(e);return tv.registerClass(t),t}function Bk(e){var t=vx.extend(e);return vx.registerClass(t),t}function Vk(e){var t=lx.extend(e);return lx.registerClass(t),t}function Hk(e){var t=Sx.extend(e);return Sx.registerClass(t),t}var Uk=Math.PI*2,Wk=Nu.CMD,Gk=[`top`,`right`,`bottom`,`left`];function Kk(e,t,n,r,i){var a=n.width,o=n.height;switch(e){case`top`:r.set(n.x+a/2,n.y-t),i.set(0,-1);break;case`bottom`:r.set(n.x+a/2,n.y+o+t),i.set(0,1);break;case`left`:r.set(n.x-t,n.y+o/2),i.set(-1,0);break;case`right`:r.set(n.x+a+t,n.y+o/2),i.set(1,0);break}}function qk(e,t,n,r,i,a,o,s,c){o-=e,s-=t;var l=Math.sqrt(o*o+s*s);o/=l,s/=l;var u=o*n+e,d=s*n+t;if(Math.abs(r-i)%Uk<1e-4)return c[0]=u,c[1]=d,l-n;if(a){var f=r;r=Ru(i),i=Ru(f)}else r=Ru(r),i=Ru(i);r>i&&(i+=Uk);var p=Math.atan2(s,o);if(p<0&&(p+=Uk),p>=r&&p<=i||p+Uk>=r&&p+Uk<=i)return c[0]=u,c[1]=d,l-n;var m=n*Math.cos(r)+e,h=n*Math.sin(r)+t,g=n*Math.cos(i)+e,_=n*Math.sin(i)+t,v=(m-o)*(m-o)+(h-s)*(h-s),y=(g-o)*(g-o)+(_-s)*(_-s);return v0){t=t/180*Math.PI,$k.fromArray(e[0]),eA.fromArray(e[1]),tA.fromArray(e[2]),G.sub(nA,$k,eA),G.sub(rA,tA,eA);var n=nA.len(),r=rA.len();if(!(n<.001||r<.001)){nA.scale(1/n),rA.scale(1/r);var i=nA.dot(rA);if(Math.cos(t)1&&G.copy(oA,tA),oA.toArray(e[1])}}}}function cA(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,$k.fromArray(e[0]),eA.fromArray(e[1]),tA.fromArray(e[2]),G.sub(nA,eA,$k),G.sub(rA,tA,eA);var r=nA.len(),i=rA.len();if(!(r<.001||i<.001)&&(nA.scale(1/r),rA.scale(1/i),nA.dot(t)=o)G.copy(oA,tA);else{oA.scaleAndAdd(rA,a/Math.tan(Math.PI/2-s));var c=tA.x===eA.x?(oA.y-eA.y)/(tA.y-eA.y):(oA.x-eA.x)/(tA.x-eA.x);if(isNaN(c))return;c<0?G.copy(oA,eA):c>1&&G.copy(oA,tA)}oA.toArray(e[1])}}}function lA(e,t,n,r){var i=n===`normal`,a=i?e:e.ensureState(n);a.ignore=t;var o=r.get(`smooth`);o=o===!0?.3:Math.max(+o,0)||0,a.shape=a.shape||{},a.shape.smooth=o;var s=r.getModel(`lineStyle`).getLineStyle();i?e.useStyle(s):a.style=s}function uA(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=kt(r[0],r[1]),a=kt(r[1],r[2]);if(!i||!a){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(i,a)*n,s=Nt([],r[1],r[0],o/i),c=Nt([],r[1],r[2],o/a),l=Nt([],s,c,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(c[0],c[1],c[0],c[1],r[2][0],r[2][1])}else for(var u=1;u0&&i&&S(-d/a,0,a);var g=e[0],_=e[a-1],v,y;b(),v<0&&C(-v,.8),y<0&&C(y,.8),b(),x(v,y,1),x(y,v,-1),b(),v<0&&w(-v),y<0&&w(y);function b(){v=g.rect[o]-n,y=r-_.rect[o]-_.rect[s]}function x(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var i=r+e;i<0&&C(-i*n,1)}else C(-e*n,1)}}function S(t,n,r){t!==0&&(u=!0);for(var i=n;i0)for(var c=0;c0;c--){var f=r[c-1]*d;S(-f,c,a)}}}function w(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r0?S(n,0,r+1):S(-n,a-r-1,a),e-=n,e<=0)return}return u}function DA(e){for(var t=0;t=0&&n.attr(i.oldLayoutSelect),De(u,`emphasis`)>=0&&n.attr(i.oldLayoutEmphasis)),jm(n,c,t,s)}else if(n.attr(c),!Kh(n).valueAnimation){var d=H(n.style.opacity,1);n.style.opacity=0,Mm(n,{style:{opacity:d}},t,s)}if(i.oldLayout=c,n.states.select){var f=i.oldLayoutSelect={};IA(f,c,LA),IA(f,n.states.select,LA)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};IA(p,c,LA),IA(p,n.states.emphasis,LA)}Jh(n,s,l,t,t)}if(r&&!r.ignore&&!r.invisible){var i=FA(r),a=i.oldLayout,m={points:r.shape.points};a?(r.attr({shape:a}),jm(r,{shape:m},t)):(r.setShape(m),r.style.strokePercent=0,Mm(r,{style:{strokePercent:1}},t)),i.oldLayout=m}},e}(),zA=xc();function BA(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){var r=zA(t).labelManager;r||=zA(t).labelManager=new RA,r.clearLabels()}),e.registerUpdateLifecycle(`series:layoutlabels`,function(e,t,n){var r=zA(t).labelManager;F(n.updatedSeries,function(e){r.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()})}var VA=Math.sin,HA=Math.cos,UA=Math.PI,WA=Math.PI*2,GA=180/UA,KA=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str=``,this._p=10**(e||4)},e.prototype.moveTo=function(e,t){this._add(`M`,e,t)},e.prototype.lineTo=function(e,t){this._add(`L`,e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){this._add(`C`,e,t,n,r,i,a)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add(`Q`,e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,a){this.ellipse(e,t,n,n,0,r,i,a)},e.prototype.ellipse=function(e,t,n,r,i,a,o,s){var c=o-a,l=!s,u=Math.abs(c),d=Pi(u-WA)||(l?c>=WA:-c>=WA),f=c>0?c%WA:c%WA+WA,p=!1;p=d?!0:!Pi(u)&&f>=UA==!!l;var m=e+n*HA(a),h=t+r*VA(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*GA);if(d){var _=1/this._p,v=(l?1:-1)*(WA-_);this._add(`A`,n,r,g,1,+l,e+n*HA(a+v),t+r*VA(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*HA(o),b=t+r*VA(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function cj(e){return``}function lj(e,t){t||={};var n=t.newline?` +`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return sj(i,a)+(i===`style`?o||``:$t(o))+(t?``+n+I(t,function(e){return r(e)}).join(n)+n:``)+cj(i)}return r(e)}function uj(e,t,n){n||={};var r=n.newline?` +`:``,i=` {`+r,a=r+`}`,o=I(Pe(e),function(t){return t+i+I(Pe(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=I(Pe(t),function(e){return`@keyframes `+e+i+I(Pe(t[e]),function(n){return n+i+I(Pe(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function dj(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function fj(e,t,n,r){return oj(`svg`,`root`,{width:e,height:t,xmlns:ej,"xmlns:xlink":tj,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var pj=0;function mj(){return pj++}var hj={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},gj=`transform-origin`;function _j(e,t,n){var r=N({},e.shape);N(r,t),e.buildPath(n,r);var i=new KA;return i.reset(Yi(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function vj(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[gj]=n+`px `+r+`px`)}var yj={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function bj(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function xj(e,t,n){var r=e.shape.paths,i={},a,o;if(F(r,function(e){var t=dj(n.zrId);t.animation=!0,Cj(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=Pe(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=bj(i,n);return a.replace(o,s)}}function Sj(e){return B(e)?hj[e]?`cubic-bezier(`+hj[e]+`)`:Xr(e)?e:``:``}function Cj(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof pm){var s=xj(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return bj(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+mj();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function wj(e,t,n){if(!e.ignore)if(e.isSilent()){var r={"pointer-events":`none`};Tj(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=Ai(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),Tj(r,t,n,!0)}}function Tj(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+mj(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var Ej=Math.round;function Dj(e){return e&&B(e.src)}function Oj(e){return e&&z(e.toDataURL)}function kj(e,t,n,r){$A(function(i,a){var o=i===`fill`||i===`stroke`;o&&qi(a)?Wj(t,e,i,r):o&&Wi(a)?Gj(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),Uj(n,e,r)}function Aj(e,t){var n=Xo(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[ij+`silent`]=`true`))}function jj(e){return Pi(e[0]-1)&&Pi(e[1])&&Pi(e[2])&&Pi(e[3]-1)}function Mj(e){return Pi(e[4])&&Pi(e[5])}function Nj(e,t,n){if(t&&!(Mj(t)&&jj(t))){var r=n?10:1e4;e.transform=jj(t)?`translate(`+Ej(t[4]*r)/r+` `+Ej(t[5]*r)/r+`)`:Li(t)}}function Pj(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;Xe(f,g),Xe(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=yl(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=oj(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=M(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=Xi(i);x&&(o.patternTransform=x);var S=oj(`pattern`,``,o,[d]),C=lj(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=oj(`pattern`,T,o,[d])),t[n]=Ji(T)}}function Kj(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=oj(`clipPath`,a,o,[zj(e,n)])}t[`clip-path`]=Ji(a)}function qj(e){return document.createTextNode(e)}function Jj(e,t,n){e.insertBefore(t,n)}function Yj(e,t){e.removeChild(t)}function Xj(e,t){e.appendChild(t)}function Zj(e){return e.parentNode}function Qj(e){return e.nextSibling}function $j(e,t){e.textContent=t}var eM=58,tM=120,nM=oj(``,``);function rM(e){return e===void 0}function iM(e){return e!==void 0}function aM(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function oM(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function sM(e){var t,n=e.children,r=e.tag;if(iM(r)){var i=e.elm=aj(r);if(uM(nM,e),R(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,cM(e,m,n,i,c)):lM(e,t,r,a))}function fM(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(uM(e,t),rM(t.text)?iM(r)&&iM(i)?r!==i&&dM(n,r,i):iM(i)?(iM(e.text)&&$j(n,``),cM(n,null,i,0,i.length-1)):iM(r)?lM(n,r,0,r.length-1):iM(e.text)&&$j(n,``):e.text!==t.text&&(iM(r)&&lM(n,r,0,r.length-1),$j(n,t.text)))}function pM(e,t){if(oM(e,t))fM(e,t);else{var n=e.elm,r=Zj(n);sM(t),r!==null&&(Jj(r,t.elm,Qj(n)),lM(r,[e],0,0))}return t}var mM=0,hM=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=gM(`configLayer`),this.storage=t,this._opts=n=N({},n),this.root=e,this._id=`zr`+mM++,this._oldVNode=fj(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=aj(`svg`);uM(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,pM(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return Hj(e,dj(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=dj(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=_M(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=oj(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=I(Pe(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(oj(`defs`,`defs`,{},c)),e.animation){var l=uj(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=oj(`style`,`stl`,{},[],l);a.push(u)}}return fj(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},lj(this.renderToVNode({animation:H(e.cssAnimation,!0),emphasis:H(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:H(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g=a}}for(var l=xM(this),u=l.startIdx;u=0)&&(a=!0)}),!(!a&&!i.__dirty)){var o=n._opts.useDirtyRect&&!bM(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}PM(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},BM),k.wxa&&IM(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r)if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s=t.endIdx},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=bM(e),c=s&&ae.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d15){d++;break}}}OC(o,a),t.drawIdx=Math.max(d,l)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t||=0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=wM,t=0);var i=FM(this._i,e)[t];return i||(i=AM(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&Ce(i,this._layerConfig[e],!0),(n||r&&e!==wM)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(!(a[t]&&a[t][n])&&OM(e)){for(var l=o.length,u=0;u0&&(c=FM(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),FM(i,t)[n]=e,!r&&!e.virtual)if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom);e.painter||=this}},e.prototype.eachLayer=function(e,t){return IM(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return IM(this._i,function(n,r){e.call(t,n,r)},LM)},e.prototype.eachOtherLayer=function(e,t){return IM(this._i,function(n,r){e.call(t,n,r)},RM)},e.prototype.getLayers=function(){var e={};return IM(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(bM(t)?s=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=$S(i,0,r),t=$S(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,IM(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(wM).resize(e,t)}return this},e.prototype.clearLayer=function(e){F(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._i.layers[wM][0].dom;var t=new SM(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;IM(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;s-1&&(s.style.stroke=s.style.fill,s.style.fill=Z.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(lx);function WM(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=Yy(e,t,n[0]);return i==null?null:i+``}else if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var KM=function(e){D(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=WS(e,-1,-1,2,2,null,a);o.attr({z2:H(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=qM,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){kf(this.childAt(0))},t.prototype.downplay=function(){Af(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):jm(f,p,o,n),Lm(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Mm(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Ih(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=KS(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof ud){var S=a.style;a.useStyle(N({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(N({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Fh(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):WM(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),Jf(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=Y(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Pm(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Pm(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return GS(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(q);function qM(e,t){this.parent.drift(e,t)}function JM(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function YM(e){return e!=null&&!V(e)&&(e={isIgnore:e}),e||{}}function XM(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Ih(t),cursorStyle:t.get(`cursor`)}}function ZM(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var QM=function(){function e(e){this.group=new q,this._SymbolCtor=e||KM}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=YM(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=XM(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);JM(e,i,r,t)&&ZM(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!JM(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):jm(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i0?n=r[0]:r[1]<0&&(n=r[1]),n}function tN(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function nN(e,t){return!isFinite(e)||!isFinite(t)}var rN=typeof Float32Array<`u`?Float32Array:void 0,iN=typeof Float64Array<`u`?Float64Array:void 0;function aN(e){return oN({ctor:rN},e).arr}function oN(e,t){var n=e.arr,r=e.ctor;if(t>Os&&(t=Os),!n||e.typed&&n.length=i||h<0)break;if(nN(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g=r||nN(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,ee=v-u,te=C-v,ne=void 0,re=void 0;if(s===`x`){ne=Math.abs(A),re=Math.abs(j);var ie=E>0?1:-1;p=_-ie*ne*o,m=v,O=_+ie*re*o,k=v}else if(s===`y`){ne=Math.abs(ee),re=Math.abs(te);var ae=D>0?1:-1;p=_,m=v-ae*ne*o,O=_,k=v+ae*re*o}else ne=Math.sqrt(A*A+ee*ee),re=Math.sqrt(j*j+te*te),T=re/(re+ne),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=lN(O,uN(S,_)),k=lN(k,uN(C,v)),O=uN(O,lN(S,_)),k=uN(k,lN(C,v)),E=O-_,D=k-v,p=_-E*ne/re,m=v-D*ne/re,p=lN(p,uN(l,_)),m=lN(m,uN(u,v)),p=uN(p,lN(l,_)),m=uN(m,lN(u,v)),E=_-p,D=v-m,O=_+E*re/ne,k=v+D*re/ne}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var fN=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),pN=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new fN},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&nN(n[i*2-2],n[i*2-1]);i--);for(;r=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?Lr(i,u,f,m,e,s):Lr(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?Fr(a,d,p,h,b):Fr(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h;break}}},t}(id),mN=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(fN),hN=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new mN},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&nN(n[a*2-2],n[a*2-1]);a--);for(;i=0,a=e.fill||Z.color.neutral99;DN(r,t);var o=r.textFill==null;return i?o&&(r.textFill=n.insideFill||Z.color.neutral00,!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=a),r.textStrokeWidth??=2):(o&&(r.textFill=e.fill||n.outsideFill||Z.color.neutral00),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,F(t.rich,function(e){DN(e,e)}),r}function DN(e,t){t&&(W(t,`fill`)&&(e.textFill=t.fill),W(t,`stroke`)&&(e.textStroke=t.fill),W(t,`lineWidth`)&&(e.textStrokeWidth=t.lineWidth),W(t,`font`)&&(e.font=t.font),W(t,`fontStyle`)&&(e.fontStyle=t.fontStyle),W(t,`fontWeight`)&&(e.fontWeight=t.fontWeight),W(t,`fontSize`)&&(e.fontSize=t.fontSize),W(t,`fontFamily`)&&(e.fontFamily=t.fontFamily),W(t,`align`)&&(e.textAlign=t.align),W(t,`verticalAlign`)&&(e.textVerticalAlign=t.verticalAlign),W(t,`lineHeight`)&&(e.textLineHeight=t.lineHeight),W(t,`width`)&&(e.textWidth=t.width),W(t,`height`)&&(e.textHeight=t.height),W(t,`backgroundColor`)&&(e.textBackgroundColor=t.backgroundColor),W(t,`padding`)&&(e.textPadding=t.padding),W(t,`borderColor`)&&(e.textBorderColor=t.borderColor),W(t,`borderWidth`)&&(e.textBorderWidth=t.borderWidth),W(t,`borderRadius`)&&(e.textBorderRadius=t.borderRadius),W(t,`shadowColor`)&&(e.textBoxShadowColor=t.shadowColor),W(t,`shadowBlur`)&&(e.textBoxShadowBlur=t.shadowBlur),W(t,`shadowOffsetX`)&&(e.textBoxShadowOffsetX=t.shadowOffsetX),W(t,`shadowOffsetY`)&&(e.textBoxShadowOffsetY=t.shadowOffsetY),W(t,`textShadowColor`)&&(e.textShadowColor=t.textShadowColor),W(t,`textShadowBlur`)&&(e.textShadowBlur=t.textShadowBlur),W(t,`textShadowOffsetX`)&&(e.textShadowOffsetX=t.textShadowOffsetX),W(t,`textShadowOffsetY`)&&(e.textShadowOffsetY=t.textShadowOffsetY))}function ON(e,t){if(e.length===t.length){for(var n=0;nt){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function FN(e,t,n){var r=e.getVisual(`visualMeta`);if(!(!r||!r.length||!e.count())&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=I(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=PN(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;F(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new hm(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function IN(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&LN(a,t))){var o=t.mapDimension(a.dim),s={};return F(a.getViewLabels(),function(e){e.tick.offInterval||(s[VD(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function LN(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function RN(e){for(var t=e.length/2;t>0&&nN(e[t*2-2],e[t*2-1]);t--);return t-1}function zN(e,t){return[e[t*2],e[t*2+1]]}function BN(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function VN(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var ee=f.getState(`emphasis`).style;ee.lineWidth=+f.style.lineWidth+1}Y(f).seriesIndex=e.seriesIndex,Jf(f,k,A,j);var te=jN(e.get(`smooth`)),ne=e.get(`smoothMonotone`);if(f.setShape({smooth:te,smoothMonotone:ne,connectNulls:x}),p){var re=a.getCalculationInfo(`stackedOnSeries`),ie=0;p.useStyle(P(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),re&&(ie=jN(re.get(`smooth`))),p.setShape({smooth:te,stackedOnSmooth:ie,smoothMonotone:ne,connectNulls:x}),Qf(p,e,`areaStyle`),Y(p).seriesIndex=e.seriesIndex,Jf(p,k,A,j)}var ae=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=ae)}),this._polyline.onHoverStateChange=ae,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var oe=e.get(`triggerEvent`),se=e.get(`triggerLineEvent`),ce=se===!0||oe===!0||oe===`line`,le=se===!0||oe===!0||oe===`area`;this.packEventData(e,f,ce),p&&this.packEventData(e,p,le)},t.prototype.packEventData=function(e,t,n){Y(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=bc(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(nN(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new KM(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Sx.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=bc(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else Sx.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;bf(this._polyline,e),t&&bf(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new pN({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new hN({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);z(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=z(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n)if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=z(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(VN(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Cd({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=RN(o);c>=0&&(Fh(a,Ih(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?WM(i,e):GM(i,n)},enableTextSetter:!0},UN(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=BN(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=zN(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Nc(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=zN(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=Kh(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=cN(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=NN(u.stackedOnCurrent,u.current,n,i,o),d=NN(u.current,null,n,i,o),m=NN(u.stackedOnNext,u.next,n,i,o),p=NN(u.next,null,n,i,o)),AN(d,p)>3e3||c&&AN(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),jm(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),jm(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;B(i)?p=KN[i]:z(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,qN))}}}}}function YN(e){e.registerChartView(WN),e.registerSeriesModel(UM),e.registerLayout(GN(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,JN(`line`))}var XN=function(e){D(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Ik),ZN=null;function QN(e){ZN||=e}function $N(){return ZN}var eP=`expandAxisBreak`,tP=`collapseAxisBreak`,nP=`toggleAxisBreak`,rP=`axisbreakchanged`,iP={type:eP,event:rP,update:`update`,refineEvent:sP},aP={type:tP,event:rP,update:`update`,refineEvent:sP},oP={type:nP,event:rP,update:`update`,refineEvent:sP};function sP(e,t,n,r){var i=[];return F(e,function(e){i=i.concat(e.eventBreaks)}),{eventContent:{breaks:i}}}function cP(e){e.registerAction(iP,t),e.registerAction(aP,t),e.registerAction(oP,t);function t(e,t){var n=[],r=Cc(t,e);function i(t,i){F(r[t],function(t){F(t.updateAxisBreaks(e).breaks,function(e){var r;n.push(P((r={},r[i]=t.componentIndex,r),e))})})}return i(`xAxisModels`,`xAxisIndex`),i(`yAxisModels`,`yAxisIndex`),i(`singleAxisModels`,`singleAxisIndex`),{eventBreaks:n}}}var lP=Math.PI,uP=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],dP=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],fP=xc(),pP=xc(),mP=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}();function hP(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=zP(e.axisName)&&ID(e.nameLocation);F(r,function(e){var t=yA(e);if(!(!t||t.label.ignore)){o.push(t);var n=a.transGroup;c&&(n.transform?Tn(gP,n.transform):yn(gP),t.transform&&xn(gP,gP,t.transform),K.copy(_P,t.localRect),_P.applyTransform(gP),s?s.union(_P):K.copy(s=new K(0,0,0,0),_P))}});var l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new K(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var gP=vn(),_P=new K(0,0,0,0),vP=function(e,t,n,r,i,a){if(ID(e.nameLocation)){var o=a.stOccupiedRect;o&&yP(SA({},o,a.transGroup.transform),r,i)}else bP(a.labelInfoList,a.dirVec,r,i)};function yP(e,t,n){var r=new G;kA(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&CA(t,r)}function bP(e,t,n,r){for(var i=G.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):As(r-lP)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),SP=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],CP={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Pt(u,u,l),Pt(d,d,l));var p=N({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&kg(r.axis.scale))$N().buildAxisBreakLine(r,i,a,m);else{var h=new om(N({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));Qm(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);B(g)&&(g=[g,g]),(B(_)||Re(_))&&(_=[_,_]);var v=KS(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];F([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=WS(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){MP(t,i,s)&&wP(e,t,n,r,i,a,o,dk.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){MP(t,i,s)&&wP(e,t,n,r,i,a,o,dk.determine);var c=AP(e,i,a,r);DP(e,t.labelLayoutList,c),jP(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(zP(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new G(0,0),_=new G(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=vn();_.transform(Cn(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*lP/180);var b,x;ID(u)?b=xP.innerTextLayout(e.rotation,y??e.rotation,d):(b=TP(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=Ke(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Cd({x:g.x,y:g.y,rotation:b.rotation,silent:xP.isLabelSilent(r),style:Lh(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(_h({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=xP.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Y(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=yA({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:ID(u)?uP[E]:dP[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function wP(e,t,n,r,i,a,o,s){PP(t)||NP(e,t,i,s,r,o);var c=t.labelLayoutList;IP(e,r,c,a),VP(r,e.rotation,c);var l=e.optionHideOverlap;EP(r,c,l),l&&OA(Me(c,function(e){return e&&!e.label.ignore})),hP(e,n,r,c)}function TP(e,t,n,r){var i=ks(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return As(i-lP/2)?(o=c?`bottom`:`top`,a=`center`):As(i-lP*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=ilP/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function EP(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(PD(r))return;function a(e,a,o){var s=yA(t[a]),c=yA(t[o]),l=r.scale;if(!(!s||!c)){if(e==null){if(!n&&i)return;var u=fP(s.label).labelInfo.tick;if(WE(l)&&u.notNice||KE(l)&&u.offInterval){OP(s.label);return}}if(e===!1||s.suggestIgnore){OP(s.label);return}if(c.suggestIgnore){OP(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=wA({marginForce:f},s),c=wA({marginForce:f},c)}kA(s,c,null,{touchThreshold:d})&&OP(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function DP(e,t,n){e.showMinorTicks||F(t,function(e){if(e&&e.label.ignore)for(var t=0;t=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}oN(XP,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r0&&v0?-2:-1,n.serUids=r}var XP=oN({ctor:iN},50);function ZP(e){return function(t,n){var r=Mk(t,{fromStat:{key:e}});if(Us(r.w2))return[-r.w2/2,r.w2/2]}}function QP(e){return e+`|&`}function $P(e,t){return e+`|&`+t}function eF(e){return JP(),{liPosMinGap:!KE(e.scale)}}var tF=`pictorialBar`;function nF(e,t,n,r){lO(e,{key:t,seriesType:n,coordSysType:r,getMetrics:eF})}function rF(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var iF={left:0,right:0,top:0,bottom:0},aF=[`25%`,`25%`],oF=`cartesian2d`,sF=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=Q_(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&Z_(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&Z_(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:iF,outerBoundsContain:`all`,outerBoundsClampWidth:aF[0],outerBoundsClampHeight:aF[1],backgroundColor:Z.color.transparent,borderWidth:1,borderColor:Z.color.neutral30},t}(tv),cF=Gc(),lF=`__ec_stack_`;function uF(e){return e.get(`stack`)||lF+e.seriesIndex}function dF(e){if(KE(e.axis.scale)){for(var t=Mk(e.axis),n=[],r=0;ro&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=rs(u,0);var d=0,f;F(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return F(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function hF(e){return{seriesType:e,overallReset:function(t){var n=$P(e,oF);nO(t,n,function(t){var r=fF(t,e);$D(t,n,function(e){var t=r.columnMap[uF(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function gF(e){return{seriesType:e,plan:yx(),reset:function(e){if(UP(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=bE(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(rF(i))),p=_F(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&aN(r*3),c=p&&s&&aN(r*3),l=p&&aN(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,is(k)s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(lx);lx.registerClass(bF);var xF=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return wE(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=Zc(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=dg(bF.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Z.color.primary,borderWidth:2}},realtimeSort:!1}),t}(bF),SF=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),CF=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new SF},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-cMath.PI/2&&ua)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Im(t,e,Y(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(Sx),MF={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=kF(t.x,e.x),s=AF(t.x+t.width,i),c=kF(t.y,e.y),l=AF(t.y+t.height,a),u=si?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=AF(t.r,e.r),a=kF(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},NF={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new vd({shape:N({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?CF:Yp,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=wF(HF(i),{isRoundCap:l===CF}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?jm:Mm)(u,{shape:p},a)}return u}};function PF(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function FF(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?jm:Mm)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?jm:Mm)(n,{shape:l},u,i)}function IF(e,t){for(var n=0;n0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function VF(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function HF(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function UF(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;N(u,OF(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?QF(i,a.coordinateSystem):$F(i,a.coordinateSystem),p=Ih(r);Fh(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:WM(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,TF(e,h===`outside`?f:h,HF(o),r.get([`label`,`rotate`]))}qh(m,p,a.getRawValue(n),function(e){return GM(t,e)});var g=r.getModel([`emphasis`]);Jf(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),Qf(e,r),VF(i)&&(e.style.fill=`none`,e.style.stroke=`none`,F(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function WF(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var GF=function(){function e(){}return e}(),KF=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new GF},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c=0?n:null},30,!1);function YF(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function XF(e,t,n){if(xN(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}else{var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function ZF(e,t,n){return new(e.type===`polar`?Yp:vd)({shape:XF(t,n,e),silent:!0,z2:0})}function QF(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function $F(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function eI(e){e.registerChartView(jF),e.registerSeriesModel(xF),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,hF(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,gF(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,JN(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),yF(e)}function tI(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:`legend`});if(!(!n||!n.length)){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),iI=xc(),aI=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new rI(L(this.getData,this),L(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return nI(this,{coordDimensions:[`value`],encodeDefaulter:Ie(hv,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=iI(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=Es(a,n.hostModel.get(`percentPrecision`))}var o=e.prototype.getDataParams.call(this,t);return o.percent=i[t]||0,o.$vars.push(`percent`),o},t.prototype._defaultLabelLine=function(e){ec(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type=`series.pie`,t.defaultOption={z:2,legendHoverLink:!0,colorBy:`data`,center:[`50%`,`50%`],radius:[0,`50%`],clockwise:!0,startAngle:90,endAngle:`auto`,padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:`box`,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:`truncate`,position:`outer`,alignTo:`none`,edgeDistance:`25%`,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:`solid`}},itemStyle:{borderWidth:1,borderJoin:`round`},showEmptyCircle:!0,emptyCircleStyle:{color:`lightgray`,opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:`expansion`,animationDuration:1e3,animationTypeUpdate:`transition`,animationEasingUpdate:`cubicInOut`,animationDurationUpdate:500,animationEasing:`cubicInOut`},t}(lx);A_({fullType:aI.type,getCoord2:function(e){return e.getShallow(`center`)}});var oI=Math.PI/180;function sI(e,t,n,r,i,a,o,s,c,l){if(e.length<2)return;function u(e){for(var a=e.rB,o=a*a,s=0;sn?o:a,d=Math.abs(c.label.y-n);if(d>=l.maxY){var f=c.label.x-t-c.len2*i,p=r+c.len;l.rB=Math.abs(f)e.unconstrainedWidth?null:f:null;r.setStyle(`width`,p)}uI(a,r)}}}function uI(e,t){fI.rect=e,bA(fI,t,dI)}var dI={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},fI={};function pI(e){return e.position===`center`}function mI(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*oI,s=t.getLayout(`viewRect`),c=t.getLayout(`r`),l=s.width,u=s.x,d=s.y,f=s.height;function p(e){e.ignore=!0}function m(e){if(!e.ignore)return!0;for(var t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){var s=t.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),g=s.getTextGuideLine(),_=t.getItemModel(e),v=_.getModel(`label`),y=v.get(`position`)||_.get([`emphasis`,`label`,`position`]),b=v.get(`distanceToLabelLine`),x=v.get(`alignTo`),S=J(v.get(`edgeDistance`),l),C=v.get(`bleedMargin`);C??=Math.min(l,f)>200?10:2;var w=_.getModel(`labelLine`),T=w.get(`length`);T=J(T,l);var E=w.get(`length2`);if(E=J(E,l),Math.abs(d.endAngle-d.startAngle)0?`right`:`left`:O>0?`left`:`right`}var le=Math.PI,ue=0,de=v.get(`rotate`);if(Re(de))ue=le/180*de;else if(y===`center`)ue=0;else if(de===`radial`||de===!0)ue=O<0?-D+le:-D;else if(de===`tangential`||de===`tangential-noflip`&&y!==`outside`&&y!==`outer`){var fe=Math.atan2(O,k);fe<0&&(fe=le*2+fe),k>0&&de!==`tangential-noflip`&&(fe=le+fe),ue=fe-le}if(a=!!ue,h.x=A,h.y=j,h.rotation=ue,h.setStyle({verticalAlign:`middle`}),ne){h.setStyle({align:te});var pe=h.states.select;pe&&(pe.x+=h.x,pe.y+=h.y)}else{var me=new K(0,0,0,0);uI(me,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new G(O,k),linePoints:ee,textAlign:te,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:me,unconstrainedWidth:me.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:ne})}}),!a&&e.get(`avoidLabelOverlap`)&&cI(n,r,i,c,l,f,u,d);for(var h=0;hr?(l=O+x*r/2,u=l):(l=O+C,u=i-C),n.setItemLayout(t,{angle:r,startAngle:l,endAngle:u,clockwise:_,cx:a,cy:o,r0:c,r:v?ps(e,b,[c,s]):s}),O=i}),E0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l=n.r0}},t.type=`pie`,t}(Sx);function SI(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension(`value`),r=n.get(t,e);return!(Re(r)&&!isNaN(r)&&r<0)})}}}function CI(e){e.registerChartView(xI),e.registerSeriesModel(aI),yS(`pie`,e.registerAction),e.registerLayout(_I),e.registerProcessor(tI(`pie`)),e.registerProcessor(SI(`pie`))}var wI=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e,t){return wE(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?5e3:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?1e4:this.get(`progressiveThreshold`))},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:``},t.type=`series.scatter`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:Z.color.primary}},universalTransition:{divideShape:`clone`}},t}(lx),TI=4,EI=function(){function e(){}return e}(),DI=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new EI},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.buildPath=function(e,t){var n=t.points,r=t.size,i=this.symbolProxy,a=i.shape,o=e.getContext?e.getContext():e,s=o&&r[0]=0;s--){var c=s*2,l=r[c]-a/2,u=r[c+1]-o/2;if(e>=l&&t>=u&&e<=l+a&&t<=u+o)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],a=r[1],o=1/0,s=1/0,c=-1/0,l=-1/0,u=0;u=0&&(c.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),kI=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,AI(e)),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),Xc(t),AI(t)),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),this._finished){var i=GN(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(AI(e))}else return{update:!0}},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return(!n||r!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=r?new OI:new QM,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type=`scatter`,t}(Sx);function AI(e){return{clipShape:bN(e)}}var jI=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Tc).models[0]},t.type=`cartesian2dAxis`,t}(tv);ke(jI,UD);var MI={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:Z.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:Z.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Z.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Z.color.backgroundTint,Z.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Z.color.neutral00,borderColor:Z.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},NI=Ce({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},MI),PI=Ce({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Z.color.axisMinorSplitLine,width:1}}},MI),FI={category:NI,value:PI,time:Ce({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},PI),log:P({logBase:10},PI)};function II(e,t,n,r){F(wD,function(i,a){var o=Ce(Ce({},FI[a],!0),r,!0),s=function(e){D(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=X_(this),r=n?Q_(e):{};Ce(e,t.getTheme().get(a+`Axis`)),Ce(e,this.getDefaultOption()),e.type=LI(e),n&&Z_(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=kE.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=$N();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,LI)}function LI(e){return e.type||(e.data?`category`:`value`)}var RI=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return I(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Me(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),zI=[`x`,`y`];function BI(e){return(e.type===`interval`||e.type===`time`)&&!kg(e)}var VI=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=oF,t.dimensions=zI,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!BI(e)||!BI(t))){var n=IE(e,null),r=IE(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(!(!o||!s)){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=Tn([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new K(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Pt(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Pt(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new K(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(RI);function HI(e,t){var n=e.scale,r=e.model,i=EO(n,r,r.ecModel,e,null),a=GE(n),o=GE(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=is(l[0].value-l[1].value),g=is(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(ne(),k=vs(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=vs(ss(C[0]/E)*E,D),O=vs(os(C[1]/E)*E,D);var e=as((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=os(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}BD(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}var UI=[[3,1],[0,2]],WI=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=zI,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;F(this._axesList,function(e){bO(e,1);var t=e.scale;KE(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=Pe(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):MO(i)}F(n,function(e){YI(e,e.__alignTo)?MO(e):HI(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};F(n.x,function(e){KI(n,`y`,e,i)}),F(n.y,function(e){KI(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=q_(e,t),i=this._rect=W_(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(ZI(a,i),!n){var c=nL(i,o,a,s,t),l=void 0;if(s)$I?($I(this._axesList,i),ZI(a,i)):l=tL(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=iL(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=tL(d,f,p,i,a,c,r))}rL(i,a,dk.determine,null,l,r),F(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}V(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];HE(a.scale)&&RD(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&F(r,function(e){e.__alignTo=n})}function YI(e,t){return kg(e.scale)||kg(t.scale)||t.scale.getTicks().length<2}function XI(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function ZI(e,t){F(e.x,function(e){return QI(e,t.x,t.width)}),F(e.y,function(e){return QI(e,t.y,t.height)})}function QI(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),XI(e,t)}var $I;function eL(e){$I=e}function tL(e,t,n,r,i,a,o){rL(r,i,dk.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=Ne(s,function(e){return e>0})==null;return mh(r,s,!0,!0,n),ZI(i,r),c;function l(e){F(i[X[e]],function(t){if(LD(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!Ge(t)&&t>1e-4&&(e/=t),e}}function nL(e,t,n,r,i){var a=new mP(aL);return F(n,function(n){return F(n,function(n){if(LD(n.model)){var o=!r;n.axisBuilder=GP(e,t,n.model,i,a,o)}})}),a}function rL(e,t,n,r,i,a){var o=n===dk.determine;F(t,function(t){return F(t,function(t){LD(t.model)&&(KP(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[X[1-t]]=e[Vm[t]]<=a.refContainer[Vm[t]]*.5?0:1-t==1?2:1}F(t,function(e,t){return F(e,function(e){LD(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function iL(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=W_(e.get(`outerBounds`,!0)||iF,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||De([`all`,`axisLabel`],a)<0?`all`:a,s=[hs(H(e.get(`outerBoundsClampWidth`,!0),aF[0]),t.width),hs(H(e.get(`outerBoundsClampHeight`,!0),aF[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var aL=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;vP(e,t,n,r,i,a),ID(e.nameLocation)||F(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&bP(e.labelInfoList,e.dirVec,r,i)})};function oL(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return sL(n,e,t),n.seriesInvolved&&lL(n,e),n}function sL(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];F(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=gL(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(F(n.getAxes(),Ie(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&F(f.baseAxes,Ie(p,!d||`cross`,u)),d&&F(f.otherAxes,Ie(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!hL(d))){s??=d.get(`triggerTooltip`),d=r?cL(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=gL(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:hL(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=uL(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function cL(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};F(s,function(e){c[e]=M(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&P(l,u.textStyle)}return e.model.getModel(`axisPointer`,new og(c,n,r))}function lL(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);!n||!n.model||r===`none`||r===!1||r===`item`||i===!1||t.get([`axisPointer`,`show`],!0)===!1||F(e.coordSysAxesInfo[gL(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function uL(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function fL(e){var t=pL(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=hL(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o0;return o&&s}var PL=xc();function FL(e,t,n,r){if(e instanceof XN&&e.scale.type!==`ordinal`)return n;var i=e.model,a=i.get(`jitter`);if(!(a>0))return n;var o=i.get(`jitterOverlap`),s=i.get(`jitterMargin`)||0,c=KE(e.scale)?Mk(e).w:null;return o?IL(n,a,c,r):LL(e,t,n,r,a,s)}function IL(e,t,n,r){if(n===null)return e+(Math.random()-.5)*t;var i=n-r*2,a=Math.min(Math.max(0,t),i);return e+(Math.random()-.5)*a}function LL(e,t,n,r,i,a){var o=PL(e);o.items||=[];var s=o.items,c=RL(s,t,n,r,i,a,1),l=RL(s,t,n,r,i,a,-1),u=Math.abs(c-n)i/2||d&&f>d/2-r?IL(n,i,d,r):(s.push({fixedCoord:t,floatCoord:u,r}),u)}function RL(e,t,n,r,i,a,o){for(var s=n,c=0;ci/2)return Number.MAX_VALUE;if(o===1&&m>s||o===-1&&m0&&!f.min?f.min=0:f.min!=null&&f.min<0&&!f.max&&(f.max=0);var p=s;f.color!=null&&(p=P({color:f.color},s));var m=Ce(M(f),{boundaryGap:e,splitNumber:t,clockwise:n,scale:r,axisLine:i,axisTick:a,axisLabel:o,name:f.text,showName:c,nameLocation:`end`,nameGap:u,nameTextStyle:p,triggerEvent:d},!1);if(B(l)){var h=m.name;m.name=l.replace(`{value}`,h??``)}else z(l)&&(m.name=l(m.name,m));var g=new og(m,null,this.ecModel);return ke(g,UD.prototype),g.mainType=`radar`,g.componentIndex=this.componentIndex,g.uid=cg(`ec_radar`),g},this);this._indicatorModels=f},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type=JL,t.defaultOption={z:0,center:[`50%`,`50%`],radius:`50%`,startAngle:90,clockwise:!1,axisName:{show:!0,color:Z.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:`polygon`,axisLine:Ce({lineStyle:{color:Z.color.neutral20}},KL.axisLine),axisLabel:XL(KL.axisLabel,!1),axisTick:XL(KL.axisTick,!1),splitLine:XL(KL.splitLine,!0),splitArea:XL(KL.splitArea,!0),indicator:[]},t}(tv),QL=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeAll(),this._buildAxes(e,n),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e,t){var n=e.coordinateSystem;F(I(n.getIndicatorAxes(),function(e){var r=e.model.get(`showName`)?e.name:``;return new xP(e.model,t,{axisName:r,position:[n.cx,n.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(e){e.build(),this.group.add(e.group)},this)},t.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(!n.length)return;var r=e.get(`shape`),i=e.getModel(`splitLine`),a=e.getModel(`splitArea`),o=i.getModel(`lineStyle`),s=a.getModel(`areaStyle`),c=i.get(`show`),l=a.get(`show`),u=o.get(`color`),d=s.get(`color`),f=R(u)?u:[u],p=R(d)?d:[d],m=[],h=[];function g(e,t,n){var r=n%t.length;return e[r]=e[r]||[],r}if(r===`circle`)for(var _=n[0].getTicksCoords(),v=t.cx,y=t.cy,b=0;b<_.length;b++){if(c){var x=g(m,f,b);m[x].push(new Ap({shape:{cx:v,cy:y,r:_[b].coord}}))}if(l&&b<_.length-1){var x=g(h,p,b);h[x].push(new Zp({shape:{cx:v,cy:y,r0:_[b].coord,r:_[b+1].coord}}))}}else for(var S,C=I(n,function(e,n){var r=e.getTicksCoords();return S=S==null?r.length-1:Math.min(r.length-1,S),I(r,function(e){return t.coordToPoint(e.coord,n)})}),w=[],b=0;b<=S;b++){for(var T=[],E=0;E3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(uR(this._zr,`globalPan`)||mR(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(dn(r.event),r.__ecRoamConsumed=!0,xR(e,t,n,r,i))},t}(zt);function mR(e){return e.__ecRoamConsumed}var hR=xc();function gR(e){var t=hR(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function _R(e,t,n,r){for(var i=gR(e).roam,a=i[t]=i[t]||[],o=0;o=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&o!=null&&s!=null&&(u=JR(l,{x:0,y:0,width:o,height:s}),!t.ignoreViewBox)){var f=r;r=new q,r.add(f),f.scaleX=f.scaleY=u.scale,f.x=u.x,f.y=u.y}return!t.ignoreRootClip&&o!=null&&s!=null&&r.setClipPath(new vd({shape:{x:0,y:0,width:o,height:s}})),{root:r,width:o,height:s,viewBoxRect:l,viewBoxTransform:u,named:i}},e.prototype._parseNode=function(e,t,n,r,i,a){var o=e.nodeName.toLowerCase(),s,c=r;if(o===`defs`&&(i=!0),o===`text`&&(a=!0),o===`defs`||o===`switch`)s=t;else{if(!i){var l=wR[o];if(l&&W(wR,o)){s=l.call(this,e,t);var u=e.getAttribute(`name`);if(u){var d={name:u,namedFrom:null,svgNodeTagLower:o,el:s};n.push(d),o===`g`&&(c=d)}else r&&n.push({name:r.name,namedFrom:r,svgNodeTagLower:o,el:s});t.add(s)}}var f=AR[o];if(f&&W(AR,o)){var p=f.call(this,e),m=e.getAttribute(`id`);m&&(this._defs[m]=p)}}if(s&&s.isGroup)for(var h=e.firstChild;h;)h.nodeType===1?this._parseNode(h,s,n,c,i,a):h.nodeType===3&&a&&this._parseText(h,s),h=h.nextSibling},e.prototype._parseText=function(e,t){var n=new od({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});NR(t,n),FR(e,n,this._defsUsePending,!1,!1),IR(n,t);var r=n.style,i=r.fontSize;i&&i<9&&(r.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9),r.font=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+`px`,r.fontFamily||`sans-serif`].join(` `);var a=n.getBoundingRect();return this._textX+=a.width,t.add(n),n},e.internalField=(function(){wR={g:function(e,t){var n=new q;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new vd;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute(`x`)||`0`),y:parseFloat(e.getAttribute(`y`)||`0`),width:parseFloat(e.getAttribute(`width`)||`0`),height:parseFloat(e.getAttribute(`height`)||`0`)}),n.silent=!0,n},circle:function(e,t){var n=new Ap;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute(`cx`)||`0`),cy:parseFloat(e.getAttribute(`cy`)||`0`),r:parseFloat(e.getAttribute(`r`)||`0`)}),n.silent=!0,n},line:function(e,t){var n=new om;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute(`x1`)||`0`),y1:parseFloat(e.getAttribute(`y1`)||`0`),x2:parseFloat(e.getAttribute(`x2`)||`0`),y2:parseFloat(e.getAttribute(`y2`)||`0`)}),n.silent=!0,n},ellipse:function(e,t){var n=new Mp;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute(`cx`)||`0`),cy:parseFloat(e.getAttribute(`cy`)||`0`),rx:parseFloat(e.getAttribute(`rx`)||`0`),ry:parseFloat(e.getAttribute(`ry`)||`0`)}),n.silent=!0,n},polygon:function(e,t){var n=e.getAttribute(`points`),r;n&&(r=PR(n));var i=new tm({shape:{points:r||[]},silent:!0});return NR(t,i),FR(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n=e.getAttribute(`points`),r;n&&(r=PR(n));var i=new rm({shape:{points:r||[]},silent:!0});return NR(t,i),FR(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new ud;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute(`xlink:href`)||e.getAttribute(`href`),x:+e.getAttribute(`x`),y:+e.getAttribute(`y`),width:+e.getAttribute(`width`),height:+e.getAttribute(`height`)}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute(`x`)||`0`,r=e.getAttribute(`y`)||`0`,i=e.getAttribute(`dx`)||`0`,a=e.getAttribute(`dy`)||`0`;this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(r)+parseFloat(a);var o=new q;return NR(t,o),FR(e,o,this._defsUsePending,!1,!0),o},tspan:function(e,t){var n=e.getAttribute(`x`),r=e.getAttribute(`y`);n!=null&&(this._textX=parseFloat(n)),r!=null&&(this._textY=parseFloat(r));var i=e.getAttribute(`dx`)||`0`,a=e.getAttribute(`dy`)||`0`,o=new q;return NR(t,o),FR(e,o,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(a),o},path:function(e,t){var n=Tp(e.getAttribute(`d`)||``);return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}})(),e}(),AR={lineargradient:function(e){var t=new hm(parseInt(e.getAttribute(`x1`)||`0`,10),parseInt(e.getAttribute(`y1`)||`0`,10),parseInt(e.getAttribute(`x2`)||`10`,10),parseInt(e.getAttribute(`y2`)||`0`,10));return jR(e,t),MR(e,t),t},radialgradient:function(e){var t=new gm(parseInt(e.getAttribute(`cx`)||`0`,10),parseInt(e.getAttribute(`cy`)||`0`,10),parseInt(e.getAttribute(`r`)||`0`,10));return jR(e,t),MR(e,t),t}};function jR(e,t){e.getAttribute(`gradientUnits`)===`userSpaceOnUse`&&(t.global=!0)}function MR(e,t){for(var n=e.firstChild;n;){if(n.nodeType===1&&n.nodeName.toLocaleLowerCase()===`stop`){var r=n.getAttribute(`offset`),i=void 0;i=r&&r.indexOf(`%`)>0?parseInt(r,10)/100:r?parseFloat(r):0;var a={};KR(n,a,a);var o=a.stopColor||n.getAttribute(`stop-color`)||`#000000`,s=a.stopOpacity||n.getAttribute(`stop-opacity`);if(s){var c=hi(o);c&&c[3]&&(c[3]*=si(s),o=Ei(c,`rgba`))}t.colorStops.push({offset:i,color:o})}n=n.nextSibling}}function NR(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||={},P(t.__inheritedStyle,e.__inheritedStyle))}function PR(e){for(var t=VR(e),n=[],r=0;r0;a-=2){var o=r[a],s=r[a-1],c=VR(o);switch(i||=vn(),s){case`translate`:Sn(i,i,[parseFloat(c[0]),parseFloat(c[1]||`0`)]);break;case`scale`:wn(i,i,[parseFloat(c[0]),parseFloat(c[1]||c[0])]);break;case`rotate`:Cn(i,i,-parseFloat(c[0])*UR,[parseFloat(c[1]||`0`),parseFloat(c[2]||`0`)]);break;case`skewX`:var l=Math.tan(parseFloat(c[0])*UR);xn(i,[1,0,l,1,0,0],i);break;case`skewY`:var u=Math.tan(parseFloat(c[0])*UR);xn(i,[1,u,0,1,0,0],i);break;case`matrix`:i[0]=parseFloat(c[0]),i[1]=parseFloat(c[1]),i[2]=parseFloat(c[2]),i[3]=parseFloat(c[3]),i[4]=parseFloat(c[4]),i[5]=parseFloat(c[5]);break}}t.setLocalTransform(i)}}var GR=/([^\s:;]+)\s*:\s*([^:;]+)/g;function KR(e,t,n){var r=e.getAttribute(`style`);if(r){GR.lastIndex=0;for(var i;(i=GR.exec(r))!=null;){var a=i[1],o=W(TR,a)?TR[a]:null;o&&(t[o]=i[2]);var s=W(DR,a)?DR[a]:null;s&&(n[s]=i[2])}}}function qR(e,t,n){for(var r=0;r1e-6;sB[0]=o?(i[0]-r.x)/a:i[0],sB[1]=o?(i[1]-r.y)/a:i[1],Pt(sB,sB,e.mtRawInv);var s=rB(e,sB);cB(t,s,a),F(n,function(e){e!==t&&cB(e,s.slice(),a)})}var sB=[];function cB(e,t,n){var r=e.option;r.center=t,r.zoom=n}function lB(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function uB(e,t){var n=t.getShallow(`nodeScaleRatio`,!0)||1,r=gz(e);return((r.zoom-1)*n+1)/(r.trans[2].scaleX||1)}function dB(e,t,n,r,i,a,o,s){if(!Qz(e)){n.disable();return}n.enable(H(e.get(`roam`),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:r,isInClip:function(e,t,n){return!i||i.contain(t,n)}}});function c(n){var r=e.mainType,i=Oh(P({type:hB(r,e.subType,qd)},n));s&&(i.componentType=r),i[r+`Id`]=e.id,t.dispatchAction(i)}n.off(`pan`).off(`zoom`).on(`pan`,function(e){a&&a(`pan`),c({dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){a&&a(`zoom`),c({zoom:e.scale,originX:e.originX,originY:e.originY})})}function fB(e){return function(t,n,r){return pB.copy(e.getBoundingRect()),pB.applyTransform(e.getComputedTransform()),pB.contain(n,r)}}var pB=new K(0,0,0,0);function mB(e,t,n){var r=hB(t,n,qd);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Oc(e,t,n),function(t){Zz(e,t),$z(e,t,r,i)})})}function hB(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function gB(e){return e.zoom!=null}function _B(e,t,n,r,i,a,o){var s=new vz(null,aB(e.ecModel,t));return Az(s,n,r,i,a),o?jz(s,o.x,o.y,o.width,o.height):jz(s,n,r,i,a),kz(s,e),s}var vB=[`rect`,`circle`,`line`,`ellipse`,`polygon`,`polyline`,`path`],yB=U(vB),bB=U(vB.concat([`g`])),xB=U(vB.concat([`g`])),SB=xc();function CB(e){var t=e.getItemStyle(),n=e.get(`areaColor`);return n!=null&&(t.fill=n),t}function wB(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var TB=function(){function e(e){var t=this.group=new q,n=this._transformGroup=new q;t.add(n),this.uid=cg(`ec_map_draw`),this._controller=new pR(e.getZr()),n.add(this._regionsGroup=new q),n.add(this._svgGroup=new q)}return e.prototype.draw=function(e,t,n,r,i){var a=this,o=e.getData&&e.getData();MB(e)&&t.eachComponent({mainType:`series`,subType:`map`},function(t){!o&&t.getHostGeoModel()===e&&(o=t.getData())});var s=e.coordinateSystem,c=s.view,l=this._regionsGroup,u=this._transformGroup,d=!l.childAt(0)||i,f;s.shouldClip()?(f=Cz(null,c),this.group.setClipPath(new vd({shape:f.clone()}))):this.group.removeClipPath(),qz(u,1,c,d?null:e);var p=o&&o.getVisual(`visualMeta`)&&o.getVisual(`visualMeta`).length>0;s.resourceType===`geoJSON`?this._buildGeoJSON(c,n,s,e,o,p):s.resourceType===`geoSVG`&&this._buildSVG(c,n,s,e,o,p),dB(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},f,function(){a._mouseDownFlag=!1},!1,!0),this._updateMapSelectHandler(e,l,n,r)},e.prototype.__updateOnOwnRoam=function(e){qz(this._transformGroup,1,e.coordinateSystem.view,null)},e.prototype._buildGeoJSON=function(e,t,n,r,i,a){var o=this._regionsGroupByName=U(),s=U(),c=this._regionsGroup,l=n.projection,u=l&&l.stream,d=no(wz(null,e,0));function f(e,t){return t&&(e=t(e)),e&&Pt([],e,d)}function p(e){for(var t=[],n=!u&&l&&l.project,r=0;r=0)&&(u=e);var d=o?{normal:{align:`center`,verticalAlign:`middle`}}:null;Fh(n,Ih(i),{labelFetcher:u,labelDataIndex:l,defaultText:r},d);var f=n.getTextContent();if(f&&(SB(f).ignore=f.ignore,n.textConfig&&o)){var p=n.getBoundingRect().clone();n.textConfig.layoutRect=p,n.textConfig.position=[(o[0]-p.x)/p.width*100+`%`,(o[1]-p.y)/p.height*100+`%`]}n.disableLabelAnimation=!0}else n.removeTextContent(),n.removeTextConfig(),n.disableLabelAnimation=null}function OB(e,t,n,r,i,a){t?t.setItemGraphicEl(a,n):Y(n).eventData={componentType:`geo`,componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:r,region:i&&i.option||{}}}function kB(e,t,n,r,i){t||_h({el:n,componentModel:e,itemName:r,itemTooltipOption:i.get(`tooltip`)})}function AB(e,t,n,r){t.highDownSilentOnTouch=!!e.get(`selectedMode`);var i=r.getModel(`emphasis`),a=i.get(`focus`);return Jf(t,a,i.get(`blurScope`),i.get(`disabled`)),MB(e)&&tp(t,e,n),a}function jB(e,t,n){var r=[],i;function a(){i=[]}function o(){i.length&&(r.push(i),i=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(e,t){isFinite(e)&&isFinite(t)&&i.push([e,t])},sphere:function(){}});return!n&&s.polygonStart(),F(e,function(e){s.lineStart();for(var t=0;t-1&&(n.style.stroke=n.style.fill,n.style.fill=Z.color.neutral00,n.style.lineWidth=2),n},t.prototype.__ownRoamView=function(){return FB(this)?this.coordinateSystem.view:null},t.type=`series.map`,t.dependencies=[`geo`],t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystem:`geo`,map:``,left:`center`,top:`center`,aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:Z.color.tertiary},itemStyle:{borderWidth:.5,borderColor:Z.color.border,areaColor:Z.color.background},emphasis:{label:{show:!0,color:Z.color.primary},itemStyle:{areaColor:Z.color.highlight}},select:{label:{show:!0,color:Z.color.primary},itemStyle:{color:Z.color.highlight}},nameProperty:`name`},t}(lx);function PB(e){return e.indexOf(`i`)===0}function FB(e){return IB(e.seriesGroup)===e&&!e.getHostGeoModel()}function IB(e){return e.f[0]}function LB(e,t){var n={};return e.eachRawSeriesByType(`map`,function(r){var i=r.getHostGeoModel(),a=i?`o`+i.id:`i`+r.getMapType(),o=n[a]=n[a]||{f:[],r:[]};!e.isSeriesFiltered(r)&&!t&&o.f.push(r),o.r.push(r)}),n}var RB=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`map`,t}return t.prototype.render=function(e,t,n,r){if(!(r&&r.type===`mapToggleSelect`&&r.from===this.uid)){var i=this.group;if(i.removeAll(),!e.getHostGeoModel()){var a=this._mapDraw;a&&r&&r.type===`geoRoam`&&a.resetForLabelLayout(),r&&r.type===`geoRoam`&&r.componentType===`series`&&r.seriesId===e.id?a&&i.add(a.group):FB(e)?(a||=this._mapDraw=new TB(n),i.add(a.group),a.draw(e,t,n,this,r)):this._clearMapDraw(),e.get(`showLegendSymbol`)&&t.getComponent(`legend`)&&this._renderSymbols(e)}}},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=this._mapDraw;FB(t)&&r&&r.__updateOnOwnRoam(t)},t.prototype.remove=function(){this._clearMapDraw(),this.group.removeAll()},t.prototype.dispose=function(){this._clearMapDraw()},t.prototype._clearMapDraw=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e){var t=e.originalData,n=this.group;t.each(t.mapDimension(`value`),function(r,i){if(!isNaN(r)){var a=t.getItemLayout(i);if(!(!a||!a.point)){var o=a.point,s=a.offset,c=new Ap({style:{fill:e.getData().getVisual(`style`).fill},shape:{cx:o[0]+s*9,cy:o[1],r:3},silent:!0,z2:8+(s?0:11)});if(!s){var l=IB(e.seriesGroup).getData(),u=t.getName(i),d=l.indexOfName(u),f=t.getItemModel(i),p=f.getModel(`label`),m=l.getItemGraphicEl(d);Fh(c,Ih(f),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(d,n)}},defaultText:u}),c.disableLabelAnimation=!0,p.get(`position`)||c.setTextConfig({position:`bottom`}),m.onHoverStateChange=function(e){bf(c,e)}}n.add(c)}}})},t.type=`map`,t}(Sx),zB={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},BB=[`lng`,`lat`],VB=function(e){D(t,e);function t(t,n,r){var i=e.call(this)||this;i.dimensions=BB,i.type=`geo`,i._nameCoordMap=U(),i.name=t;var a=r.projection,o=hz.load(n,r.nameMap,r.nameProperty),s=hz.getGeoResource(n);i.resourceType=s?s.type:null;var c=i.regions=o.regions,l=zB[s.type];i._clip=r.clip,i.view=new vz(!a&&l.invertLongitute,aB(r.ecModel,r.api),i),i.map=n,i._regionsMap=o.regionsMap,i.regions=o.regions,i.projection=a;var u;if(a)for(var d=0;d1?(b.width=y,b.height=y/g):(b.height=y,b.width=y*g),b.y=v[1]-b.height/2,b.x=v[0]-b.width/2;else{var x=e.getBoxLayoutParams();x.aspect=g,b=W_(x,h),b=G_(e,b,g)}jz(n,b.x,b.y,b.width,b.height),kz(n,e)}function WB(e,t){F(t.get(`geoCoord`),function(t,n){e.addGeoCoord(n,t)})}var GB=new(function(){function e(){this.dimensions=BB}return e.prototype.create=function(e,t){var n=[];function r(e){return{nameProperty:e.get(`nameProperty`),aspectScale:e.get(`aspectScale`),projection:e.get(`projection`),clip:e.getShallow(`clip`,!0)}}return e.eachComponent(`geo`,function(i,a){var o=i.get(`map`),s=new VB(o+a,o,N({nameMap:i.get(`nameMap`),api:t,ecModel:e},r(i)));n.push(s),i.coordinateSystem=s,s.model=i,s.resize=UB,s.resize(i,t)}),e.eachSeries(function(e){P_({targetModel:e,coordSysType:`geo`,coordSysProvider:function(){var t=e.subType===`map`?e.getHostGeoModel():e.getReferringComponents(`geo`,Tc).models[0];return t&&t.coordinateSystem},allowNotFound:!0})}),F(LB(e,!0),function(i,a){if(PB(a)){var o=i.r[0],s=[];F(i.r,function(e){s.push(e.get(`nameMap`)),e.seriesGroup=null});var c=a.slice(1),l=new VB(c,c,N({nameMap:we(s),api:t,ecModel:e},r(o))),u;F(i.r,function(e){u=H(u,e.get(`scaleLimit`))}),n.push(l),l.resize=UB,l.resize(o,t),F(i.r,function(e){e.coordinateSystem=l,WB(l,e)})}}),n},e.prototype.getFilledRegions=function(e,t,n,r){for(var i=(e||[]).slice(),a=U(),o=0;o=0;a--){var o=i[a];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},n.push(o)}}function rV(e,t){var n=e.isExpand?e.children:[],r=e.parentNode.children,i=e.hierNode.i?r[e.hierNode.i-1]:null;if(n.length){sV(e);var a=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-a):e.hierNode.prelim=a}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=cV(e,i,e.parentNode.hierNode.defaultAncestor||r[0],t)}function iV(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function aV(e){return arguments.length?e:pV}function oV(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function sV(e){for(var t=e.children,n=t.length,r=0,i=0;--n>=0;){var a=t[n];a.hierNode.prelim+=r,a.hierNode.modifier+=r,i+=a.hierNode.change,r+=a.hierNode.shift+i}}function cV(e,t,n,r){if(t){for(var i=e,a=e,o=a.parentNode.children[0],s=t,c=i.hierNode.modifier,l=a.hierNode.modifier,u=o.hierNode.modifier,d=s.hierNode.modifier;s=lV(s),a=uV(a),s&&a;){i=lV(i),o=uV(o),i.hierNode.ancestor=e;var f=s.hierNode.prelim+d-a.hierNode.prelim-l+r(s,a);f>0&&(fV(dV(s,e,n),e,f),l+=f,c+=f),d+=s.hierNode.modifier,l+=a.hierNode.modifier,c+=i.hierNode.modifier,u+=o.hierNode.modifier}s&&!lV(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=d-c),a&&!uV(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=l-u,n=e)}return n}function lV(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function uV(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function dV(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function fV(e,t,n){var r=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=r,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=r}function pV(e,t){return e.parentNode===t.parentNode?1:2}var mV=xc();function hV(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,SV(t,n,e),F(n,function(n){F(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,Ie(gV,e))})}),t.wrapMethod(`cloneShallow`,Ie(vV,e)),F(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,Ie(_V,e))}),Xe(n[t.dataType]===t)}function gV(e,t){if(xV(this)){var n=N({},mV(this).datas);n[this.dataType]=t,SV(t,n,e)}else CV(t,this.dataType,mV(this).mainData,e);return t}function _V(e,t){return e.struct&&e.struct.update(),t}function vV(e,t){return F(mV(t).datas,function(n,r){n!==t&&CV(n.cloneShallow(),r,t,e)}),t}function yV(e){var t=mV(this).mainData;return e==null||t==null?t:mV(t).datas[e]}function bV(){var e=mV(this).mainData;return e==null?[{data:e}]:I(Pe(mV(e).datas),function(t){return{type:t,data:mV(e).datas[t]}})}function xV(e){return mV(e).mainData===e}function SV(e,t,n){mV(e).datas={},F(t,function(t,r){CV(t,r,e,n)})}function CV(e,t,n,r){mV(n).datas[t]=e,mV(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=yV,e.getLinkedDataAll=bV}var wV=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||``,this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){z(e)&&(n=t,t=e,e=null),e||={},B(e)&&(e={order:e});var r=e.order||`preorder`,i=this[e.attr||`children`],a;r===`preorder`&&(a=t.call(n,this));for(var o=0;!a&&ot&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var r=n.getData().tree.root,i=e.targetNode;if(B(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=r.getNodeById(a)))return{node:i}}}function OV(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function kV(e,t){return De(OV(e),t)>=0}function AV(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var jV=`tree`,MV=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.ignoreStyleOnData=!0,n}return t.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},n=new og(e.leaves||{},this,this.ecModel),r=TV.createTree(t,this,i);function i(e){e.wrapMethod(`getItemModel`,function(e,t){var i=r.getNodeByDataIndex(t);return i&&i.children.length&&i.isExpand||(e.parentModel=n),e})}var a=0;r.eachNode(`preorder`,function(e){e.depth>a&&(a=e.depth)});var o=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:a;return r.root.eachNode(`preorder`,function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&t.collapsed!=null?!t.collapsed:e.depth<=o}),r.data},t.prototype.getOrient=function(){var e=this.get(`orient`);return e===`horizontal`?e=`LR`:e===`vertical`&&(e=`TB`),e},t.prototype.formatTooltip=function(e,t,n){for(var r=this.getData().tree,i=r.root.children[0],a=r.getNodeByDataIndex(e),o=a.getValue(),s=a.name;a&&a!==i;)s=a.parentNode.name+`.`+s,a=a.parentNode;return Hb(`nameValue`,{name:s,value:o,noValue:isNaN(o)||o==null})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=AV(r,this),n.collapsed=!r.isExpand,n},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type=`series.`+jV,t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystemUsage:`box`,left:`12%`,top:`12%`,right:`12%`,bottom:`12%`,layout:`orthogonal`,edgeShape:`curve`,edgeForkPosition:`50%`,roam:!1,roamTrigger:`global`,nodeScaleRatio:.4,center:null,zoom:1,orient:`LR`,symbol:`emptyCircle`,symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:Z.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:`lightsteelblue`,borderWidth:1.5},label:{show:!0},animationEasing:`linear`,animationDuration:700,animationDurationUpdate:500},t}(lx),NV=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),PV=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new NV},t.prototype.buildPath=function(e,t){var n=t.childPoints,r=n.length,i=t.parentPoint,a=n[0],o=n[r-1];if(r===1){e.moveTo(i[0],i[1]),e.lineTo(a[0],a[1]);return}var s=t.orient,c=s===`TB`||s===`BT`?0:1,l=1-c,u=J(t.forkPosition,1),d=[];d[c]=i[c],d[l]=i[l]+(o[l]-i[l])*u,e.moveTo(i[0],i[1]),e.lineTo(d[0],d[1]),e.moveTo(a[0],a[1]),d[c]=a[c],e.lineTo(d[0],d[1]),d[c]=o[c],e.lineTo(d[0],d[1]),e.lineTo(o[0],o[1]);for(var f=1;fv.x,x||(b-=Math.PI));var C=x?`left`:`right`,w=s.getModel(`label`),T=w.get(`rotate`),E=Math.PI/180*T,D=g.getTextContent();D&&(g.setTextConfig({position:w.get(`position`)||C,rotation:T==null?-b:E,origin:`center`}),D.setStyle(`verticalAlign`,`middle`))}var O=s.get([`emphasis`,`focus`]),k=O===`relative`?at(o.getAncestorsIndices(),o.getDescendantIndices()):O===`ancestor`?o.getAncestorsIndices():O===`descendant`?o.getDescendantIndices():null;k&&(Y(n).focus=k),RV(i,o,u,n,m,p,h,r),n.__edge&&(n.onHoverStateChange=function(t){if(t!==`blur`){var r=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);r&&r.hoverState===1||bf(n.__edge,t)}})}function RV(e,t,n,r,i,a,o,s){var c=t.getModel(),l=e.get(`edgeShape`),u=e.get(`layout`),d=e.getOrient(),f=e.get([`lineStyle`,`curveness`]),p=e.get(`edgeForkPosition`),m=c.getModel(`lineStyle`).getLineStyle(),h=r.__edge;if(l===`curve`)t.parentNode&&t.parentNode!==n&&(h||=r.__edge=new um({shape:HV(u,d,f,i,i)}),jm(h,{shape:HV(u,d,f,a,o)},e));else if(l===`polyline`&&u===`orthogonal`&&t!==n&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,_=[],v=0;v=0;a--)n.push(i[a])}}function GV(e,t){e.eachSeriesByType(`tree`,function(e){KV(e,t)})}function KV(e,t){var n=q_(e,t).refContainer,r=W_(e.getBoxLayoutParams(),n);e.layoutInfo=r;var i=e.get(`layout`),a=0,o=0,s=null;i===`radial`?(a=2*Math.PI,o=Math.min(r.height,r.width)/2,s=aV(function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth})):(a=r.width,o=r.height,s=aV());var c=e.getData().tree.root,l=c.children[0];if(l){nV(c),UV(l,rV,s),c.hierNode.modifier=-l.hierNode.prelim,WV(l,iV);var u=l,d=l,f=l;WV(l,function(e){var t=e.getLayout().x;td.getLayout().x&&(d=e),e.depth>f.depth&&(f=e)});var p=u===d?1:s(u,d)/2,m=p-u.getLayout().x,h=0,g=0,_=0,v=0;if(i===`radial`)h=a/(d.getLayout().x+p+m),g=o/(f.depth-1||1),WV(l,function(e){_=(e.getLayout().x+m)*h,v=(e.depth-1)*g;var t=oV(_,v);e.setLayout({x:t.x,y:t.y,rawX:_,rawY:v},!0)});else{var y=e.getOrient();y===`RL`||y===`LR`?(g=o/(d.getLayout().x+p+m),h=a/(f.depth-1||1),WV(l,function(e){v=(e.getLayout().x+m)*g,_=y===`LR`?(e.depth-1)*h:a-(e.depth-1)*h,e.setLayout({x:_,y:v},!0)})):(y===`TB`||y===`BT`)&&(h=a/(d.getLayout().x+p+m),g=o/(f.depth-1||1),WV(l,function(e){_=(e.getLayout().x+m)*h,v=y===`TB`?(e.depth-1)*g:o-(e.depth-1)*g,e.setLayout({x:_,y:v},!0)}))}}}function qV(e){e.registerAction({type:`treeExpandAndCollapse`,event:`treeExpandAndCollapse`,update:`update`},function(e,t){t.eachComponent({mainType:Rd,subType:jV,query:e},function(t){var n=e.dataIndex,r=t.getData().tree.getNodeByDataIndex(n);r.isExpand=!r.isExpand})}),mB(e,Rd,jV)}var JV=Qc(jV,YV);function YV(e){e.eachSeriesByType(jV,function(e){var t=e.getData();t.tree.eachNode(function(e){var n=e.getModel().getModel(`itemStyle`).getItemStyle();N(t.ensureUniqueItemVisual(e.dataIndex,`style`),n)})})}function XV(e){e.registerChartView(FV),e.registerSeriesModel(MV),e.registerLayout(GV),e.registerVisual(JV),qV(e)}var ZV=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function QV(e){for(var t=0;t1;)r=r.parentNode;var i=Ev(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var eH=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};tH(n);var r=e.levels||[],i=new og({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=nH(r,t);var a=I(r||[],function(e){return new og(e,i,t)},this),o=TV.createTree(n,this,s);function s(e){e.wrapMethod(`getItemModel`,function(e,t){var n=o.getNodeByDataIndex(t);return e.parentModel=(n?a[n.depth]:null)||i,e})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e);return Hb(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=AV(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},N(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=U(),this._idIndexMapCount=0);var n=t.get(e);return n??t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){$V(this)},t.type=`series.treemap`,t.layoutMode=`box`,t.defaultOption={progressive:0,coordinateSystemUsage:`box`,left:Z.size.l,top:Z.size.xxxl,right:Z.size.l,bottom:Z.size.xxxl,sort:!0,clipWindow:`origin`,squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:`▶`,zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:`global`,nodeClick:`zoomToNode`,animation:!0,animationDurationUpdate:900,animationEasing:`quinticInOut`,breadcrumb:{show:!0,height:22,left:`center`,bottom:Z.size.m,emptyItemWidth:25,itemStyle:{color:Z.color.backgroundShade,textStyle:{color:Z.color.secondary}},emphasis:{itemStyle:{color:Z.color.background}}},label:{show:!0,distance:0,padding:5,position:`inside`,color:Z.color.neutral00,overflow:`truncate`},upperLabel:{show:!1,position:[0,`50%`],height:20,overflow:`truncate`,verticalAlign:`middle`},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:Z.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,`50%`],overflow:`truncate`,verticalAlign:`middle`}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:`index`,visibleMin:10,childrenVisibleMin:null,levels:[]},t}(lx);function tH(e){var t=0;F(e.children,function(e){tH(e);var n=e.value;R(n)&&(n=n[0]),t+=n});var n=e.value;R(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),R(e.value)?e.value[0]=n:e.value=n}function nH(e,t){var n=$s(t.get(`color`)),r=$s(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;F(e,function(e){var t=new og(e),n=t.get(`color`),r=t.get(`decal`);(t.get([`itemStyle`,`color`])||n&&n!==`none`)&&(i=!0),(t.get([`itemStyle`,`decal`])||r&&r!==`none`)&&(a=!0)});var o=e[0]||={};return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}}var rH=8,iH=8,aH=5,oH=function(){function e(e){this.group=new q,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel(`breadcrumb`),a=this.group;if(a.removeAll(),!(!i.get(`show`)||!n)){var o=i.getModel(`itemStyle`),s=i.getModel(`emphasis`),c=o.getModel(`textStyle`),l=s.getModel([`itemStyle`,`textStyle`]),u=q_(e,t).refContainer,d={left:i.get(`left`),right:i.get(`right`),top:i.get(`top`),bottom:i.get(`bottom`)},f={emptyItemWidth:i.get(`emptyItemWidth`),totalWidth:0,renderList:[]},p=W_(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),J_(a,d,u)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=pc(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+rH*2,t.emptyItemWidth);t.totalWidth+=o+iH,t.renderList.push({node:r,text:i,width:o})}},e.prototype._renderContent=function(e,t,n,r,i,a,o,s){for(var c=0,l=t.emptyItemWidth,u=e.get([`breadcrumb`,`height`]),d=t.totalWidth,f=t.renderList,p=i.getModel(`itemStyle`).getItemStyle(),m=f.length-1;m>=0;m--){var h=f[m],g=h.node,_=h.width,v=h.text;d>n.width&&(d-=_-l,_=l,v=null);var y=new tm({shape:{points:sH(c,0,_,u,m===f.length-1,m===0)},style:P(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new Cd({style:Lh(a,{text:v})}),textConfig:{position:`inside`},z2:10*1e4,onclick:Ie(s,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=Lh(o,{text:v}),y.ensureState(`emphasis`).style=p,Jf(y,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(y),cH(y,e,g),c+=_+iH}},e.prototype.remove=function(){this.group.removeAll()},e}();function sH(e,t,n,r,i,a){var o=[[i?e:e-aH,t],[e+n,t],[e+n,t+r],[i?e:e-aH,t+r]];return!a&&o.splice(2,0,[e+n+aH,t+r/2]),!i&&o.push([e,t+r/2]),o}function cH(e,t,n){Y(e).eventData={componentType:`series`,componentSubType:`treemap`,componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:`treemap`,selfType:`breadcrumb`,nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&AV(n,t)}}var lH=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;r=0;c--){var l=i[r===`asc`?o-c-1:c].getValue();l/n*ts[1]&&(s[1]=t)})),{sum:r,dataExtent:s}}function wH(e,t,n){for(var r=0,i=1/0,a=0,o=void 0,s=e.length;ar&&(r=o));var c=e.area*e.area,l=t*t*n;return c?dH(l*r/c,c/(l*i)):1/0}function TH(e,t,n,r,i){var a=t===n.width?0:1,o=1-a,s=[`x`,`y`],c=[`width`,`height`],l=n[s[a]],u=t?e.area/t:0;(i||u>n[c[o]])&&(u=n[c[o]]);for(var d=0,f=e.length;dOs&&(u=Os),i=c}uPH||Math.abs(e.dy)>PH)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:`treemapMove`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale,i=this.seriesModel;if(this._state!==`animating`){var a=i.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new K(o.x,o.y,o.width,o.height),c=i.layoutInfo,l=AH(c,o),u=l*r;u=jH(u,i);var d=u/l;t-=c.x,n-=c.y;var f=vn();Sn(f,f,[-t,-n]),wn(f,f,[d,d]),Sn(f,f,[t,n]),s.applyTransform(f),this.api.dispatchAction({type:`treemapRender`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var t=this;e.on(`click`,function(e){if(t._state===`ready`){var n=t.seriesModel.get(`nodeClick`,!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if(n===`zoomToNode`)t._zoomToNode(r);else if(n===`link`){var a=i.hostTree.data.getItemModel(i.dataIndex),o=a.get(`link`,!0),s=a.get(`target`,!0)||`blank`;o&&T_(o,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=e.get(`leafDepth`,!0)==null?this.findTarget(t.getWidth()/2,t.getHeight()/2):{node:e.getViewRoot()},n||={node:e.getData().tree.root}),(this._breadcrumb||=new oH(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&(kV(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=WH(),this._state=`ready`,this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:`treemapZoomToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:`treemapRootToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:`viewChildren`,order:`preorder`},function(r){var i=this._storage.background[r.getRawIndex()];if(i){var a=i.transformCoordToLocal(e,t),o=i.shape;if(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height)n={node:r,offsetX:a[0],offsetY:a[1]};else return!1}},this),n},t.type=`treemap`,t}(Sx);function WH(){return{nodeGroup:[],background:[],content:[]}}function GH(e,t,n,r,i,a,o,s,c,l){if(!o)return;var u=o.getLayout(),d=e.getData(),f=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!u||!u.isInView)return;var p=u.width,m=u.height,h=u.borderWidth,g=u.invisible,_=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,b=u.upperHeight,x=y&&y.length,S=f.getModel(`itemStyle`),C=f.getModel([`emphasis`,`itemStyle`]),w=f.getModel([`blur`,`itemStyle`]),T=f.getModel([`select`,`itemStyle`]),E=S.get(`borderRadius`)||0,D=le(`nodeGroup`,MH);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),HH(D).nodeWidth=p,HH(D).nodeHeight=m,u.isAboveViewRoot)return D;var O=le(`background`,NH,l,RH);O&&ie(D,O,x&&u.upperLabelHeight);var k=f.getModel(`emphasis`),A=k.get(`focus`),j=k.get(`blurScope`),ee=k.get(`disabled`),te=A===`ancestor`?o.getAncestorsIndices():A===`descendant`?o.getDescendantIndices():A;if(x)ep(D)&&$f(D,!1),O&&($f(O,!ee),d.setItemGraphicEl(o.dataIndex,O),Yf(O,te,j));else{var ne=le(`content`,NH,l,zH);ne&&ae(D,ne),O.disableMorphing=!0,O&&ep(O)&&$f(O,!1),$f(D,!ee),d.setItemGraphicEl(o.dataIndex,D);var re=f.getShallow(`cursor`);re&&ne.attr(`cursor`,re),Yf(D,te,j)}return D;function ie(t,n,r){var i=Y(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)oe(n);else{n.invisible=!1;var a=o.getVisual(`style`),s=a.stroke,c=VH(S);c.fill=s;var l=BH(C);l.fill=C.get(`borderColor`);var u=BH(w);u.fill=w.get(`borderColor`);var d=BH(T);if(d.fill=T.get(`borderColor`),r){var f=p-2*h;se(n,s,a.opacity,{x:h,y:0,width:f,height:b})}else n.removeTextContent();n.setStyle(c),n.ensureState(`emphasis`).style=l,n.ensureState(`blur`).style=u,n.ensureState(`select`).style=d,Ef(n)}t.add(n)}function ae(t,n){var r=Y(n);r.dataIndex=o.dataIndex,r.seriesIndex=e.seriesIndex;var i=Math.max(p-2*h,0),a=Math.max(m-2*h,0);if(n.culling=!0,n.setShape({x:h,y:h,width:i,height:a,r:E}),g)oe(n);else{n.invisible=!1;var s=o.getVisual(`style`),c=s.fill,l=VH(S);l.fill=c,l.decal=s.decal;var u=BH(C),d=BH(w),f=BH(T);se(n,c,s.opacity,null),n.setStyle(l),n.ensureState(`emphasis`).style=u,n.ensureState(`blur`).style=d,n.ensureState(`select`).style=f,Ef(n)}t.add(n)}function oe(e){!e.invisible&&a.push(e)}function se(t,n,r,i){var a=f.getModel(i?IH:FH),s=pc(f.get(`name`),null),c=a.getShallow(`show`);Fh(t,Ih(f,i?IH:FH),{defaultText:c?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:o.dataIndex});var l=t.getTextContent();if(l){var d=l.style,p=Ye(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),l.disableLabelLayout=!0),l.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);(d.width!==e||d.height!==n)&&l.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow=`truncate`,ce(d,i,u);var m=l.getState(`emphasis`);ce(m?m.style:null,i,u)}}function ce(t,n,r){var i=t?t.text:null;if(!n&&r.isLeafRoot&&i!=null){var a=e.get(`drillDownIcon`,!0);t.text=a?a+` `+i:i}}function le(e,r,a,o){var s=v!=null&&n[e][v],c=i[e];return s?(n[e][v]=null,ue(c,s)):g||(s=new r,s instanceof Xl&&(s.z2=KH(a,o)),de(c,s)),t[e][_]=s}function ue(e,t){var n=e[_]={};t instanceof MH?(n.oldX=t.x,n.oldY=t.y):n.oldShape=N({},t.shape)}function de(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof q;if(a&&(!r||r.direction===`drillDown`)){var c=0,l=0,u=i.background[a.getRawIndex()];!r&&u&&u.oldShape&&(c=u.oldShape.width,l=u.oldShape.height),s?(n.oldX=0,n.oldY=l):n.oldShape={x:c,y:l,width:0,height:0}}n.fadein=!s}}function KH(e,t){return e*LH+t}var qH=F,JH=V,YH=-1,XH=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=M(t);this.type=r,this.mappingMethod=n,this._normalizeData=cU[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?($H(i),ZH(i)):n===`category`?i.categories?QH(i):$H(i,!0):(Xe(n!==`linear`||i.dataExtent),$H(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return L(this._normalizeData,this)},e.listVisualTypes=function(){return Pe(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){V(e)?F(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=R(t)?[]:V(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&qH(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(R(e))e=e.slice();else if(JH(e)){var t=[];qH(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a=0;a--)r[a]??(delete n[t[a]],t.pop())}function $H(e,t){var n=e.visual,r=[];V(n)?qH(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),sU(e,r)}function eU(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:aU([0,1])}}function tU(e){var t=this.option.visual;return t[Math.round(ps(e,[0,1],[0,t.length-1],!0))]||{}}function nU(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function rU(e){var t=this.option.visual;return t[this.option.loop&&e!==YH?e%t.length:e]}function iU(){return this.option.visual[0]}function aU(e){return{linear:function(t){return ps(t,e,this.option.visual,!0)},category:rU,piecewise:function(t,n){var r=oU.call(this,n);return r??=ps(t,e,this.option.visual,!0),r},fixed:iU}}function oU(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[XH.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function sU(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=I(t,function(e){return hi(e)||[0,0,0,1]})),t}var cU={linear:function(e){return ps(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=XH.findPieceIndex(e,t,!0);if(n!=null)return ps(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??YH},fixed:ct};function lU(e,t,n){return e?t<=n:t=n.length||e===n[e.depth])&&pU(e,bU(i,c,e,t,m,r),n,r)})}}}function mU(e,t,n){var r=N({},t),i=n.designatedVisualItemStyle;return F([`color`,`colorAlpha`,`colorSaturation`],function(n){i[n]=t[n];var a=e.get(n);i[n]=null,a!=null&&(r[n]=a)}),r}function hU(e){var t=_U(e,`color`);if(t){var n=_U(e,`colorAlpha`),r=_U(e,`colorSaturation`);return r&&(t=wi(t,null,null,r)),n&&(t=Ti(t,n)),t}}function gU(e,t){return t==null?null:wi(t,null,null,e)}function _U(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function vU(e,t,n,r,i,a){if(!(!a||!a.length)){var o=yU(t,`color`)||i.color!=null&&i.color!==`none`&&(yU(t,`colorAlpha`)||yU(t,`colorSaturation`));if(o){var s=t.get(`visualMin`),c=t.get(`visualMax`),l=n.dataExtent.slice();s!=null&&sl[1]&&(l[1]=c);var u=t.get(`colorMappingBy`),d={type:o.name,dataExtent:l,visual:o.range};d.type===`color`&&(u===`index`||u===`id`)?(d.mappingMethod=`category`,d.loop=!0):d.mappingMethod=`linear`;var f=new XH(d);return dU(f).drColorMappingBy=u,f}}}function yU(e,t){var n=e.get(t);return R(n)&&n.length?{name:t,range:n}:null}function bU(e,t,n,r,i,a){var o=N({},t);if(i){var s=i.type,c=s===`color`&&dU(i).drColorMappingBy,l=c===`index`?r:c===`id`?a.mapIdToIndex(n.getId()):n.getValue(e.get(`visualDimension`));o[s]=i.mapValueToVisual(l)}return o}function xU(e){e.registerSeriesModel(eH),e.registerChartView(UH),e.registerVisual(fU),e.registerLayout(vH),QV(e)}function SU(e){return`_EC_`+e}var CU=function(){function e(e){this.type=`graph`,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=e==null?``+t:``+e;var n=this._nodesMap;if(!n[SU(e)]){var r=new wU(e,t);return r.hostGraph=this,this.nodes.push(r),n[SU(e)]=r,r}},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[SU(e)]},e.prototype.addEdge=function(e,t,n){var r=this._nodesMap,i=this._edgesMap;if(Re(e)&&(e=this.nodes[e]),Re(t)&&(t=this.nodes[t]),e instanceof wU||(e=r[SU(e)]),t instanceof wU||(t=r[SU(t)]),!(!e||!t)){var a=e.id+`-`+t.id,o=new TU(e,t,n);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),i[a]=o,o}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof wU&&(e=e.id),t instanceof wU&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+`-`+t]:n[e+`-`+t]||n[t+`-`+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,r=n.length,i=0;i=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof wU||(t=this._nodesMap[SU(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),TU=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=U(),t=U();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function EU(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}ke(wU,EU(`hostGraph`,`data`)),ke(TU,EU(`hostGraph`,`edgeData`));function DU(e,t,n,r,i){for(var a=new CU(r),o=0;o `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=wE(e,n);else{var h=O_.get(p),g=h&&h.dimensions||[];De(g,`value`)<0&&g.concat([`value`]);var _=dE(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new lE(_,n),m.initData(e)}var v=new lE([`value`],n);return v.initData(c,s),i&&i(m,v),hV({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var OU=`-->`,kU=function(e){return e.get(`autoCurveness`)||null},AU=function(e,t){var n=kU(e),r=20,i=[];if(Re(n))r=n;else if(R(n)){e.__curvenessList=n;return}t>r&&(r=t);var a=r%2?r+2:r+3;i=[];for(var o=0;o `),value:i.value,noValue:i.value==null})}return ix({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=I(this.option.categories||[],function(e){return e.value==null?N({value:0},e):e}),t=new lE([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))},t.prototype.__ownRoamView=function(){var e=this.coordinateSystem;return Kz(e)&&e},t.type=`series.`+zU,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.defaultOption={z:2,coordinateSystem:`view`,legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:`center`,top:`center`,symbol:`circle`,symbolSize:10,edgeSymbol:[`none`,`none`],edgeSymbolSize:10,edgeLabel:{position:`middle`,distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:`{b}`},itemStyle:{},lineStyle:{color:Z.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:Z.color.primary}}},t}(lx);function VU(e){return e instanceof Array||(e=[e,e]),e}var HU=Qc(zU,UU);function UU(e){e.eachSeriesByType(zU,function(e){var t=e.getGraph(),n=e.getEdgeData(),r=VU(e.get(`edgeSymbol`)),i=VU(e.get(`edgeSymbolSize`));n.setVisual(`fromSymbol`,r&&r[0]),n.setVisual(`toSymbol`,r&&r[1]),n.setVisual(`fromSymbolSize`,i&&i[0]),n.setVisual(`toSymbolSize`,i&&i[1]),n.setVisual(`style`,e.getModel(`lineStyle`).getLineStyle()),n.each(function(e){var r=n.getItemModel(e),i=t.getEdgeByIndex(e),a=VU(r.getShallow(`symbol`,!0)),o=VU(r.getShallow(`symbolSize`,!0)),s=r.getModel(`lineStyle`).getLineStyle(),c=n.ensureUniqueItemVisual(e,`style`);switch(N(c,s),c.stroke){case`source`:var l=i.node1.getVisual(`style`);c.stroke=l&&l.fill;break;case`target`:var l=i.node2.getVisual(`style`);c.stroke=l&&l.fill;break}a[0]&&i.setVisual(`fromSymbol`,a[0]),a[1]&&i.setVisual(`toSymbol`,a[1]),o[0]&&i.setVisual(`fromSymbolSize`,o[0]),o[1]&&i.setVisual(`toSymbolSize`,o[1])})})}function WU(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`)){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get(`x`),+t.get(`y`)])}),GU(n,e)}}function GU(e,t){e.eachEdge(function(e,n){var r=qe(e.getModel().get([`lineStyle`,`curveness`]),-RU(e,t,n,!0),0),i=mt(e.node1.getLayout()),a=mt(e.node2.getLayout()),o=[i,a];+r&&o.push([(i[0]+a[0])/2-(i[1]-a[1])*r,(i[1]+a[1])/2-(a[0]-i[0])*r]),e.setLayout(o)})}var KU=Qc(zU,qU);function qU(e,t){e.eachSeriesByType(zU,function(e){var t=e.get(`layout`),n=e.coordinateSystem;if(n&&n.type!==`view`){var r=e.getData(),i=[];F(n.dimensions,function(e){i=i.concat(r.mapDimensionsAll(e))});for(var a=0;a0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0].8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C;break}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(q),xW=function(){function e(e){this.group=new q,this._LineCtor=e||bW}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=CW(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=CW(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!SW(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i0}function CW(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Ih(t)}}function wW(e){return isNaN(e[0])||isNaN(e[1])}function TW(e){return e&&!wW(e[0])&&!wW(e[1])}var EW=[],DW=[],OW=[],kW=Hr,AW=jt,jW=Math.abs;function MW(e,t,n){for(var r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1,u=.1;u<=.9;u+=.1){EW[0]=kW(r[0],i[0],a[0],u),EW[1]=kW(r[1],i[1],a[1],u);var d=jW(AW(EW,t)-c);d=0?s+=l:s-=l:m>=0?s-=l:s+=l}return s}function NW(e,t){var n=[],r=Kr,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){var c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[mt(c[0]),mt(c[1])],c[2]&&c.__original.push(mt(c[2])));var d=c.__original;if(c[2]!=null){if(pt(i[0],d[0]),pt(i[1],d[2]),pt(i[2],d[1]),l&&l!==`none`){var f=YU(e.node1),p=MW(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){var f=YU(e.node2),p=MW(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}pt(c[0],i[0]),pt(c[1],i[2]),pt(c[2],i[1])}else{if(pt(a[0],d[0]),pt(a[1],d[1]),vt(o,a[1],a[0]),Dt(o,o),l&&l!==`none`){var f=YU(e.node1);_t(a[0],a[0],o,f*t)}if(u&&u!==`none`){var f=YU(e.node2);_t(a[1],a[1],o,-f*t)}pt(c[0],a[0]),pt(c[1],a[1])}})}var PW=xc();function FW(e){if(e)return PW(e).bridge}function IW(e,t){e&&(PW(e).bridge=t)}var LW=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=zU,t}return t.prototype.init=function(e,t){var n=new QM,r=new xW,i=this.group,a=new q;this._controller=new pR(t.getZr()),a.add(n.group),a.add(r.group),i.add(a),this._symbolDraw=n,this._lineDraw=r,this._mainGroup=a,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=Qz(e),a=!1;this._model=e,this._api=n,this._active=!0;var o=this._mainGroup,s=this._getThumbnailInfo();s&&s.bridge.reset(n);var c=this._symbolDraw,l=this._lineDraw;i&&qz(o,2,i,this._firstRender?null:e),NW(e.getGraph(),JU(e));var u=e.getData();c.updateData(u);var d=e.getEdgeData();l.updateData(d),this._updateNodeAndLinkScale(),i&&dB(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},null),clearTimeout(this._layoutTimeout);var f=e.forceLayout,p=e.get([`force`,`layoutAnimation`]);f&&(a=!0,this._startForceLayoutIteration(f,n,p));var m=e.get(`layout`);u.graph.eachNode(function(t){var i=t.dataIndex,a=t.getGraphicEl(),o=t.getModel();if(a){a.off(`drag`).off(`dragend`);var s=o.get(`draggable`);s&&a.on(`drag`,function(o){switch(m){case`force`:f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,n,p),f.setFixed(i),u.setItemLayout(i,[a.x,a.y]);break;case`circular`:u.setItemLayout(i,[a.x,a.y]),t.setLayout({fixed:!0},!0),QU(e,`symbolSize`,t,[o.offsetX,o.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(i,[a.x,a.y]),GU(e.getGraph(),e),r.updateLayout(e);break}}).on(`dragend`,function(){f&&f.setUnfixed(i)}),a.setDraggable(s,!!o.get(`cursor`)),o.get([`emphasis`,`focus`])===`adjacency`&&(Y(a).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&(Y(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var h=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),g=u.getLayout(`cx`),_=u.getLayout(`cy`);u.graph.eachNode(function(e){eW(e,h,g,_)}),this._firstRender=!1,a||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(e,t,n){var r=this,i=!1;(function a(){e.step(function(e){r.updateLayout(r._model),(e||!i)&&(i=!0,r._renderThumbnail(r._model,t,r._symbolDraw,r._lineDraw)),(r._layouting=!e)&&(n?r._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=Qz(t);!this._active||!r||(qz(this._mainGroup,2,r,null),gB(e)&&(this._updateNodeAndLinkScale(),NW(t.getGraph(),JU(t)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=JU(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(NW(e.getGraph(),JU(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,t=e.coordinateSystem;if(t.type===`view`){var n=FW(e);if(n)return{bridge:n,coordSys:t}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(bz(null,e.coordSys),this._api)},t.prototype._renderThumbnail=function(e,t,n,r){var i=this._getThumbnailInfo();if(i){var a=new q,o=n.group.children(),s=r.group.children(),c=new q,l=new q;a.add(l),a.add(c);for(var u=0;u `),value:r.value,noValue:r.value==null})}return Hb(`nameValue`,{name:r.name,value:r.value,noValue:r.value==null})},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);if(n===`node`){var i=this.getData(),a=this.getGraph().getNodeByIndex(t);r.name??=i.getName(t),r.value??=a.getLayout().value}return r},t.type=`series.`+UW,t.defaultOption={z:2,coordinateSystem:`none`,legendHoverLink:!0,colorBy:`data`,left:0,top:0,right:0,bottom:0,width:null,height:null,center:[`50%`,`50%`],radius:[`70%`,`80%`],clockwise:!0,startAngle:90,endAngle:`auto`,minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:`source`,opacity:.2},label:{show:!0,position:`outside`,distance:5},emphasis:{focus:`adjacency`,lineStyle:{opacity:.5}}},t}(lx),GW=function(e){D(t,e);function t(t,n,r){var i=e.call(this)||this;Y(i).dataType=`node`,i.z2=2;var a=new Cd;return i.setTextContent(a),i.updateData(t,n,r,!0),i}return t.prototype.updateData=function(e,t,n,r){var i=this,a=e.graph.getNodeByIndex(t),o=e.hostModel,s=a.getModel(),c=s.getModel(`emphasis`),l=e.getItemLayout(t),u=N(OF(s.getModel(`itemStyle`),l,!0),l),d=this;if(isNaN(u.startAngle)){d.setShape(u);return}r?d.setShape(u):jm(d,{shape:u},o,t);var f=N(OF(s.getModel(`itemStyle`),l,!0),l);i.setShape(f),i.useStyle(e.getItemVisual(t,`style`)),Qf(i,s),this._updateLabel(o,s,a),e.setItemGraphicEl(t,d),Qf(d,s,`itemStyle`);var p=c.get(`focus`);Jf(this,p===`adjacency`?a.getAdjacentDataIndices():p,c.get(`blurScope`),c.get(`disabled`))},t.prototype._updateLabel=function(e,t,n){var r=this.getTextContent(),i=n.getLayout(),a=(i.startAngle+i.endAngle)/2,o=Math.cos(a),s=Math.sin(a),c=t.getModel(`label`);r.ignore=!c.get(`show`);var l=Ih(t),u=n.getVisual(`style`);Fh(r,l,{labelFetcher:{getFormattedLabel:function(n,r,i,a,o,s){return e.getFormattedLabel(n,r,`node`,a,qe(o,l.normal&&l.normal.get(`formatter`),t.get(`name`)),s)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+``,inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:`startArc`});var d=c.get(`position`)||`outside`,f=c.get(`distance`)||0,p=d===`outside`?i.r+f:(i.r+i.r0)/2;this.textConfig={inside:d!==`outside`};var m=d===`outside`?o>0?`left`:`right`:c.get(`align`)||`center`,h=d===`outside`?s>0?`top`:`bottom`:c.get(`verticalAlign`)||`middle`;r.attr({x:o*p+i.cx,y:s*p+i.cy,rotation:0,style:{align:m,verticalAlign:h}})},t}(Yp),KW=function(e){D(t,e);function t(t,n,r,i){var a=e.call(this)||this;return Y(a).dataType=`edge`,a.updateData(t,n,r,i,!0),a}return t.prototype.buildPath=function(e,t){e.moveTo(t.s1[0],t.s1[1]);var n=.7,r=t.clockwise;e.arc(t.cx,t.cy,t.r,t.sStartAngle,t.sEndAngle,!r),e.bezierCurveTo((t.cx-t.s2[0])*n+t.s2[0],(t.cy-t.s2[1])*n+t.s2[1],(t.cx-t.t1[0])*n+t.t1[0],(t.cy-t.t1[1])*n+t.t1[1],t.t1[0],t.t1[1]),e.arc(t.cx,t.cy,t.r,t.tStartAngle,t.tEndAngle,!r),e.bezierCurveTo((t.cx-t.t2[0])*n+t.t2[0],(t.cy-t.t2[1])*n+t.t2[1],(t.cx-t.s1[0])*n+t.s1[0],(t.cy-t.s1[1])*n+t.s1[1],t.s1[0],t.s1[1]),e.closePath()},t.prototype.updateData=function(e,t,n,r,i){var a=e.hostModel,o=t.graph.getEdgeByIndex(n),s=o.getLayout(),c=o.node1.getModel(),l=t.getItemModel(o.dataIndex),u=l.getModel(`lineStyle`),d=l.getModel(`emphasis`),f=d.get(`focus`),p=N(OF(c.getModel(`itemStyle`),s,!0),s),m=this;if(isNaN(p.sStartAngle)||isNaN(p.tStartAngle)){m.setShape(p);return}i?(m.setShape(p),qW(m,o,e,u)):(Lm(m),qW(m,o,e,u),jm(m,{shape:p},a,n)),Jf(this,f===`adjacency`?o.getAdjacentDataIndices():f,d.get(`blurScope`),d.get(`disabled`)),Qf(m,l,`lineStyle`),t.setItemGraphicEl(o.dataIndex,m)},t}(id);function qW(e,t,n,r){var i=t.node1,a=t.node2,o=e.style;switch(e.setStyle(r.getLineStyle()),r.get(`color`)){case`source`:o.fill=n.getItemVisual(i.dataIndex,`style`).fill,o.decal=i.getVisual(`style`).decal;break;case`target`:o.fill=n.getItemVisual(a.dataIndex,`style`).fill,o.decal=a.getVisual(`style`).decal;break;case`gradient`:var s=n.getItemVisual(i.dataIndex,`style`).fill,c=n.getItemVisual(a.dataIndex,`style`).fill;if(B(s)&&B(c)){var l=e.shape;o.fill=new hm((l.s1[0]+l.s2[0])/2,(l.s1[1]+l.s2[1])/2,(l.t1[0]+l.t2[0])/2,(l.t1[1]+l.t2[1])/2,[{offset:0,color:s},{offset:1,color:c}],!0)}break}}var JW=Math.PI/180,YW=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=UW,t}return t.prototype.init=function(e,t){},t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,a=this.group,o=-e.get(`startAngle`)*JW;if(r.diff(i).add(function(e){if(r.getItemLayout(e)){var t=new GW(r,e,o);Y(t).dataIndex=e,a.add(t)}}).update(function(t,n){var s=i.getItemGraphicEl(n);if(!r.getItemLayout(t)){s&&Im(s,e,n);return}s?s.updateData(r,t,o):s=new GW(r,t,o),a.add(s)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&Im(n,e,t)}).execute(),!i){var s=e.get(`center`);this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=J(s[0],n.getWidth()),this.group.originY=J(s[1],n.getHeight()),Mm(this.group,{scaleX:1,scaleY:1},e)}this._data=r,this.renderEdges(e,o)},t.prototype.renderEdges=function(e,t){var n=e.getData(),r=e.getEdgeData(),i=this._edgeData,a=this.group;r.diff(i).add(function(e){var i=new KW(n,r,e,t);Y(i).dataIndex=e,a.add(i)}).update(function(e,o){var s=i.getItemGraphicEl(o);s.updateData(n,r,e,t),a.add(s)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&Im(n,e,t)}).execute(),this._edgeData=r},t.prototype.dispose=function(){},t.type=UW,t}(Sx),XW=Math.PI/180,ZW=Qc(UW,QW);function QW(e,t){e.eachSeriesByType(UW,function(e){$W(e,t)})}function $W(e,t){var n=e.getData(),r=n.graph,i=e.getEdgeData();if(i.count()){var a=U_(e,t),o=a.cx,s=a.cy,c=a.r,l=a.r0,u=Math.max((e.get(`padAngle`)||0)*XW,0),d=Math.max((e.get(`minAngle`)||0)*XW,0),f=-e.get(`startAngle`)*XW,p=f+Math.PI*2,m=e.get(`clockwise`),h=m?1:-1,g=[f,p];Mu(g,!m);var _=g[0],v=g[1]-_,y=n.getSum(`value`)===0&&i.getSum(`value`)===0,b=[],x=0;r.eachEdge(function(e){var t=y?1:e.getValue(`value`);y&&(t>0||d)&&(x+=2);var n=e.node1.dataIndex,r=e.node2.dataIndex;b[n]=(b[n]||0)+t,b[r]=(b[r]||0)+t});var S=0;if(r.eachNode(function(e){var t=e.getValue(`value`);isNaN(t)||(b[e.dataIndex]=Math.max(t,b[e.dataIndex]||0)),!y&&(b[e.dataIndex]>0||d)&&x++,S+=b[e.dataIndex]||0}),!(x===0||S===0)){u*x>=Math.abs(v)&&(u=Math.max(0,(Math.abs(v)-d*x)/x)),(u+d)*x>=Math.abs(v)&&(d=(Math.abs(v)-u*x)/x);var C=(v-u*x*h)/S,w=0,T=0,E=0,D=1/0;r.eachNode(function(e){var t=b[e.dataIndex]||0,n=C*(S?t:1)*h;Math.abs(n)T){var k=w/T;r.eachNode(function(e){var t=e.getLayout().angle;Math.abs(t)>=d?e.setLayout({angle:t*k,ratio:k},!0):e.setLayout({angle:d,ratio:d===0?1:t/d},!0)})}else r.eachNode(function(e){if(!O){var t=e.getLayout().angle;t-Math.min(t/E,1)*wd&&d>0){var n=O?1:Math.min(t/E,1),r=t-d,i=Math.min(r,Math.min(A,w*n));A-=i,e.setLayout({angle:t-i,ratio:(t-i)/t},!0)}else d>0&&e.setLayout({angle:d,ratio:t===0?1:d/t},!0)}});var j=_,ee=[];r.eachNode(function(e){var t=Math.max(e.getLayout().angle,d);e.setLayout({cx:o,cy:s,r0:l,r:c,startAngle:j,endAngle:j+t*h,clockwise:m},!0),ee[e.dataIndex]=j,j+=(t+u)*h}),r.eachEdge(function(e){var t=y?1:e.getValue(`value`),n=C*(S?t:1)*h,r=e.node1.dataIndex,i=ee[r]||0,a=i+Math.abs((e.node1.getLayout().ratio||1)*n)*h,c=[o+l*Math.cos(i),s+l*Math.sin(i)],u=[o+l*Math.cos(a),s+l*Math.sin(a)],d=e.node2.dataIndex,f=ee[d]||0,p=f+Math.abs((e.node2.getLayout().ratio||1)*n)*h,g=[o+l*Math.cos(f),s+l*Math.sin(f)],_=[o+l*Math.cos(p),s+l*Math.sin(p)];e.setLayout({s1:c,s2:u,sStartAngle:i,sEndAngle:a,t1:g,t2:_,tStartAngle:f,tEndAngle:p,cx:o,cy:s,r:l,value:t,clockwise:m}),ee[r]=a,ee[d]=p})}}}function eG(e){e.registerChartView(YW),e.registerSeriesModel(WW),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,ZW),e.registerProcessor(tI(`chord`))}var tG=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),nG=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`pointer`,n}return t.prototype.getDefaultShape=function(){return new tG},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,i=t.r,a=t.width,o=t.angle,s=t.x-n(o)*a*(a>=i/3?1:2),c=t.y-r(o)*a*(a>=i/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,c),e.lineTo(t.x+n(o)*a,t.y+r(o)*a),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(o)*a,t.y-r(o)*a),e.lineTo(s,c)},t}(id);function rG(e,t){var n=e.get(`center`),r=t.getWidth(),i=t.getHeight(),a=Math.min(r,i);return{cx:J(n[0],t.getWidth()),cy:J(n[1],t.getHeight()),r:J(e.get(`radius`),a/2)}}function iG(e,t){var n=e==null?``:e+``;return t&&(B(t)?n=t.replace(`{value}`,n):z(t)&&(n=t(e))),n}var aG=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeAll();var r=e.get([`axisLine`,`lineStyle`,`color`]),i=rG(e,n);this._renderMain(e,t,n,r,i),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,i){var a=this.group,o=e.get(`clockwise`),s=-e.get(`startAngle`)/180*Math.PI,c=-e.get(`endAngle`)/180*Math.PI,l=e.getModel(`axisLine`),u=l.get(`roundCap`)?CF:Yp,d=l.get(`show`),f=l.getModel(`lineStyle`),p=f.get(`width`),m=[s,c];Mu(m,!o),s=m[0],c=m[1];for(var h=c-s,g=s,_=[],v=0;d&&v=e&&(t===0?0:r[t-1][0])Math.PI/2&&(oe+=Math.PI)):ae===`tangential`?oe=-S-Math.PI/2:Re(ae)&&(oe=ae*Math.PI/180),oe===0?l.add(new Cd({style:Lh(_,{text:te,x:re,y:ie,verticalAlign:k<-.8?`top`:k>.8?`bottom`:`middle`,align:O<-.4?`left`:O>.4?`right`:`center`},{inheritColor:ne}),silent:!0})):l.add(new Cd({style:Lh(_,{text:te,x:re,y:ie,verticalAlign:`middle`,align:`center`},{inheritColor:ne}),silent:!0,originX:re,originY:ie,rotation:oe}))}if(g.get(`show`)&&A!==v){var j=g.get(`distance`);j=j?j+c:c;for(var se=0;se<=y;se++){O=Math.cos(S),k=Math.sin(S);var ce=new om({shape:{x1:O*(f-j)+u,y1:k*(f-j)+d,x2:O*(f-x-j)+u,y2:k*(f-x-j)+d},silent:!0,style:E});E.stroke===`auto`&&ce.setStyle({stroke:r((A+se/y)/v)}),l.add(ce),S+=w}S-=w}else S+=C}},t.prototype._renderPointer=function(e,t,n,r,i,a,o,s,c){var l=this.group,u=this._data,d=this._progressEls,f=[],p=e.get([`pointer`,`show`]),m=e.getModel(`progress`),h=m.get(`show`),g=e.getData(),_=g.mapDimension(`value`),v=+e.get(`min`),y=+e.get(`max`),b=[v,y],x=[a,o];function S(t,n){var r=g.getItemModel(t).getModel(`pointer`),a=J(r.get(`width`),i.r),o=J(r.get(`length`),i.r),s=e.get([`pointer`,`icon`]),c=r.get(`offsetCenter`),l=J(c[0],i.r),u=J(c[1],i.r),d=r.get(`keepAspect`),f=s?WS(s,l-a/2,u-o,a,o,null,d):new nG({shape:{angle:-Math.PI/2,width:a,r:o,x:l,y:u}});return f.rotation=-(n+Math.PI/2),f.x=i.cx,f.y=i.cy,f}function C(e,t){var n=m.get(`roundCap`)?CF:Yp,r=m.get(`overlap`),o=r?m.get(`width`):c/g.count(),l=r?i.r-o:i.r-(e+1)*o,u=r?i.r:i.r-e*o,d=new n({shape:{startAngle:a,endAngle:t,cx:i.cx,cy:i.cy,clockwise:s,r0:l,r:u}});return r&&(d.z2=ps(g.get(_,e),[v,y],[100,0],!0)),d}(h||p)&&(g.diff(u).add(function(t){var n=g.get(_,t);if(p){var r=S(t,a);Mm(r,{rotation:-((isNaN(+n)?x[0]:ps(n,b,x,!0))+Math.PI/2)},e),l.add(r),g.setItemGraphicEl(t,r)}if(h){var i=C(t,a);Mm(i,{shape:{endAngle:ps(n,b,x,m.get(`clip`))}},e),l.add(i),Ld(e.seriesIndex,g.dataType,t,i),f[t]=i}}).update(function(t,n){var r=g.get(_,t);if(p){var i=u.getItemGraphicEl(n),o=i?i.rotation:a,s=S(t,o);s.rotation=o,jm(s,{rotation:-((isNaN(+r)?x[0]:ps(r,b,x,!0))+Math.PI/2)},e),l.add(s),g.setItemGraphicEl(t,s)}if(h){var c=d[n],v=C(t,c?c.shape.endAngle:a);jm(v,{shape:{endAngle:ps(r,b,x,m.get(`clip`))}},e),l.add(v),Ld(e.seriesIndex,g.dataType,t,v),f[t]=v}}).execute(),g.each(function(e){var t=g.getItemModel(e),n=t.getModel(`emphasis`),i=n.get(`focus`),a=n.get(`blurScope`),o=n.get(`disabled`),s=r(ps(g.get(_,e),b,[0,1],!0));if(p){var c=g.getItemGraphicEl(e),l=g.getItemVisual(e,`style`),u=l.fill;if(c instanceof ud){var d=c.style;c.useStyle(N({image:d.image,x:d.x,y:d.y,width:d.width,height:d.height},l))}else c.useStyle(l),c.type!==`pointer`&&c.setColor(u);c.setStyle(t.getModel([`pointer`,`itemStyle`]).getItemStyle()),c.style.fill===`auto`&&c.setStyle(`fill`,s),c.z2EmphasisLift=0,Qf(c,t),Jf(c,i,a,o)}if(h){var m=f[e];m.useStyle(g.getItemVisual(e,`style`)),m.setStyle(t.getModel([`progress`,`itemStyle`]).getItemStyle()),m.style.fill===`auto`&&m.setStyle(`fill`,s),m.z2EmphasisLift=0,Qf(m,t),Jf(m,i,a,o)}}),this._progressEls=f)},t.prototype._renderAnchor=function(e,t){var n=e.getModel(`anchor`);if(n.get(`show`)){var r=n.get(`size`),i=n.get(`icon`),a=n.get(`offsetCenter`),o=n.get(`keepAspect`),s=WS(i,t.cx-r/2+J(a[0],t.r),t.cy-r/2+J(a[1],t.r),r,r,null,o);s.z2=+!!n.get(`showAbove`),s.setStyle(n.getModel(`itemStyle`).getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,i){var a=this,o=e.getData(),s=o.mapDimension(`value`),c=+e.get(`min`),l=+e.get(`max`),u=new q,d=[],f=[],p=e.isAnimationEnabled(),m=e.get([`pointer`,`showAbove`]);o.diff(this._data).add(function(e){d[e]=new Cd({silent:!0}),f[e]=new Cd({silent:!0})}).update(function(e,t){d[e]=a._titleEls[t],f[e]=a._detailEls[t]}).execute(),o.each(function(t){var n=o.getItemModel(t),a=o.get(s,t),h=new q,g=r(ps(a,[c,l],[0,1],!0)),_=n.getModel(`title`);if(_.get(`show`)){var v=_.get(`offsetCenter`),y=i.cx+J(v[0],i.r),b=i.cy+J(v[1],i.r),x=d[t];x.attr({z2:m?0:2,style:Lh(_,{x:y,y:b,text:o.getName(t),align:`center`,verticalAlign:`middle`},{inheritColor:g})}),h.add(x)}var S=n.getModel(`detail`);if(S.get(`show`)){var C=S.get(`offsetCenter`),w=i.cx+J(C[0],i.r),T=i.cy+J(C[1],i.r),E=J(S.get(`width`),i.r),D=J(S.get(`height`),i.r),O=e.get([`progress`,`show`])?o.getItemVisual(t,`style`).fill:g,x=f[t],k=S.get(`formatter`);x.attr({z2:m?0:2,style:Lh(S,{x:w,y:T,text:iG(a,k),width:isNaN(E)?null:E,height:isNaN(D)?null:D,align:`center`,verticalAlign:`middle`},{inheritColor:O})}),qh(x,{normal:S},a,function(e){return iG(e,k)}),p&&Jh(x,t,o,e,{getFormattedLabel:function(e,t,n,r,i,o){return iG(o?o.interpolatedValue:a,k)}}),h.add(x)}u.add(h)}),this.group.add(u),this._titleEls=d,this._detailEls=f},t.type=`gauge`,t}(Sx),oG=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath=`itemStyle`,n}return t.prototype.getInitialData=function(e,t){return nI(this,[`value`])},t.type=`series.gauge`,t.defaultOption={z:2,colorBy:`data`,center:[`50%`,`50%`],legendHoverLink:!0,radius:`75%`,startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,Z.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:Z.color.axisTick,width:3,type:`solid`}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:Z.color.axisTickMinor,width:1,type:`solid`}},axisLabel:{show:!0,distance:15,color:Z.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:`60%`,width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:`circle`,offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:Z.color.neutral00,borderWidth:0,borderColor:Z.color.theme[0]}},title:{show:!0,offsetCenter:[0,`20%`],color:Z.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:Z.color.transparent,borderWidth:0,borderColor:Z.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,`40%`],color:Z.color.primary,fontSize:30,fontWeight:`bold`,lineHeight:30,valueAnimation:!1}},t}(lx);function sG(e){e.registerChartView(aG),e.registerSeriesModel(oG)}var cG=`funnel`,lG=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new rI(L(this.getData,this),L(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return nI(this,{coordDimensions:[`value`],encodeDefaulter:Ie(hv,this)})},t.prototype._defaultLabelLine=function(e){ec(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),i=n.mapDimension(`value`),a=n.getSum(i);return r.percent=a?+(n.get(i,t)/a*100).toFixed(2):0,r.$vars.push(`percent`),r},t.type=`series.`+cG,t.defaultOption={coordinateSystemUsage:`box`,z:2,legendHoverLink:!0,colorBy:`data`,left:80,top:60,right:80,bottom:65,minSize:`0%`,maxSize:`100%`,sort:`descending`,orient:`vertical`,gap:0,funnelAlign:`center`,label:{show:!0,position:`outer`},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:Z.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:Z.color.primary}}},t}(lx),uG=[`itemStyle`,`opacity`],dG=function(e){D(t,e);function t(t,n){var r=e.call(this)||this,i=r,a=new rm,o=new Cd;return i.setTextContent(o),r.setTextGuideLine(a),r.updateData(t,n,!0),r}return t.prototype.updateData=function(e,t,n){var r=this,i=e.hostModel,a=e.getItemModel(t),o=e.getItemLayout(t),s=a.getModel(`emphasis`),c=a.get(uG);c??=1,n||Lm(r),r.useStyle(e.getItemVisual(t,`style`)),r.style.lineJoin=`round`,n?(r.setShape({points:o.points}),r.style.opacity=0,Mm(r,{style:{opacity:c}},i,t)):jm(r,{style:{opacity:c},shape:{points:o.points}},i,t),Qf(r,a),this._updateLabel(e,t),Jf(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e,t){var n=this,r=this.getTextGuideLine(),i=n.getTextContent(),a=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,c=e.getItemVisual(t,`style`),l=c.fill;Fh(i,Ih(o),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:c.opacity,defaultText:e.getName(t)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}});var u=o.getModel(`label`).get(`color`)===`inherit`?l:null;n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var d=s.linePoints;r.setShape({points:d}),n.textGuideLineConfig={anchor:d?new G(d[0][0],d[0][1]):null},jm(i,{style:{x:s.x,y:s.y}},a,t),i.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),dA(n,fA(o),{stroke:l})},t}(tm),fG=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=cG,t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,a=this.group;r.diff(i).add(function(e){var t=new dG(r,e);r.setItemGraphicEl(e,t),a.add(t)}).update(function(e,t){var n=i.getItemGraphicEl(t);n.updateData(r,e),a.add(n),r.setItemGraphicEl(e,n)}).remove(function(t){Im(i.getItemGraphicEl(t),e,t)}).execute(),this._data=r},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type=cG,t}(Sx);function pG(e,t){for(var n=e.mapDimension(`value`),r=e.mapArray(n,function(e){return e}),i=[],a=t===`ascending`,o=0,s=e.count();o-1&&(i=`left`),n&&De([`left`,`right`],i)>-1&&(i=`bottom`)),i===`left`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,h=p-_,u=h-5,l=`right`):i===`right`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,h=p+_,u=h+5,l=`left`):i===`top`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,g=m-_,d=g-5,l=`center`):i===`bottom`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,g=m+_,d=g+5,l=`center`):i===`rightTop`?(p=n?s[3][0]:s[1][0],m=n?s[3][1]:s[1][1],n?(g=m-_,d=g-5,l=`center`):(h=p+_,u=h+5,l=`top`)):i===`rightBottom`?(p=s[2][0],m=s[2][1],n?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`bottom`)):i===`leftTop`?(p=s[0][0],m=n?s[0][1]:s[1][1],n?(g=m-_,d=g-5,l=`center`):(h=p-_,u=h-5,l=`right`)):i===`leftBottom`?(p=n?s[1][0]:s[3][0],m=n?s[1][1]:s[2][1],n?(g=m+_,d=g+5,l=`center`):(h=p-_,u=h-5,l=`right`)):(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,n?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`left`)),n?(h=p,u=h):(g=m,d=g),f=[[p,m],[h,g]]}o.label={linePoints:f,x:u,y:d,verticalAlign:`middle`,textAlign:l,inside:c}})}var hG=Qc(cG,gG);function gG(e,t){e.eachSeriesByType(cG,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=e.get(`sort`),a=q_(e,t),o=W_(e.getBoxLayoutParams(),a.refContainer),s=_G(e),c=o.width,l=o.height,u=pG(n,i),d=o.x,f=o.y,p=s?[J(e.get(`minSize`),l),J(e.get(`maxSize`),l)]:[J(e.get(`minSize`),c),J(e.get(`maxSize`),c)],m=n.getDataExtent(r),h=e.get(`min`),g=e.get(`max`);h??=Math.min(m[0],0),g??=m[1];var _=e.get(`funnelAlign`),v=e.get(`gap`),y=((s?c:l)-v*(n.count()-1))/n.count(),b=function(e,t){if(s){var i=ps(n.get(r,e)||0,[h,g],p,!0),a=void 0;switch(_){case`top`:a=f;break;case`center`:a=f+(l-i)/2;break;case`bottom`:a=f+(l-i);break}return[[t,a],[t,a+i]]}var o=ps(n.get(r,e)||0,[h,g],p,!0),u;switch(_){case`left`:u=d;break;case`center`:u=d+(c-o)/2;break;case`right`:u=d+c-o;break}return[[u,t],[u+o,t]]};i===`ascending`&&(y=-y,v=-v,s?d+=c:f+=l,u=u.reverse());for(var x=0;xFG)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);r.behavior!==`none`&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!(this._mouseDownPoint||!RG(this,`mousemove`))){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),r=n.behavior;r===`jump`&&this._throttledDispatchExpand.debounceNextCall(t.get(`axisExpandDebounce`)),this._throttledDispatchExpand(r===`none`?null:{axisExpandWindow:n.axisExpandWindow,animation:r===`jump`?null:{duration:0}})}}};function RG(e,t){var n=e._model;return n.get(`axisExpandable`)&&n.get(`axisExpandTriggerOn`)===t}var zG=`parallel`,BG=zG,VG=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&Ce(t,e,!0),this._initDimensions()},t.prototype.contains=function(e,t){var n=e.get(`parallelIndex`);return n!=null&&t.getComponent(`parallel`,n)===this},t.prototype.setAxisExpand=function(e){F([`axisExpandable`,`axisExpandCenter`,`axisExpandCount`,`axisExpandWidth`,`axisExpandWindow`],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[];F(Me(this.ecModel.queryComponents({mainType:`parallelAxis`}),function(e){return(e.get(`parallelIndex`)||0)===this.componentIndex},this),function(n){e.push(`dim`+n.get(`dim`)),t.push(n.componentIndex)})},t.type=BG,t.dependencies=[`parallelAxis`],t.layoutMode=`box`,t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:`horizontal`,axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:`click`,parallelAxisDefault:null},t}(tv),HG=function(e){D(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.type=i||`value`,o.axisIndex=a,o}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get(`layout`)!==`horizontal`},t}(Ik);function UG(e,t,n,r,i,a){e||=0;var o=Ds(n[1],-n[0]);if(i!=null&&(i=GG(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),r===`all`){var s=Math.abs(Ds(t[1],-t[0]));s=GG(s,[0,o]),i=a=GG(s,[i,a]),r=0}t[0]=GG(t[0],n),t[1]=GG(t[1],n);var c=WG(t,r);t[r]+=e;var l=i||0,u=n.slice();c.sign<0?u[0]=Ds(u[0],l):u[1]=Ds(u[1],-l),t[r]=GG(t[r],u);var d=WG(t,r);return i!=null&&(d.sign!==c.sign||d.spana&&(t[1-r]=Ds(t[r],d.sign*a)),t}function WG(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function GG(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var KG=function(){function e(e,t,n){this.type=zG,this._axesMap=U(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var r=e.dimensions,i=e.parallelAxisIndex;F(r,function(e,n){var r=i[n],a=t.getComponent(`parallelAxis`,r),o=ED(a),s=this._axesMap.set(e,new HG(e,DD(a,o,!1),[0,0],o,r));s.onBand=HD(s.scale,a),s.inverse=a.get(`inverse`),a.axis=s,s.model=a,s.coordinateSystem=a.coordinateSystem=this},this)},e.prototype.update=function(e,t){F(this.dimensions,function(e){var t=this._axesMap.get(e);bO(t,1),MO(t)},this)},e.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,r=t.layoutBase,i=t.pixelDimIndex,a=e[1-i],o=e[i];return a>=n&&a<=n+t.axisLength&&o>=r&&o<=r+t.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype.resize=function(e,t){var n=q_(e,t).refContainer;this._rect=W_(e.getBoxLayoutParams(),n),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=[`x`,`y`],r=[`width`,`height`],i=e.get(`layout`),a=i===`horizontal`?0:1,o=t[r[a]],s=[0,o],c=this.dimensions.length,l=qG(e.get(`axisExpandWidth`),s),u=qG(e.get(`axisExpandCount`)||0,[0,c]),d=e.get(`axisExpandable`)&&c>3&&c>u&&u>1&&l>0&&o>0,f=e.get(`axisExpandWindow`),p;f?(p=qG(f[1]-f[0],s),f[1]=f[0]+p):(p=qG(l*(u-1),s),f=[l*(e.get(`axisExpandCenter`)||os(c/2))-p/2],f[1]=f[0]+p);var m=(o-p)/(c-u);m<3&&(m=0);var h=[os(vs(f[0]/l,1))+1,ss(vs(f[1]/l,1))-1],g=m/l*f[0];return{layout:i,pixelDimIndex:a,layoutBase:t[n[a]],layoutLength:o,axisBase:t[n[1-a]],axisLength:t[r[1-a]],axisExpandable:d,axisExpandWidth:l,axisCollapseWidth:m,axisExpandWindow:f,axisCount:c,winInnerIndices:h,axisExpandWindow0Pos:g}},e.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,r=this._makeLayoutInfo(),i=r.layout;t.each(function(e){var t=[0,r.axisLength],n=+!!e.inverse;e.setExtent(t[n],t[1-n])}),F(n,function(t,n){var a=(r.axisExpandable?YG:JG)(n,r),o={horizontal:{x:a.position,y:r.axisLength},vertical:{x:0,y:a.position}},s={horizontal:ds/2,vertical:0},c=[o[i].x+e.x,o[i].y+e.y],l=s[i],u=vn();Cn(u,u,l),Sn(u,u,c),this._axesLayout[t]={position:c,rotation:l,transform:u,axisNameAvailableWidth:a.axisNameAvailableWidth,axisLabelShow:a.axisLabelShow,nameTruncateMaxWidth:a.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(e){return this._axesMap.get(e)},e.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},e.prototype.eachActiveState=function(e,t,n,r){n??=0,r??=e.count();var i=this._axesMap,a=this.dimensions,o=[],s=[];F(a,function(t){o.push(e.mapDimension(t)),s.push(i.get(t).model)});for(var c=this.hasAxisBrushed(),l=n;li*(1-u[0])?(c=`jump`,s=o-i*(1-u[2])):(s=o-i*u[1])>=0&&(s=o-i*(1-u[1]))<=0&&(s=0),s*=t.axisExpandWidth/l,s?UG(s,r,a,`all`):c=`none`;else{var f=r[1]-r[0];r=[rs(0,a[1]*o/f-f/2)],r[1]=ns(a[1],r[0]+f),r[0]=r[1]-f}return{axisExpandWindow:r,behavior:c}},e}();function qG(e,t){return ns(rs(e,t[0]),t[1])}function JG(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function YG(e,t){var n=t.layoutLength,r=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,c=a,l=!1,u;return e=0;n--)bs(t[n])},t.prototype.getActiveState=function(e){var t=this.activeIntervals;if(!t.length)return`normal`;if(e==null||isNaN(+e))return`inactive`;if(t.length===1){var n=t[0];if(n[0]<=e&&e<=n[1])return`active`}else for(var r=0,i=t.length;riK}function CK(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function wK(e,t,n,r){var i=new q;return i.add(new vd({name:`main`,style:OK(n),silent:!0,draggable:!0,cursor:`move`,drift:Ie(NK,e,t,i,[`n`,`s`,`w`,`e`]),ondragend:Ie(xK,t,{isEnd:!0})})),F(r,function(n){i.add(new vd({name:n.join(``),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ie(NK,e,t,i,n),ondragend:Ie(xK,t,{isEnd:!0})}))}),i}function TK(e,t,n,r){var i=r.brushStyle.lineWidth||0,a=tK(i,aK),o=n[0][0],s=n[1][0],c=o-i/2,l=s-i/2,u=n[0][1],d=n[1][1],f=u-a+i/2,p=d-a+i/2,m=u-o,h=d-s,g=m+i,_=h+i;DK(e,t,`main`,o,s,m,h),r.transformable&&(DK(e,t,`w`,c,l,a,_),DK(e,t,`e`,f,l,a,_),DK(e,t,`n`,c,l,g,a),DK(e,t,`s`,c,p,g,a),DK(e,t,`nw`,c,l,a,a),DK(e,t,`ne`,f,l,a,a),DK(e,t,`sw`,c,p,a,a),DK(e,t,`se`,f,p,a,a))}function EK(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(OK(n)),i.attr({silent:!r,cursor:r?`move`:`default`}),F([[`w`],[`e`],[`n`],[`s`],[`s`,`e`],[`s`,`w`],[`n`,`e`],[`n`,`w`]],function(n){var i=t.childOfName(n.join(``)),a=n.length===1?jK(e,n[0]):MK(e,n);i&&i.attr({silent:!r,invisible:!r,cursor:r?cK[a]+`-resize`:null})})}function DK(e,t,n,r,i,a,o){var s=t.childOfName(n);s&&s.setShape(LK(IK(e,t,[[r,i],[r+a,i+o]])))}function OK(e){return P({strokeNoScale:!0},e.brushStyle)}function kK(e,t,n,r){var i=[eK(e,n),eK(t,r)],a=[tK(e,n),tK(t,r)];return[[i[0],a[0]],[i[1],a[1]]]}function AK(e){return th(e.group)}function jK(e,t){return{left:`w`,right:`e`,top:`n`,bottom:`s`}[rh({w:`left`,e:`right`,n:`top`,s:`bottom`}[t],AK(e))]}function MK(e,t){var n=[jK(e,t[0]),jK(e,t[1])];return(n[0]===`e`||n[0]===`w`)&&n.reverse(),n.join(``)}function NK(e,t,n,r,i,a){var o=n.__brushOption,s=e.toRectRange(o.range),c=FK(t,i,a);F(r,function(e){var t=sK[e];s[t[0]][t[1]]+=c[t[0]]}),o.range=e.fromRectRange(kK(s[0][0],s[1][0],s[0][1],s[1][1])),gK(t,n),xK(t,{isEnd:!1})}function PK(e,t,n,r){var i=t.__brushOption.range,a=FK(e,n,r);F(i,function(e){e[0]+=a[0],e[1]+=a[1]}),gK(e,t),xK(e,{isEnd:!1})}function FK(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),a=r.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function IK(e,t,n){var r=yK(e,t);return r&&r!==$G?r.clipPath(n,e._transform):M(n)}function LK(e){var t=eK(e[0][0],e[1][0]),n=eK(e[0][1],e[1][1]),r=tK(e[0][0],e[1][0]),i=tK(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}function RK(e,t,n){if(!(!e._brushType||GK(e,t.offsetX,t.offsetY))){var r=e._zr,i=e._covers,a=vK(e,t,n);if(!e._dragging)for(var o=0;or.getWidth()||n<0||n>r.getHeight()}var KK={lineX:qK(0),lineY:qK(1),rect:{createCover:function(e,t){function n(e){return e}return wK({toRectRange:n,fromRectRange:n},e,t,[[`w`],[`e`],[`n`],[`s`],[`s`,`e`],[`s`,`w`],[`n`,`e`],[`n`,`w`]])},getCreatingRange:function(e){var t=CK(e);return kK(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){TK(e,t,n,r)},updateCommon:EK,contain:BK},polygon:{createCover:function(e,t){var n=new q;return n.add(new rm({name:`main`,style:OK(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new tm({name:`main`,draggable:!0,drift:Ie(PK,e,t),ondragend:Ie(xK,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:IK(e,t,n)})},updateCommon:EK,contain:BK}};function qK(e){return{createCover:function(t,n){return wK({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[[`w`],[`e`]],[[`n`],[`s`]]][e])},getCreatingRange:function(t){var n=CK(t);return[eK(n[0][e],n[1][e]),tK(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var a,o=yK(t,n);if(o!==$G&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var c=[r,a];e&&c.reverse(),TK(t,n,c,i)},updateCommon:EK,contain:BK}}function JK(e){return e=ZK(e),function(t){return sh(t,e)}}function YK(e,t){return e=ZK(e),function(n){var r=t??n,i=r?e.width:e.height,a=r?e.x:e.y;return[a,a+(i||0)]}}function XK(e,t,n){var r=ZK(e);return function(e,i){return r.contain(i[0],i[1])&&!fR(e,t,n)}}function ZK(e){return K.create(e)}var QK=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t,n){e.prototype.init.apply(this,arguments),(this._brushController=new dK(n.getZr())).on(`brush`,L(this._onBrush,this))},t.prototype.render=function(e,t,n,r){if(!$K(e,t,r)){this.axisModel=e,this.api=n,this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new q,this.group.add(this._axisGroup),e.get(`show`)){var a=tq(e,t),o=a.coordinateSystem,s=e.getAreaSelectStyle(),c=s.width,l=e.axis.dim,u=o.getAxisLayout(l),d=N({strokeContainThreshold:c},u),f=new xP(e,n,d);f.build(),this._axisGroup.add(f.group),this._refreshBrushController(d,s,e,a,c,n),oh(i,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,t,n,r,i,a){var o=n.axis.getExtent(),s=o[1]-o[0],c=Math.min(30,Math.abs(s)*.1),l=K.create({x:o[0],y:-i/2,width:s,height:i});l.x-=c,l.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:`pl`,clipPath:JK(l),isTargetByCursor:XK(l,a,r),getLinearBrushOtherExtent:YK(l,0)}]).enableBrush({brushType:`lineX`,brushStyle:t,removeOnClick:!0}).updateCovers(eq(n))},t.prototype._onBrush=function(e){var t=e.areas,n=this.axisModel,r=n.axis,i=I(t,function(e){return[r.coordToData(e.range[0],!0),r.coordToData(e.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:`axisAreaSelect`,parallelAxisId:n.id,intervals:i})},t.prototype.dispose=function(){this._brushController.dispose()},t.type=`parallelAxis`,t}(vx);function $K(e,t,n){return n&&n.type===`axisAreaSelect`&&t.findComponents({mainType:`parallelAxis`,query:n})[0]===e}function eq(e){var t=e.axis;return I(e.activeIntervals,function(e){return{brushType:`lineX`,panelId:`pl`,range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function tq(e,t){return t.getComponent(`parallel`,e.get(`parallelIndex`))}var nq={type:`axisAreaSelect`,event:`axisAreaSelected`};function rq(e){e.registerAction(nq,function(e,t){t.eachComponent({mainType:`parallelAxis`,query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),e.registerAction(`parallelAxisExpand`,function(e,t){t.eachComponent({mainType:`parallel`,query:e},function(t){t.setAxisExpand(e)})})}var iq={type:`value`,areaSelectStyle:{width:20,borderWidth:1,borderColor:`rgba(160,197,232)`,color:`rgba(160,197,232)`,opacity:.3},realtime:!0,z:10};function aq(e){e.registerComponentView(IG),e.registerComponentModel(VG),e.registerCoordinateSystem(`parallel`,ZG),e.registerPreprocessor(MG),e.registerComponentModel(QG),e.registerComponentView(QK),II(e,`parallel`,QG,iq),rq(e)}function oq(e){MT(aq),e.registerChartView(bG),e.registerSeriesModel(DG),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,jG)}var sq=`sankey`,cq=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[],i=e.levels||[];this.levelModels=[];for(var a=this.levelModels,o=0;o=0&&(a[i[o].depth]=new og(i[o],this,t));return DU(r,n,this,!0,s).data;function s(e,t){e.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getData().getItemLayout(t);if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e}),t.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e})}},t.prototype.setNodePosition=function(e,t){var n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function r(e){return isNaN(e)||e==null}if(n===`edge`){var i=this.getDataParams(e,n),a=i.data,o=i.value;return Hb(`nameValue`,{name:a.source+` -- `+a.target,value:o,noValue:r(o)})}else{var s=this.getGraph().getNodeByIndex(e).getLayout().value,c=this.getDataParams(e,n).data.name;return Hb(`nameValue`,{name:c==null?null:c+``,value:s,noValue:r(s)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);return r.value==null&&n===`node`&&(r.value=this.getGraph().getNodeByIndex(t).getLayout().value),r},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type=`series.`+sq,t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystemUsage:`box`,left:`5%`,top:`5%`,right:`20%`,bottom:`5%`,orient:`horizontal`,nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:`global`,center:null,zoom:1,label:{show:!0,position:`right`,fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:`justify`,lineStyle:{color:Z.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:Z.color.primary}},animationEasing:`linear`,animationDuration:1e3},t}(lx),lq=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),uq=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new lq},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),t.orient===`vertical`?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){kf(this)},t.prototype.downplay=function(){Af(this)},t}(id),dq=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=sq,t._mainGroup=new q,t}return t.prototype.init=function(e,t){this._controller=new pR(t.getZr()),this.group.add(this._mainGroup),this._firstRender=!0},t.prototype.render=function(e,t,n){var r=e.getGraph(),i=this._mainGroup,a=e.layoutInfo,o=a.width,s=a.height,c=e.getData(),l=e.getData(`edge`),u=e.get(`orient`);i.removeAll(),i.x=a.x,i.y=a.y,this._updateViewCoordSys(e,n),dB(e,n,this._controller,fB(i),null),r.eachEdge(function(t){var n=new uq,r=Y(n);r.dataIndex=t.dataIndex,r.seriesIndex=e.seriesIndex,r.dataType=`edge`;var a=t.getModel(),c=a.getModel(`lineStyle`),d=c.get(`curveness`),f=t.node1.getLayout(),p=t.node1.getModel(),m=p.get(`localX`),h=p.get(`localY`),g=t.node2.getLayout(),_=t.node2.getModel(),v=_.get(`localX`),y=_.get(`localY`),b=t.getLayout(),x,S,C,w,T,E,D,O;n.shape.extent=Math.max(1,b.dy),n.shape.orient=u,u===`vertical`?(x=(m==null?f.x:m*o)+b.sy,S=(h==null?f.y:h*s)+f.dy,C=(v==null?g.x:v*o)+b.ty,w=y==null?g.y:y*s,T=x,E=S*(1-d)+w*d,D=C,O=S*d+w*(1-d)):(x=(m==null?f.x:m*o)+f.dx,S=(h==null?f.y:h*s)+b.sy,C=v==null?g.x:v*o,w=(y==null?g.y:y*s)+b.ty,T=x*(1-d)+C*d,E=S,D=x*d+C*(1-d),O=w),n.setShape({x1:x,y1:S,x2:C,y2:w,cpx1:T,cpy1:E,cpx2:D,cpy2:O}),n.useStyle(c.getItemStyle()),fq(n.style,u,t);var k=``+a.get(`value`),A=Ih(a,`edgeLabel`);Fh(n,A,{labelFetcher:{getFormattedLabel:function(t,n,r,i,a,o){return e.getFormattedLabel(t,n,`edge`,i,qe(a,A.normal&&A.normal.get(`formatter`),k),o)}},labelDataIndex:t.dataIndex,defaultText:k}),n.setTextConfig({position:`inside`});var j=a.getModel(`emphasis`);Qf(n,a,`lineStyle`,function(e){var n=e.getItemStyle();return fq(n,u,t),n}),i.add(n),l.setItemGraphicEl(t.dataIndex,n);var ee=j.get(`focus`);Jf(n,ee===`adjacency`?t.getAdjacentDataIndices():ee===`trajectory`?t.getTrajectoryDataIndices():ee,j.get(`blurScope`),j.get(`disabled`))}),r.eachNode(function(t){var n=t.getLayout(),r=t.getModel(),a=r.get(`localX`),l=r.get(`localY`),u=r.getModel(`emphasis`),d=r.get([`itemStyle`,`borderRadius`])||0,f=new vd({shape:{x:a==null?n.x:a*o,y:l==null?n.y:l*s,width:n.dx,height:n.dy,r:d},style:r.getModel(`itemStyle`).getItemStyle(),z2:10});Fh(f,Ih(r),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(t,n,`node`)}},labelDataIndex:t.dataIndex,defaultText:t.id}),f.disableLabelAnimation=!0,f.setStyle(`fill`,t.getVisual(`color`)),f.setStyle(`decal`,t.getVisual(`style`).decal),Qf(f,r),i.add(f),c.setItemGraphicEl(t.dataIndex,f),Y(f).dataType=`node`;var p=u.get(`focus`);Jf(f,p===`adjacency`?t.getAdjacentDataIndices():p===`trajectory`?t.getTrajectoryDataIndices():p,u.get(`blurScope`),u.get(`disabled`))}),c.eachItemGraphicEl(function(t,r){c.getItemModel(r).get(`draggable`)&&(t.drift=function(t,i){this.shape.x+=t,this.shape.y+=i,this.dirty(),n.dispatchAction({type:`dragNode`,seriesId:e.id,dataIndex:c.getRawIndex(r),localX:this.shape.x/o,localY:this.shape.y/s})},t.draggable=!0,t.cursor=`move`)}),!this._data&&e.isAnimationEnabled()&&i.setClipPath(pq(i.getBoundingRect(),e,function(){i.removeClipPath()})),this._data=e.getData(),this._firstRender=!1},t.prototype.__updateOnOwnRoam=function(e,t,n){qz(this.group,2,t.coordinateSystem,null)},t.prototype.dispose=function(){this._controller&&this._controller.dispose()},t.prototype._updateViewCoordSys=function(e,t){var n=e.layoutInfo,r=e.coordinateSystem=_B(e,t,n.x,n.y,n.width,n.height);qz(this.group,2,r,this._firstRender?null:e)},t.type=sq,t}(Sx);function fq(e,t,n){switch(e.fill){case`source`:e.fill=n.node1.getVisual(`color`),e.decal=n.node1.getVisual(`style`).decal;break;case`target`:e.fill=n.node2.getVisual(`color`),e.decal=n.node2.getVisual(`style`).decal;break;case`gradient`:var r=n.node1.getVisual(`color`),i=n.node2.getVisual(`color`);B(r)&&B(i)&&(e.fill=new hm(0,0,+(t===`horizontal`),+(t===`vertical`),[{color:r,offset:0},{color:i,offset:1}]))}}function pq(e,t,n){var r=new vd({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Mm(r,{shape:{width:e.width+20}},t,n),r}var mq=Qc(sq,hq);function hq(e,t){e.eachSeriesByType(sq,function(e){var n=e.get(`nodeWidth`),r=e.get(`nodeGap`),i=q_(e,t).refContainer,a=W_(e.getBoxLayoutParams(),i);e.layoutInfo=a;var o=a.width,s=a.height,c=e.getGraph(),l=c.nodes,u=c.edges;_q(l),gq(l,u,n,r,o,s,Me(l,function(e){return e.getLayout().value===0}).length===0?e.get(`layoutIterations`):0,e.get(`orient`),e.get(`nodeAlign`))})}function gq(e,t,n,r,i,a,o,s,c){vq(e,t,n,i,a,s,c),Cq(e,t,a,i,r,o,s),Iq(e,s)}function _q(e){F(e,function(e){var t=Pq(e.outEdges,Nq),n=Pq(e.inEdges,Nq),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)})}function vq(e,t,n,r,i,a,o){for(var s=[],c=[],l=[],u=[],d=0,f=0;f=0;_&&g.depth>p&&(p=g.depth),h.setLayout({depth:_?g.depth:d},!0),a===`vertical`?h.setLayout({dy:n},!0):h.setLayout({dx:n},!0);for(var v=0;vd-1?p:d-1;o&&o!==`left`&&bq(e,o,a,C),Sq(e,a===`vertical`?(i-n)/C:(r-n)/C,a)}function yq(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function bq(e,t,n,r){if(t===`right`){for(var i=[],a=e,o=0;a.length;){for(var s=0;s0;a--)c*=.99,Dq(s,c,o),Eq(s,i,n,r,o),Fq(s,c,o),Eq(s,i,n,r,o)}function wq(e,t){var n=[],r=t===`vertical`?`y`:`x`,i=Mc(e,function(e){return e.getLayout()[r]});return bs(i.keys),F(i.keys,function(e){n.push(i.buckets.get(e))}),n}function Tq(e,t,n,r,i,a){var o=1/0;F(e,function(e){var t=e.length,s=0;F(e,function(e){s+=e.getLayout().value});var c=a===`vertical`?(r-(t-1)*i)/s:(n-(t-1)*i)/s;c0&&(o=s.getLayout()[a]+c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]+s.getLayout()[d]+t;var p=i===`vertical`?r:n;if(c=l-t-p,c>0){o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0),l=o;for(var f=u-2;f>=0;--f)s=e[f],c=s.getLayout()[a]+s.getLayout()[d]+t-l,c>0&&(o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]}})}function Dq(e,t,n){F(e.slice().reverse(),function(e){F(e,function(e){if(e.outEdges.length){var r=Pq(e.outEdges,Oq,n)/Pq(e.outEdges,Nq);if(isNaN(r)){var i=e.outEdges.length;r=i?Pq(e.outEdges,kq,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-Mq(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-Mq(e,n))*t;e.setLayout({y:o},!0)}}})})}function Oq(e,t){return Mq(e.node2,t)*e.getValue()}function kq(e,t){return Mq(e.node2,t)}function Aq(e,t){return Mq(e.node1,t)*e.getValue()}function jq(e,t){return Mq(e.node1,t)}function Mq(e,t){return t===`vertical`?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function Nq(e){return e.getValue()}function Pq(e,t,n){for(var r=0,i=e.length,a=-1;++aa&&(a=t)}),F(n,function(t){var n=new XH({type:`color`,mappingMethod:`linear`,dataExtent:[i,a],visual:e.get(`color`)}).mapValueToVisual(t.getLayout().value),r=t.getModel().get([`itemStyle`,`color`]);r==null?(t.setVisual(`color`,n),t.setVisual(`style`,{fill:n})):(t.setVisual(`color`,r),t.setVisual(`style`,{fill:r}))})}r.length&&F(r,function(e){var t=e.getModel().get(`lineStyle`);e.setVisual(`style`,t)})})}function zq(e){e.registerChartView(dq),e.registerSeriesModel(cq),e.registerLayout(mq),e.registerVisual(Lq),e.registerAction({type:`dragNode`,event:`dragnode`,update:`update`},function(e,t){t.eachComponent({mainType:Rd,subType:sq,query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),mB(e,Rd,sq)}var Bq=function(){function e(){}return e.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},e.prototype.getInitialData=function(e,t){var n,r=t.getComponent(`xAxis`,this.get(`xAxisIndex`)),i=t.getComponent(`yAxis`,this.get(`yAxisIndex`)),a=r.get(`type`),o=i.get(`type`),s,c=e.layout;a===`category`?(c=`horizontal`,n=r.getOrdinalMeta(),s=!this._hasEncodeRule(`x`)):o===`category`&&(c=`vertical`,n=i.getOrdinalMeta(),s=!this._hasEncodeRule(`y`)),c||=o===`time`?`vertical`:`horizontal`,this._layout=c;var l=[`x`,`y`],u=c===`horizontal`?0:1,d=this._baseAxisDim=l[u],f=l[1-u],p=[r,i],m=p[u].get(`type`),h=p[1-u].get(`type`),g=e.data;if(g&&s){var _=[];F(g,function(e,t){var n;R(e)?(n=e.slice(),e.unshift(t)):R(e.value)?(n=N({},e),n.value=n.value.slice(),e.value.unshift(t)):n=e,_.push(n)}),e.data=_}var v=this.defaultValueDimensions,y=[{name:d,type:zT(m),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:[`base`]},{name:f,type:zT(h),dimsDef:v.slice()}];return nI(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:Ie(mv,y,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+`Axis`,this.get(e+`AxisIndex`)).axis},e.prototype.getWhiskerBoxesLayout=function(){return this._layout},e}();function Vq(e,t){for(var n=t.ends.length,r=0,i=0;ih){var b=[_,y];r.push(b)}}}return{boxData:n,outliers:r}}var rJ={type:`echarts:boxplot`,transform:function(e){var t=e.upstream;t.sourceFormat!==`arrayRows`&&Ys(``);var n=nJ(t.getRawData(),e.config);return[{dimensions:[`ItemName`,`Low`,`Q1`,`Q2`,`Q3`,`High`],data:n.boxData},{data:n.outliers}]}};function iJ(e){e.registerSeriesModel(Uq),e.registerChartView(Wq),e.registerLayout(Zq),e.registerTransform(rJ),tJ(e)}var aJ=`candlestick`,oJ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:`open`,defaultTooltip:!0},{name:`close`,defaultTooltip:!0},{name:`lowest`,defaultTooltip:!0},{name:`highest`,defaultTooltip:!0}],n}return t.prototype.getShadowDim=function(){return`open`},t.prototype.brushSelector=function(e,t,n){var r=t.getItemLayout(e);return r&&n.rect(r.brushRect)},t.type=`series.`+aJ,t.dependencies=[`xAxis`,`yAxis`,`grid`],t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:`#eb5454`,color0:`#47b262`,borderColor:`#eb5454`,borderColor0:`#47b262`,borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:`mod`,animationEasing:`linear`,animationDuration:300},t}(lx);ke(oJ,Bq,!0);var sJ=[`itemStyle`,`borderColor`],cJ=[`itemStyle`,`borderColor0`],lJ=[`itemStyle`,`borderColorDoji`],uJ=[`itemStyle`,`color`],dJ=[`itemStyle`,`color0`];function fJ(e,t){return t.get(e>0?uJ:dJ)}function pJ(e,t){return t.get(e===0?lJ:e>0?sJ:cJ)}var mJ={seriesType:aJ,plan:yx(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){for(var n;(n=e.next())!=null;){var r=t.getItemModel(n),i=t.getItemLayout(n).sign,a=r.getItemStyle();a.fill=fJ(i,r),a.stroke=pJ(i,r)||a.fill,N(t.ensureUniqueItemVisual(n,`style`),a)}}}}},hJ=[`color`,`borderColor`],gJ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,t,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,t,n,r){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},t.prototype.eachRendered=function(e){yh(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e){var t=e.getData(),n=this._data,r=this.group,i=t.getLayout(`isSimpleBox`),a=e.get(`clip`,!0),o=e.coordinateSystem,s=o.getArea&&o.getArea(),c=a&&vN(o,!1,e);this._data||r.removeAll();var l=SJ(e);t.diff(n).add(function(n){if(t.hasValue(n)){var o=t.getItemLayout(n),u=a?Vq(s,o):0;if(u===2)return;var d=yJ(o,n,l,!0);Mm(d,{shape:{points:o.ends}},e,n),yN(u===1,d,c),bJ(d,t,n,i),r.add(d),t.setItemGraphicEl(n,d)}}).update(function(o,u){var d=n.getItemGraphicEl(u);if(!t.hasValue(o)){r.remove(d);return}var f=t.getItemLayout(o),p=a?Vq(s,f):0;if(p===2){r.remove(d);return}d?(jm(d,{shape:{points:f.ends}},e,o),Lm(d)):d=yJ(f,o,l),bJ(d,t,o,i),yN(p===1,d,c),r.add(d),t.setItemGraphicEl(o,d)}).remove(function(e){var t=n.getItemGraphicEl(e);t&&r.remove(t)}).execute(),this._data=t},t.prototype._renderLarge=function(e){this._clear(),TJ(e,this.group);var t=e.get(`clip`,!0)?vN(e.coordinateSystem,!1,e):null;yN(!!t,this.group,t)},t.prototype._incrementalRenderNormal=function(e,t){for(var n=t.getData(),r=n.getLayout(`isSimpleBox`),i=SJ(t),a;(a=e.next())!=null;){var o=yJ(n.getItemLayout(a),a,i);bJ(o,n,a,r),o.incremental=Xc(t),this.group.add(o),this._progressiveEls.push(o)}},t.prototype._incrementalRenderLarge=function(e,t){TJ(t,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),yN(!1,this.group,null),this._data=null},t.type=aJ,t}(Sx),_J=function(){function e(){}return e}(),vJ=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`normalCandlestickBox`,n}return t.prototype.getDefaultShape=function(){return new _J},t.prototype.buildPath=function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t}(id);function yJ(e,t,n,r){var i=e.ends;return new vJ({shape:{points:r?xJ(i,n,e):i},z2:100})}function bJ(e,t,n,r){var i=t.getItemModel(n);e.useStyle(t.getItemVisual(n,`style`)),e.style.strokeNoScale=!0;var a=i.getShallow(`cursor`);a&&e.attr(`cursor`,a),e.__simpleBox=r,Qf(e,i);var o=t.getItemLayout(n).sign;F(e.states,function(e,t){var n=i.getModel(t),r=fJ(o,n),a=pJ(o,n)||r,s=e.style||={};r&&(s.fill=r),a&&(s.stroke=a)});var s=i.getModel(`emphasis`);Jf(e,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))}function xJ(e,t,n){return I(e,function(e){return e=e.slice(),e[t]=n.initBaseline,e})}function SJ(e){return+(e.getWhiskerBoxesLayout()===`horizontal`)}var CJ=function(){function e(){}return e}(),wJ=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeCandlestickBox`,n}return t.prototype.getDefaultShape=function(){return new CJ},t.prototype.buildPath=function(e,t){for(var n=t.points,r=0;rh?x[a]:b[a],ends:w,brushRect:O(g,_,p)})}function E(e,n){var r=[];return r[i]=n,r[a]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(r)}function D(e,t,n){var a=t.slice(),o=t.slice();a[i]=eh(a[i]+r/2,1,!1),o[i]=eh(o[i]-r/2,1,!0),n?e.push(a,o):e.push(o,a)}function O(e,t,n){var o=E(e,n),s=E(t,n);return o[i]-=r/2,s[i]-=r/2,{x:o[0],y:o[1],width:a?r:s[0]-o[0],height:a?s[1]-o[1]:r}}function k(e){return e[i]=eh(e[i],1),e}}function m(n,r){for(var o=aN(n.count*4),c=0,p,m=[],h=[],g,_=r.getStore(),v=!!e.get([`itemStyle`,`borderColorDoji`]);(g=n.next())!=null;){var y=_.get(s,g),b=_.get(l,g),x=_.get(u,g),S=_.get(d,g),C=_.get(f,g);if(isNaN(y)||isNaN(S)||isNaN(C)){o[c++]=NaN,c+=3;continue}o[c++]=AJ(_,g,b,x,u,v),m[i]=y,m[a]=S,p=t.dataToPoint(m,null,h),o[c++]=p?p[0]:NaN,o[c++]=p?p[1]:NaN,m[a]=C,p=t.dataToPoint(m,null,h),o[c++]=p?p[1]:NaN}r.setLayout(`largePoints`,o)}}};function AJ(e,t,n,r,i,a){return n>r?-1:n0?e.get(i,t-1)<=r?1:-1:1}function jJ(e,t){var n=Mk(e.getBaseAxis(),{fromStat:{key:QP(aJ)},min:1}).w,r=J(H(e.get(`barMaxWidth`),n),n),i=J(H(e.get(`barMinWidth`),1),n),a=e.get(`barWidth`);return a==null?rs(ns(n/2,r),i):J(a,n)}function MJ(e){OJ(e,function(){var t=QP(aJ);lO(e,{key:t,seriesType:aJ,getMetrics:eF}),wO(t,ZP(t))})}function NJ(e){e.registerChartView(gJ),e.registerSeriesModel(oJ),e.registerPreprocessor(DJ),e.registerVisual(mJ),e.registerLayout(kJ),MJ(e)}function PJ(e,t){var n=t.rippleEffectColor||t.color;e.eachChild(function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType===`stroke`?n:null,fill:t.brushType===`fill`?n:null}})})}var FJ=function(e){D(t,e);function t(t,n){var r=e.call(this)||this,i=new KM(t,n),a=new q;return r.add(i),r.add(a),r.updateData(t,n),r}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,r=e.rippleNumber,i=this.childAt(1),a=0;a0&&(a=this._getLineLength(r)/c*1e3),a!==this._period||o!==this._loop||s!==this._roundTrip){r.stopAnimation();var u=void 0;u=z(l)?l(n):l,r.__t>0&&(u=-a*r.__t),this._animateSymbol(r,a,u,o,s)}this._period=a,this._loop=o,this._roundTrip=s}},t.prototype._animateSymbol=function(e,t,n,r,i){if(t>0){e.__t=0;var a=this,o=e.animate(``,r).when(i?t*2:t,{__t:i?2:1}).delay(n).during(function(){a._updateSymbolPosition(e)});r||o.done(function(){a.remove(e)}),o.start()}},t.prototype._getLineLength=function(e){return kt(e.__p1,e.__cp1)+kt(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},t.prototype.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},t.prototype._updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,r=e.__cp1,i=e.__t<=1?e.__t:2-e.__t,a=[e.x,e.y],o=a.slice(),s=Hr,c=Ur;a[0]=s(t[0],r[0],n[0],i),a[1]=s(t[1],r[1],n[1],i);var l=e.__t<=1?c(t[0],r[0],n[0],i):c(n[0],r[0],t[0],1-i),u=e.__t<=1?c(t[1],r[1],n[1],i):c(n[1],r[1],t[1],1-i);e.rotation=-Math.atan2(u,l)-Math.PI/2,(this._symbolType===`line`||this._symbolType===`rect`||this._symbolType===`roundRect`)&&(e.__lastT!==void 0&&e.__lastT=0&&!(r[o]<=t);o--);o=Math.min(o,i-2)}else{for(o=a;ot);o++);o=Math.min(o-1,i-2)}var s=(t-r[o])/(r[o+1]-r[o]),c=n[o],l=n[o+1];e.x=c[0]*(1-s)+s*l[0],e.y=c[1]*(1-s)+s*l[1];var u=e.__t<=1?l[0]-c[0]:c[0]-l[0],d=e.__t<=1?l[1]-c[1]:c[1]-l[1];e.rotation=-Math.atan2(d,u)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},t}(BJ),UJ=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),WJ=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new UJ},t.prototype.buildPath=function(e,t){var n=t.segs,r=t.curveness,i;if(t.polyline)for(i=this._off;i0){e.moveTo(n[i++],n[i++]);for(var o=1;o0){var d=(s+l)/2-(c-u)*r,f=(c+u)/2-(l-s)*r;e.quadraticCurveTo(d,f,l,u)}else e.lineTo(l,u)}this.incremental&&(this._off=i,this.notClear=!0)},t.prototype.findDataIndex=function(e,t){var n=this.shape,r=n.segs,i=n.curveness,a=this.style.lineWidth;if(n.polyline)for(var o=0,s=0;s0)for(var l=r[s++],u=r[s++],d=1;d0){if(Iu(l,u,(l+f)/2-(u-p)*i,(u+p)/2-(f-l)*i,f,p,a,e,t))return o}else if(Pu(l,u,f,p,a,e,t))return o;o++}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape.segs,n=1/0,r=1/0,i=-1/0,a=-1/0,o=0;o0&&(a.dataIndex=n+e.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),KJ={seriesType:`lines`,plan:yx(),reset:function(e){var t=e.coordinateSystem;if(t){var n=e.get(`polyline`),r=e.pipelineContext.large;return{progress:function(i,a){var o=[];if(r){var s=void 0,c=i.end-i.start;if(n){for(var l=0,u=i.start;u0&&c&&s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)}),i.updateData(r);var l=e.get(`clip`,!0)&&vN(e.coordinateSystem,!1,e);l?this.group.setClipPath(l):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateLineDraw(r,e).incrementalPrepareUpdate(r),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData(),Xc(t)),this._finished=e.end===t.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,t,n){var r=e.getData(),i=this._lineDraw;if(!this._finished||!i||!i.updateLayout)return{update:!0};var a=KJ.reset(e,t,n);a.progress&&a.progress({start:0,end:r.count(),count:r.count()},r),i.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,t){var n=this._lineDraw,r=this._showEffect(t),i=!!t.get(`polyline`),a=t.pipelineContext.large;return(!n||r!==this._hasEffet||i!==this._isPolyline||a!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=a?new GJ:new xW(i?r?HJ:VJ:r?BJ:bW),this._hasEffet=r,this._isPolyline=i,this._isLargeDraw=a),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get([`effect`,`show`])},t.prototype._clearLayer=function(e){var t=jh(e);t&&this._lastZlevel!=null&&t.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.type=`lines`,t}(Sx),JJ=typeof Uint32Array>`u`?Array:Uint32Array,YJ=typeof Float64Array>`u`?Array:Float64Array;function XJ(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=I(t,function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),we([t,e[0],e[1]])}))}var ZJ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath=`lineStyle`,n.visualDrawType=`stroke`,n}return t.prototype.init=function(t){t.data=t.data||[],XJ(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(t){if(XJ(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=at(this._flatCoords,t.flatCoords),this._flatCoordsOffset=at(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var t=this.getData().getItemModel(e);return t.option instanceof Array?t.option:t.getShallow(`coords`)},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[e*2],r=this._flatCoordsOffset[e*2+1],i=0;i `)}return Hb(`nameValue`,{name:o,value:i,noValue:i==null||isNaN(i)})},t.prototype.preventIncremental=function(){return!!this.get([`effect`,`show`])},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?1e4:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?2e4:this.get(`progressiveThreshold`))},t.prototype.getZLevelKey=function(){var e=this.getModel(`effect`),t=e.get(`trailLength`);return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get(`show`)&&t>0?t+``:``},t.type=`series.lines`,t.dependencies=[`grid`,`polar`,`geo`,`calendar`],t.defaultOption={coordinateSystem:`geo`,z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:[`none`,`none`],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:`circle`,symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:`end`},lineStyle:{opacity:.5}},t}(lx);function QJ(e){return e instanceof Array||(e=[e,e]),e}var $J={seriesType:`lines`,reset:function(e){var t=QJ(e.get(`symbol`)),n=QJ(e.get(`symbolSize`)),r=e.getData();r.setVisual(`fromSymbol`,t&&t[0]),r.setVisual(`toSymbol`,t&&t[1]),r.setVisual(`fromSymbolSize`,n&&n[0]),r.setVisual(`toSymbolSize`,n&&n[1]);function i(e,t){var n=e.getItemModel(t),r=QJ(n.getShallow(`symbol`,!0)),i=QJ(n.getShallow(`symbolSize`,!0));r[0]&&e.setItemVisual(t,`fromSymbol`,r[0]),r[1]&&e.setItemVisual(t,`toSymbol`,r[1]),i[0]&&e.setItemVisual(t,`fromSymbolSize`,i[0]),i[1]&&e.setItemVisual(t,`toSymbolSize`,i[1])}return{dataEach:r.hasItemOption?i:null}}};function eY(e){e.registerChartView(qJ),e.registerSeriesModel(ZJ),e.registerLayout(KJ),e.registerVisual($J)}var tY=256,nY=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ae.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,a){var o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(var p=0;p0){var E=a(v)?s:c;v>0&&(v=v*w+C),b[x++]=E[T],b[x++]=E[T+1],b[x++]=E[T+2],b[x++]=E[T+3]*v*256}else x+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||=ae.createCanvas(),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=Z.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],a=0,o=0;o<256;o++)e[t](o/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r},e}();function rY(e,t,n){var r=e[1]-e[0];t=I(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(e){var r;for(r=a;r=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r=t[0]&&e<=t[1]}}var aY=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r;t.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):SN(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(SN(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){yh(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=xN(a,`cartesian2d`),s=xN(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=Mk(f).w+.5,l=Mk(p).w+.5,u=f.scale.getExtent(),d=p.scale.getExtent()}for(var m=this.group,h=e.getData(),g=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),_=e.getModel([`blur`,`itemStyle`]).getItemStyle(),v=e.getModel([`select`,`itemStyle`]).getItemStyle(),y=e.get([`itemStyle`,`borderRadius`]),b=Ih(e),x=e.getModel(`emphasis`),S=x.get(`focus`),C=x.get(`blurScope`),w=x.get(`disabled`),T=o||s?[h.mapDimension(`x`),h.mapDimension(`y`),h.mapDimension(`value`)]:[h.mapDimension(`time`),h.mapDimension(`value`)],E=n;Eu[1]||Ad[1])continue;var j=a.dataToPoint([k,A]);D=new vd({shape:{x:j[0]-c/2,y:j[1]-l/2,width:c,height:l},style:O})}else if(s){var ee=a.dataToLayout([h.get(T[0],E),h.get(T[1],E)]).rect;if(Ge(ee.x))continue;D=new vd({z2:1,shape:ee,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var te=a.dataToLayout([h.get(T[0],E)]),ee=te.contentRect||te.rect;if(Ge(ee.x)||Ge(ee.y))continue;D=new vd({z2:1,shape:ee,style:O})}if(h.hasItemOption){var ne=h.getItemModel(E),re=ne.getModel(`emphasis`);g=re.getModel(`itemStyle`).getItemStyle(),_=ne.getModel([`blur`,`itemStyle`]).getItemStyle(),v=ne.getModel([`select`,`itemStyle`]).getItemStyle(),y=ne.get([`itemStyle`,`borderRadius`]),S=re.get(`focus`),C=re.get(`blurScope`),w=re.get(`disabled`),b=Ih(ne)}D.shape.r=y;var ie=e.getRawValue(E),ae=`-`;ie&&ie[2]!=null&&(ae=ie[2]+``),Fh(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:ae}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,Jf(D,S,C,w),D.incremental=Xc(e,i),i&&(D.states.emphasis.hoverLayer=2),m.add(D),h.setItemGraphicEl(E,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new nY;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);var c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);var u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?iY(v,n.option.range):rY(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var b=new ud({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(Sx),oY=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return wE(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=O_.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`},t.type=`series.heatmap`,t.dependencies=[`grid`,`geo`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:Z.color.primary}}},t}(lx);function sY(e){e.registerChartView(aY),e.registerSeriesModel(oY)}var cY=[`itemStyle`,`borderWidth`],lY=[{xy:`x`,wh:`width`,index:0,posDesc:[`left`,`right`]},{xy:`y`,wh:`height`,index:1,posDesc:[`top`,`bottom`]}],uY=new Ap,dY=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=tF,t}return t.prototype.render=function(e,t,n){var r=this.group,i=e.getData(),a=this._data,o=e.coordinateSystem,s=o.getBaseAxis().isHorizontal(),c=o.master.getRect(),l={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:o,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:s,valueDim:lY[+s],categoryDim:lY[1-s]};i.diff(a).add(function(e){if(i.hasValue(e)){var t=fY(i,e,CY(i,e),l),n=EY(i,l,t);i.setItemGraphicEl(e,n),r.add(n),MY(n,l,t)}}).update(function(e,t){var n=a.getItemGraphicEl(t);if(!i.hasValue(e)){r.remove(n);return}var o=fY(i,e,CY(i,e),l),s=kY(i,o);n&&s!==n.__pictorialShapeStr&&(r.remove(n),i.setItemGraphicEl(e,null),n=null),n?DY(n,l,o):n=EY(i,l,o,!0),i.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=o,r.add(n),MY(n,l,o)}).remove(function(e){var t=a.getItemGraphicEl(e);t&&OY(a,e,t.__pictorialSymbolMeta.animationModel,t)}).execute();var u=e.get(`clip`,!0)?vN(e.coordinateSystem,!1,e):null;return u?r.setClipPath(u):r.removeClipPath(),this._data=i,this.group},t.prototype.remove=function(e,t){var n=this.group,r=this._data;e.get(`animation`)?r&&r.eachItemGraphicEl(function(t){OY(r,Y(t).dataIndex,e,t)}):n.removeAll()},t.type=tF,t}(Sx);function fY(e,t,n,r){var i=e.getItemLayout(t),a=n.get(`symbolRepeat`),o=n.get(`symbolClip`),s=n.get(`symbolPosition`)||`start`,c=(n.get(`symbolRotate`)||0)*Math.PI/180||0,l=n.get(`symbolPatternSize`)||2,u=n.isAnimationEnabled(),d={dataIndex:t,layout:i,itemModel:n,symbolType:e.getItemVisual(t,`symbol`)||`circle`,style:e.getItemVisual(t,`style`),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:n.get(`symbolRepeatDirection`),symbolPatternSize:l,rotation:c,animationModel:u?n:null,hoverScale:u&&n.get([`emphasis`,`scale`]),z2:n.getShallow(`z`,!0)||0};pY(n,a,i,r,d),hY(e,t,i,a,o,d.boundingLength,d.pxSign,l,r,d),gY(n,d.symbolScale,c,r,d);var f=d.symbolSize;return _Y(n,f,i,a,o,KS(n.get(`symbolOffset`),f),s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,r,d),d}function pY(e,t,n,r,i){var a=r.valueDim,o=e.get(`symbolBoundingData`),s=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),c=s.toGlobalCoord(s.dataToCoord(0)),l=1-(n[a.wh]<=0),u;if(R(o)){var d=[mY(s,o[0])-c,mY(s,o[1])-c];d[1]=0?1:-1:u>0?1:-1}function mY(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function hY(e,t,n,r,i,a,o,s,c,l){var u=c.valueDim,d=c.categoryDim,f=Math.abs(n[d.wh]),p=e.getItemVisual(t,`symbolSize`),m=R(p)?p.slice():p==null?[`100%`,`100%`]:[p,p];m[d.index]=J(m[d.index],f),m[u.index]=J(m[u.index],r?f:Math.abs(a)),l.symbolSize=m;var h=l.symbolScale=[m[0]/s,m[1]/s];h[u.index]*=(c.isHorizontal?-1:1)*o}function gY(e,t,n,r,i){var a=e.get(cY)||0;a&&(uY.attr({scaleX:t[0],scaleY:t[1],rotation:n}),uY.updateTransform(),a/=uY.getLineScale(),a*=t[r.valueDim.index]),i.valueLineWidth=a||0}function _Y(e,t,n,r,i,a,o,s,c,l,u,d){var f=u.categoryDim,p=u.valueDim,m=d.pxSign,h=Math.max(t[p.index]+s,0),g=h;if(r){var _=Math.abs(c),v=Ke(e.get(`symbolMargin`),`15%`)+``,y=!1;v.lastIndexOf(`!`)===v.length-1&&(y=!0,v=v.slice(0,v.length-1));var b=J(v,t[p.index]),x=Math.max(h+b*2,0),S=y?0:b*2,C=zs(r),w=C?r:NY((_+S)/x);b=(_-w*h)/2/(y?w:Math.max(w-1,1)),x=h+b*2,S=y?0:b*2,!C&&r!==`fixed`&&(w=l?NY((Math.abs(l)+S)/x):0),g=w*x-S,d.repeatTimes=w,d.symbolMargin=b}var T=g/2*m,E=d.pathPosition=[];E[f.index]=n[f.wh]/2,E[p.index]=o===`start`?T:o===`end`?c-T:c/2,a&&(E[0]+=a[0],E[1]+=a[1]);var D=d.bundlePosition=[];D[f.index]=n[f.xy],D[p.index]=n[p.xy];var O=d.barRectShape=N({},n);O[p.wh]=m*Math.max(Math.abs(n[p.wh]),Math.abs(E[p.index]+T)),O[f.wh]=n[f.wh];var k=d.clipShape={};k[f.xy]=-n[f.xy],k[f.wh]=u.ecSize[f.wh],k[p.xy]=0,k[p.wh]=n[p.wh]}function vY(e){var t=e.symbolPatternSize,n=WS(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),n.type!==`image`&&n.setStyle({strokeNoScale:!0}),n}function yY(e,t,n,r){var i=e.__pictorialBundle,a=n.symbolSize,o=n.valueLineWidth,s=n.pathPosition,c=t.valueDim,l=n.repeatTimes||0,u=0,d=a[t.valueDim.index]+o+n.symbolMargin*2;for(AY(e,function(e){e.__pictorialAnimationIndex=u,e.__pictorialRepeatTimes=l,u0:r<0)&&(i=l-1-e),t[c.index]=d*(i-l/2+.5)+s[c.index],{x:t[0],y:t[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function bY(e,t,n,r){var i=e.__pictorialBundle,a=e.__pictorialMainPath;a?jY(a,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,r):(a=e.__pictorialMainPath=vY(n),i.add(a),jY(a,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,r))}function xY(e,t,n){var r=N({},t.barRectShape),i=e.__pictorialBarRect;i?jY(i,null,{shape:r},t,n):(i=e.__pictorialBarRect=new vd({z2:2,shape:r,silent:!0,style:{stroke:`transparent`,fill:`transparent`,lineWidth:0}}),i.disableMorphing=!0,e.add(i))}function SY(e,t,n,r){if(n.symbolClip){var i=e.__pictorialClipPath,a=N({},n.clipShape),o=t.valueDim,s=n.animationModel,c=n.dataIndex;if(i)jm(i,{shape:a},s,c);else{a[o.wh]=0,i=new vd({shape:a}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var l={};l[o.wh]=n.clipShape[o.wh],zm[r?`updateProps`:`initProps`](i,{shape:l},s,c)}}}function CY(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=wY,n.isAnimationEnabled=TY,n}function wY(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function TY(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow(`animation`)}function EY(e,t,n,r){var i=new q,a=new q;return i.add(a),i.__pictorialBundle=a,a.x=n.bundlePosition[0],a.y=n.bundlePosition[1],n.symbolRepeat?yY(i,t,n):bY(i,t,n),xY(i,n,r),SY(i,t,n,r),i.__pictorialShapeStr=kY(e,n),i.__pictorialSymbolMeta=n,i}function DY(e,t,n){var r=n.animationModel,i=n.dataIndex,a=e.__pictorialBundle;jm(a,{x:n.bundlePosition[0],y:n.bundlePosition[1]},r,i),n.symbolRepeat?yY(e,t,n,!0):bY(e,t,n,!0),xY(e,n,!0),SY(e,t,n,!0)}function OY(e,t,n,r){var i=r.__pictorialBarRect;i&&i.removeTextContent();var a=[];AY(r,function(e){a.push(e)}),r.__pictorialMainPath&&a.push(r.__pictorialMainPath),r.__pictorialClipPath&&(n=null),F(a,function(e){Pm(e,{scaleX:0,scaleY:0},n,t,function(){r.parent&&r.parent.remove(r)})}),e.setItemGraphicEl(t,null)}function kY(e,t){return[e.getItemVisual(t.dataIndex,`symbol`)||`none`,!!t.symbolRepeat,!!t.symbolClip].join(`:`)}function AY(e,t,n){F(e.__pictorialBundle.children(),function(r){r!==e.__pictorialBarRect&&t.call(n,r)})}function jY(e,t,n,r,i,a){t&&e.attr(t),r.symbolClip&&!i?n&&e.attr(n):n&&zm[i?`updateProps`:`initProps`](e,n,r.animationModel,r.dataIndex,a)}function MY(e,t,n){var r=n.dataIndex,i=n.itemModel,a=i.getModel(`emphasis`),o=a.getModel(`itemStyle`).getItemStyle(),s=i.getModel([`blur`,`itemStyle`]).getItemStyle(),c=i.getModel([`select`,`itemStyle`]).getItemStyle(),l=i.getShallow(`cursor`),u=a.get(`focus`),d=a.get(`blurScope`),f=a.get(`scale`);AY(e,function(e){if(e instanceof ud){var t=e.style;e.useStyle(N({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else e.useStyle(n.style);var r=e.ensureState(`emphasis`);r.style=o,f&&(r.scaleX=e.scaleX*1.1,r.scaleY=e.scaleY*1.1),e.ensureState(`blur`).style=s,e.ensureState(`select`).style=c,l&&(e.cursor=l),e.z2=n.z2});var p=t.valueDim.posDesc[+(n.boundingLength>0)],m=e.__pictorialBarRect;m.ignoreClip=!0,Fh(m,Ih(i),{labelFetcher:t.seriesModel,labelDataIndex:r,defaultText:WM(t.seriesModel.getData(),r),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),Jf(e,u,d,a.get(`disabled`))}function NY(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var PY=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.defaultSymbol=`roundRect`,n}return t.prototype.getInitialData=function(t){return t.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type=`series.`+tF,t.dependencies=[`grid`],t.defaultOption=dg(bF.defaultOption,{symbol:`circle`,symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:`end`,symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:`-100%`,clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:Z.color.primary}}}),t}(bF);function FY(e){e.registerChartView(dY),e.registerSeriesModel(PY),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,hF(tF)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,gF(tF)),yF(e)}var IY=2,LY=`themeRiver`,RY=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new rI(L(this.getData,this),L(this.getRawData,this))},t.prototype.fixData=function(e){var t=e.length,n={},r=Mc(e,function(e){return n.hasOwnProperty(e[0]+``)||(n[e[0]+``]=-1),e[2]}),i=[];r.buckets.each(function(e,t){i.push({name:t,dataList:e})});for(var a=i.length,o=0;oa&&(a=s),r.push(s)}for(var l=0;la&&(a=d)}return{y0:i,max:a}}function GY(e){e.registerChartView(zY),e.registerSeriesModel(RY),e.registerLayout(VY),e.registerProcessor(tI(LY))}var KY=2,qY=4,JY=function(e){D(t,e);function t(t,n,r,i){var a=e.call(this)||this;a.z2=KY,a.textConfig={inside:!0},Y(a).seriesIndex=n.seriesIndex;var o=new Cd({z2:qY,silent:t.getModel().get([`label`,`silent`])});return a.setTextContent(o),a.updateData(!0,t,n,r,i),a}return t.prototype.updateData=function(e,t,n,r,i){this.node=t,t.piece=this,n||=this._seriesModel,r||=this._ecModel;var a=this;Y(a).dataIndex=t.dataIndex;var o=t.getModel(),s=o.getModel(`emphasis`),c=t.getLayout(),l=N({},c);l.label=null;var u=t.getVisual(`style`);u.lineJoin=`bevel`;var d=t.getVisual(`decal`);d&&(u.decal=NC(d,i)),N(l,OF(o.getModel(`itemStyle`),l,!0)),F(tf,function(e){var t=a.ensureState(e),n=o.getModel([e,`itemStyle`]);t.style=n.getItemStyle();var r=OF(n,l);r&&(t.shape=r)}),e?(a.setShape(l),a.shape.r=c.r0,Mm(a,{shape:{r:c.r}},n,t.dataIndex)):(jm(a,{shape:l},n),Lm(a)),a.useStyle(u),this._updateLabel(n);var f=o.getShallow(`cursor`);f&&a.attr(`cursor`,f),this._seriesModel=n||this._seriesModel,this._ecModel=r||this._ecModel;var p=s.get(`focus`),m=p===`relative`?at(t.getAncestorsIndices(),t.getDescendantIndices()):p===`ancestor`?t.getAncestorsIndices():p===`descendant`?t.getDescendantIndices():p;Jf(this,m,s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e){var t=this,n=this.node.getModel(),r=n.getModel(`label`),i=this.node.getLayout(),a=i.endAngle-i.startAngle,o=(i.startAngle+i.endAngle)/2,s=Math.cos(o),c=Math.sin(o),l=this,u=l.getTextContent(),d=this.node.dataIndex,f=r.get(`minAngle`)/180*Math.PI;u.ignore=!(r.get(`show`)&&!(f!=null&&Math.abs(a)T&&!As(D-T)&&D0?(i.virtualPiece?i.virtualPiece.updateData(!1,r,e,t,n):(i.virtualPiece=new JY(r,e,t,n),c.add(i.virtualPiece)),a.piece.off(`click`),i.virtualPiece.on(`click`,function(e){i._rootToNode(a.parentNode)})):i.virtualPiece&&=(c.remove(i.virtualPiece),null)}},t.prototype._initEvents=function(){var e=this;this.group.off(`click`),this.group.on(`click`,function(t){var n=!1;e.seriesModel.getViewRoot().eachNode(function(r){if(!n&&r.piece&&r.piece===t.target){var i=r.getModel().get(`nodeClick`);if(i===`rootToNode`)e._rootToNode(r);else if(i===`link`){var a=r.getModel(),o=a.get(`link`);o&&T_(o,a.get(`target`,!0)||`_blank`)}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:QY,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}},t.type=YY,t}(Sx),rX=Qc(YY,iX);function iX(e){var t={};function n(e,n,r){if(e.depth===0)return Z.color.neutral50;for(var i=e;i&&i.depth>1;)i=i.parentNode;var a=n.getColorFromPalette(i.name||i.dataIndex+``,t);return e.depth>1&&B(a)&&(a=vi(a,(e.depth-1)/(r-1)*.5)),a}e.eachSeriesByType(YY,function(e){var t=e.getData(),r=t.tree;r.eachNode(function(i){var a=i.getModel().getModel(`itemStyle`).getItemStyle();a.fill||=n(i,e,r.root.height),N(t.ensureUniqueItemVisual(i.dataIndex,`style`),a)})})}var aX=Math.PI/180,oX=Qc(YY,sX);function sX(e,t){e.eachSeriesByType(YY,function(e){var n=e.get(`center`),r=e.get(`radius`);R(r)||(r=[0,r]),R(n)||(n=[n,n]);var i=t.getWidth(),a=t.getHeight(),o=Math.min(i,a),s=J(n[0],i),c=J(n[1],a),l=J(r[0],o/2),u=J(r[1],o/2),d=-e.get(`startAngle`)*aX,f=e.get(`minAngle`)*aX,p=e.getData().tree.root,m=e.getViewRoot(),h=m.depth,g=e.get(`sort`);g!=null&&cX(m,g);var _=0;F(m.children,function(e){!isNaN(e.getValue())&&_++});var v=m.getValue(),y=Math.PI/(v||_)*2,b=m.depth>0,x=m.height-(b?-1:1),S=(u-l)/(x||1),C=e.get(`clockwise`),w=e.get(`stillShowZeroSum`),T=C?1:-1,E=function(t,n){if(t){var r=n;if(t!==p){var i=t.getValue(),a=v===0&&w?y:i*y;ar[1]&&r.reverse(),{coordSys:{type:`polar`,cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=t.dataToRadius(r[0]),a=n.dataToAngle(r[1]),o=e.coordToPoint([i,a]);return o.push(i,a*Math.PI/180),o},size:L(xX,e)}}}function CX(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:`calendar`,x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}function wX(e){var t=e.getRect();return{coordSys:{type:`matrix`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}var TX={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},EX=Pe(TX);je(io,function(e,t){return e[t]=1,e},{}),io.join(`, `);var DX=[``,`style`,`shape`,`extra`],OX=xc();function kX(e,t,n,r,i){var a=e+`Animation`,o=km(e,r,i)||{},s=OX(t).userDuring;return o.duration>0&&(o.during=s?L(zX,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),N(o,n[a]),o}function AX(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=OX(e),l=t.style;c.userDuring=t.during;var u={},d={};if(UX(e,t,d),e.type===`compound`)for(var f=e.shape.paths,p=t.shape.paths,m=0;m0&&e.animateFrom(g,_)}else FX(e,t,i||0,n,u);jX(e,t),l?e.dirty():e.markRedraw()}function jX(e,t){for(var n=OX(e).leaveToProps,r=0;r0&&e.animateFrom(i,a)}}function IX(e,t){W(t,`silent`)&&(e.silent=t.silent),W(t,`ignore`)&&(e.ignore=t.ignore),e instanceof Xl&&W(t,`invisible`)&&(e.invisible=t.invisible),e instanceof id&&W(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}var LX={},RX={setTransform:function(e,t){return LX.el[e]=t,this},getTransform:function(e){return LX.el[e]},setShape:function(e,t){var n=LX.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=LX.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=LX.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=LX.el.style;if(t)return t[e]},setExtra:function(e,t){var n=LX.el.extra||(LX.el.extra={});return n[e]=t,this},getExtra:function(e){var t=LX.el.extra;if(t)return t[e]}};function zX(){var e=this,t=e.el;if(t){var n=OX(t).userDuring,r=e.userDuring;if(n!==r){e.el=e.userDuring=null;return}LX.el=t,r(RX)}}function BX(e,t,n,r){var i=n[e];if(i){var a=t[e],o;if(a){var s=n.transition,c=i.transition;if(c)if(!o&&(o=r[e]={}),NX(c))N(o,a);else for(var l=$s(c),u=0;u=0){!o&&(o=r[e]={});for(var p=Pe(a),u=0;u=0)){var f=e.getAnimationStyleProps(),p=f?f.style:null;if(p){!a&&(a=r.style={});for(var m=Pe(n),l=0;l=0?t.getStore().get(i,n):void 0}var a=t.get(r.name,n),o=r&&r.ordinalMeta;return o?o.categories[a]:a}function C(n,r){r??=u;var i=t.getItemVisual(r,`style`),a=i&&i.fill,o=i&&i.opacity,s=y(r,ZX).getItemStyle();a!=null&&(s.fill=a),o!=null&&(s.opacity=o);var c={inheritColor:B(a)?a:Z.color.neutral99},l=b(r,ZX),d=Lh(l,null,c,!1,!0);d.text=l.getShallow(`show`)?H(e.getFormattedLabel(r,ZX),WM(t,r)):null;var f=Rh(l,c,!1);return E(n,s),s=EN(s,d,f),n&&T(s,n),s.legacy=!0,s}function w(n,r){r??=u;var i=y(r,XX).getItemStyle(),a=b(r,XX),o=Lh(a,null,null,!0,!0);o.text=a.getShallow(`show`)?qe(e.getFormattedLabel(r,XX),e.getFormattedLabel(r,ZX),WM(t,r)):null;var s=Rh(a,null,!0);return E(n,i),i=EN(i,o,s),n&&T(i,n),i.legacy=!0,i}function T(e,t){for(var n in t)W(t,n)&&(e[n]=t[n])}function E(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}function D(e,n){if(n??=u,W(dX,e)){var r=t.getItemVisual(n,`style`);return r?r[dX[e]]:null}if(W(fX,e))return t.getItemVisual(n,e)}function O(e){if(o.type===`cartesian2d`)return dF(P({axis:o.getBaseAxis()},e))}function k(){return n.getCurrentSeriesIndices()}function A(e){return Gh(e,n)}}function _Z(e){var t={};return F(e.dimensions,function(n){var r=e.getDimensionInfo(n);if(!r.isExtraCoord){var i=r.coordDim,a=t[i]=t[i]||[];a[r.coordDimIndex]=e.getDimensionIndex(n)}}),t}function vZ(e,t,n,r,i,a,o){if(!r){a.remove(t);return}var s=yZ(e,t,n,r,i,a);return s&&o.setItemGraphicEl(n,s),s&&Jf(s,r.focus,r.blurScope,r.emphasisDisabled),s}function yZ(e,t,n,r,i,a){var o=-1,s=t;t&&bZ(t,r,i)&&(o=De(a.childrenRef(),t),t=null);var c=!t,l=t;l?l.clearStates():(l=dZ(r),s&&lZ(s,l)),r.morph===!1?l.disableMorphing=!0:l.disableMorphing&&=!1,r.tooltipDisabled&&(l.tooltipDisabled=!0),aZ.normal.cfg=aZ.normal.conOpt=aZ.emphasis.cfg=aZ.emphasis.conOpt=aZ.blur.cfg=aZ.blur.conOpt=aZ.select.cfg=aZ.select.conOpt=null,aZ.isLegacy=!1,SZ(l,n,r,i,c,aZ),xZ(l,n,r,i,c),fZ(e,l,n,r,aZ,i,c),W(r,`info`)&&(pX(l).info=r.info);for(var u=0;u=0?a.replaceAt(l,o):a.add(l),l}function bZ(e,t,n){var r=pX(e),i=t.type,a=t.shape,o=t.style;return n.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i===`path`&&NZ(a)&&MZ(a)!==r.customPathData||i===`image`&&W(o,`image`)&&o.image!==r.customImagePath}function xZ(e,t,n,r,i){var a=n.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&bZ(o,a,r)&&(o=null),o||(o=dZ(a),e.setClipPath(o)),fZ(null,o,t,a,null,r,i)}}function SZ(e,t,n,r,i,a){if(!(e.isGroup||e.type===`compoundPath`)){CZ(n,null,a),CZ(n,XX,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,c=a.blur.conOpt,l=a.select.conOpt;if(o!=null||s!=null||l!=null||c!=null){var u=e.getTextContent();if(o===!1)u&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:`text`},u?u.clearStates():(u=dZ(o),e.setTextContent(u)),fZ(null,u,t,o,null,r,i);for(var d=o&&o.style,f=0;f=u;p--)DZ(t,t.childAt(p),i)}}function DZ(e,t,n){t&&MX(t,pX(e).option,n)}function OZ(e){new FT(e.oldChildren,e.newChildren,kZ,kZ,e).add(AZ).update(AZ).remove(jZ).execute()}function kZ(e,t){return(e&&e.name)??iZ+t}function AZ(e,t){var n=this.context,r=e==null?null:n.newChildren[e],i=t==null?null:n.oldChildren[t];yZ(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function jZ(e){var t=this.context,n=t.oldChildren[e];n&&MX(n,pX(n).option,t.seriesModel)}function MZ(e){return e&&(e.pathData||e.d)}function NZ(e){return e&&(W(e,`pathData`)||W(e,`d`))}function PZ(e){e.registerChartView(uZ),e.registerSeriesModel(mX)}var FZ=xc(),IZ=M,LZ=L,RZ=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!r&&this._lastValue===i&&this._lastStatus===a)){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new q,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=Ie(zZ,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}UZ(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&Mk(r).w>o)return!0;if(a){var s=pL(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=FZ(e).pointerEl=new zm[i.type](IZ(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=FZ(e).labelEl=new Cd(IZ(t.label));e.add(i),VZ(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=FZ(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=FZ(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),VZ(i,r))},e.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=lh(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){dn(e.event)},onmousedown:LZ(this._onHandleDragMove,this,0,0),drift:LZ(this._onHandleDragMove,this),ondragend:LZ(this._onHandleDragEnd,this)}),n.add(r)),UZ(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);R(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Nx(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){zZ(this._axisPointerModel,!t&&this._moveAnimation,this._handle,HZ(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(HZ(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(HZ(r)),FZ(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Px(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function zZ(e,t,n,r){BZ(FZ(n).lastProp,r)||(FZ(n).lastProp=r,t?jm(n,r,e):(n.stopAnimation(),n.attr(r)))}function BZ(e,t){if(V(e)&&V(t)){var n=!0;return F(t,function(t,r){n&&=BZ(e[r],t)}),!!n}else return e===t}function VZ(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function HZ(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function UZ(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function WZ(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function GZ(e,t,n,r,i){var a=qZ(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=h_(o.get(`padding`)||0),c=o.getFont(),l=ho(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),KZ(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Lh(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function KZ(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function qZ(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:MD(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};F(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),B(o)?a=o.replace(`{value}`,a):z(o)&&(a=o(s))}return a}function JZ(e,t,n){var r=vn();return Cn(r,r,n.rotation),Sn(r,r,n.position),nh([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function YZ(e,t,n,r,i,a){var o=xP.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),GZ(t,r,i,a,{position:JZ(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function XZ(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function ZZ(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function QZ(e,t,n,r,i,a){return{cx:e,cy:t,r0:n,r,startAngle:i,endAngle:a,clockwise:!0}}function $Z(e,t,n){return Mk(e,{fromStat:{sers:I(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function eQ(e,t,n){return[rs(ns(t[0],t[1]),e-n/2),ns(e+n/2,rs(t[0],t[1]))]}var tQ=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=nQ(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=WZ(r),f=rQ[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}YZ(t,e,HP(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=HP(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=JZ(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=nQ(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=ns(o[1],l[c]),l[c]=rs(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(RZ);function nQ(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var rQ={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:XZ([t,r[0]],[t,r[1]],iQ(e))}},shadow:function(e,t,n,r,i,a){var o=$Z(e,i,a),s=r[1]-r[0],c=eQ(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:ZZ([l,r[0]],[u-l,s],iQ(e))}}};function iQ(e){return e.dim===`x`?0:1}var aQ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Z.color.border,width:1,type:`dashed`},shadowStyle:{color:Z.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Z.color.neutral00,padding:[5,7,5,7],backgroundColor:Z.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:Z.color.accent40,throttle:40}},t}(tv),oQ=xc(),sQ=F;function cQ(e,t,n){if(!k.node){var r=t.getZr();oQ(r).records||(oQ(r).records={}),lQ(r,t);var i=oQ(r).records[e]||(oQ(r).records[e]={});i.handler=n}}function lQ(e,t){if(oQ(e).initialized)return;oQ(e).initialized=!0,n(`click`,Ie(fQ,`click`)),n(`mousemove`,Ie(fQ,`mousemove`)),n(`mousewheel`,Ie(fQ,`mousewheel`)),n(`globalout`,dQ);function n(n,r){e.on(n,function(n){var i=pQ(t);sQ(oQ(e).records,function(e){e&&r(e,n,i.dispatchAction)}),uQ(i.pendings,t)})}}function uQ(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function dQ(e,t,n){e.handler(`leave`,null,n)}function fQ(e,t,n,r){t.handler(e,n,r)}function pQ(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function mQ(e,t){if(!k.node){var n=t.getZr();(oQ(n).records||{})[e]&&(oQ(n).records[e]=null)}}var hQ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;cQ(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){mQ(`axisPointer`,t)},t.prototype.dispose=function(e,t){mQ(`axisPointer`,t)},t.type=`axisPointer`,t}(vx);function gQ(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=bc(a,e);if(o==null||o<0||R(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint)if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(I(c.dimensions,function(e){return a.mapDimension(e)}),o))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var _Q=xc();function vQ(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||L(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){OQ(i)&&(i=gQ({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=OQ(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||OQ(i),f={},p={},m={list:[],map:{}},h={showPointer:Ie(xQ,p),showTooltip:Ie(SQ,m)};F(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);F(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=EQ(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&yQ(e,o,h,!1,f)}})});var g={};return F(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&F(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,DQ(t),DQ(e)))),g[e.key]=a}})}),F(g,function(e,t){yQ(u[t],e,h,!0,f)}),CQ(p,u,f),wQ(m,i,e,o),TQ(u,o,n),f}}function yQ(e,t,n,r,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){n.showPointer(e,t);return}var o=bQ(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&N(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function bQ(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return F(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Us(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),F(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function xQ(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function SQ(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var c=t.coordSys.model,l=gL(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function CQ(e,t,n){var r=n.axesInfo=[];F(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function wQ(e,t,n,r){if(OQ(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function TQ(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=_Q(r)[i]||{},o=_Q(r)[i]={};F(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&F(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}F(a,function(e,t){!o[t]&&c.push(l(e))}),F(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function EQ(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function DQ(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function OQ(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function kQ(e){vL.registerAxisPointerClass(`CartesianAxisPointer`,tQ),e.registerComponentModel(aQ),e.registerComponentView(hQ),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!R(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=oL(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},vQ)}function AQ(e){MT(kL),MT(kQ)}var jQ=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis;a.dim===`angle`&&(this.animationThreshold=Math.PI/18);var o=a.polar,s=a.getExtent(),c=o.getOtherAxis(a).getExtent(),l=a.dataToCoord(t),u=r.get(`type`);if(u&&u!==`none`){var d=WZ(r),f=NQ[u](a,o,l,s,c,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}GZ(e,n,r,i,MQ(t,n,r,o,r.get([`label`,`margin`])))},t}(RZ);function MQ(e,t,n,r,i){var a=t.axis,o=a.dataToCoord(e),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var c=r.getRadiusAxis().getExtent(),l,u,d;if(a.dim===`radius`){var f=vn();Cn(f,f,s),Sn(f,f,[r.cx,r.cy]),l=nh([o,-i],f);var p=t.getModel(`axisLabel`).get(`rotate`)||0,m=xP.innerTextLayout(s,p*Math.PI/180,-1);u=m.textAlign,d=m.textVerticalAlign}else{var h=c[1];l=r.coordToPoint([h+i,o]);var g=r.cx,_=r.cy;u=Math.abs(l[0]-g)/h<.3?`center`:l[0]>g?`left`:`right`,d=Math.abs(l[1]-_)/h<.3?`middle`:l[1]>_?`top`:`bottom`}return{position:l,align:u,verticalAlign:d}}var NQ={line:function(e,t,n,r,i){return e.dim===`angle`?{type:`Line`,shape:XZ(t.coordToPoint([i[0],n]),t.coordToPoint([i[1],n]))}:{type:`Circle`,shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,r,i,a,o){var s=Math.PI/180,c=$Z(e,a,o),l;if(e.dim===`angle`)l=QZ(t.cx,t.cy,i[0],i[1],(-n-c/2)*s,(-n+c/2)*s);else{var u=eQ(n,r,c),d=u[0],f=u[1];l=QZ(t.cx,t.cy,d,f,0,Math.PI*2)}return{type:`Sector`,shape:l}}},PQ=`polar`,FQ=PQ,IQ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.findAxisModel=function(e){var t;return this.ecModel.eachComponent(e,function(e){e.getCoordSysModel()===this&&(t=e)},this),t},t.type=PQ,t.dependencies=[`radiusAxis`,`angleAxis`],t.defaultOption={z:0,center:[`50%`,`50%`],radius:`80%`},t}(tv),LQ=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`polar`,Tc).models[0]},t.type=`polarAxis`,t}(tv);ke(LQ,UD);var RQ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`angleAxis`,t}(LQ),zQ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`radiusAxis`,t}(LQ),BQ=function(e){D(t,e);function t(t,n){return e.call(this,`radius`,t,n)||this}return t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)[this.dim===`radius`?0:1]},t}(Ik);BQ.prototype.dataToRadius=Ik.prototype.dataToCoord,BQ.prototype.radiusToData=Ik.prototype.coordToData;var VQ=xc(),HQ=function(e){D(t,e);function t(t,n){return e.call(this,`angle`,t,n||[0,360])||this}return t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)[this.dim===`radius`?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,t=e.getLabelModel(),n=e.scale,r=n.getExtent(),i=n.count();if(r[1]-r[0]<1)return 0;var a=r[0],o=e.dataToCoord(a+1)-e.dataToCoord(a),s=Math.abs(o),c=ho(a==null?``:a+``,t.getFont(),`center`,`top`),l=Math.max(c.height,7)/s;isNaN(l)&&(l=1/0);var u=Math.max(0,Math.floor(l)),d=VQ(e.model),f=d.lastAutoInterval,p=d.lastTickCount;return f!=null&&p!=null&&Math.abs(f-u)<=1&&Math.abs(p-i)<=1&&f>u?u=f:(d.lastTickCount=i,d.lastAutoInterval=u),u},t}(Ik);HQ.prototype.dataToAngle=Ik.prototype.dataToCoord,HQ.prototype.angleToData=Ik.prototype.coordToData;var UQ=[`radius`,`angle`],WQ=function(){function e(e){this.dimensions=UQ,this.type=PQ,this.cx=0,this.cy=0,this._radiusAxis=new BQ,this._angleAxis=new HQ,this.axisPointerEnabled=!0,this.name=e||``,this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){var t=`_`+e+`Axis`;return this[t]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,r=this._radiusAxis;return n.scale.type===e&&t.push(n),r.scale.type===e&&t.push(r),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=e!=null&&e!==`auto`?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],n)},e.prototype.pointToData=function(e,t,n){n||=[];var r=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(r[0],t),n[1]=this._angleAxis.angleToData(r[1],t),n},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,r=this.getAngleAxis(),i=r.getExtent(),a=Math.min(i[0],i[1]),o=Math.max(i[0],i[1]);r.inverse?a=o-360:o=a+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var c=Math.atan2(-n,t)/Math.PI*180,l=co;)c+=l*360;return[s,c]},e.prototype.coordToPoint=function(e,t){t||=[];var n=e[0],r=e[1]/180*Math.PI;return t[0]=Math.cos(r)*n+this.cx,t[1]=-Math.sin(r)*n+this.cy,t},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),r=Math.PI/180,i=1e-4;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*r,endAngle:-n[1]*r,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,r=t-this.cy,a=n*n+r*r,o=this.r,s=this.r0;return o!==s&&a-i<=o*o&&a+i>=s*s},x:this.cx-t[1],y:this.cy-t[1],width:t[1]*2,height:t[1]*2}},e.prototype.convertToPixel=function(e,t,n){return GQ(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return GQ(t)===this?this.pointToData(n):null},e}();function GQ(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function KQ(e,t,n){var r=t.get(`center`),i=q_(t,n).refContainer;e.cx=J(r[0],i.width)+i.x,e.cy=J(r[1],i.height)+i.y;var a=e.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=t.get(`radius`);s==null?s=[0,`100%`]:R(s)||(s=[0,s]);var c=[J(s[0],o),J(s[1],o)];a.inverse?a.setExtent(c[1],c[0]):a.setExtent(c[0],c[1])}function qQ(e,t){var n=this,r=n.getAngleAxis(),i=n.getRadiusAxis();if(bO(r,1),bO(i,1),MO(r),MO(i),r.type===`category`&&!r.onBand){var a=r.getExtent(),o=360/r.scale.count();r.inverse?a[1]+=o:a[1]-=o,r.setExtent(a[0],a[1])}}function JQ(e){return e.mainType===`angleAxis`}function YQ(e,t){if(e.type=ED(t),e.scale=DD(t,e.type,!1),e.onBand=HD(e.scale,t),e.inverse=t.get(`inverse`),JQ(t)){e.inverse=e.inverse!==t.get(`clockwise`);var n=t.get(`startAngle`),r=t.get(`endAngle`)??n+(e.inverse?-360:360);e.setExtent(n,r)}t.axis=e,e.model=t}var XQ={dimensions:UQ,create:function(e,t){var n=[];return e.eachComponent(FQ,function(e,r){var i=new WQ(r+``);i.update=qQ;var a=i.getRadiusAxis(),o=i.getAngleAxis(),s=e.findAxisModel(`radiusAxis`),c=e.findAxisModel(`angleAxis`);YQ(a,s),YQ(o,c),KQ(i,e,t),n.push(i),e.coordinateSystem=i,i.model=e}),e.eachSeries(function(e){if(e.get(`coordinateSystem`)===`polar`){var t=e.coordinateSystem=e.getReferringComponents(FQ,Tc).models[0].coordinateSystem;t&&(sO(t.getRadiusAxis(),e,PQ),sO(t.getAngleAxis(),e,PQ))}}),n}},ZQ=[`axisLine`,`axisLabel`,`axisTick`,`minorTick`,`splitLine`,`minorSplitLine`,`splitArea`];function QQ(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var r=e.coordToPoint([t[0],n]),i=e.coordToPoint([t[1],n]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function $Q(e){return+!e.getRadiusAxis().inverse}function e$(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var t$=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`PolarAxisPointer`,n}return t.prototype.render=function(e,t){if(this.group.removeAll(),e.get(`show`)){var n=e.axis,r=n.polar,i=r.getRadiusAxis().getExtent(),a=n.getTicksCoords({breakTicks:`none`}),o=n.getMinorTicksCoords(),s=[];F(n.getViewLabels(),function(e){if(!e.tick.offInterval){e=M(e);var t=n.scale;e.coord=n.dataToCoord(VD(t,e.tick)),s.push(e)}}),e$(s),e$(a),F(ZQ,function(t){e.get([t,`show`])&&(!n.scale.isBlank()||t===`axisLine`)&&n$[t](this.group,e,r,a,o,i,s)},this)}},t.type=`angleAxis`,t}(vL),n$={axisLine:function(e,t,n,r,i,a){var o=t.getModel([`axisLine`,`lineStyle`]),s=n.getAngleAxis(),c=Math.PI/180,l=s.getExtent(),u=$Q(n),d=+!u,f,p=Math.abs(l[1]-l[0])===360?`Circle`:`Arc`;f=a[d]===0?new zm[p]({shape:{cx:n.cx,cy:n.cy,r:a[u],startAngle:-l[0]*c,endAngle:-l[1]*c,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):new Zp({shape:{cx:n.cx,cy:n.cy,r:a[u],r0:a[d]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,e.add(f)},axisTick:function(e,t,n,r,i,a){var o=t.getModel(`axisTick`),s=(o.get(`inside`)?-1:1)*o.get(`length`),c=a[$Q(n)],l=I(r,function(e){return new om({shape:QQ(n,[c,c+s],e.coord)})});e.add(Xm(l,{style:P(o.getModel(`lineStyle`).getLineStyle(),{stroke:t.get([`axisLine`,`lineStyle`,`color`])})}))},minorTick:function(e,t,n,r,i,a){if(i.length){for(var o=t.getModel(`axisTick`),s=t.getModel(`minorTick`),c=(o.get(`inside`)?-1:1)*s.get(`length`),l=a[$Q(n)],u=[],d=0;dm?`left`:`right`,_=Math.abs(p[1]-h)/f<.3?`middle`:p[1]>h?`top`:`bottom`;if(s&&s[d]){var v=s[d];V(v)&&v.textStyle&&(o=new og(v.textStyle,c,c.ecModel))}var y=new Cd({silent:xP.isLabelSilent(t),style:Lh(o,{x:p[0],y:p[1],fill:o.getTextColor()||t.get([`axisLine`,`lineStyle`,`color`]),text:r.formattedLabel,align:g,verticalAlign:_})});if(e.add(y),_h({el:y,componentModel:t,itemName:r.formattedLabel,formatterParamsExtra:{isTruncated:function(){return y.isTruncated},value:r.rawLabel,tickIndex:i}}),u){var b=xP.makeAxisEventDataBase(t);b.targetType=`axisLabel`,b.value=r.rawLabel,Y(y).eventData=b}},this)},splitLine:function(e,t,n,r,i,a){var o=t.getModel(`splitLine`).getModel(`lineStyle`),s=o.get(`color`),c=0;s=s instanceof Array?s:[s];for(var l=[],u=0;u=0?`p`:`n`,T=y;_&&(r[a][C]||(r[a][C]={p:y,n:y}),T=r[a][C][w]);var E=void 0,D=void 0,O=void 0,k=void 0;if(u.dim===`radius`){var A=u.dataToCoord(S)-y,j=e.dataToCoord(C);is(A)=k})}}function f$(e,t){var n=$P(t,PQ),r=Mk(e,{fromStat:{key:n},min:1}).w,i=r,a=0,o=`20%`,s=`30%`,c={};$D(e,n,function(e){var t=c$(e);c[t]||a++,c[t]=c[t]||{width:0,maxWidth:0};var n=J(e.get(`barWidth`),r),l=J(e.get(`barMaxWidth`),r),u=e.get(`barGap`),d=e.get(`barCategoryGap`);n&&!c[t].width&&(n=ns(i,n),c[t].width=n,i-=n),l&&(c[t].maxWidth=l),u!=null&&(s=u),d!=null&&(o=d)});var l={},u=J(o,r),d=J(s,1),f=(i-u)/(a+(a-1)*d);f=rs(f,0),F(c,function(e,t){var n=e.maxWidth;n&&n=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},e.prototype.pointToData=function(e,t,n){n||=[];var r=this.getAxis();return n[0]=r.coordToData(r.toLocalCoord(e[r.orient===`horizontal`?0:1])),n},e.prototype.dataToPoint=function(e,t,n){var r=this.getAxis(),i=this.getRect();n||=[];var a=r.orient===`horizontal`?0:1;return e instanceof Array&&(e=e[0]),n[a]=r.toGlobalCoord(r.dataToCoord(+e)),n[1-a]=a===0?i.y+i.height/2:i.x+i.width/2,n},e.prototype.convertToPixel=function(e,t,n){return T$(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return T$(t)===this?this.pointToData(n):null},e}();function T$(e){var t=e.seriesModel,n=e.singleAxisModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function E$(e,t){var n=[];return e.eachComponent(jL,function(r,i){var a=new w$(r,e,t);a.name=`single_`+i,a.resize(r,t),r.coordinateSystem=a,n.push(a)}),e.eachSeries(function(e){if(e.get(`coordinateSystem`)===`singleAxis`){var t=e.getReferringComponents(jL,Tc).models[0],n=e.coordinateSystem=t&&t.coordinateSystem;n&&sO(n.getAxis(),e,AL)}}),n}var D$={create:E$,dimensions:C$},O$=[`x`,`y`],k$=[`width`,`height`],A$=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.coordinateSystem,s=M$(a),c=N$(o,s),l=N$(o,1-s),u=o.dataToPoint(t)[0],d=r.get(`type`);if(d&&d!==`none`){var f=WZ(r),p=j$[d](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);p.style=f,e.graphicKey=p.type,e.pointer=p}YZ(t,e,v$(n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=v$(t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=JZ(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.coordinateSystem,o=M$(i),s=N$(a,o),c=[e.x,e.y];c[o]+=t[o],c[o]=Math.min(s[1],c[o]),c[o]=Math.max(s[0],c[o]);var l=N$(a,1-o),u=(l[1]+l[0])/2,d=[u,u];return d[o]=c[o],{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:d,tooltipOption:{verticalAlign:`middle`}}},t}(RZ),j$={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:XZ([t,r[0]],[t,r[1]],M$(e))}},shadow:function(e,t,n,r,i,a){var o=$Z(e,i,a),s=r[1]-r[0],c=eQ(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:ZZ([l,r[0]],[u-l,s],M$(e))}}};function M$(e){return+!e.isHorizontal()}function N$(e,t){var n=e.getRect();return[n[O$[t]],n[O$[t]]+n[k$[t]]]}var P$=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`single`,t}(vx);function F$(e){MT(kQ),vL.registerAxisPointerClass(`SingleAxisPointer`,A$),e.registerComponentView(P$),e.registerComponentView(b$),e.registerComponentModel(ML),II(e,`single`,ML,ML.defaultOption),e.registerCoordinateSystem(`single`,D$)}var I$=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t,n,r){var i=Q_(t);e.prototype.init.apply(this,arguments),L$(t,i)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),L$(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type=`calendar`,t.layoutMode=`box`,t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:`horizontal`,splitLine:{show:!0,lineStyle:{color:Z.color.axisLine,width:1,type:`solid`}},itemStyle:{color:Z.color.neutral00,borderWidth:1,borderColor:Z.color.neutral10},dayLabel:{show:!0,firstDay:0,position:`start`,margin:Z.size.s,color:Z.color.secondary},monthLabel:{show:!0,position:`start`,margin:Z.size.s,align:`center`,formatter:null,color:Z.color.secondary},yearLabel:{show:!0,position:null,margin:Z.size.xl,formatter:null,color:Z.color.quaternary,fontFamily:`sans-serif`,fontWeight:`bolder`,fontSize:20}},t}(tv);function L$(e,t){var n=e.cellSize,r=R(n)?n:e.cellSize=[n,n];r.length===1&&(r[1]=r[0]),Z_(e,t,{type:`box`,ignoreSize:I([0,1],function(e){return Y_(t,e)&&(r[e]=`auto`),r[e]!=null&&r[e]!==`auto`})})}var R$=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=this.group;r.removeAll();var i=e.coordinateSystem,a=i.getRangeInfo(),o=i.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,a,r),this._renderLines(e,a,o,r),this._renderYearText(e,a,o,r),this._renderMonthText(e,s,o,r),this._renderWeekText(e,s,a,o,r)},t.prototype._renderDayRect=function(e,t,n){for(var r=e.coordinateSystem,i=e.getModel(`itemStyle`).getItemStyle(),a=r.getCellWidth(),o=r.getCellHeight(),s=t.start.time;s<=t.end.time;s=r.getNextNDay(s,1).time){var c=r.dataToCalendarLayout([s],!1).tl,l=new vd({shape:{x:c[0],y:c[1],width:a,height:o},cursor:`default`,style:i});n.add(l)}},t.prototype._renderLines=function(e,t,n,r){var i=this,a=e.coordinateSystem,o=e.getModel([`splitLine`,`lineStyle`]).getLineStyle(),s=e.get([`splitLine`,`show`]),c=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var l=t.start,u=0;l.time<=t.end.time;u++){f(l.formatedDate),u===0&&(l=a.getDateInfo(t.start.y+`-`+t.start.m));var d=l.date;d.setMonth(d.getMonth()+1),l=a.getDateInfo(d)}f(a.getNextNDay(t.end.time,1).formatedDate);function f(t){i._firstDayOfMonth.push(a.getDateInfo(t)),i._firstDayPoints.push(a.dataToCalendarLayout([t],!1).tl);var c=i._getLinePointsOfOneWeek(e,t,n);i._tlpoints.push(c[0]),i._blpoints.push(c[c.length-1]),s&&i._drawSplitline(c,o,r)}s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,c,n),o,r),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,c,n),o,r)},t.prototype._getEdgesPoints=function(e,t,n){var r=[e[0].slice(),e[e.length-1].slice()],i=n===`horizontal`?0:1;return r[0][i]=r[0][i]-t/2,r[1][i]=r[1][i]+t/2,r},t.prototype._drawSplitline=function(e,t,n){var r=new rm({z2:20,shape:{points:e},style:t});n.add(r)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var r=e.coordinateSystem,i=r.getDateInfo(t),a=[],o=0;o<7;o++){var s=r.getNextNDay(i.time,o),c=r.dataToCalendarLayout([s.time],!1);a[2*s.day]=c.tl,a[2*s.day+1]=c[n===`horizontal`?`bl`:`tr`]}return a},t.prototype._formatterLabel=function(e,t){return B(e)&&e?b_(e,t):z(e)?e(t):t.nameMap},t.prototype._yearTextPositionControl=function(e,t,n,r,i){var a=t[0],o=t[1],s=[`center`,`bottom`];r===`bottom`?(o+=i,s=[`center`,`top`]):r===`left`?a-=i:r===`right`?(a+=i,s=[`center`,`top`]):o-=i;var c=0;return(r===`left`||r===`right`)&&(c=Math.PI/2),{rotation:c,x:a,y:o,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,n,r){var i=e.getModel(`yearLabel`);if(i.get(`show`)){var a=i.get(`margin`),o=i.get(`position`);o||=n===`horizontal`?`left`:`top`;var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(s[0][0]+s[1][0])/2,l=(s[0][1]+s[1][1])/2,u=n===`horizontal`?0:1,d={top:[c,s[u][1]],bottom:[c,s[1-u][1]],left:[s[1-u][0],l],right:[s[u][0],l]},f=t.start.y;+t.end.y>+t.start.y&&(f=f+`-`+t.end.y);var p=i.get(`formatter`),m={start:t.start.y,end:t.end.y,nameMap:f},h=new Cd({z2:30,style:Lh(i,{text:this._formatterLabel(p,m)}),silent:i.get(`silent`)});h.attr(this._yearTextPositionControl(h,d[o],n,o,a)),r.add(h)}},t.prototype._monthTextPositionControl=function(e,t,n,r,i){var a=`left`,o=`top`,s=e[0],c=e[1];return n===`horizontal`?(c+=i,t&&(a=`center`),r===`start`&&(o=`bottom`)):(s+=i,t&&(o=`middle`),r===`start`&&(a=`right`)),{x:s,y:c,align:a,verticalAlign:o}},t.prototype._renderMonthText=function(e,t,n,r){var i=e.getModel(`monthLabel`);if(i.get(`show`)){var a=i.get(`nameMap`),o=i.get(`margin`),s=i.get(`position`),c=i.get(`align`),l=[this._tlpoints,this._blpoints];(!a||B(a))&&(a&&(t=Sg(a)||t),a=t.get([`time`,`monthAbbr`])||[]);var u=s===`start`?0:1,d=n===`horizontal`?0:1;o=s===`start`?-o:o;for(var f=c===`center`,p=i.get(`silent`),m=0;m=i.start.time&&r.timeo.end.time&&t.reverse(),t},e.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var r=Math.floor(t[1].time/z$)-Math.floor(t[0].time/z$)+1,i=new Date(t[0].time),a=i.getDate(),o=t[1].date.getDate();i.setDate(a+r-1);var s=i.getDate();if(s!==o)for(var c=i.getTime()-t[1].time>0?1:-1;(s=i.getDate())!==o&&(i.getTime()-t[1].time)*c>0;)r-=c,i.setDate(s-c);var l=Math.floor((r+t[0].day+6)/7),u=n?-l+1:l-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var r=this._getRangeInfo(n);if(e>r.weeks||e===0&&tr.lweek)return null;var i=(e-1)*7-r.fweek+t,a=new Date(r.start.time);return a.setDate(+r.start.d+i),this.getDateInfo(a)},e.create=function(t,n){var r=[];return t.eachComponent(`calendar`,function(i){var a=new e(i,t,n);r.push(a),i.coordinateSystem=a}),t.eachComponent(function(e,t){P_({targetModel:t,coordSysType:`calendar`,coordSysProvider:F_})}),r},e.dimensions=[`time`,`value`],e}();function V$(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function H$(e){e.registerComponentModel(I$),e.registerComponentView(R$),e.registerCoordinateSystem(`calendar`,B$)}var U$={level:1,leaf:2,nonLeaf:3},W$={none:0,all:1,body:2,corner:3};function G$(e,t,n){var r=t[X[n]].getCell(e);return!r&&Re(e)&&e<0&&(r=t[X[1-n]].getUnitLayoutInfo(n,Math.round(e))),r}function K$(e){var t=e||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function q$(e,t,n,r,i){J$(e[0],t,i,n,r,0),J$(e[1],t,i,n,r,1)}function J$(e,t,n,r,i,a){e[0]=1/0,e[1]=-1/0;var o=r[a],s=R(o)?o:[o],c=s.length,l=!!n;if(c>=1?(Y$(e,t,s,l,i,a,0),c>1&&Y$(e,t,s,l,i,a,c-1)):e[0]=e[1]=NaN,l){var u=-i[X[1-a]].getLocatorCount(a),d=i[X[a]].getLocatorCount(a)-1;n===W$.body?u=rs(0,u):n===W$.corner&&(d=ns(-1,d)),d=t[0]&&e[0]<=t[1]}function t1(e,t){e.id.set(t[0][0],t[1][0]),e.span.set(t[0][1]-e.id.x+1,t[1][1]-e.id.y+1)}function n1(e,t){e[0][0]=t[0][0],e[0][1]=t[0][1],e[1][0]=t[1][0],e[1][1]=t[1][1]}function r1(e,t,n,r){var i=G$(t[r][0],n,r),a=G$(t[r][1],n,r);e[X[r]]=e[Vm[r]]=NaN,i&&a&&(e[X[r]]=i.xy,e[Vm[r]]=a.xy+a.wh-i.xy)}function i1(e,t,n,r){return e[X[t]]=n,e[X[1-t]]=r,e}function a1(e){return e&&(e.type===U$.leaf||e.type===U$.nonLeaf)?e:null}function o1(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var s1=function(){function e(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e===`x`?0:1,this._model=t,this._uniqueValueGen=c1(e);var n=t.get(`data`,!0),r=t.get(`length`,!0);if(n!=null&&!R(n)&&(n=[]),n)this._initByDimModelData(n);else if(r!=null){n=Array(r);for(var i=0;i=1,y=n[X[r]],b=a.getLocatorCount(r)-1,x=new Pc;for(o.resetLayoutIterator(x,r);x.next();)S(x.item);for(a.resetLayoutIterator(x,r);x.next();)S(x.item);function S(e){Ge(e.wh)&&(e.wh=_),e.xy=y,e.id[X[r]]===b&&!v&&(e.wh=n[X[r]]+n[Vm[r]]-e.xy),y+=e.wh}}function R1(e,t){for(var n=t[X[e]].resetCellIterator();n.next();){var r=n.item;B1(r.rect,e,r.id,r.span,t),B1(r.rect,1-e,r.id,r.span,t),r.type===U$.nonLeaf&&(r.xy=r.rect[X[e]],r.wh=r.rect[Vm[e]])}}function z1(e,t){e.travelExistingCells(function(e){var n=e.span;if(n){var r=e.spanRect,i=e.id;B1(r,0,i,n,t),B1(r,1,i,n,t)}})}function B1(e,t,n,r,i){e[Vm[t]]=0;var a=n[X[t]]<0?i[X[1-t]]:i[X[t]],o=a.getUnitLayoutInfo(t,n[X[t]]);if(e[X[t]]=o.xy,e[Vm[t]]=o.wh,r[X[t]]>1){var s=a.getUnitLayoutInfo(t,n[X[t]]+r[X[t]]-1);e[Vm[t]]=s.xy+s.wh-o.xy}}function V1(e,t,n){return H1(hs(e,n[Vm[t]]),n[Vm[t]])}function H1(e,t){return Math.max(Math.min(e,H(t,1/0)),0)}function U1(e){var t=e.matrixModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}var W1={inBody:1,inCorner:2,outside:3},G1={x:null,y:null,point:[]};function K1(e,t,n,r,i){var a=n[X[t]],o=n[X[1-t]],s=a.getUnitLayoutInfo(t,a.getLocatorCount(t)-1),c=a.getUnitLayoutInfo(t,0),l=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),u=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,d=e.point[t]=r[t];if(!c&&!u){e[X[t]]=W1.outside;return}if(i===W$.body){c?(e[X[t]]=W1.inBody,d=ns(s.xy+s.wh,rs(c.xy,d)),e.point[t]=d):e[X[t]]=W1.outside;return}else if(i===W$.corner){u?(e[X[t]]=W1.inCorner,d=ns(u.xy+u.wh,rs(l.xy,d)),e.point[t]=d):e[X[t]]=W1.outside;return}var f=c?c.xy:u?u.xy+u.wh:NaN,p=l?l.xy:f,m=s?s.xy+s.wh:f;if(dm){if(!i){e[X[t]]=W1.outside;return}d=m}e.point[t]=d,e[X[t]]=f<=d&&d<=m?W1.inBody:p<=d&&d<=f?W1.inCorner:W1.outside}function q1(e,t,n,r){var i=1-n;if(e[X[n]]!==W1.outside)for(r[X[n]].resetCellIterator(I1);I1.next();){var a=I1.item;if(X1(e.point[n],a.rect,n)&&X1(e.point[i],a.rect,i)){t[n]=a.ordinal,t[i]=a.id[X[i]];return}}}function J1(e,t,n,r){if(e[X[n]]!==W1.outside){for((e[X[n]]===W1.inCorner?r[X[1-n]]:r[X[n]]).resetLayoutIterator(F1,n);F1.next();)if(Y1(e.point[n],F1.item)){t[n]=F1.item.id[X[n]];return}}}function Y1(e,t){return t.xy<=e&&e<=t.xy+t.wh}function X1(e,t,n){return t[X[n]]<=e&&e<=t[X[n]]+t[Vm[n]]}function Z1(e){e.registerComponentModel(g1),e.registerComponentView(C1),e.registerCoordinateSystem(`matrix`,N1)}function Q1(e,t){var n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),t.parentId==null){var r=t.parentOption;r?t.parentId=r.id:n&&(t.parentId=n.parentId)}t.parentOption=null}function $1(e,t){var n;return F(t,function(t){e[t]!=null&&e[t]!==`auto`&&(n=!0)}),n}function e0(e,t,n){var r=N({},n),i=e[t],a=n.$action||`merge`;a===`merge`?i?(Ce(i,r,!0),Z_(i,r,{ignoreSize:!0}),$_(n,i),r0(n,i),r0(n,i,`shape`),r0(n,i,`style`),r0(n,i,`extra`),n.clipPath=i.clipPath):e[t]=r:a===`replace`?e[t]=r:a===`remove`&&i&&(e[t]=null)}var t0=[`transition`,`enterFrom`,`leaveTo`],n0=t0.concat([`enterAnimation`,`updateAnimation`,`leaveAnimation`]);function r0(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),!(!e||!t))for(var r=n?t0:n0,i=0;i=0;c--){var l=n[c],u=pc(l.id,null),d=u==null?null:i.get(u);if(d){var f=d.parent,h=s0(f),g=f===r?{width:a,height:o}:{width:h.width,height:h.height},_={},v=J_(d,l,g,null,{hv:l.hv,boundingMode:l.bounding},_);if(!s0(d).isNew&&v){for(var y=l.transition,b={},x=0;x=0)?b[S]=C:d[S]=C}jm(d,b,e,0)}else d.attr(_)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each(function(n){d0(n,s0(n).option,t,e._lastGraphicModel)}),this._elMap=U()},t.prototype.dispose=function(){this._clear()},t.type=`graphic`,t}(vx);function l0(e){var t=new(W(o0,e)?o0[e]:Km(e))({});return s0(t).type=e,t}function u0(e,t,n,r){var i=l0(n);return t.add(i),r.set(e,i),s0(i).id=e,s0(i).isNew=!0,i}function d0(e,t,n,r){e&&e.parent&&(e.type===`group`&&e.traverse(function(e){d0(e,t,n,r)}),MX(e,t,r),n.removeKey(s0(e).id))}function f0(e,t,n,r){e.isGroup||F([[`cursor`,Xl.prototype.cursor],[`zlevel`,r||0],[`z`,n||0],[`z2`,0]],function(n){var r=n[0];W(t,r)?e[r]=H(t[r],n[1]):e[r]??(e[r]=n[1])}),F(Pe(t),function(n){if(n.indexOf(`on`)===0){var r=t[n];e[n]=z(r)?r:null}}),W(t,`draggable`)&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function p0(e){return e=N({},e),F([`id`,`parentId`,`$action`,`hv`,`bounding`,`textContent`,`clipPath`].concat(L_),function(t){delete e[t]}),e}function m0(e,t,n){var r=Y(e).eventData;!e.silent&&!e.ignore&&!r&&(r=Y(e).eventData={componentType:`graphic`,componentIndex:t.componentIndex,name:e.name}),r&&(r.info=n.info)}function h0(e){e.registerComponentModel(a0),e.registerComponentView(c0),e.registerPreprocessor(function(e){var t=e.graphic;R(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var g0=[`x`,`y`,`radius`,`angle`,`single`],_0=xc(),v0=[`cartesian2d`,`polar`,`singleAxis`];function y0(e){return De(v0,e.get(`coordinateSystem`))>=0}function b0(e){return e+`Axis`}function x0(e,t){var n=U(),r=[],i=U();e.eachComponent({mainType:`dataZoom`,query:t},function(e){i.get(e.uid)||s(e)});var a;do a=!1,e.eachComponent(`dataZoom`,o);while(a);function o(e){!i.get(e.uid)&&c(e)&&(s(e),a=!0)}function s(e){i.set(e.uid,!0),r.push(e),l(e)}function c(e){var t=!1;return e.eachTargetAxis(function(e,r){var i=n.get(e);i&&i[r]&&(t=!0)}),t}function l(e){e.eachTargetAxis(function(e,t){(n.get(e)||n.set(e,[]))[t]=!0})}return r}function S0(e){var t=e.ecModel,n={infoList:[],infoMap:U()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(b0(e),r);if(i){var a=i.getCoordSysModel();if(a){var o=a.uid,s=n.infoMap.get(o);s||(s={model:a,axisModels:[]},n.infoList.push(s),n.infoMap.set(o,s)),s.axisModels.push(i)}}}),n}function C0(e){var t=_0(NS(e));return t.axisProxyMap||=U()}function w0(e){if(e)return C0(e.ecModel).get(e.uid)}function T0(e,t){C0(e.ecModel).set(e.uid,t)}function E0(e,t){var n=t.getAxisModel().axis.__alignTo;return n&&e.getAxisProxy(n.dim,n.model.componentIndex)?w0(n.model):null}var D0=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),O0=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=[`percent`,`percent`],n}return t.prototype.init=function(e,t,n){var r=k0(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=k0(e);Ce(this.option,e,!0),Ce(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;F([[`start`,`startValue`],[`end`,`endValue`]],function(e,r){this._rangePropMode[r]===`value`&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get(`orient`,!0),t=this._targetAxisInfoMap=U();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||`horizontal`,this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return F(g0,function(n){var r=this.getReferringComponents(b0(n),Ec);if(r.specified){t=!0;var i=new D0;F(r.models,function(e){i.add(e.componentIndex)}),e.set(n,i)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i=t===`vertical`?`y`:`x`,a=n.findComponents({mainType:i+`Axis`});o(a,i)}if(r){var a=n.findComponents({mainType:`singleAxis`,filter:function(e){return e.get(`orient`,!0)===t}});o(a,`single`)}function o(t,n){var i=t[0];if(i){var a=new D0;if(a.add(i.componentIndex),e.set(n,a),r=!1,n===`x`||n===`y`){var o=i.getReferringComponents(`grid`,Tc).models[0];o&&F(t,function(e){i.componentIndex!==e.componentIndex&&o===e.getReferringComponents(`grid`,Tc).models[0]&&a.add(e.componentIndex)})}}}r&&F(g0,function(t){if(r){var i=n.findComponents({mainType:b0(t),filter:function(e){return e.get(`type`,!0)===`category`}});if(i[0]){var a=new D0;a.add(i[0].componentIndex),e.set(t,a),r=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){!e&&(e=t)},this),e===`y`?`vertical`:`horizontal`},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty(`throttle`)&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get(`rangeMode`);F([[`start`,`startValue`],[`end`,`endValue`]],function(r,i){var a=e[r[0]]!=null,o=e[r[1]]!=null;a&&!o?t[i]=`percent`:!a&&o?t[i]=`value`:n?t[i]=n[i]:a&&(t[i]=`percent`)})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){e??=this.ecModel.getComponent(b0(t),n)},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){F(n.indexList,function(n){e.call(t,r,n)})})},t.prototype.getAxisProxy=function(e,t){return w0(this.getAxisModel(e,t))},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(b0(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;F([[`start`,`startValue`],[`end`,`endValue`]],function(r){(e[r[0]]!=null||e[r[1]]!=null)&&(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;F([`start`,`startValue`,`end`,`endValue`],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent},t.prototype.getValueRange=function(e,t){if(e==null&&t==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getWindow().value}else return this.getAxisProxy(e,t).getWindow().value},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return w0(e);for(var t,n=this._targetAxisInfoMap.keys(),r=0;ra[1];if(u&&!d&&!f)return!0;u&&(i=!0),d&&(t=!0),f&&(n=!0)}return i&&t&&n})}else F(r,function(n){if(i===`empty`)e.setData(t=t.map(n,function(e){return o(e)?e:NaN}));else{var r={};r[n]=a,t.selectRange(r)}});F(r,function(e){t.setApproximateExtent(a,e)})}});function o(e){return e>=a[0]&&e<=a[1]}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._extent;F([`min`,`max`],function(r){var i=t.get(r+`Span`),a=t.get(r+`ValueSpan`);a!=null&&(a=this.getAxisModel().axis.scale.parse(a)),a==null?i!=null&&(a=ps(i,[0,100],n,!0)-n[0]):i=ps(n[0]+a,n,[0,100],!0),e[r+`Span`]=i,e[r+`ValueSpan`]=a},this)},e}(),P0={dirtyOnOverallProgress:!0,getTargetSeries:function(e){function t(t){e.eachComponent(`dataZoom`,function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(b0(r),i),n)})})}var n=[];t(function(t,r,i,a){if(!w0(i)){var o=new N0(t,r,a,e);n.push(o),T0(i,o)}});var r=U();return F(n,function(e){F(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset:function(e,t){e.eachComponent(`dataZoom`,function(e){var n=[];e.eachTargetAxis(function(t,r){var i=e.getAxisProxy(t,r),a=E0(e,i);a?n.push([i,a]):i.reset(e,null)}),F(n,function(t){t[0].reset(e,t[1].getWindow().percentInverted)}),e.eachTargetAxis(function(n,r){e.getAxisProxy(n,r).filterData(e,t)})}),e.eachComponent(`dataZoom`,function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getWindow(),r=n.percent,i=n.value;e.setCalculatedRange({start:r[0],end:r[1],startValue:i[0],endValue:i[1]})}})}};function F0(e){e.registerAction(`dataZoom`,function(e,t){F(x0(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var I0=Gc();function L0(e){I0(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,P0),F0(e),e.registerSubTypeDefaulter(`dataZoom`,function(){return`slider`})})}function R0(e){e.registerComponentModel(A0),e.registerComponentView(M0),L0(e)}var z0=function(){function e(){}return e}(),B0={};function V0(e,t){B0[e]=t}function H0(e){return B0[e]}var U0=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t,n,r){var i=r.getTheme().get(`toolbox`),a=i?i.feature:null;a&&(this._themeFeatureOption=N({},a),i.feature={}),e.prototype.init.call(this,t,n,r),a&&(i.feature=a)},t.prototype.optionUpdated=function(){F(this.option.feature,function(e,t){var n=this._themeFeatureOption,r=H0(t);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(this.ecModel)),n&&n[t]&&(Ce(e,n[t]),n[t]=null),Ce(e,r.defaultOption))},this)},t.type=`toolbox`,t.layoutMode={type:`box`,ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:`horizontal`,left:`right`,top:`top`,backgroundColor:`transparent`,borderColor:Z.color.border,borderRadius:0,borderWidth:0,padding:Z.size.m,itemSize:15,itemGap:Z.size.s,showTitle:!0,iconStyle:{borderColor:Z.color.accent50,color:`none`},emphasis:{iconStyle:{borderColor:Z.color.accent70}},tooltip:{show:!1,position:`bottom`}},t}(tv);function W0(e,t){var n=h_(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new vd({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var G0=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n,r){var i=this.group;if(i.removeAll(),!e.get(`show`))return;var a=+e.get(`itemSize`),o=e.get(`orient`)===`vertical`,s=e.get(`feature`)||{},c=this._features||=U(),l=[];F(s,function(e,t){l.push(t)}),new FT(this._featureNames||[],l).add(u).update(u).remove(Ie(u,null)).execute(),this._featureNames=Me(l,function(e){return c.hasKey(e)});function u(i,a){var o=i!=null&&a==null,u=i!=null&&a!=null,f=i==null,p=o||u?l[i]:l[a],m=s[p],h=o||u?new og(m,e,t):null,g=h&&h.get(`show`),_;if(o){if(!g)return;if(K0(p))_={onclick:h.option.onclick,featureName:p};else{var v=H0(p);if(!v)return;_=new v}c.set(p,_)}else _=c.get(p);if(f||!g){q0(_)&&_.dispose&&_.dispose(t,n),c.removeKey(p);return}r&&r.newTitle!=null&&r.featureName===p&&(m.title=r.newTitle),o&&(_.uid=cg(`toolbox-feature`)),_.model=h,_.ecModel=t,_.api=n,d(h,_,p),h.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&(t===`emphasis`?kf:Af)(r[e])},q0(_)&&_.render&&_.render(h,t,n,r)}function d(r,s,c){var l=r.getModel(`iconStyle`),u=r.getModel([`emphasis`,`iconStyle`]),d=s instanceof z0&&s.getIcons?s.getIcons():r.get(`icon`),f=r.get(`title`)||{},p,m;B(d)?(p={},p[c]=d):p=d,B(f)?(m={},m[c]=f):m=f;var h=r.iconPaths={};F(p,function(c,d){var f=lh(c,{},{x:-a/2,y:-a/2,width:a,height:a});f.setStyle(l.getItemStyle());var p=f.ensureState(`emphasis`);p.style=u.getItemStyle();var g=new Cd({style:{text:m[d],align:u.get(`textAlign`),borderRadius:u.get(`textBorderRadius`),padding:u.get(`textPadding`),fill:null,font:Gh({fontStyle:u.get(`textFontStyle`),fontFamily:u.get(`textFontFamily`),fontSize:u.get(`textFontSize`),fontWeight:u.get(`textFontWeight`)},t)},ignore:!0});f.setTextContent(g),_h({el:f,componentModel:e,itemName:d,formatterParamsExtra:{title:m[d]}}),f.__title=m[d],f.on(`mouseover`,function(){var t=u.getItemStyle(),r=o?e.get(`right`)==null&&e.get(`left`)!==`right`?`right`:`left`:e.get(`bottom`)==null&&e.get(`top`)!==`bottom`?`bottom`:`top`;g.setStyle({fill:u.get(`textFill`)||t.fill||t.stroke||Z.color.neutral99,backgroundColor:u.get(`textBackgroundColor`)}),f.setTextConfig({position:u.get(`textPosition`)||r}),g.ignore=!e.get(`showTitle`),n.enterEmphasis(this)}).on(`mouseout`,function(){r.get([`iconStatus`,d])!==`emphasis`&&n.leaveEmphasis(this),g.hide()}),(r.get([`iconStatus`,d])===`emphasis`?kf:Af)(f),i.add(f),f.on(`click`,L(s.onclick,s,t,n,d)),h[d]=f})}var f=q_(e,n).refContainer,p=e.getBoxLayoutParams(),m=e.get(`padding`),h=W_(p,f,m);B_(e.get(`orient`),i,e.get(`itemGap`),h.width,h.height),J_(i,p,f,m),i.add(W0(i.getBoundingRect(),e)),o||i.eachChild(function(e){var t=e.__title,r=e.ensureState(`emphasis`),o=r.textConfig||={},s=e.getTextContent(),c=s&&s.ensureState(`emphasis`);if(c&&!z(c)&&t){var l=c.style||={},u=ho(t,Cd.makeFont(l)),d=e.x+i.x,f=e.y+i.y+a,p=!1;f+u.height>n.getHeight()&&(o.position=`top`,p=!0);var m=p?-5-u.height:a+10;d+u.width/2>n.getWidth()?(o.position=[`100%`,m],l.align=`right`):d-u.width/2<0&&(o.position=[0,m],l.align=`left`)}})},t.prototype.updateView=function(e,t,n,r){F(this._features,function(e){e&&e instanceof z0&&e.updateView&&e.updateView(e.model,t,n,r)})},t.prototype.dispose=function(e,t){F(this._features,function(n){n&&n instanceof z0&&n.dispose&&n.dispose(e,t)})},t.type=`toolbox`,t}(vx);function K0(e){return e.indexOf(`my`)===0}function q0(e){return e instanceof z0}var J0=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(e,t){var n=this.model,r=n.get(`name`)||e.get(`title.0.text`)||`echarts`,i=t.getZr().painter.getType()===`svg`,a=i?`svg`:n.get(`type`,!0)||`png`,o=t.getConnectedDataURL({type:a,backgroundColor:n.get(`backgroundColor`,!0)||e.get(`backgroundColor`)||Z.color.neutral00,connectedBackgroundColor:n.get(`connectedBackgroundColor`),excludeComponents:n.get(`excludeComponents`),pixelRatio:n.get(`pixelRatio`)}),s=k.browser;if(typeof MouseEvent==`function`&&(s.newEdge||!s.ie&&!s.edge)){var c=document.createElement(`a`);c.download=r+`.`+a,c.target=`_blank`,c.href=o;var l=new MouseEvent(`click`,{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(l)}else if(window.navigator.msSaveOrOpenBlob||i){var u=o.split(`,`),d=u[0].indexOf(`base64`)>-1,f=i?decodeURIComponent(u[1]):u[1];d&&(f=window.atob(f));var p=r+`.`+a;if(window.navigator.msSaveOrOpenBlob){for(var m=f.length,h=new Uint8Array(m);m--;)h[m]=f.charCodeAt(m);var g=new Blob([h]);window.navigator.msSaveOrOpenBlob(g,p)}else{var _=document.createElement(`iframe`);document.body.appendChild(_);var v=_.contentWindow,y=v.document;y.open(`image/svg+xml`,`replace`),y.write(f),y.close(),v.focus(),y.execCommand(`SaveAs`,!0,p),document.body.removeChild(_)}}else{var b=n.get(`lang`),x=``,S=window.open();S.document.write(x),S.document.title=r}},t.getDefaultOption=function(e){return{show:!0,icon:`M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0`,title:e.getLocaleModel().get([`toolbox`,`saveAsImage`,`title`]),type:`png`,connectedBackgroundColor:Z.color.neutral00,name:``,excludeComponents:[`toolbox`],lang:e.getLocaleModel().get([`toolbox`,`saveAsImage`,`lang`])}},t}(z0),Y0=`__ec_magicType_stack__`,X0=[[`line`,`bar`],[`stack`]],Z0=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,t=e.get(`icon`),n={};return F(e.get(`type`),function(e){t[e]&&(n[e]=t[e])}),n},t.getDefaultOption=function(e){return{show:!0,type:[],icon:{line:`M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4`,bar:`M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7`,stack:`M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z`},title:e.getLocaleModel().get([`toolbox`,`magicType`,`title`]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,t,n){var r=this.model,i=r.get([`seriesIndex`,n]);if(Q0[n]){var a={series:[]};F(X0,function(e){De(e,n)>=0&&F(e,function(e){r.setIconStatus(e,`normal`)})}),r.setIconStatus(n,`emphasis`),e.eachComponent({mainType:`series`,query:i==null?null:{seriesIndex:i}},function(e){var t=e.subType,i=e.id,o=Q0[n](t,i,e,r);o&&(P(o,e.option),a.series.push(o));var s=e.coordinateSystem;if(s&&s.type===`cartesian2d`&&(n===`line`||n===`bar`)){var c=s.getAxesByScale(`ordinal`)[0];if(c){var l=c.dim+`Axis`,u=e.getReferringComponents(l,Tc).models[0].componentIndex;a[l]=a[l]||[];for(var d=0;d<=u;d++)a[l][u]=a[l][u]||{};a[l][u].boundaryGap=n===`bar`}}});var o,s=n;n===`stack`&&(o=Ce({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),r.get([`iconStatus`,n])!==`emphasis`&&(s=`tiled`)),t.dispatchAction({type:`changeMagicType`,currentType:s,newOption:a,newTitle:o,featureName:`magicType`})}},t}(z0),Q0={line:function(e,t,n,r){if(e===`bar`)return Ce({id:t,type:`line`,data:n.get(`data`),stack:n.get(`stack`),markPoint:n.get(`markPoint`),markLine:n.get(`markLine`)},r.get([`option`,`line`])||{},!0)},bar:function(e,t,n,r){if(e===`line`)return Ce({id:t,type:`bar`,data:n.get(`data`),stack:n.get(`stack`),markPoint:n.get(`markPoint`),markLine:n.get(`markLine`)},r.get([`option`,`bar`])||{},!0)},stack:function(e,t,n,r){var i=n.get(`stack`)===Y0;if(e===`line`||e===`bar`)return r.setIconStatus(`stack`,i?`normal`:`emphasis`),Ce({id:t,stack:i?``:Y0},r.get([`option`,`stack`])||{},!0)}};hT({type:`changeMagicType`,event:`magicTypeChanged`,update:`prepareAndUpdate`},function(e,t){t.mergeOption(e.newOption)});var $0=Array(60).join(`-`),e2=` `;function t2(e){var t={},n=[],r=[];return e.eachRawSeries(function(e){var i=e.coordinateSystem;if(i&&(i.type===`cartesian2d`||i.type===`polar`)){var a=i.getBaseAxis();if(a.type===`category`){var o=qP(a);t[o]||(t[o]={categoryAxis:a,valueAxis:i.getOtherAxis(a),series:[]},r.push({axisDim:a.dim,axisIndex:a.index})),t[o].series.push(e)}else n.push(e)}else n.push(e)}),{seriesGroupByCategoryAxis:t,other:n,meta:r}}function n2(e){var t=[];return F(e,function(e,n){var r=e.categoryAxis,i=e.valueAxis.dim,a=[` `].concat(I(e.series,function(e){return e.name})),o=[r.model.getCategories()];F(e.series,function(e){var t=e.getRawData();o.push(e.getRawData().mapArray(t.mapDimension(i),function(e){return e}))});for(var s=[a.join(e2)],c=0;c=0)return!0}var s2=RegExp(`[`+e2+`]+`,`g`);function c2(e){for(var t=e.split(/\n+/g),n=a2(t.shift()).split(s2),r=[],i=I(n,function(e){return{name:e,data:[]}}),a=0;a=0&&!n[i][r];i--);if(i<0){var a=e.queryComponents({mainType:`dataZoom`,subType:`select`,id:r})[0];if(a){var o=a.getPercentRange();n[0][r]={dataZoomId:r,start:o[0],end:o[1]}}}}),n.push(t)}function g2(e){var t=y2(e),n=t[t.length-1];t.length>1&&t.pop();var r={};return p2(n,function(e,n){for(var i=t.length-1;i>=0;i--)if(e=t[i][n],e){r[n]=e;break}}),r}function _2(e){m2(e).snapshots=null}function v2(e){return y2(e).length}function y2(e){var t=m2(e);return t.snapshots||=[{}],t.snapshots}var b2=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(e,t){_2(e),t.dispatchAction({type:`restore`,from:this.uid})},t.getDefaultOption=function(e){return{show:!0,icon:`M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5`,title:e.getLocaleModel().get([`toolbox`,`restore`,`title`])}},t}(z0);hT({type:`restore`,event:`restore`,update:`prepareAndUpdate`},function(e,t){t.resetOption(`recreate`)});var x2=[`grid`,`xAxis`,`yAxis`,`geo`,`graph`,`polar`,`radiusAxis`,`angleAxis`,`bmap`],S2=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=w2(t,e);F(T2,function(e,t){(!n||!n.include||De(n.include,t)>=0)&&e(i,r._targetInfoList)})}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(e,t,n){if((e.coordRanges||=[]).push(t),!e.coordRange){e.coordRange=t;var r=O2[e.brushType](0,n,t);e.__rangeOffset={offset:A2[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}}),e},e.prototype.matchOutputRanges=function(e,t,n){F(e,function(e){var r=this.findTargetInfo(e,t);r&&r!==!0&&F(r.coordSyses,function(r){n(e,O2[e.brushType](1,r,e.range,!0).values,r,t)})},this)},e.prototype.setInputRanges=function(e,t){F(e,function(e){var n=this.findTargetInfo(e,t);if(e.range=e.range||[],n&&n!==!0){e.panelId=n.panelId;var r=O2[e.brushType](0,n.coordSys,e.coordRange),i=e.__rangeOffset;e.range=i?A2[e.brushType](r.values,i.offset,M2(r.xyMinMax,i.xyMinMax)):r.values}},this)},e.prototype.makePanelOpts=function(e,t){return I(this._targetInfoList,function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:JK(r),isTargetByCursor:XK(r,e,n.coordSysModel),getLinearBrushOtherExtent:YK(r)}})},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return r===!0||r&&De(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=w2(t,e),i=0;ie[1]&&e.reverse(),e}function w2(e,t){return Cc(e,t,{includeMainTypes:x2})}var T2={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,a=U(),o={},s={};!n&&!r&&!i||(F(n,function(e){var t=e.axis.grid.model;a.set(t.id,t),o[t.id]=!0}),F(r,function(e){var t=e.axis.grid.model;a.set(t.id,t),s[t.id]=!0}),F(i,function(e){a.set(e.id,e),o[e.id]=!0,s[e.id]=!0}),a.each(function(e){var i=e.coordinateSystem,a=[];F(i.getCartesians(),function(e,t){(De(n,e.getAxis(`x`).model)>=0||De(r,e.getAxis(`y`).model)>=0)&&a.push(e)}),t.push({panelId:`grid--`+e.id,gridModel:e,coordSysModel:e,coordSys:a[0],coordSyses:a,getPanelRect:D2.grid,xAxisDeclared:o[e.id],yAxisDeclared:s[e.id]})}))},geo:function(e,t){F(e.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:`geo--`+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:D2.geo})})}},E2=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],D2={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys.view,t=Sz(null,e);return Wn(t,t,bz(null,e)),t}},O2={lineX:Ie(k2,0),lineY:Ie(k2,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),a=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),o=[C2([i[0],a[0]]),C2([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,n,r){var i=[Ic(),Ic()];return{values:I(n,function(n){var a=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],a[0]),i[1][0]=Math.min(i[1][0],a[1]),i[0][1]=Math.max(i[0][1],a[0]),i[1][1]=Math.max(i[1][1],a[1]),a}),xyMinMax:i}}};function k2(e,t,n,r){var i=n.getAxis([`x`,`y`][e]),a=C2(I([0,1],function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))})),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}var A2={lineX:Ie(j2,0),lineY:Ie(j2,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return I(e,function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]})}};function j2(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function M2(e,t){var n=N2(e),r=N2(t),i=[n[0]/r[0],n[1]/r[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function N2(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var P2=F,F2=gc(`toolbox-dataZoom_`),I2={x:`width`,y:`height`},L2=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n,r){this._brushController||(this._brushController=new dK(n.getZr()),this._brushController.on(`brush`,L(this._onBrush,this)).mount()),V2(e,t,this,r,n),B2(e,t)},t.prototype.onclick=function(e,t,n){R2[n].call(this)},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(!e.isEnd||!t.length)return;var n={},r=this.ecModel;this._brushController.updateCovers([]),new S2(z2(this.model),r,{include:[`grid`]}).matchOutputRanges(t,r,function(e,t,n){if(n.type===`cartesian2d`){var r=n.master.getRect().clone(),a=e.brushType;a===`rect`?(i(`x`,n,r,t[0]),i(`y`,n,r,t[1])):i({lineX:`x`,lineY:`y`}[a],n,r,t)}}),h2(r,n),this._dispatchZoomAction(n);function i(e,t,i,o){var s=t.getAxis(e),c=s.model,l=a(e,c,r),u=l.findRepresentativeAxisProxy(c).getMinMaxSpan(),d=s.scale.getExtent();(u.minValueSpan!=null||u.maxValueSpan!=null)&&(o=UG(0,o.slice(),d,0,u.minValueSpan,u.maxValueSpan));var f=ws(d,i[I2[e]],.5);l&&(n[l.id]={dataZoomId:l.id,startValue:isFinite(f)?vs(o[0],f):o[0],endValue:isFinite(f)?vs(o[1],f):o[1]})}function a(e,t,n){var r;return n.eachComponent({mainType:`dataZoom`,subType:`select`},function(n){n.getAxisModel(e,t.componentIndex)&&(r=n)}),r}},t.prototype._dispatchZoomAction=function(e){var t=[];P2(e,function(e,n){t.push(M(e))}),t.length&&this.api.dispatchAction({type:`dataZoom`,from:this.uid,batch:t})},t.getDefaultOption=function(e){return{show:!0,filterMode:`filter`,icon:{zoom:`M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1`,back:`M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26`},title:e.getLocaleModel().get([`toolbox`,`dataZoom`,`title`]),brushStyle:{borderWidth:0,color:Z.color.backgroundTint}}},t}(z0),R2={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:`takeGlobalCursor`,key:`dataZoomSelect`,dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(g2(this.ecModel))}};function z2(e){var t={xAxisIndex:e.get(`xAxisIndex`,!0),yAxisIndex:e.get(`yAxisIndex`,!0),xAxisId:e.get(`xAxisId`,!0),yAxisId:e.get(`yAxisId`,!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex=`all`),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex=`all`),t}function B2(e,t){e.setIconStatus(`back`,v2(t)>1?`emphasis`:`normal`)}function V2(e,t,n,r,i){var a=n._isZoomActive;r&&r.type===`takeGlobalCursor`&&(a=r.key===`dataZoomSelect`&&r.dataZoomSelectActive),n._isZoomActive=a,e.setIconStatus(`zoom`,a?`emphasis`:`normal`);var o=new S2(z2(e),t,{include:[`grid`]}).makePanelOpts(i,function(e){return e.xAxisDeclared&&!e.yAxisDeclared?`lineX`:!e.xAxisDeclared&&e.yAxisDeclared?`lineY`:`rect`});n._brushController.setPanels(o).enableBrush(a&&o.length?{brushType:`auto`,brushStyle:e.getModel(`brushStyle`).getItemStyle()}:!1)}xv(`dataZoom`,function(e){var t=e.getComponent(`toolbox`,0),n=[`feature`,`dataZoom`];if(!t||t.get(n)==null)return;var r=t.getModel(n),i=[],a=Cc(e,z2(r));P2(a.xAxisModels,function(e){return o(e,`xAxis`,`xAxisIndex`)}),P2(a.yAxisModels,function(e){return o(e,`yAxis`,`yAxisIndex`)});function o(e,t,n){var a=e.componentIndex,o={type:`select`,$fromToolbox:!0,filterMode:r.get(`filterMode`,!0)||`filter`,id:F2+t+a};o[n]=a,i.push(o)}return i});function H2(e){e.registerComponentModel(U0),e.registerComponentView(G0),V0(`saveAsImage`,J0),V0(`magicType`,Z0),V0(`dataView`,d2),V0(`dataZoom`,L2),V0(`restore`,b2),MT(R0)}var U2=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Z.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Z.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Z.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Z.color.tertiary,fontSize:14}},t}(tv);function W2(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function G2(e){if(k.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function t4(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(k.transformSupported?``+Z2+i:`,left`+i+`,top`+i)),X2+`:`+a}function n4(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!k.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=k.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+Z2+`:`+o+`;`:[[`top`,0],[`left`,0],[K2,o]]}function r4(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=H(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),F([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function i4(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=nx(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(t4(a,n,r)),o&&i.push(`background-color:`+o),F([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=m_(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(r4(d)),f!=null&&i.push(`padding:`+h_(f).join(`px `)+`px`),i.join(`;`)+`;`}function a4(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Gt(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var o4=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,k.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(B(i)?document.querySelector(i):Ve(i)?i:z(i)&&i(e.getDom()));a4(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;sn(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=Y2(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=Q2+i4(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+n4(i[0],i[1],!0)+(`border-color:`+w_(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(B(i)&&n.get(`trigger`)===`item`&&!W2(n)&&(o=e4(n,r,i)),B(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,R(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(!(r.from===this.uid||k.node||!n.getDom())){var i=m4(r,n);this._ticket=``;var a=r.dataByCoordSys,o=y4(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=d4;c.x=r.x,c.y=r.y,c.update(),Y(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=gQ(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(m4(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(!(i==null||a==null||o==null)){var s=t.getSeriesByIndex(i);if(s&&p4([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(Y(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;SS(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Y(e).dataIndex==null?Y(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=L(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=p4([t.tooltipOption],r),o=this._renderMode,s=[],c=Hb(`section`,{blocks:[],noHeader:!0}),l=[],u=new rx;F(e,function(e){F(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(!(!t||i==null)){var f=qZ(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=Hb(`section`,{header:f,noHeader:!Ze(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),F(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=MD(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,w_(m.color),o);var h=Qy(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=p4([a],r).get(`valueFormatter`);p.blocks.push(_?N({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=Jb(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` + +`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Y(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=p4([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(!(m!=null&&m!==`item`)){var h=s.getDataParams(c,l),g=new rx;h.marker=g.makeTooltipMarker(`item`,w_(h.color),d);var _=Qy(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?Jb(y?N({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Y(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(B(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=M(a),a.content=$t(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=p4(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new rx;this._showOrMove(d,function(){var n=M(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,!(!e.get(`showContent`)||!e.get(`show`))){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u)if(B(u)){var p=e.ecModel.get(`useUTC`),m=R(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=Jg(m.axisValue,d,p)),d=y_(d,n,!0)}else if(z(u)){var g=L(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u;l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||R(t))return{color:r||i};if(!R(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),z(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),R(t))n=J(t[0],s),r=J(t[1],c);else if(V(t)){var p=t;p.width=l[0],p.height=l[1];var m=W_(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(B(t)&&o){var h=_4(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=h4(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=v4(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=v4(d)?l[1]/2:d===`bottom`?l[1]:0),W2(e)){var h=g4(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&F(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&F(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&F(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&F(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){k.node||!t.getDom()||(Px(this,`_updatePosition`),this._tooltipContent.dispose(),mQ(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(vx);function p4(e,t,n){var r=t.ecModel,i;n?(i=new og(n,r,r),i=new og(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof og&&(o=o.get(`tooltip`,!0)),B(o)&&(o={formatter:o}),o&&(i=new og(o,i,r)))}return i}function m4(e,t){return e.dispatchAction||L(t.dispatchAction,t)}function h4(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function g4(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function _4(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function v4(e){return e===`center`||e===`middle`}function y4(e,t,n){var r=wc(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=Dc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Y(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function b4(e){MT(kQ),e.registerComponentModel(U2),e.registerComponentView(f4),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},ct),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},ct)}var x4=[`rect`,`polygon`,`keep`,`clear`];function S4(e,t){var n=$s(e?e.brush:[]);if(n.length){var r=[];F(n,function(e){var t=e.hasOwnProperty(`toolbox`)?e.toolbox:[];t instanceof Array&&(r=r.concat(t))});var i=e&&e.toolbox;R(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||={},o=a.brush||={},s=o.type||=[];s.push.apply(s,r),qc(s,function(e){return e+``},null),t&&!s.length&&s.push.apply(s,x4)}}var C4=F;function w4(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function T4(e,t,n){var r={};return C4(t,function(t){var a=r[t]=i();C4(e[t],function(e,r){if(XH.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new XH(i),r===`opacity`&&(i=M(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new XH(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function E4(e,t,n){var r;F(n,function(e){t.hasOwnProperty(e)&&w4(t[e])&&(r=!0)}),r&&F(n,function(n){t.hasOwnProperty(n)&&w4(t[n])?e[n]=M(t[n]):delete e[n]})}function D4(e,t,n,r,i,a){var o={};F(e,function(e){o[e]=XH.prepareVisualTypes(t[e])});var s;function c(e){return gS(n,s,e)}function l(e,t){vS(n,s,e,t)}a==null?n.each(u):n.each([a],u);function u(e,u){s=a==null?e:u;var d=n.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var f=r.call(i,e),p=t[f],m=o[f],h=0,g=m.length;ht[0][1]&&(t[0][1]=a[0]),a[1]t[1][1]&&(t[1][1]=a[1])}return t&&W4(t)}};function W4(e){return new K(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var G4=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new dK(t.getZr())).on(`brush`,L(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){I4(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:`brush`,brushId:t,areas:M(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:`brushEnd`,brushId:t,areas:M(n),$from:t})},t.type=`brush`,t}(vx),K4=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&E4(n,e,[`inBrush`,`outOfBrush`]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},r.hasOwnProperty(`liftZ`)||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=I(e,function(e){return q4(this.option,e)},this))},t.prototype.setBrushOption=function(e){this.brushOption=q4(this.option,e),this.brushType=this.brushOption.brushType},t.type=`brush`,t.dependencies=[`geo`,`grid`,`xAxis`,`yAxis`,`parallel`,`series`],t.defaultOption={seriesIndex:`all`,brushType:`rect`,brushMode:`single`,transformable:!0,brushStyle:{borderWidth:1,color:Z.color.backgroundTint,borderColor:Z.color.borderTint},throttleType:`fixRate`,throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:Z.color.disabled},t}(tv);function q4(e,t){return Ce({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new og(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var J4=[`rect`,`polygon`,`lineX`,`lineY`,`keep`,`clear`],Y4=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n){var r,i,a;t.eachComponent({mainType:`brush`},function(e){r=e.brushType,i=e.brushOption.brushMode||`single`,a||=!!e.areas.length}),this._brushType=r,this._brushMode=i,F(e.get(`type`,!0),function(t){e.setIconStatus(t,(t===`keep`?i===`multiple`:t===`clear`?a:t===r)?`emphasis`:`normal`)})},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get(`icon`,!0),n={};return F(e.get(`type`,!0),function(e){t[e]&&(n[e]=t[e])}),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,i=this._brushMode;n===`clear`?(t.dispatchAction({type:`axisAreaSelect`,intervals:[]}),t.dispatchAction({type:`brush`,command:`clear`,areas:[]})):t.dispatchAction({type:`takeGlobalCursor`,key:`brush`,brushOption:{brushType:n===`keep`?r:r!==n&&n,brushMode:n===`keep`?i===`multiple`?`single`:`multiple`:i}})},t.getDefaultOption=function(e){return{show:!0,type:J4.slice(),icon:{rect:`M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13`,polygon:`M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2`,lineX:`M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4`,lineY:`M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4`,keep:`M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z`,clear:`M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2`},title:e.getLocaleModel().get([`toolbox`,`brush`,`title`])}},t}(z0);function X4(e){e.registerComponentView(G4),e.registerComponentModel(K4),e.registerPreprocessor(S4),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,L4),e.registerAction({type:`brush`,event:`brush`,update:`updateVisual`},function(e,t){t.eachComponent({mainType:`brush`,query:e},function(t){t.setAreas(e.areas)})}),e.registerAction({type:`brushSelect`,event:`brushSelected`,update:`none`},ct),e.registerAction({type:`brushEnd`,event:`brushEnd`,update:`none`},ct),V0(`brush`,Y4)}var Z4=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.type=`title`,t.defaultOption={z:6,show:!0,text:``,target:`blank`,subtext:``,subtarget:`blank`,left:`center`,top:Z.size.m,backgroundColor:Z.color.transparent,borderColor:Z.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:`bold`,color:Z.color.primary},subtextStyle:{fontSize:12,color:Z.color.quaternary}},t}(tv),Q4=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=H(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new Cd({style:Lh(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new Cd({style:Lh(a,{text:u,fill:a.getTextColor(),y:l.height+e.get(`itemGap`),verticalAlign:`top`},{disableBox:!0}),z2:10}),f=e.get(`link`),p=e.get(`sublink`),m=e.get(`triggerEvent`,!0);c.silent=!f&&!m,d.silent=!p&&!m,f&&c.on(`click`,function(){T_(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){T_(p,`_`+e.get(`subtarget`))}),Y(c).eventData=Y(d).eventData=m?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(d);var h=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=h.width,g.height=h.height;var _=W_(g,q_(e,n).refContainer,e.get(`padding`));o||(o=e.get(`left`)||e.get(`right`),o===`middle`&&(o=`center`),o===`right`?_.x+=_.width:o===`center`&&(_.x+=_.width/2)),s||(s=e.get(`top`)||e.get(`bottom`),s===`center`&&(s=`middle`),s===`bottom`?_.y+=_.height:s===`middle`&&(_.y+=_.height/2),s||=`top`),r.x=_.x,r.y=_.y,r.markRedraw();var v={align:o,verticalAlign:s};c.setStyle(v),d.setStyle(v),h=r.getBoundingRect();var y=_.margin,b=e.getItemStyle([`color`,`opacity`]);b.fill=e.get(`backgroundColor`);var x=new vd({shape:{x:h.x-y[3],y:h.y-y[0],width:h.width+y[1]+y[3],height:h.height+y[0]+y[2],r:e.get(`borderRadius`)},style:b,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type=`title`,t}(vx);function $4(e){e.registerComponentModel(Z4),e.registerComponentView(Q4)}var e3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode=`box`,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e??=this.option.currentIndex;var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,t=e.data||[],n=e.axisType,r=this._names=[],i;n===`category`?(i=[],F(t,function(e,t){var n=pc(nc(e),``),a;V(e)?(a=M(e),a.value=t):a=t,i.push(a),r.push(n)})):i=t;var a={category:`ordinal`,time:`time`,value:`number`}[n]||`number`;(this._data=new lE([{name:`value`,type:a}],this)).initData(i,r)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get(`axisType`)===`category`)return this._names.slice()},t.type=`timeline`,t.defaultOption={z:4,show:!0,axisType:`time`,realtime:!0,left:`20%`,top:null,right:`20%`,bottom:0,width:null,height:40,padding:Z.size.m,controlPosition:`left`,autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:Z.color.secondary},data:[]},t}(tv),t3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`timeline.slider`,t.defaultOption=dg(e3.defaultOption,{backgroundColor:`rgba(0,0,0,0)`,borderColor:Z.color.border,borderWidth:0,orient:`horizontal`,inverse:!1,tooltip:{trigger:`item`},symbol:`circle`,symbolSize:12,lineStyle:{show:!0,width:2,color:Z.color.accent10},label:{position:`auto`,show:!0,interval:`auto`,rotate:0,color:Z.color.tertiary},itemStyle:{color:Z.color.accent20,borderWidth:0},checkpointStyle:{symbol:`circle`,symbolSize:15,color:Z.color.accent50,borderColor:Z.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`rgba(0, 0, 0, 0)`,animation:!0,animationDuration:300,animationEasing:`quinticInOut`},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:`left`,playIcon:`path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z`,stopIcon:`path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z`,nextIcon:`path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z`,prevIcon:`path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z`,prevBtnSize:18,nextBtnSize:18,color:Z.color.accent50,borderColor:Z.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:Z.color.accent60},itemStyle:{color:Z.color.accent60,borderColor:Z.color.accent60},controlStyle:{color:Z.color.accent70,borderColor:Z.color.accent70}},progress:{lineStyle:{color:Z.color.accent30},itemStyle:{color:Z.color.accent40}},data:[]}),t}(e3);ke(t3,Zy.prototype);var n3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`timeline`,t}(vx),r3=function(e){D(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r)||this;return a.type=i||`value`,a}return t.prototype.getLabelModel=function(){return this.model.getModel(`label`)},t.prototype.isHorizontal=function(){return this.model.get(`orient`)===`horizontal`},t}(Ik),i3=Math.PI,a3=xc(),o3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){this.api=t},t.prototype.render=function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get(`show`,!0)){var r=this._layout(e,n),i=this._createGroup(`_mainGroup`),a=this._createGroup(`_labelGroup`),o=this._axis=this._createAxis(r,e);e.formatTooltip=function(e){return Hb(`nameValue`,{noName:!0,value:o.scale.getLabel({value:e})})},F([`AxisLine`,`AxisTick`,`Control`,`CurrentPointer`],function(t){this[`_render`+t](r,i,o,e)},this),this._renderAxisLabel(r,a,o,e),this._position(r,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,t){var n=e.get([`label`,`position`]),r=e.get(`orient`),i=s3(e,t),a=n==null||n===`auto`?r===`horizontal`?i.y+i.height/2=0||a===`+`?`left`:`right`},s={horizontal:a>=0||a===`+`?`top`:`bottom`,vertical:`middle`},c={horizontal:0,vertical:i3/2},l=r===`vertical`?i.height:i.width,u=e.getModel(`controlStyle`),d=u.get(`show`,!0),f=d?u.get(`itemSize`):0,p=d?u.get(`itemGap`):0,m=f+p,h=e.get([`label`,`rotate`])||0;h=h*i3/180;var g,_,v,y=u.get(`position`,!0),b=d&&u.get(`showPlayBtn`,!0),x=d&&u.get(`showPrevBtn`,!0),S=d&&u.get(`showNextBtn`,!0),C=0,w=l;y===`left`||y===`bottom`?(b&&(g=[0,0],C+=m),x&&(_=[C,0],C+=m),S&&(v=[w-f,0],w-=m)):(b&&(g=[w-f,0],w-=m),x&&(_=[0,0],C+=m),S&&(v=[w-f,0],w-=m));var T=[C,w];return e.get(`inverse`)&&T.reverse(),{viewRect:i,mainLength:l,orient:r,rotation:c[r],labelRotation:h,labelPosOpt:a,labelAlign:e.get([`label`,`align`])||o[r],labelBaseline:e.get([`label`,`verticalAlign`])||e.get([`label`,`baseline`])||s[r],playPosition:g,prevBtnPosition:_,nextBtnPosition:v,axisExtent:T,controlSize:f,controlGap:p}},t.prototype._position=function(e,t){var n=this._mainGroup,r=this._labelGroup,i=e.viewRect;if(e.orient===`vertical`){var a=vn(),o=i.x,s=i.y+i.height;Sn(a,a,[-o,-s]),Cn(a,a,-i3/2),Sn(a,a,[o,s]),i=i.clone(),i.applyTransform(a)}var c=g(i),l=g(n.getBoundingRect()),u=g(r.getBoundingRect()),d=[n.x,n.y],f=[r.x,r.y];f[0]=d[0]=c[0][0];var p=e.labelPosOpt;if(p==null||B(p)){var m=p===`+`?0:1;_(d,l,c,1,m),_(f,u,c,1,1-m)}else{var m=p>=0?0:1;_(d,l,c,1,m),f[1]=d[1]+p}n.setPosition(d),r.setPosition(f),n.rotation=r.rotation=e.rotation,h(n),h(r);function h(e){e.originX=c[0][0]-e.x,e.originY=c[1][0]-e.y}function g(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function _(e,t,n,r,i){e[r]+=n[r][i]-t[r][i]}},t.prototype._createAxis=function(e,t){var n=t.getData(),r=t.get(`axisType`)||t.get(`type`);r!==`category`&&r!==`time`&&(r=`value`);var i=DD(t,r,!1);i.getTicks=function(){return n.mapArray([`value`],function(e){return{value:e}})};var a=n.getDataExtent(`value`);i.setExtent(a[0],a[1]),PO(i,{fixMinMax:[!0,!0]});var o=new r3(`value`,i,e.axisExtent,r);return o.model=t,o},t.prototype._createGroup=function(e){var t=this[e]=new q;return this.group.add(t),t},t.prototype._renderAxisLine=function(e,t,n,r){var i=n.getExtent();if(r.get([`lineStyle`,`show`])){var a=new om({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:N({lineCap:`round`},r.getModel(`lineStyle`).getLineStyle()),silent:!0,z2:1});t.add(a);var o=this._progressLine=new om({shape:{x1:i[0],x2:this._currentPointer?this._currentPointer.x:i[0],y1:0,y2:0},style:P({lineCap:`round`,lineWidth:a.style.lineWidth},r.getModel([`progress`,`lineStyle`]).getLineStyle()),silent:!0,z2:1});t.add(o)}},t.prototype._renderAxisTick=function(e,t,n,r){var i=this,a=r.getData(),o=n.scale.getTicks();this._tickSymbols=[],F(o,function(e){var o=n.dataToCoord(e.value),s=a.getItemModel(e.value),c=s.getModel(`itemStyle`),l=s.getModel([`emphasis`,`itemStyle`]),u=s.getModel([`progress`,`itemStyle`]),d=l3(s,c,t,{x:o,y:0,onclick:L(i._changeTimeline,i,e.value)});d.ensureState(`emphasis`).style=l.getItemStyle(),d.ensureState(`progress`).style=u.getItemStyle(),Kf(d);var f=Y(d);s.get(`tooltip`)?(f.dataIndex=e.value,f.dataModel=r):f.dataIndex=f.dataModel=null,i._tickSymbols.push(d)})},t.prototype._renderAxisLabel=function(e,t,n,r){var i=this;if(n.getLabelModel().get(`show`)){var a=r.getData(),o=n.getViewLabels();this._tickLabels=[],F(o,function(r){if(!r.tick.offInterval){var o=r.tick.value,s=a.getItemModel(o),c=s.getModel(`label`),l=s.getModel([`emphasis`,`label`]),u=s.getModel([`progress`,`label`]),d=new Cd({x:n.dataToCoord(o),y:0,rotation:e.labelRotation-e.rotation,onclick:L(i._changeTimeline,i,o),silent:!1,style:Lh(c,{text:r.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});d.ensureState(`emphasis`).style=Lh(l),d.ensureState(`progress`).style=Lh(u),t.add(d),Kf(d),a3(d).dataIndex=o,i._tickLabels.push(d)}})}},t.prototype._renderControl=function(e,t,n,r){var i=e.controlSize,a=e.rotation,o=r.getModel(`controlStyle`).getItemStyle(),s=r.getModel([`emphasis`,`controlStyle`]).getItemStyle(),c=r.getPlayState(),l=r.get(`inverse`,!0);u(e.nextBtnPosition,`next`,L(this._changeTimeline,this,l?`-`:`+`)),u(e.prevBtnPosition,`prev`,L(this._changeTimeline,this,l?`+`:`-`)),u(e.playPosition,c?`stop`:`play`,L(this._handlePlayClick,this,!c),!0);function u(e,n,c,l){if(e){var u=yo(H(r.get([`controlStyle`,n+`BtnSize`]),i),i),d=[0,-u/2,u,u],f=c3(r,n+`Icon`,d,{x:e[0],y:e[1],originX:i/2,originY:0,rotation:l?-a:0,rectHover:!0,style:o,onclick:c});f.ensureState(`emphasis`).style=s,t.add(f),Kf(f)}}},t.prototype._renderCurrentPointer=function(e,t,n,r){var i=r.getData(),a=r.getCurrentIndex(),o=i.getItemModel(a).getModel(`checkpointStyle`),s=this,c={onCreate:function(e){e.draggable=!0,e.drift=L(s._handlePointerDrag,s),e.ondragend=L(s._handlePointerDragend,s),u3(e,s._progressLine,a,n,r,!0)},onUpdate:function(e){u3(e,s._progressLine,a,n,r)}};this._currentPointer=l3(o,o,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:`timelinePlayChange`,playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,t){var n=this._toAxisCoord(e)[0],r=this._axis,i=bs(r.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var T3={min:Ie(w3,`min`),max:Ie(w3,`max`),average:Ie(w3,`average`),median:Ie(w3,`median`)};function E3(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!C3(t)&&!R(t.coord)&&R(i)){var a=D3(t,n,r,e);if(t=M(t),t.type&&T3[t.type]&&a.baseAxis&&a.valueAxis){var o=De(i,a.baseAxis.dim),s=De(i,a.valueAxis.dim),c=T3[t.type](n,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=c[0],t.value=c[1]}else t.coord=[t.xAxis==null?t.radiusAxis:t.xAxis,t.yAxis==null?t.angleAxis:t.yAxis]}if(t.coord==null||!R(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&T3[t.type]){var u=r.getOtherAxis(l);u&&(t.value=M3(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)T3[d[f]]&&(d[f]=M3(n,n.mapDimension(i[f]),d[f]));return t}}function D3(e,t,n,r){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex==null?e.valueDim:t.getDimension(e.valueIndex),i.valueAxis=n.getAxis(O3(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function O3(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function k3(e,t){return e&&e.containData&&t.coord&&!S3(t)?e.containData(t.coord):!0}function A3(e,t,n){return e&&e.containZone&&t.coord&&n.coord&&!S3(t)&&!S3(n)?e.containZone(t.coord,n.coord):!0}function j3(e,t){return e?function(e,n,r,i){return nb(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return nb(e.value,t[i])}}function M3(e,t,n){if(n===`average`){var r=0,i=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,i++)}),r/i}else if(n===`median`)return e.getMedian(t);else return e.getDataExtent(t)[+(n===`max`)]}var N3=xc(),P3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this.markerGroupMap=U()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){N3(e).keep=!1}),t.eachSeries(function(e){var i=b3.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!N3(e).keep&&r.group.remove(e.group)}),F3(t,i,this.type)},t.prototype.markKeep=function(e){N3(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;F(e,function(e){var r=b3.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?jf(e):Mf(e))})})},t.type=`marker`,t}(vx);function F3(e,t,n){e.eachSeries(function(e){var r=b3.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=wh(r),o=a.z,s=a.zlevel;Eh(i.group,o,s)}})}function I3(e,t,n){var r=t.coordinateSystem,i=n.getWidth(),a=n.getHeight(),o=r&&r.getArea&&r.getArea();e.each(function(n){var s=e.getItemModel(n),c=s.get(`relativeTo`)===`coordinate`,l=c?o?o.width:0:i,u=c?o?o.height:0:a,d=c&&o?o.x:0,f=c&&o?o.y:0,p,m=J(s.get(`x`),l)+d,h=J(s.get(`y`),u)+f;if(!isNaN(m)&&!isNaN(h))p=[m,h];else if(t.getMarkerPosition)p=t.getMarkerPosition(e.getValues(e.dimensions,n));else if(r){var g=e.get(r.dimensions[0],n),_=e.get(r.dimensions[1],n);p=r.dataToPoint([g,_])}isNaN(m)||(p[0]=m),isNaN(h)||(p[1]=h),e.setItemLayout(n,p)})}var L3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=b3.getMarkerModelFromSeries(e,`markPoint`);t&&(I3(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new QM),l=R3(i,e,t);t.setData(l),I3(t.getData(),e,r),l.each(function(e){var n=l.getItemModel(e),r=n.getShallow(`symbol`),i=n.getShallow(`symbolSize`),a=n.getShallow(`symbolRotate`),s=n.getShallow(`symbolOffset`),c=n.getShallow(`symbolKeepAspect`);if(z(r)||z(i)||z(a)||z(s)){var u=t.getRawValue(e),d=t.getDataParams(e);z(r)&&(r=r(u,d)),z(i)&&(i=i(u,d)),z(a)&&(a=a(u,d)),z(s)&&(s=s(u,d))}var f=n.getModel(`itemStyle`).getItemStyle(),p=n.get(`z2`),m=_S(o,`color`);f.fill||=m,l.setItemVisual(e,{z2:H(p,0),symbol:r,symbolSize:i,symbolRotate:a,symbolOffset:s,symbolKeepAspect:c,style:f})}),c.updateData(l),this.group.add(c.group),l.eachItemGraphicEl(function(e){e.traverse(function(e){Y(e).dataModel=t})}),this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markPoint`,t}(P3);function R3(e,t,n){var r=e?I(e&&e.dimensions,function(e){var n=t.getData();return N(N({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new lE(r,n),a=I(n.get(`data`),Ie(E3,t));e&&(a=Me(a,Ie(k3,e)));var o=j3(!!e,r);return i.initData(a,null,o),i}function z3(e){e.registerComponentModel(x3),e.registerComponentView(L3),e.registerPreprocessor(function(e){_3(e.series,`markPoint`)&&(e.markPoint=e.markPoint||{})})}var B3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markLine`,t.defaultOption={z:5,symbol:[`circle`,`arrow`],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:`item`},label:{show:!0,position:`end`,distance:5},lineStyle:{type:`dashed`},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:`linear`},t}(b3),V3=xc(),H3=function(e,t,n,r){var i=e.getData(),a;if(R(r))a=r;else{var o=r.type;if(o===`min`||o===`max`||o===`average`||o===`median`||r.xAxis!=null||r.yAxis!=null){var s=void 0,c=void 0;if(r.yAxis!=null||r.xAxis!=null)s=t.getAxis(r.yAxis==null?`x`:`y`),c=Ke(r.yAxis,r.xAxis);else{var l=D3(r,i,t,e);s=l.valueAxis,c=M3(i,xE(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=M(r),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var m=n.get(`precision`);m>=0&&Re(c)&&(c=+c.toFixed(Math.min(m,20))),f.coord[u]=p.coord[u]=c,a=[f,p,{type:o,valueIndex:r.valueIndex,value:c}]}else a=[]}var h=[E3(e,a[0]),E3(e,a[1]),N({},a[2])];return h[2].type=h[2].type||null,Ce(h[2],h[0]),Ce(h[2],h[1]),h};function U3(e){return!isNaN(e)&&!isFinite(e)}function W3(e,t,n,r){var i=1-e,a=r.dimensions[e];return U3(t[i])&&U3(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function G3(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(W3(1,n,r,e)||W3(0,n,r,e)))return!0}return k3(e,t[0])&&k3(e,t[1])}function K3(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=J(o.get(`x`),i.getWidth()),l=J(o.get(`y`),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition)s=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=a.dimensions,d=e.get(u[0],t),f=e.get(u[1],t);s=a.dataToPoint([d,f])}if(xN(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;U3(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):U3(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var q3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=b3.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=V3(t).from,a=V3(t).to;i.each(function(t){K3(i,t,!0,e,n),K3(a,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),a.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new xW);this.group.add(c.group);var l=J3(i,e,t),u=l.from,d=l.to,f=l.line;V3(t).from=u,V3(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);R(p)||(p=[p,p]),R(m)||(m=[m,m]),R(h)||(h=[h,h]),R(g)||(g=[g,g]),l.from.each(function(e){_(u,e,!0),_(d,e,!1)}),f.each(function(e){var t=f.getItemModel(e),n=t.getModel(`lineStyle`).getLineStyle();f.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]);var r=t.get(`z2`);n.stroke??=u.getItemVisual(e,`style`).fill,f.setItemVisual(e,{z2:H(r,0),fromSymbolKeepAspect:u.getItemVisual(e,`symbolKeepAspect`),fromSymbolOffset:u.getItemVisual(e,`symbolOffset`),fromSymbolRotate:u.getItemVisual(e,`symbolRotate`),fromSymbolSize:u.getItemVisual(e,`symbolSize`),fromSymbol:u.getItemVisual(e,`symbol`),toSymbolKeepAspect:d.getItemVisual(e,`symbolKeepAspect`),toSymbolOffset:d.getItemVisual(e,`symbolOffset`),toSymbolRotate:d.getItemVisual(e,`symbolRotate`),toSymbolSize:d.getItemVisual(e,`symbolSize`),toSymbol:d.getItemVisual(e,`symbol`),style:n})}),c.updateData(f),l.line.eachItemGraphicEl(function(e){Y(e).dataModel=t,e.traverse(function(e){Y(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);K3(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=_S(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:H(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:H(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:H(a.get(`symbolSize`),m[+!i]),symbol:H(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(P3);function J3(e,t,n){var r=e?I(e&&e.dimensions,function(e){var n=t.getData();return N(N({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new lE(r,n),a=new lE(r,n),o=new lE([],n),s=I(n.get(`data`),Ie(H3,t,e,n));e&&(s=Me(s,Ie(G3,e)));var c=j3(!!e,r);return i.initData(I(s,function(e){return e[0]}),null,c),a.initData(I(s,function(e){return e[1]}),null,c),o.initData(I(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function Y3(e){e.registerComponentModel(B3),e.registerComponentView(q3),e.registerPreprocessor(function(e){_3(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var X3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markArea`,t.defaultOption={z:1,tooltip:{trigger:`item`},animation:!1,label:{show:!0,position:`top`},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:`top`}}},t}(b3),Z3=xc(),Q3=function(e,t,n,r){var i=r[0],a=r[1];if(!(!i||!a)){var o=E3(e,i),s=E3(e,a),c=o.coord,l=s.coord;c[0]=Ke(c[0],-1/0),c[1]=Ke(c[1],-1/0),l[0]=Ke(l[0],1/0),l[1]=Ke(l[1],1/0);var u=we([{},o,s]);return u.coord=[o.coord,s.coord],u.x0=o.x,u.y0=o.y,u.x1=s.x,u.y1=s.y,u}};function $3(e){return!isNaN(e)&&!isFinite(e)}function e6(e,t,n,r){var i=1-e;return $3(t[i])&&$3(n[i])}function t6(e,t){var n=t.coord[0],r=t.coord[1],i={coord:n,x:t.x0,y:t.y0},a={coord:r,x:t.x1,y:t.y1};return xN(e,`cartesian2d`)?n&&r&&(e6(1,n,r,e)||e6(0,n,r,e))?!0:A3(e,i,a):k3(e,i)||k3(e,a)}function n6(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=J(o.get(n[0]),i.getWidth()),l=J(o.get(n[1]),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition){var u=e.getValues([`x0`,`y0`],t),d=e.getValues([`x1`,`y1`],t),f=a.clampData(u),p=a.clampData(d),m=[];n[0]===`x0`?m[0]=f[0]>p[0]?d[0]:u[0]:m[0]=f[0]>p[0]?u[0]:d[0],n[1]===`y0`?m[1]=f[1]>p[1]?d[1]:u[1]:m[1]=f[1]>p[1]?u[1]:d[1],s=r.getMarkerPosition(m,n,!0)}else{var h=e.get(n[0],t),g=e.get(n[1],t),_=[h,g];a.clampData&&a.clampData(_,_),s=a.dataToPoint(_,!0)}if(xN(a,`cartesian2d`)){var v=a.getAxis(`x`),y=a.getAxis(`y`),h=e.get(n[0],t),g=e.get(n[1],t);$3(h)?s[0]=v.toGlobalCoord(v.getExtent()[n[0]===`x0`?0:1]):$3(g)&&(s[1]=y.toGlobalCoord(y.getExtent()[n[1]===`y0`?0:1]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}return s}var r6=[[`x0`,`y0`],[`x1`,`y0`],[`x1`,`y1`],[`x0`,`y1`]],i6=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=b3.getMarkerModelFromSeries(e,`markArea`);if(t){var r=t.getData();r.each(function(t){var i=I(r6,function(i){return n6(r,t,i,e,n)});r.setItemLayout(t,i),r.getItemGraphicEl(t).setShape(`points`,i)})}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,{group:new q});this.group.add(c.group),this.markKeep(c);var l=a6(i,e,t);t.setData(l),l.each(function(t){var n=I(r6,function(n){return n6(l,t,n,e,r)}),a=i.getAxis(`x`).scale,s=i.getAxis(`y`).scale,c=a.getExtent(),u=s.getExtent(),d=[a.parse(l.get(`x0`,t)),a.parse(l.get(`x1`,t))],f=[s.parse(l.get(`y0`,t)),s.parse(l.get(`y1`,t))];bs(d),bs(f);var p=c[0]>d[1]||c[1]f[1]||u[1]=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Z.size.m,align:`auto`,backgroundColor:Z.color.transparent,borderColor:Z.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Z.color.disabled,inactiveBorderColor:Z.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:Z.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Z.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Z.color.tertiary,borderWidth:1,borderColor:Z.color.border},emphasis:{selectorLabel:{show:!0,color:Z.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(tv),l6=Ie,u6=F,d6=q,f6=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new d6),this.group.add(this._selectorGroup=new d6),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=q_(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=W_(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=W_(P({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=W0(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=U(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),u6(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` +`)){var p=new d6;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f))if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,l6(h6,f,null,r,d)).on(`mouseover`,l6(g6,m.name,null,r,d)).on(`mouseout`,l6(_6,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Y(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=hi(h.fill);_&&_[3]===0&&(_[3]=.2,h=N(N({},h),{fill:Ei(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,l6(h6,null,f,r,d)).on(`mouseover`,l6(g6,null,f,r,d)).on(`mouseout`,l6(_6,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Y(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Y(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();u6(e,function(e){var r=e.type,i=new Cd({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Fh(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),Kf(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=p6(c,r,o,s,d,m,u),y=new d6,b=r.getModel(`textStyle`);if(z(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(m6({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;B(w)&&w?T=w.replace(`{name}`,t??``):z(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Cd({style:Lh(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new vd({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&_h({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),Kf(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();B_(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){B_(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}else return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(vx);function p6(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),u6(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:NC(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function m6(e){var t=e.icon||`roundRect`,n=WS(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Z.color.neutral00,n.style.lineWidth=2),n}function h6(e,t,n,r){_6(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),g6(e,t,n,r)}function g6(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function _6(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function v6(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),y6(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){F(i,function(t,n){e[t?`select`:`unSelect`](n)}),y6(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function y6(e,t){var n=t||{};return F(e.getData(),function(t){var r=t.get(`name`);if(!(r===` +`||r===``)){var i=e.isSelected(r);W(n,r)?n[r]=n[r]&&i:n[r]=i}}),n}function b6(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,Ie(v6,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,Ie(v6,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,Ie(v6,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,Ie(v6,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,Ie(v6,`unSelect`))}var x6=$c(S6);function S6(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=H(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new vd({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&jm(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;F([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,B(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=D6[i],o=O6[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(f6);function A6(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function j6(e){MT(C6),e.registerComponentModel(w6),e.registerComponentView(k6),A6(e)}function M6(e){MT(C6),MT(j6)}var N6=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.inside`,t.defaultOption=dg(O0.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(O0),P6=xc();function F6(e,t,n){P6(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function I6(e,t){for(var n=P6(e).coordSysRecordMap,r=n.keys(),i=0;ia[i+r]&&(r=n),o&&=t.get(`preventDefaultMouseMove`,!0),s=H(t.get(`cursorGrab`,!0),s),c=H(t.get(`cursorGrabbing`,!0),c)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:s,cursorGrabbing:c}}}function H6(e){e.registerUpdateLifecycle(`coordsys:aftercreate`,function(e,t){var n=P6(t),r=n.coordSysRecordMap||=U();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){F(S0(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,R6(t,n.model));(a.dataZoomInfoMap||=U()).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var n=e.controller,i,a=e.dataZoomInfoMap;if(a){var o=a.keys()[0];o!=null&&(i=a.get(o))}if(!i){L6(r,e);return}var s=V6(a,e,t);n.enable(s.controlType,s.opt),Nx(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)})})}var U6=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataZoom.inside`,t}return t.prototype.render=function(t,n,r){if(e.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),F6(r,t,{pan:L(W6.pan,this),zoom:L(W6.zoom,this),scrollMove:L(W6.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){I6(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(j0),W6={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=K6[t](null,[r.originX,r.originY],o,n,e),c=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],l=Math.max(1/r.scale,0);a[0]=(a[0]-c)*l+c,a[1]=(a[1]-c)*l+c;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(UG(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:G6(function(e,t,n,r,i,a){var o=K6[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:G6(function(e,t,n,r,i,a){return K6[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function G6(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(UG(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}var K6={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return e||=[0,0],a.dim===`x`?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem,c=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),n.mainType===`radiusAxis`?(o.pixel=t[0]-e[0],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,n,r,i){var a=n.axis,o=i.model.coordinateSystem.getRect(),s={};return e||=[0,0],a.orient===`horizontal`?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function q6(e){L0(e),e.registerComponentModel(N6),e.registerComponentView(U6),H6(e)}var J6=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.slider`,t.layoutMode=`box`,t.defaultOption=dg(O0.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:Z.color.accent10,borderRadius:0,backgroundColor:Z.color.transparent,dataBackground:{lineStyle:{color:Z.color.accent30,width:.5},areaStyle:{color:Z.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:Z.color.accent40,width:.5},areaStyle:{color:Z.color.accent20,opacity:.3}},fillerColor:`rgba(135,175,274,0.2)`,handleIcon:`path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z`,handleSize:`100%`,handleStyle:{color:Z.color.neutral00,borderColor:Z.color.accent20},moveHandleSize:7,moveHandleIcon:`path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z`,moveHandleStyle:{color:Z.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:Z.color.tertiary},brushSelect:!0,brushStyle:{color:Z.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:Z.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(O0),Y6=vd,X6=1,Z6=30,Q6=7,$6=`horizontal`,e8=`vertical`,t8=5,n8=[`line`,`bar`,`candlestick`,`scatter`],r8={easing:`cubicOut`,duration:100,delay:0},i8=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return t.prototype.init=function(e,t){this.api=t,this._onBrush=L(this._onBrush,this),this._onBrushEnd=L(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),Nx(this,`_dispatchZoomAction`,t.get(`throttle`),`fixRate`),this._orient=t.getOrient(),t.get(`show`)===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!==`dataZoom`||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Px(this,`_dispatchZoomAction`);var e=this.api.getZr();e.off(`mousemove`,this._onBrush),e.off(`mouseup`,this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new q;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get(`brushSelect`)?Q6:0,r=q_(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===$6?{right:r.width-i.x-i.width,top:r.height-Z6-a-n,width:i.width,height:Z6}:{right:a,top:i.y,width:Z6,height:i.height},s=Q_(e.option);F([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=W_(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===e8&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get(`inverse`),a=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n===$6&&!i?{scaleY:o?1:-1,scaleX:1}:n===$6&&i?{scaleY:o?1:-1,scaleX:-1}:n===e8&&!i?{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2});var s=e.getBoundingRect([a]),c=isNaN(s.x)?0:s.x,l=isNaN(s.y)?0:s.y;e.x=t.x-c,e.y=t.y-l,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get(`brushSelect`);n.add(new Y6({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new Y6({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:L(this._onClickPanel,this)}),a=this.api.getZr();r?(i.on(`mousedown`,this._onBrushStart,this),i.cursor=`crosshair`,a.on(`mousemove`,this._onBrush),a.on(`mouseup`,this._onBrushEnd)):(a.off(`mousemove`,this._onBrush),a.off(`mouseup`,this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),o=a&&i.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(o==null)return;var s=this._shadowPolygonPts,c=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var l=i.getDataExtent(e.thisDim),u=i.getDataExtent(o),d=(u[1]-u[0])*.3;u=[u[0]-d,u[1]+d];var f=[0,t[1]],p=[0,t[0]],m=[[t[0],0],[0,0]],h=[],g=p[1]/Math.max(1,i.count()-1),_=t[0]/(l[1]-l[0]),v=e.thisAxis.type===`time`,y=-g,b=Math.round(i.count()/t[0]),x;i.each([e.thisDim,o],function(e,t,n){if(b>0&&n%b){v||(y+=g);return}y=v?(+e-l[0])*_:y+g;var r=t==null||isNaN(t)||t===``,i=r?0:ps(t,u,f,!0);r&&!x&&n?(m.push([m[m.length-1][0],0]),h.push([h[h.length-1][0],0])):!r&&x&&(m.push([y,0]),h.push([y,0])),r||(m.push([y,i]),h.push([y,i])),x=r}),s=this._shadowPolygonPts=m,c=this._shadowPolylinePts=h}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];var S=this.dataZoomModel;function C(e){var t=S.getModel(e?`selectedDataBackground`:`dataBackground`),n=new q,r=new tm({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new rm({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel(`lineStyle`).getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}for(var w=0;w<3;w++){var T=C(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get(`showDataShadow`);if(t!==!1){var n,r=this.ecModel;return e.eachTargetAxis(function(i,a){F(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!n&&!(t!==!0&&De(n8,e.get(`type`))<0)){var o=r.getComponent(b0(i),a).axis,s=o8(i),c,l=e.coordinateSystem;s!=null&&l.getOtherAxis&&(c=l.getOtherAxis(o).inverse),s=e.getData().mapDimension(s),n={thisAxis:o,series:e,thisDim:e.getData().mapDimension(i),otherDim:s,otherAxisInverse:c}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,a=this._size,o=this.dataZoomModel,s=this.api,c=o.get(`borderRadius`)||0,l=o.get(`brushSelect`),u=t.filler=new Y6({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new Y6({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1],r:c},style:{stroke:o.get(`dataBackgroundColor`)||o.get(`borderColor`),lineWidth:X6,fill:Z.color.transparent}})),F([0,1],function(t){var a=o.get(`handleIcon`);!VS[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=WS(a,-1,0,2,2,null,!0);s.attr({cursor:s8(this._orient),draggable:!0,drift:L(this._onDragMove,this,t),ondragend:L(this._onDragEnd,this),onmouseover:L(this._onOverDataInfoTriggerArea,this,!0),onmouseout:L(this._onOverDataInfoTriggerArea,this,!1),z2:5});var c=s.getBoundingRect(),l=o.get(`handleSize`);this._handleHeight=J(l,this._size[1]),this._handleWidth=c.width/c.height*this._handleHeight,s.setStyle(o.getModel(`handleStyle`).getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState(`emphasis`).style=o.getModel([`emphasis`,`handleStyle`]).getItemStyle(),Kf(s);var u=o.get(`handleColor`);u!=null&&(s.style.fill=u),i.add(n[t]=s);var d=o.getModel(`textStyle`),f=(o.get(`handleLabel`)||{}).show||!1;e.add(r[t]=new Cd({silent:!0,invisible:!f,style:Lh(d,{x:0,y:0,text:``,verticalAlign:`middle`,align:`center`,fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var d=u;if(l){var f=J(o.get(`moveHandleSize`),a[1]),p=t.moveHandle=new vd({style:o.getModel(`moveHandleStyle`).getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:a[1]-.5,height:f}}),m=f*.8,h=t.moveHandleIcon=WS(o.get(`moveHandleIcon`),-m/2,-m/2,m,m,Z.color.neutral00,!0);h.silent=!0,h.y=a[1]+f/2-.5,p.ensureState(`emphasis`).style=o.getModel([`emphasis`,`moveHandleStyle`]).getItemStyle();var g=Math.min(a[1]/2,Math.max(f,10));d=t.moveZone=new vd({invisible:!0,shape:{y:a[1]-g,height:f+g}}),d.on(`mouseover`,function(){s.enterEmphasis(p)}).on(`mouseout`,function(){s.leaveEmphasis(p)}),i.add(p),i.add(h),i.add(d)}d.attr({draggable:!0,cursor:`grab`,drift:L(this._onActualMoveZoneDrift,this),ondragstart:L(this._onActualMoveZoneDragStart,this),ondragend:L(this._onActualMoveZoneDragEnd,this),onmouseover:L(this._onOverDataInfoTriggerArea,this,!0),onmouseout:L(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[ps(e[0],[0,100],t,!0),ps(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];UG(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:ps(a.minSpan,o,i,!0),a.maxSpan==null?null:ps(a.maxSpan,o,i,!0));var s=this._range,c=this._range=bs([ps(r[0],i,o,!0),ps(r[1],i,o,!0)]);return!s||s[0]!==c[0]||s[1]!==c[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=bs(n.slice()),i=this._size;F([0,1],function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scaleX:a/2,scaleY:a/2,x:n[e]+(e?-1:1),y:i[1]/2-a/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var a={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(a),t.moveZone.setShape(a),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr(`x`,a.x+a.width/2));for(var o=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],c=0;ct[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval(`all`,n[0]-i);this._updateView(),a&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new G(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr(`ignore`,!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100],a=this._handleEnds=[n.x,n.x+n.width],o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();UG(0,a,r,0,o.minSpan==null?null:ps(o.minSpan,i,r,!0),o.maxSpan==null?null:ps(o.maxSpan,i,r,!0)),this._range=bs([ps(a[0],r,i,!0),ps(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(dn(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new Y6({silent:!0,style:r.getModel(`brushStyle`).getItemStyle()}),n.sliderGroup.add(i)),i.attr(`ignore`,!1);var a=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),c=o.transformCoordToLocal(a.x,a.y),l=this._size;s[0]=Math.max(Math.min(l[0],s[0]),0),i.setShape({x:c[0],y:0,width:s[0]-c[0],height:l[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:`dataZoom`,from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?r8:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=S0(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:r*.2,y:i*.2,width:r*.6,height:i*.6}}return e},t.type=`dataZoom.slider`,t}(j0);function a8(e,t,n,r){var i=e.get(`labelFormatter`),a=e.get(`labelPrecision`);(a==null||a===`auto`)&&(a=n.valuePrecision);var o=n.value[t],s=o==null||isNaN(o)?``:KE(r)||WE(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?vs(o,a,!0):o+``;return z(i)?i(o,s):B(i)?i.replace(`{value}`,s):s}function o8(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function s8(e){return e===`vertical`?`ns-resize`:`ew-resize`}function c8(e){e.registerComponentModel(J6),e.registerComponentView(i8),L0(e)}function l8(e){MT(q6),MT(c8)}var u8={get:function(e,t,n){var r=M((d8[e]||{})[t]);return n&&R(r)?r[r.length-1]:r}},d8={color:{active:[`#006edd`,`#e0ffff`],inactive:[Z.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},f8=XH.mapVisual,p8=XH.eachVisual,m8=R,h8=F,g8=bs,_8=ps,v8=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&E4(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=L(e,this),this.controllerVisuals=T4(this.option.controller,t,e),this.targetVisuals=T4(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return h8(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=Dc(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return I(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){F(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],R(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(B(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(z(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=g8([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=Ne(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};Ce(r,n),Ce(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){m8(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},h8(r,function(e,t){if(XH.isValidType(t)){var n=u8.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;h8(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??=t&&M(t)||(a?i:[i]),c.symbolSize??=n&&M(n)||(a?s[0]:[s[0],s[0]]),c.symbol=f8(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;p8(l,function(e){e>u&&(u=e)}),c.symbolSize=f8(l,function(e){return _8(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Z.color.transparent,borderColor:Z.color.borderTint,contentColor:Z.color.theme[0],inactiveColor:Z.color.disabled,borderWidth:0,padding:Z.size.m,textGap:10,precision:0,textStyle:{color:Z.color.secondary}},t}(tv),y8=[20,140],b8=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=y8[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=y8[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):R(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),F(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=bs((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=x8(this,`outOfRange`,this.getExtent()),n=x8(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new q(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);D8([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=E8(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=nh(n.handleLabelPoints[l],th(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=E8(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=nh(c.indicatorLabelPoint,th(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||F8(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=yc(u,d);this._dispatchHighDown(`downplay`,T8(f[0],n)),this._dispatchHighDown(`highlight`,T8(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(SS(e.target,function(e){var n=Y(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function B8(e,t,n,r){for(var i=t.targetVisuals[r],a=XH.prepareVisualTypes(i),o={color:_S(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(L8,R8),F(z8,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(H8))}function K8(e){e.registerComponentModel(b8),e.registerComponentView(M8),G8(e)}var q8=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],J8[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=M(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=I(this._pieceList,function(e){return e=M(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=XH.listVisualTypes(),i=this.isCategory();F(t.pieces,function(e){F(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),F(n,function(e,n){var r=!1;F(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&F(this.stateList,function(e){(t[e]||(t[e]={}))[n]=u8.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,F(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;F(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=M(e)},t.prototype.getValueState=function(e){var t=XH.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){XH.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return F(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=dg(v8.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(v8),J8={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function Y8(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var X8=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Ke(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),F(o.viewPieceList,function(o){var s=o.piece,u=new q;u.onclick=L(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Cd({style:Lh(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:H(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),B_(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:T8(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return w8(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new q,o=this.visualMapModel.textStyleModel;a.add(new Cd({style:Lh(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=I(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=WS(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=M(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,F(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(S8);function Z8(e){e.registerComponentModel(q8),e.registerComponentView(X8),G8(e)}function Q8(e){MT(K8),MT(Z8)}var $8=function(){function e(e){this._thumbnailModel=e}return e.prototype.reset=function(e){this._renderVersion=e.getECUpdateCycleVersion()},e.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:Th(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},e.prototype.updateWindow=function(e,t){var n=t.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},e}(),e5=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return t.prototype.optionUpdated=function(e,t){this._updateBridge()},t.prototype._updateBridge=function(){var e=this._birdge=this._birdge||new $8(this);this._target=null,this.ecModel.eachSeries(function(e){IW(e,null)}),this.shouldShow()&&IW(this.getTarget().baseMapProvider,e)},t.prototype.shouldShow=function(){return this.getShallow(`show`,!0)},t.prototype.getBridge=function(){return this._birdge},t.prototype.getTarget=function(){if(this._target)return this._target;var e=this.getReferringComponents(`series`,{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return e?e.subType!==`graph`&&(e=null):e=this.ecModel.queryComponents({mainType:`series`,subType:`graph`})[0],this._target={baseMapProvider:e},this._target},t.type=`thumbnail`,t.layoutMode=`box`,t.dependencies=[`series`,`geo`],t.defaultOption={show:!0,right:1,bottom:1,height:`25%`,width:`25%`,itemStyle:{borderColor:Z.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:Z.color.neutral30,borderColor:Z.color.neutral40,opacity:.3},z:10},t}(tv),t5=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this._api=n,this._model=e,this._coordSys||=new vz,!this._isEnabled()){this._clear();return}this._renderVersion=n.getECUpdateCycleVersion();var r=this.group;r.removeAll();var i=e.getModel(`itemStyle`),a=i.getItemStyle();a.fill??=t.get(`backgroundColor`)||Z.color.neutral00;var o=q_(e,n).refContainer,s=W_(V_(e,!0),o),c=a.lineWidth||0,l=this._contentRect=mh(s.clone(),c/2,!0,!0),u=new q;r.add(u),u.setClipPath(new vd({shape:l.plain()}));var d=this._targetGroup=new q;u.add(d);var f=s.plain();f.r=i.getShallow(`borderRadius`,!0),r.add(this._bgRect=new vd({style:a,shape:f,silent:!1,cursor:`grab`}));var p=e.getModel(`windowStyle`),m=p.getShallow(`borderRadius`,!0);u.add(this._windowRect=new vd({shape:{x:0,y:0,width:0,height:0,r:m},style:p.getItemStyle(),silent:!1,cursor:`grab`})),this._dealRenderContent(),this._dealUpdateWindow(),r5(e,this)},t.prototype.renderContent=function(e){this._bridgeRendered=e,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),r5(this._model,this))},t.prototype._dealRenderContent=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var t=this._targetGroup,n=this._coordSys,r=this._contentRect;if(t.removeAll(),e){var i=e.group,a=i.getBoundingRect();t.add(i),this._bgRect.z2=e.z2Range.min-10,Az(n,a.x,a.y,a.width,a.height);var o=W_({left:`center`,top:`center`,aspect:a.width/a.height},r);jz(n,o.x,o.y,o.width,o.height),wz(i,n,0),i.dirty(),this._windowRect.z2=e.z2Range.max+10,this._resetRoamController(e.roamType)}}},t.prototype.updateWindow=function(e){var t=this._bridgeRendered;t&&t.renderVersion===e.renderVersion&&(t.targetTrans=e.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var t=Tn([],e.targetTrans),n=xn([],bz(null,this._coordSys),t);this._transThisToTarget=Tn([],n);var r=e.viewportRect;r=r?r.clone():new K(0,0,this._api.getWidth(),this._api.getHeight()),r.applyTransform(n);var i=this._windowRect,a=i.shape.r;i.setShape(P({r:a},r))}},t.prototype._resetRoamController=function(e){var t=this,n=this._api,r=this._roamController;if(r||=this._roamController=new pR(n.getZr()),!e||!this._isEnabled()){r.disable();return}r.enable(e,{api:n,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(e,n,r){return t._contentRect.contain(n,r)}}}),r.off(`pan`).off(`zoom`).on(`pan`,L(this._onPan,this)).on(`zoom`,L(this._onZoom,this))},t.prototype._onPan=function(e){var t=this._transThisToTarget;if(!(!this._isEnabled()||!t)){var n=Pt([],[e.oldX,e.oldY],t),r=Pt([],[e.oldX-e.dx,e.oldY-e.dy],t);this._api.dispatchAction(n5(this._model.getTarget().baseMapProvider,{dx:r[0]-n[0],dy:r[1]-n[1]}))}},t.prototype._onZoom=function(e){var t=this._transThisToTarget;if(!(!this._isEnabled()||!t)){var n=Pt([],[e.originX,e.originY],t);this._api.dispatchAction(n5(this._model.getTarget().baseMapProvider,{zoom:1/e.scale,originX:n[0],originY:n[1]}))}},t.prototype._isEnabled=function(){var e=this._model;return!(!e||!e.shouldShow()||!e.getTarget().baseMapProvider)},t.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},t.prototype.remove=function(){this._clear()},t.prototype.dispose=function(){this._clear()},t.type=`thumbnail`,t}(vx);function n5(e,t){var n={type:e.mainType===`series`?e.subType+`Roam`:e.mainType+`Roam`};return n[e.mainType+`Id`]=e.id,N(n,t),n}function r5(e,t){var n=wh(e);Eh(t.group,n.z,n.zlevel)}function i5(e){e.registerComponentModel(e5),e.registerComponentView(t5)}var a5={label:{enabled:!0},decal:{show:!1}},o5=xc(),s5=xc(),c5=$c(l5);function l5(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=s5(e).scope||(s5(e).scope={}),i=M(a5);Ce(i.label,e.getLocaleModel().get(`aria`),!1),Ce(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=U();e.eachSeries(function(e){e.isColorBySeries()||(o5(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(z(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=Ev(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=o5(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=Ev(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?N(N({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=P(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_":`gt`,">=":`gte`,"=":`eq`,"!=":`ne`,"<>":`ne`},p5=function(){function e(e){(this._condVal=B(e)?new RegExp(e):We(e)?e:null)??Ys(``)}return e.prototype.evaluate=function(e){var t=typeof e;return B(t)?this._condVal.test(e):Re(t)?this._condVal.test(e+``):!1},e}(),m5=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),h5=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&r.push(i),i=[e,t]}function u(e,t,n,r){N5(e,n)&&N5(t,r)||i.push(e,t,n,r,n,r)}function d(e,t,n,r,a,o){var s=Math.abs(t-e),c=Math.tan(s/4)*4/3,l=tw:D2&&r.push(i),r}function F5(e,t,n,r,i,a,o,s,c,l){if(N5(e,n)&&N5(t,r)&&N5(i,o)&&N5(a,s)){c.push(o,s);return}var u=2/l,d=u*u,f=o-e,p=s-t,m=Math.sqrt(f*f+p*p);f/=m,p/=m;var h=n-e,g=r-t,_=i-o,v=a-s,y=h*h+g*g,b=_*_+v*v;if(y=0&&w=0){c.push(o,s);return}var T=[],E=[];zr(e,n,i,o,.5,T),zr(t,r,a,s,.5,E),F5(T[0],E[0],T[1],E[1],T[2],E[2],T[3],E[3],c,l),F5(T[4],E[4],T[5],E[5],T[6],E[6],T[7],E[7],c,l)}function I5(e,t){var n=P5(e),r=[];t||=1;for(var i=0;i0)for(var l=0;lMath.abs(l),d=L5([c,l],+!u,t),f=(u?s:l)/d.length,p=0;pi,o=L5([r,i],+!a,t),s=a?`width`:`height`,c=a?`height`:`width`,l=a?`x`:`y`,u=a?`y`:`x`,d=e[s]/o.length,f=0;f1?null:new G(p*c+e,p*l+t)}function H5(e,t,n){var r=new G;G.sub(r,n,t),r.normalize();var i=new G;return G.sub(i,e,t),i.dot(r)}function U5(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function W5(e,t,n){for(var r=e.length,i=[],a=0;ao?(l.x=u.x=s+a/2,l.y=c,u.y=c+o):(l.y=u.y=c+o/2,l.x=s,u.x=s+a),W5(t,l,u)}function K5(e,t,n,r){if(n===1)r.push(t);else{var i=Math.floor(n/2),a=e(t);K5(e,a[0],i,r),K5(e,a[1],n-i,r)}return r}function q5(e,t){for(var n=[],r=0;r0)for(var x=r/n,S=-r/2;S<=r/2;S+=x){for(var C=Math.sin(S),w=Math.cos(S),T=0,y=0;y0;l/=2){var u=0,d=0;(e&l)>0&&(u=1),(t&l)>0&&(d=1),s+=l*l*(3*u^d),d===0&&(u===1&&(e=l-1-e,t=l-1-t),c=e,e=t,t=c)}return s}function f7(e){var t=1/0,n=1/0,r=-1/0,i=-1/0;return I(I(e,function(e){var a=e.getBoundingRect(),o=e.getComputedTransform(),s=a.x+a.width/2+(o?o[4]:0),c=a.y+a.height/2+(o?o[5]:0);return t=Math.min(s,t),n=Math.min(c,n),r=Math.max(s,r),i=Math.max(c,i),[s,c]}),function(a,o){return{cp:a,z:d7(a[0],a[1],t,n,r,i),path:e[o]}}).sort(function(e,t){return e.z-t.z}).map(function(e){return e.path})}function p7(e){return X5(e.path,e.count)}function m7(){return{fromIndividuals:[],toIndividuals:[],count:0}}function h7(e,t,n){var r=[];function i(e){for(var t=0;t=0;i--)if(!n[i].many.length){var c=n[s].many;if(c.length<=1)if(s)s=0;else return n;var a=c.length,l=Math.ceil(a/2);n[i].many=c.slice(l,a),n[s].many=c.slice(0,l),s++}return n}var y7={clone:function(e){for(var t=[],n=1-(1-e.path.style.opacity)**(1/e.count),r=0;r0))return;var s=r.getModel(`universalTransition`).get(`delay`),c=N({setToFinal:!0},o),l,u;_7(e)&&(l=e,u=t),_7(t)&&(l=t,u=e);function d(e,t,r,i,o){var l=e.many,u=e.one;if(l.length===1&&!o){var f=t?l[0]:u,p=t?u:l[0];if(i7(f))d({many:[f],one:p},!0,r,i,!0);else{var m=s?P({delay:s(r,i)},c):c;u7(f,p,m),a(f,p,f,p,m)}}else for(var h=P({dividePath:y7[n],individualDelay:s&&function(e,t,n,a){return s(e+r,i)}},c),g=t?h7(l,u,h):g7(u,l,h),_=g.fromIndividuals,v=g.toIndividuals,y=_.length,b=0;bt.length,p=l?v7(u,l):v7(f?t:e,[f?e:t]),m=0,h=0;hS7))for(var i=n.getIndices(),a=0;a0&&r.group.traverse(function(e){e instanceof id&&!e.animators.length&&e.animateFrom({style:{opacity:0}},i)})})}function L7(e){return e.getModel(`universalTransition`).get(`seriesKey`)||e.id}function R7(e){return R(e)?e.sort().join(`,`):e}function z7(e){if(e.hostModel)return e.hostModel.getModel(`universalTransition`).get(`divideShape`)}function B7(e,t){var n=U(),r=U(),i=U();return F(e.oldSeries,function(t,n){var a=e.oldDataGroupIds[n],o=e.oldData[n],s=L7(t),c=R7(s);r.set(c,{dataGroupId:a,data:o}),R(s)&&F(s,function(e){i.set(e,{key:c,dataGroupId:a,data:o})})}),F(t.updatedSeries,function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get(`dataGroupId`),a=e.getData(),o=L7(e),s=R7(o),c=r.get(s);if(c)n.set(s,{oldSeries:[{dataGroupId:c.dataGroupId,divide:z7(c.data),data:c.data}],newSeries:[{dataGroupId:t,divide:z7(a),data:a}]});else if(R(o)){var l=[];F(o,function(e){var t=r.get(e);t.data&&l.push({dataGroupId:t.dataGroupId,divide:z7(t.data),data:t.data})}),l.length&&n.set(s,{oldSeries:l,newSeries:[{dataGroupId:t,data:a,divide:z7(a)}]})}else{var u=i.get(o);if(u){var d=n.get(u.key);d||(d={oldSeries:[{dataGroupId:u.dataGroupId,data:u.data,divide:z7(u.data)}],newSeries:[]},n.set(u.key,d)),d.newSeries.push({dataGroupId:t,data:a,divide:z7(a)})}}}}),n}function V7(e,t){for(var n=0;n=0&&i.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:z7(t.oldData[n]),groupIdDim:e.dimension})}),F($s(e.to),function(e){var r=V7(n.updatedSeries,e);if(r>=0){var i=n.updatedSeries[r].getData();a.push({dataGroupId:t.oldDataGroupIds[r],data:i,divide:z7(i),groupIdDim:e.dimension})}}),i.length>0&&a.length>0&&I7(i,a,r)}function U7(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){F($s(n.seriesTransition),function(e){F($s(e.to),function(e){for(var t=n.updatedSeries,r=0;ro.vmin?n+=o.vmin-r+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:n+=e-r,r=o.vmax,i=!1;break}n+=o.vmin-r+o.gapReal,r=o.vmax}return i&&(n+=e-r),n},transformOut:function(e,t){if(t&&t.depth===2)return e;for(var n=K7,r=q7,i=!0,a=0,o=0;oc?s.vmin+(e-c)/(l-c)*(s.vmax-s.vmin):r+e-n,r=s.vmax,i=!1;break}n=l,r=s.vmax}return i&&(a=r+e-n),a}},e}();function G7(e,t){return new W7(e,t)}var K7=0,q7=0;function J7(e,t){var n=0,r={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};F(e.breaks,function(e){var i=e.gapParsed;i.type===`tpPrct`&&(n+=i.val);var o=Z7(e,t);if(o){var s=o.vmin!==e.vmin,c=o.vmax!==e.vmax,l=o.vmax-o.vmin;if(!(s&&c))if(s||c){var u=s?`S`:`E`;a[u][i.type].has=!0,a[u][i.type].span=l,a[u][i.type].inExtFrac=l/(e.vmax-e.vmin),a[u][i.type].val=i.val}else r[i.type].span+=l,r[i.type].val+=i.val}});var o=n*(0+(t[1]-t[0])+(r.tpAbs.val-r.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-r.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-r.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));F(e.breaks,function(e){var t=e.gapParsed;t.type===`tpPrct`&&(e.gapReal=n===0?0:rs(o,0)*t.val/n),t.type===`tpAbs`&&(e.gapReal=t.val),e.gapReal??=0})}function Y7(e,t,n,r,i,a){e!==`no`&&F(n,function(n){var o=Z7(n,a);if(o)for(var s=t.length-1;s>=0;s--){var c=t[s],l=r(c),u=i*3/4;l>o.vmin-u&&lt[0]&&n=0&&e<.99999}F(e,function(e){if(!(!e||e.start==null||e.end==null)&&!e.isExpanded){var a={breakOption:M(e),vmin:t.parse(e.start),vmax:t.parse(e.end),gapParsed:{type:`tpAbs`,val:0},gapReal:null};if(e.gap!=null){var o=!1;if(B(e.gap)){var s=Ze(e.gap);if(s.match(/%$/)){var c=parseFloat(s)/100;i(c,`Percent gap`)||(c=0),a.gapParsed.type=`tpPrct`,a.gapParsed.val=c,o=!0}}if(!o){var l=t.parse(e.gap);(!isFinite(l)||l<0)&&(l=0),a.gapParsed.type=`tpAbs`,a.gapParsed.val=l}}if(a.vmin===a.vmax&&(a.gapParsed.type=`tpAbs`,a.gapParsed.val=0),n&&n.noNegative&&F([`vmin`,`vmax`],function(e){a[e]<0&&(a[e]=0)}),a.vmin>a.vmax){var u=a.vmax;a.vmax=a.vmin,a.vmin=u}r.push(a)}}),r.sort(function(e,t){return e.vmin-t.vmin});var a=-1/0;return F(r,function(e,t){a>e.vmin&&(r[t]=null),a=e.vmax}),{breaks:Me(r,function(e){return!!e})}}function $7(e,t){return e9(t)===e9(e)}function e9(e){return e.start+`_\0_`+e.end}function t9(e,t,n){var r=[];F(e,function(e,n){var i=t(e);i&&i.type===`vmin`&&r.push([n])}),F(e,function(n,i){var a=t(n);if(a&&a.type===`vmax`){var o=Ne(r,function(n){return $7(t(e[n[0]]).parsedBreak.breakOption,a.parsedBreak.breakOption)});o&&o.push(i)}});var i=[];return F(r,function(t){t.length===2&&i.push(n?t:[e[t[0]],e[t[1]]])}),i}function n9(e,t,n,r){if(t.break){var i=t.break.parsedBreak,a=Ne(n,function(e){return $7(e.breakOption,t.break.parsedBreak.breakOption)}),o={lookup:r,depth:2},s={vmin:e.transformOut(i.vmin,o),vmax:e.transformOut(i.vmax,o),breakOption:i.breakOption,gapParsed:M(a.gapParsed),gapReal:i.gapReal};return{tickVal:s[t.break.type],vBreak:{type:t.break.type,parsedBreak:s}}}}function r9(e,t,n,r,i){i.original=Q7(e,t,n);var a=i.transformed=Q7(e,t,n),o=i.lookup;a.breaks=I(a.breaks,function(e,n){var i={depth:2},a=t.transformIn(e.vmin,i),s=t.transformIn(e.vmax,i),c={type:e.gapParsed.type,val:e.gapParsed.type===`tpAbs`?t.transformIn(e.vmin+e.gapParsed.val,i)-a:e.gapParsed.val};return o.from[r+n]=a,o.to[r+n]=e.vmin,o.from[r+n+1]=s,o.to[r+n+1]=e.vmax,{vmin:a,vmax:s,gapParsed:c,gapReal:e.gapReal,breakOption:e.breakOption}})}var i9={vmin:`start`,vmax:`end`};function a9(e,t){return t&&(e||={},e.break={type:i9[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function o9(){Tg({createBreakScaleMapper:G7,pruneTicksByBreak:Y7,addBreaksToTicks:X7,parseAxisBreakOption:Q7,identifyAxisBreak:$7,serializeAxisBreakIdentifier:e9,retrieveAxisBreakPairs:t9,getTicksBreakOutwardTransform:n9,parseAxisBreakOptionInwardTransform:r9,makeAxisLabelFormatterParamBreak:a9})}var s9=xc();function c9(e,t){var n=Ne(e,function(e){return Eg().identifyAxisBreak(e.parsedBreak.breakOption,t.breakOption)});return n||e.push(n={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),n}function l9(e){F(e,function(e){return e.shouldRemove=!0})}function u9(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function d9(e,t,n,r,i){var a=n.axis;if(a.scale.isBlank()||!Eg())return;var o=Eg().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:`only_break`}),function(e){return e.break},!1);if(!o.length)return;var s=n.getModel(`breakArea`),c=s.get(`zigzagAmplitude`),l=s.get(`zigzagMinSpan`),u=s.get(`zigzagMaxSpan`);l=Math.max(2,l||0),u=Math.max(l,u||0);var d=s.get(`expandOnClick`),f=s.get(`zigzagZ`),p=s.getModel(`itemStyle`).getItemStyle(),m=p.stroke,h=p.lineWidth,g=p.lineDash,_=p.fill,v=new q({ignoreModelZ:!0}),y=a.isHorizontal(),b=s9(t).visualList||(s9(t).visualList=[]);l9(b);for(var x=function(e){var t=o[e][0].break.parsedBreak,r=[];r[0]=a.toGlobalCoord(a.dataToCoord(t.vmin,!0)),r[1]=a.toGlobalCoord(a.dataToCoord(t.vmax,!0)),r[1]=y;D&&(w=y);var O=[],k=[];O[d]=n,k[d]=i,!E&&!D&&(O[d]+=C?-c:c,k[d]-=C?c:-c),O[v]=w,k[v]=w,x.push(O),S.push(k);var A=void 0;if(Tn[1]&&n.reverse(),{coordPair:n,brkId:Eg().serializeAxisBreakIdentifier(t.breakOption)}});s.sort(function(e,t){return e.coordPair[0]-t.coordPair[0]});for(var c=o[0],l=null,u=0;u=0?c[0].width:c[1].width)+u.x)/2-l.x,f=Math.min(d,d-u.x),p=Math.max(d,d-u.x);s=(d-(p<0?p:f>0?f:0))/u.x}var m=new G,h=new G;G.scale(m,r,-s),G.scale(h,r,1-s),CA(n[0],m),CA(n[1],h)}function m9(e,t){var n={breaks:[]};return F(t.breaks,function(r){if(r){var i=Ne(e.get(`breaks`,!0),function(e){return Eg().identifyAxisBreak(e,r)});if(i){var a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===`expandAxisBreak`?!0:a===`collapseAxisBreak`?!1:a===`toggleAxisBreak`?!i.isExpanded:i.isExpanded,n.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),n}function h9(){QN({adjustBreakLabelPair:p9,buildAxisBreakLine:f9,rectCoordBuildBreakAxis:d9,updateModelAxisBreak:m9})}function g9(e){cP(e),o9(),h9()}function _9(){eL(v9)}function v9(e,t){F(e,function(e){if(!e.model.get([`axisLabel`,`inside`])){var n=y9(e);if(n){var r=e.isHorizontal()?`height`:`width`,i=e.model.get([`axisLabel`,`margin`]);t[r]-=n[r]+i,e.position===`top`?t.y+=n.height+i:e.position===`left`&&(t.x+=n.width+i)}}})}function y9(e){var t=e.model,n=e.scale;if(!t.get([`axisLabel`,`show`])||n.isBlank())return;var r,i,a=n.getExtent();n instanceof tD?i=n.count():(r=n.getTicks(),i=r.length);var o=e.getLabelModel(),s=jD(e),c,l=1;i>40&&(l=Math.ceil(i/40));for(var u=0;uIk,ChartView:()=>Sx,ComponentModel:()=>tv,ComponentView:()=>vx,List:()=>lE,Model:()=>og,PRIORITY:()=>ow,SeriesModel:()=>lx,color:()=>ti,connect:()=>rT,dataTool:()=>kT,dependencies:()=>HC,disConnect:()=>aT,disconnect:()=>iT,dispose:()=>oT,env:()=>k,extendChartView:()=>Hk,extendComponentModel:()=>zk,extendComponentView:()=>Bk,extendSeriesModel:()=>Vk,format:()=>sk,getCoordinateSystemDimensions:()=>_T,getInstanceByDom:()=>sT,getInstanceById:()=>cT,getMap:()=>ET,graphic:()=>ok,helper:()=>IO,init:()=>nT,innerDrawElementOnCanvas:()=>EC,matrix:()=>_n,number:()=>ik,parseGeoJSON:()=>rk,parseGeoJson:()=>rk,registerAction:()=>hT,registerCoordinateSystem:()=>gT,registerCustomSeries:()=>vT,registerLayout:()=>yT,registerLoading:()=>CT,registerLocale:()=>bg,registerMap:()=>TT,registerPostInit:()=>fT,registerPostUpdate:()=>pT,registerPreprocessor:()=>uT,registerProcessor:()=>dT,registerTheme:()=>lT,registerTransform:()=>DT,registerUpdateLifecycle:()=>mT,registerVisual:()=>bT,setCanvasCreator:()=>wT,setPlatformAPI:()=>oe,throttle:()=>Mx,time:()=>ak,use:()=>MT,util:()=>ck,vector:()=>dt,version:()=>VC,zrUtil:()=>se,zrender:()=>Ro});MT([HM]),MT([vM]),MT([YN,eI,CI,BL,oR,tV,XV,xU,HW,eG,sG,vG,oq,zq,iJ,NJ,zJ,eY,sY,FY,GY,uX,PZ]),MT(AQ),MT(_$),MT(YB),MT(F$),MT(aq),MT(H$),MT(Z1),MT(h0),MT(H2),MT(b4),MT(kQ),MT(X4),MT($4),MT(g3),MT(z3),MT(Y3),MT(o6),MT(M6),MT(l8),MT(q6),MT(c8),MT(Q8),MT(K8),MT(Z8),MT(i5),MT(d5),MT(O5),MT(j5),MT(U7),MT(BA),MT(g9),MT(_9),MT(VL);var x9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=1;e.default=function(){return`${t++}`}})),S9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,n=null;return function(){var r=this,i=[...arguments];clearTimeout(n),n=setTimeout(function(){e.apply(r,i)},t)}}})),C9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SizeSensorId=e.SensorTabIndex=e.SensorClassName=void 0,e.SizeSensorId=`size-sensor-id`,e.SensorClassName=`size-sensor-object`,e.SensorTabIndex=`-1`})),w9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSensor=void 0;var t=r(S9()),n=C9();function r(e){return e&&e.__esModule?e:{default:e}}e.createSensor=function(e,r){var i=void 0,a=[],o=function(){getComputedStyle(e).position===`static`&&(e.style.position=`relative`);var t=document.createElement(`object`);return t.onload=function(){t.contentDocument.defaultView.addEventListener(`resize`,s),s()},t.style.display=`block`,t.style.position=`absolute`,t.style.top=`0`,t.style.left=`0`,t.style.height=`100%`,t.style.width=`100%`,t.style.overflow=`hidden`,t.style.pointerEvents=`none`,t.style.zIndex=`-1`,t.style.opacity=`0`,t.setAttribute(`class`,n.SensorClassName),t.setAttribute(`tabindex`,n.SensorTabIndex),t.type=`text/html`,e.appendChild(t),t.data=`about:blank`,t},s=(0,t.default)(function(){a.forEach(function(t){t(e)})}),c=function(e){i||=o(),a.indexOf(e)===-1&&a.push(e)},l=function(){i&&i.parentNode&&(i.contentDocument&&i.contentDocument.defaultView.removeEventListener(`resize`,s),i.parentNode.removeChild(i),e.removeAttribute(n.SizeSensorId),i=void 0,a=[],r&&r())};return{element:e,bind:c,destroy:l,unbind:function(e){var t=a.indexOf(e);t!==-1&&a.splice(t,1),a.length===0&&i&&l()}}}})),T9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSensor=void 0;var t=C9(),n=r(S9());function r(e){return e&&e.__esModule?e:{default:e}}e.createSensor=function(e,r){var i=void 0,a=[],o=(0,n.default)(function(){a.forEach(function(t){t(e)})}),s=function(){var t=new ResizeObserver(o);return t.observe(e),o(),t},c=function(e){i||=s(),a.indexOf(e)===-1&&a.push(e)},l=function(){i&&i.disconnect(),a=[],i=void 0,e.removeAttribute(t.SizeSensorId),r&&r()};return{element:e,bind:c,destroy:l,unbind:function(e){var t=a.indexOf(e);t!==-1&&a.splice(t,1),a.length===0&&i&&l()}}}})),E9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSensor=void 0;var t=w9(),n=T9();e.createSensor=typeof ResizeObserver<`u`?n.createSensor:t.createSensor})),D9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.removeSensor=e.getSensor=e.Sensors=void 0;var t=i(x9()),n=E9(),r=C9();function i(e){return e&&e.__esModule?e:{default:e}}var a=e.Sensors={};function o(e){e&&a[e]&&delete a[e]}e.getSensor=function(e){var i=e.getAttribute(r.SizeSensorId);if(i&&a[i])return a[i];var s=(0,t.default)();e.setAttribute(r.SizeSensorId,s);var c=(0,n.createSensor)(e,function(){return o(s)});return a[s]=c,c},e.removeSensor=function(e){var t=e.element.getAttribute(r.SizeSensorId);e.destroy(),o(t)}})),O9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ver=e.clear=e.bind=void 0;var t=D9();e.bind=function(e,n){var r=(0,t.getSensor)(e);return r.bind(n),function(){r.unbind(n)}},e.clear=function(e){var n=(0,t.getSensor)(e);(0,t.removeSensor)(n)},e.ver=`1.0.3`}))();function k9(e,t){var n={};return t.forEach(function(t){n[t]=e[t]}),n}function A9(e){return typeof e==`function`}function j9(e){return typeof e==`string`}var M9=e(n(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}}))()),N9=function(e){C(t,e);function t(t){var n=e.call(this,t)||this;return n.echarts=b9,n}return t}(function(e){C(t,e);function t(t){var n=e.call(this,t)||this;return n.echarts=t.echarts,n.ele=null,n.isInitialResize=!0,n.eventHandlerRefs={},n}return t.prototype.componentDidMount=function(){this.renderNewEcharts()},t.prototype.componentDidUpdate=function(e){var t=this.props.shouldSetOption;if(!(A9(t)&&!t(e,this.props))){if(!(0,M9.default)(e.theme,this.props.theme)||!(0,M9.default)(e.opts,this.props.opts)){this.dispose(),this.renderNewEcharts();return}var n=this.getEchartsInstance();(0,M9.default)(e.onEvents,this.props.onEvents)||(this.unbindEvents(n),this.bindEvents(n,this.props.onEvents));var r=[`option`,`notMerge`,`replaceMerge`,`lazyUpdate`,`showLoading`,`loadingOption`];(0,M9.default)(k9(this.props,r),k9(e,r))||this.updateEChartsOption(),(!(0,M9.default)(e.style,this.props.style)||!(0,M9.default)(e.className,this.props.className))&&this.resize()}},t.prototype.componentWillUnmount=function(){this.dispose()},t.prototype.initEchartsInstance=function(){return S(this,void 0,void 0,function(){var e=this;return x(this,function(t){return[2,new Promise(function(t){e.echarts.init(e.ele,e.props.theme,e.props.opts),e.getEchartsInstance().on(`finished`,function(){var n=e.ele.clientWidth,r=e.ele.clientHeight;e.echarts.dispose(e.ele);var i=w({width:n,height:r},e.props.opts);t(e.echarts.init(e.ele,e.props.theme,i))})})]})})},t.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)},t.prototype.dispose=function(){if(this.ele){try{(0,O9.clear)(this.ele)}catch(e){console.warn(e)}this.echarts.dispose(this.ele)}},t.prototype.renderNewEcharts=function(){return S(this,void 0,void 0,function(){var e,t,n,r,i,a,o=this;return x(this,function(s){switch(s.label){case 0:return e=this.props,t=e.onEvents,n=e.onChartReady,r=e.autoResize,i=r===void 0||r,[4,this.initEchartsInstance()];case 1:return s.sent(),a=this.updateEChartsOption(),this.bindEvents(a,t||{}),A9(n)&&n(a),this.ele&&i&&(0,O9.bind)(this.ele,function(){o.resize()}),[2]}})})},t.prototype.bindEvents=function(e,t){var n=this,r=function(t,r){if(j9(t)&&A9(r)){var i=function(t){r(t,e)};e.on(t,i),n.eventHandlerRefs[t]=i}};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&r(i,t[i])},t.prototype.unbindEvents=function(e){for(var t=0,n=Object.entries(this.eventHandlerRefs);t{let{token:e}=P9(),{t}=y(),n={xAxis:{type:`category`,show:!1,data:[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`]},yAxis:{show:!1,type:`value`},series:[{data:[120,88,116,60,70],type:`bar`,itemStyle:{color:e.colorPrimary},barWidth:10}]},r={xAxis:{show:!1,type:`category`,data:[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`]},yAxis:{show:!1,type:`value`},series:[{data:[1,2,3,2,3,2,1],type:`line`,itemStyle:{color:e.colorPrimary}}]},i={title:{text:t(`dashboard.analysis.annualSales`),textStyle:{color:e.colorText,fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong}},tooltip:{trigger:`axis`,axisPointer:{type:`cross`,label:{backgroundColor:e.colorPrimaryBg,color:e.colorPrimary}},borderWidth:0,backgroundColor:e.colorPrimaryBg,textStyle:{color:e.colorText}},legend:{data:[t(`dashboard.analysis.grossProfit`),t(`dashboard.analysis.netProfit`),t(`dashboard.analysis.totalExpense`)],textStyle:{color:e.colorText}},grid:{left:`3%`,right:`4%`,bottom:`3%`,containLabel:!0},xAxis:[{type:`category`,boundaryGap:!1,data:[t(`dashboard.analysis.january`),t(`dashboard.analysis.february`),t(`dashboard.analysis.march`),t(`dashboard.analysis.april`),t(`dashboard.analysis.may`),t(`dashboard.analysis.june`),t(`dashboard.analysis.july`),t(`dashboard.analysis.august`),t(`dashboard.analysis.september`),t(`dashboard.analysis.october`),t(`dashboard.analysis.november`),t(`dashboard.analysis.december`)]}],yAxis:[{type:`value`,splitLine:{lineStyle:{color:e.colorBorder}}}],series:[{name:t(`dashboard.analysis.grossProfit`),type:`line`,stack:`Total`,areaStyle:{color:e.colorPrimaryBorder},emphasis:{focus:`series`},itemStyle:{color:e.colorPrimary},data:[30,36,42,33,21,26,29,35,42,32,28,26]},{name:t(`dashboard.analysis.netProfit`),type:`line`,stack:`Total`,areaStyle:{color:e.colorSuccessBorder},emphasis:{focus:`series`},itemStyle:{color:e.colorSuccess},data:[32,16,18,30,15,19,22,17,24,19,30,31]},{name:t(`dashboard.analysis.totalExpense`),type:`line`,stack:`Total`,areaStyle:{color:e.colorWarningBorder},emphasis:{focus:`series`},itemStyle:{color:e.colorWarning},data:[36,24,36,36,39,56,24,23,21,12,16,19]}]},m={title:{text:t(`dashboard.analysis.accessFrom`),textStyle:{color:e.colorText,fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong}},tooltip:{trigger:`item`},legend:{bottom:`0%`,left:`center`,textStyle:{color:e.colorText}},series:[{name:t(`dashboard.analysis.accessFrom`),type:`pie`,radius:[`40%`,`70%`],avoidLabelOverlap:!1,itemStyle:{borderRadius:e.borderRadius,borderColor:e.colorBorder,borderWidth:2},label:{show:!1,position:`center`},emphasis:{label:{show:!0,fontSize:40,fontWeight:`bold`}},labelLine:{show:!1},data:[{value:1048,name:t(`dashboard.analysis.searchEngine`)},{value:735,name:t(`dashboard.analysis.direct`)},{value:580,name:t(`dashboard.analysis.email`)},{value:484,name:t(`dashboard.analysis.unionAds`)},{value:300,name:t(`dashboard.analysis.videoAds`)}]}]};return(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(d,{gutter:[20,20],children:[(0,$.jsx)(u,{xxl:6,lg:12,xs:24,children:(0,$.jsxs)(l,{variant:`borderless`,children:[(0,$.jsx)(`div`,{children:t(`dashboard.analysis.totalRevenue`)}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between pt-4 pb-2`,children:[(0,$.jsx)(`div`,{className:`text-4xl flex-0`,children:`¥3,415.00`}),(0,$.jsx)(N9,{style:{width:120,height:80},option:n})]}),(0,$.jsxs)(`div`,{children:[t(`dashboard.since.lastWeek`),` `,(0,$.jsxs)(`span`,{style:{color:e.colorError},children:[(0,$.jsx)(g,{}),`11.28%`]})]})]})}),(0,$.jsx)(u,{xxl:6,lg:12,xs:24,children:(0,$.jsxs)(l,{variant:`borderless`,children:[(0,$.jsx)(`div`,{children:t(`dashboard.analysis.totalExpenses`)}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between pt-4 pb-2`,children:[(0,$.jsx)(`div`,{className:`text-4xl flex-0`,children:`¥8,425.00`}),(0,$.jsx)(N9,{style:{width:120,height:80},option:r})]}),(0,$.jsxs)(`div`,{children:[t(`dashboard.since.lastWeek`),` `,(0,$.jsxs)(`span`,{style:{color:e.colorSuccess},children:[(0,$.jsx)(h,{}),`15.33%`]})]})]})}),(0,$.jsx)(u,{xxl:6,lg:12,xs:24,children:(0,$.jsxs)(l,{variant:`borderless`,children:[(0,$.jsx)(`div`,{children:t(`dashboard.analysis.visitors`)}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between pt-4 pb-2`,children:[(0,$.jsx)(`div`,{className:`text-4xl flex-0`,children:`1,128`}),(0,$.jsx)(`div`,{className:`text-4xl rounded-full flex items-center justify-center`,style:{height:80,width:80,background:e.colorPrimaryBg},children:(0,$.jsx)(v,{style:{color:e.colorPrimary}})})]}),(0,$.jsxs)(`div`,{children:[t(`dashboard.since.lastWeek`),` `,(0,$.jsxs)(`span`,{style:{color:e.colorError},children:[(0,$.jsx)(g,{}),`32.60%`]})]})]})}),(0,$.jsx)(u,{xxl:6,lg:12,xs:24,children:(0,$.jsxs)(l,{variant:`borderless`,children:[(0,$.jsx)(`div`,{children:t(`dashboard.analysis.likes`)}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between pt-4 pb-2`,children:[(0,$.jsx)(`div`,{className:`text-4xl flex-0`,children:`668`}),(0,$.jsx)(`div`,{className:`text-4xl rounded-full flex items-center justify-center`,style:{height:80,width:80,background:e.colorPrimaryBg},children:(0,$.jsx)(_,{style:{color:e.colorPrimary}})})]}),(0,$.jsxs)(`div`,{children:[t(`dashboard.since.lastWeek`),` `,(0,$.jsxs)(`span`,{style:{color:e.colorSuccess},children:[(0,$.jsx)(h,{}),`9.60%`]})]})]})}),(0,$.jsx)(u,{xl:18,xs:24,children:(0,$.jsx)(l,{variant:`borderless`,children:(0,$.jsx)(N9,{style:{width:`100%`,height:460},option:i})})}),(0,$.jsx)(u,{xl:6,xs:24,children:(0,$.jsx)(l,{variant:`borderless`,children:(0,$.jsx)(N9,{style:{width:`100%`,height:460},option:m})})}),(0,$.jsx)(u,{xl:12,xs:24,children:(0,$.jsxs)(l,{variant:`borderless`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between mb-5`,children:[(0,$.jsx)(`div`,{style:{fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong},children:t(`dashboard.analysis.salesRanking`)}),(0,$.jsx)(c.Group,{options:[{label:t(`dashboard.analysis.month`),value:`month`},{label:t(`dashboard.analysis.year`),value:`year`},{label:t(`dashboard.analysis.day`),value:`day`}],defaultValue:`day`,optionType:`button`,buttonStyle:`solid`})]}),(0,$.jsx)(a,{columns:[{title:t(`dashboard.analysis.article`),dataIndex:`name`,key:`name`,render:e=>(0,$.jsx)(`a`,{children:e})},{title:t(`dashboard.analysis.age`),dataIndex:`age`,key:`age`},{title:t(`dashboard.analysis.address`),dataIndex:`address`,key:`address`},{title:t(`dashboard.analysis.tags`),key:`tags`,dataIndex:`tags`,render:(e,{tags:t})=>(0,$.jsx)($.Fragment,{children:t.map(e=>{let t=e.length>5?`geekblue`:`green`;return e===`loser`&&(t=`volcano`),(0,$.jsx)(p,{color:t,children:e.toUpperCase()},e)})})},{title:t(`dashboard.analysis.action`),key:`action`,render:(e,n)=>(0,$.jsxs)(o,{size:`middle`,children:[(0,$.jsxs)(`a`,{children:[t(`dashboard.analysis.invite`),` `,n.name]}),(0,$.jsx)(`a`,{children:t(`dashboard.analysis.delete`)})]})}],dataSource:[{key:`1`,name:`John Brown`,age:32,address:`New York No. 1 Lake Park`,tags:[`nice`,`developer`]},{key:`2`,name:`Jim Green`,age:42,address:`London No. 1 Lake Park`,tags:[`loser`]},{key:`3`,name:`Joe Black`,age:32,address:`Sydney No. 1 Lake Park`,tags:[`cool`,`teacher`]},{key:`4`,name:`Jim Green`,age:42,address:`London No. 1 Lake Park`,tags:[`loser`]},{key:`5`,name:`Joe Black`,age:32,address:`Sydney No. 1 Lake Park`,tags:[`cool`,`teacher`]}],pagination:!1,scroll:{x:800}})]})}),(0,$.jsx)(u,{xl:12,xs:24,children:(0,$.jsxs)(l,{variant:`borderless`,children:[(0,$.jsx)(`div`,{className:`mb-5`,style:{fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong},children:t(`dashboard.analysis.userReviews`)}),(0,$.jsx)(f,{dataSource:[{title:`Ant Design Title 1`},{title:`Ant Design Title 2`},{title:`Ant Design Title 3`},{title:`Ant Design Title 4`},{title:`Ant Design Title 5`}],renderItem:(e,n)=>(0,$.jsx)(f.Item,{children:(0,$.jsx)(f.Item.Meta,{avatar:(0,$.jsx)(s,{src:`https://xsgames.co/randomusers/avatar.php?g=pixel&key=${n}`}),title:(0,$.jsx)(`a`,{href:`https://ant.design`,children:e.title}),description:t(`dashboard.analysis.reviewDescription`)})})})]})})]})})};export{F9 as default}; \ No newline at end of file diff --git a/public/assets/app-BscZ5bao.js b/public/assets/app-BscZ5bao.js new file mode 100644 index 0000000..05e6f76 --- /dev/null +++ b/public/assets/app-BscZ5bao.js @@ -0,0 +1 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,Et as n,Ln as r,Ot as i,Tt as a,Vn as o,Wt as s,bt as c,nt as l,xt as u,yt as d,zn as f}from"./jsx-runtime-ADHq9IcL.js";import{w as p}from"./tooltip-CRuv8UNz.js";import{t as m}from"./CheckCircleFilled-D9xa2k05.js";import{t as h}from"./CloseCircleFilled-BARdd-Ff.js";import{r as g}from"./PlusOutlined-W6xCIIXs.js";import{t as _}from"./ExclamationCircleFilled-BF18pnJ8.js";import{_ as v,d as y,f as b,g as x,i as S,l as C,m as w,n as T,p as E,t as D,u as O}from"./context-o-GHk4GQ.js";import{n as k,t as A}from"./useClosable-CCgKioKg.js";import{t as j}from"./useModal-DQaWKI1g.js";var M=e(t()),N={info:M.createElement(v,null),success:M.createElement(m,null),error:M.createElement(h,null),warning:M.createElement(_,null),loading:M.createElement(l,null)};function P(e,t){return t===null||t===!1?null:t||M.createElement(g,{className:`${e}-close-icon`})}var F=4.5,I=`topRight`,L={offset:8},R=({children:e,prefixCls:t})=>{let n=d(t),[r,i]=C(t,n);return M.createElement(x,{classNames:{list:o(r,i,n)}},e)},z=(e,{prefixCls:t,key:n})=>M.createElement(R,{prefixCls:t,key:n},e),B=M.forwardRef((e,t)=>{let{top:n,bottom:i,prefixCls:s,getContainer:c,maxCount:l,rtl:d,onAllRemoved:p,stack:m,duration:h=F,pauseOnHover:g=!0,showProgress:_}=e,{getPrefixCls:v,getPopupContainer:x,direction:S}=f(`notification`),{notification:C}=(0,M.useContext)(r),T=s||v(`notification`),D=(0,M.useMemo)(()=>a(h)&&h>0?h:!1,[h]),[O,k]=u([C?.classNames,e?.classNames],[C?.styles,e?.styles],{props:e}),A=()=>b(n,i),j=()=>o({[`${T}-rtl`]:d??S===`rtl`}),N=()=>y(T),I=E(m,L),[R,B]=w({prefixCls:T,style:A,className:j,motion:N,closable:{closeIcon:P(T)},duration:D,getContainer:()=>c?.()||x?.()||document.body,maxCount:l,pauseOnHover:g,showProgress:_,classNames:O,styles:k,onAllRemoved:p,renderNotifications:z,stack:I});return M.useImperativeHandle(t,()=>({...R,prefixCls:T,notification:C})),B});function V(e){let t=M.useRef(null);p(`Notification`);let{notification:a}=M.useContext(r);return[M.useMemo(()=>{let r=r=>{if(!t.current)return;let{open:s,prefixCls:l,notification:u}=t.current,d=u?.className||{},f=u?.style||{},p=`${l}-notice`,{title:m,message:h,description:g,icon:_,type:v,btn:y,actions:b,className:x,style:S,role:C=`alert`,closeIcon:w,closable:T,classNames:E={},styles:D={},...j}=r,M=m??h,F=i(M),L=b??y,R=P(p,O(w,e,u)),[z,B,,V]=A(k({...e||{},...r}),k(a),{closable:!0,closeIcon:R}),H=z?{onClose:n(T)?T.onClose:void 0,closeIcon:B,...V}:!1,U=c(E,{props:r}),W=c(D,{props:r}),G=_||(v?N[v]:null),K=!_&&v?`${p}-icon-${v}`:void 0;return s({placement:e?.placement??I,...j,title:F?M:null,description:g,icon:G,actions:L,role:C,classNames:{...U,icon:o(K,U.icon)},styles:{...W,root:{...f,...W.root}},className:o({[`${p}-${v}`]:v},x,d),style:S,closable:H})},s={open:r,destroy:e=>{e===void 0?t.current?.destroy():t.current?.close(e)}};return[`success`,`info`,`warning`,`error`].forEach(e=>{s[e]=t=>r({...t,type:e})}),s},[e,a]),M.createElement(B,{key:`notification-holder`,...e,ref:t})]}function H(e){return V(e)}var U=s(`App`,e=>{let{componentCls:t,colorText:n,fontSize:r,lineHeight:i,fontFamily:a}=e;return{[t]:{color:n,fontSize:r,lineHeight:i,fontFamily:a,[`&${t}-rtl`]:{direction:`rtl`}}}},()=>({})),W=M.forwardRef((e,t)=>{let{prefixCls:n,children:r,className:i,rootClassName:a,message:s,notification:c,style:l,component:u=`div`}=e,{direction:d,getPrefixCls:m,className:h,style:g}=f(`app`),_=m(`app`,n),[v,y]=U(_),b=o(v,_,i,a,y,{[`${_}-rtl`]:d===`rtl`}),x=(0,M.useContext)(D),C=M.useMemo(()=>({message:{...x.message,...s},notification:{...x.notification,...c}}),[s,c,x.message,x.notification]),[w,E]=S(C.message),[O,k]=H(C.notification),[A,N]=j(),P=M.useMemo(()=>({message:w,notification:O,modal:A}),[w,O,A]);p(`App`)(!(y&&u===!1),`usage`,"When using cssVar, ensure `component` is assigned a valid React component string."),p(`App`)(!t||u!==!1,`usage`,"`ref` is not supported when `component` is `false`. Please provide a valid `component` instead.");let F=u===!1?M.Fragment:u,I={className:o(h,b),style:{...g,...l}};return M.createElement(T.Provider,{value:P},M.createElement(D.Provider,{value:C},M.createElement(F,{...u===!1?void 0:{...I,ref:t}},N,E,k,r)))}),G=()=>M.useContext(T),K=W;K.useApp=G;export{K as t}; \ No newline at end of file diff --git a/public/assets/avatar-ZeeUR_v9.js b/public/assets/avatar-ZeeUR_v9.js new file mode 100644 index 0000000..da8e2eb --- /dev/null +++ b/public/assets/avatar-ZeeUR_v9.js @@ -0,0 +1 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,Et as n,Hn as r,Jn as i,Ln as a,Pn as o,Q as s,Tt as c,Vn as l,Wt as u,Zt as d,st as f,ur as p,xn as m,yt as h,zn as g}from"./jsx-runtime-ADHq9IcL.js";import{r as _,t as v}from"./useBreakpoint-Dhidjsjf.js";import{t as y}from"./popover-DCXX8fLF.js";var b=e(t()),x=b.createContext({}),S=e=>{let{antCls:t,componentCls:n,iconCls:r,avatarBg:i,avatarColor:a,containerSize:s,containerSizeLG:c,containerSizeSM:l,textFontSize:u,textFontSizeLG:f,textFontSizeSM:p,iconFontSize:m,iconFontSizeLG:h,iconFontSizeSM:g,borderRadius:_,borderRadiusLG:v,borderRadiusSM:y,lineWidth:b,lineType:x}=e,S=(e,t,i,a)=>({width:e,height:e,borderRadius:`50%`,fontSize:t,[`&${n}-square`]:{borderRadius:a},[`&${n}-icon`]:{fontSize:i,[`> ${r}`]:{margin:0}}});return{[n]:{...d(e),position:`relative`,display:`inline-flex`,justifyContent:`center`,alignItems:`center`,overflow:`hidden`,color:a,whiteSpace:`nowrap`,textAlign:`center`,verticalAlign:`middle`,background:i,border:`${o(b)} ${x} transparent`,"&-image":{background:`transparent`},[`${t}-image-img`]:{display:`block`},...S(s,u,m,_),"&-lg":{...S(c,f,h,v)},"&-sm":{...S(l,p,g,y)},"> img":{display:`block`,width:`100%`,height:`100%`,objectFit:`cover`}}}},C=e=>{let{componentCls:t,groupBorderColor:n,groupOverlapping:r,groupSpace:i}=e;return{[`${t}-group`]:{display:`inline-flex`,[t]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:i}}}},w=u(`Avatar`,e=>{let{colorTextLightSolid:t,colorTextPlaceholder:n}=e,r=m(e,{avatarBg:n,avatarColor:t});return[S(r),C(r)]},e=>{let{controlHeight:t,controlHeightLG:n,controlHeightSM:r,fontSize:i,fontSizeLG:a,fontSizeXL:o,fontSizeHeading3:s,marginXS:c,marginXXS:l,colorBorderBg:u}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:r,textFontSize:i,textFontSizeLG:i,textFontSizeSM:i,iconFontSize:Math.round((a+o)/2),iconFontSizeLG:s,iconFontSizeSM:i,groupSpace:l,groupOverlapping:-c,groupBorderColor:u}}),T=b.forwardRef((e,t)=>{let{prefixCls:i,shape:a,size:o,src:u,srcSet:d,icon:f,className:m,rootClassName:y,style:S,alt:C,draggable:T,children:E,crossOrigin:D,gap:O=4,onError:k,...A}=e,[j,M]=b.useState(1),[N,P]=b.useState(!1),[F,I]=b.useState(!0),L=b.useRef(null),R=b.useRef(null),z=p(t,L),{getPrefixCls:B,className:V,style:H}=g(`avatar`),U=b.useContext(x),W=()=>{if(!R.current||!L.current)return;let e=R.current.offsetWidth,t=L.current.offsetWidth;e!==0&&t!==0&&O*2{P(!0)},[]),b.useEffect(()=>{I(!0),M(1)},[u]),b.useEffect(W,[O]);let G=()=>{k?.()!==!1&&I(!1)},K=s(e=>o??U?.size??e??`medium`),q=v(Object.keys(n(K)&&K||{}).some(e=>_.includes(e))),J=b.useMemo(()=>{if(!n(K))return{};let e=_.find(e=>q[e]),t=K[e];return t?{width:t,height:t,fontSize:t&&(f||E)?t/2:18}:{}},[q,K,f,E]),Y=B(`avatar`,i),X=h(Y),[Z,ee]=w(Y,X),te=l({[`${Y}-lg`]:K===`large`,[`${Y}-sm`]:K===`small`}),Q=b.isValidElement(u),ne=l(Y,te,V,`${Y}-${a||U?.shape||`circle`}`,{[`${Y}-image`]:Q||u&&F,[`${Y}-icon`]:!!f},ee,X,m,y,Z),re=c(K)?{width:K,height:K,fontSize:f?K/2:18}:{},$;if(typeof u==`string`&&F)$=b.createElement(`img`,{src:u,draggable:T,srcSet:d,onError:G,alt:C,crossOrigin:D});else if(Q)$=u;else if(f)$=f;else if(N||j!==1){let e=`scale(${j})`,t={msTransform:e,WebkitTransform:e,transform:e};$=b.createElement(r,{onResize:W},b.createElement(`span`,{className:`${Y}-string`,ref:R,style:t},E))}else $=b.createElement(`span`,{className:`${Y}-string`,style:{opacity:0},ref:R},E);return b.createElement(`span`,{...A,style:{...re,...J,...H,...S},className:ne,ref:z},$)}),E=e=>{let{size:t,shape:n}=b.useContext(x),r=b.useMemo(()=>({size:e.size||t,shape:e.shape||n}),[e.size,e.shape,t,n]);return b.createElement(x.Provider,{value:r},e.children)},D=e=>{let{getPrefixCls:t,direction:n}=b.useContext(a),{prefixCls:r,className:o,rootClassName:s,style:c,maxCount:u,maxStyle:d,size:p,shape:m,maxPopoverPlacement:g,maxPopoverTrigger:_,children:v,max:x}=e,S=t(`avatar`,r),C=`${S}-group`,D=h(S),[O,k]=w(S,D),A=l(C,{[`${C}-rtl`]:n===`rtl`},k,D,o,s,O),j=i(v).map((e,t)=>f(e,{key:`avatar-key-${t}`})),M=x?.count||u,N=j.length;if(M&&M{let{prefixCls:t,value:n,current:r,offset:a=0}=e,o;return a&&(o={position:`absolute`,top:`${a}00%`,left:0}),y.createElement(`span`,{style:o,className:i(`${t}-only-unit`,{current:r})},n)};function x(e,t,n){let r=e,i=0;for(;(r+10)%10!==t;)r+=n,i+=n;return i}var S=e=>{let{prefixCls:t,count:n,value:r}=e,i=Number(r),a=Math.abs(n),[o,s]=y.useState(i),[c,l]=y.useState(a),u=()=>{s(i),l(a)};y.useEffect(()=>{let e=setTimeout(u,1e3);return()=>clearTimeout(e)},[i]);let d,f;if(o===i||Number.isNaN(i)||Number.isNaN(o))d=[y.createElement(b,{...e,key:i,current:!0})],f={transition:`none`};else{d=[];let t=i+10,n=[];for(let e=i;e<=t;e+=1)n.push(e);let r=ce%10===o);d=(r<0?n.slice(0,s+1):n.slice(s)).map((t,n)=>{let i=t%10;return y.createElement(b,{...e,key:t,value:i,offset:r<0?n-s:n,current:n===s})}),f={transform:`translateY(${-x(o,i,r)}00%)`}}return y.createElement(`span`,{className:`${t}-only`,style:f,onTransitionEnd:u},d)},C=y.forwardRef((e,t)=>{let{prefixCls:n,count:r,className:a,motionClassName:o,style:s,title:c,show:l,component:u=`sup`,children:d,...f}=e,{getPrefixCls:p}=y.useContext(h),m=p(`scroll-number`,n),_={...f,"data-show":l,style:s,className:i(m,a,o),title:c},v=r;if(r&&Number(r)%1==0){let e=String(r).split(``);v=y.createElement(`bdi`,null,e.map((t,n)=>y.createElement(S,{prefixCls:m,count:Number(r),value:t,key:e.length-n})))}return s?.borderColor&&(_.style={...s,boxShadow:`0 0 0 1px ${s.borderColor} inset`}),d?g(d,e=>({className:i(`${m}-custom-component`,e?.className,o)})):y.createElement(u,{..._,ref:t},v)}),w=new p(`antStatusProcessing`,{"0%":{transform:`scale(0.8)`,opacity:.5},"100%":{transform:`scale(2.4)`,opacity:0}}),T=new p(`antZoomBadgeIn`,{"0%":{transform:`scale(0) translate(50%, -50%)`,opacity:0},"100%":{transform:`scale(1) translate(50%, -50%)`}}),E=new p(`antZoomBadgeOut`,{"0%":{transform:`scale(1) translate(50%, -50%)`},"100%":{transform:`scale(0) translate(50%, -50%)`,opacity:0}}),D=new p(`antNoWrapperZoomBadgeIn`,{"0%":{transform:`scale(0)`,opacity:0},"100%":{transform:`scale(1)`}}),O=new p(`antNoWrapperZoomBadgeOut`,{"0%":{transform:`scale(1)`},"100%":{transform:`scale(0)`,opacity:0}}),k=new p(`antBadgeLoadingCircle`,{"0%":{transformOrigin:`50%`},"100%":{transform:`translate(50%, -50%) rotate(360deg)`,transformOrigin:`50%`}}),A=t=>{let{componentCls:n,iconCls:r,antCls:i,badgeShadowSize:a,textFontSize:o,textFontSizeSM:s,statusSize:l,dotSize:u,textFontWeight:d,indicatorHeight:f,indicatorHeightSM:p,marginXS:m,calc:h}=t,g=`${i}-scroll-number`,_=v(t,(e,{darkColor:t})=>({[`&${n} ${n}-color-${e}`]:{background:t,[`&:not(${n}-count)`]:{color:t},"a:hover &":{background:t}}}));return{[n]:{...e(t),position:`relative`,display:`inline-block`,width:`fit-content`,lineHeight:1,[`${n}-count`]:{display:`inline-flex`,justifyContent:`center`,zIndex:t.indicatorZIndex,minWidth:f,height:f,color:t.badgeTextColor,fontWeight:d,fontSize:o,lineHeight:c(f),whiteSpace:`nowrap`,textAlign:`center`,background:t.badgeColor,borderRadius:h(f).div(2).equal(),boxShadow:`0 0 0 ${c(a)} ${t.badgeShadowColor}`,transition:`background-color ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${n}-count-sm`]:{minWidth:p,height:p,fontSize:s,lineHeight:c(p),borderRadius:h(p).div(2).equal()},[`${n}-multiple-words`]:{paddingInline:t.paddingInline,bdi:{unicodeBidi:`plaintext`}},[`${n}-dot`]:{zIndex:t.indicatorZIndex,width:u,minWidth:u,height:u,background:t.badgeColor,borderRadius:`100%`,boxShadow:`0 0 0 ${c(a)} ${t.badgeShadowColor}`},[`${n}-count, ${n}-dot, ${g}-custom-component`]:{position:`absolute`,top:0,insetInlineEnd:0,transform:`translate(50%, -50%)`,transformOrigin:`100% 0%`,[`&${r}-spin`]:{animationName:k,animationDuration:`1s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`}},[`&${n}-status`]:{lineHeight:`inherit`,verticalAlign:`baseline`,[`${n}-status-dot`]:{position:`relative`,top:-1,display:`inline-block`,width:l,height:l,verticalAlign:`middle`,borderRadius:`50%`},[`${n}-status-success`]:{backgroundColor:t.colorSuccess},[`${n}-status-processing`]:{overflow:`visible`,color:t.colorInfo,backgroundColor:t.colorInfo,borderColor:`currentcolor`,"&::after":{position:`absolute`,top:0,insetInlineStart:0,width:`100%`,height:`100%`,borderWidth:a,borderStyle:`solid`,borderColor:`inherit`,borderRadius:`50%`,animationName:w,animationDuration:t.badgeProcessingDuration,animationIterationCount:`infinite`,animationTimingFunction:`ease-in-out`,content:`""`}},[`${n}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${n}-status-error`]:{backgroundColor:t.colorError},[`${n}-status-warning`]:{backgroundColor:t.colorWarning},[`${n}-status-text`]:{marginInlineStart:m,color:t.colorText,fontSize:t.fontSize}},..._,[`${n}-zoom-appear, ${n}-zoom-enter`]:{animationName:T,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:`both`},[`${n}-zoom-leave`]:{animationName:E,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:`both`},[`&${n}-not-a-wrapper`]:{[`${n}-zoom-appear, ${n}-zoom-enter`]:{animationName:D,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${n}-zoom-leave`]:{animationName:O,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${n}-status)`]:{verticalAlign:`middle`},[`${g}-custom-component, ${n}-count`]:{transform:`none`},[`${g}-custom-component, ${g}`]:{position:`relative`,top:`auto`,display:`block`,transformOrigin:`50% 50%`}},[g]:{overflow:`hidden`,transition:`all ${t.motionDurationMid} ${t.motionEaseOutBack}`,[`${g}-only`]:{position:`relative`,display:`inline-block`,height:f,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:`preserve-3d`,WebkitBackfaceVisibility:`hidden`,[`> p${g}-only-unit`]:{height:f,margin:0,WebkitTransformStyle:`preserve-3d`,WebkitBackfaceVisibility:`hidden`}},[`${g}-symbol`]:{verticalAlign:`top`}},"&-rtl":{direction:`rtl`,[`${n}-count, ${n}-dot, ${g}-custom-component`]:{transform:`translate(-50%, -50%)`}}}}},j=e=>{let{fontHeight:n,lineWidth:r,marginXS:i,colorBorderBg:a}=e,o=n,s=r,c=e.colorTextLightSolid,l=e.colorError,u=e.colorErrorHover;return t(e,{badgeFontHeight:o,badgeShadowSize:s,badgeTextColor:c,badgeColor:l,badgeColorHover:u,badgeShadowColor:a,badgeProcessingDuration:`1.2s`,badgeRibbonOffset:i,badgeRibbonCornerTransform:`scaleY(0.75)`,badgeRibbonCornerFilter:`brightness(75%)`})},M=e=>{let{fontSize:t,lineHeight:n,fontSizeSM:r,lineWidth:i,paddingXS:a}=e;return{indicatorZIndex:`auto`,indicatorHeight:Math.round(t*n)-2*i,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:`normal`,statusSize:r/2,paddingInline:a}},ee=a(`Badge`,e=>A(j(e)),M),N=y.forwardRef((e,t)=>{let{prefixCls:n,scrollNumberPrefixCls:a,children:o,status:c,text:p,color:h,count:v=null,overflowCount:b=99,dot:x=!1,size:S=`medium`,title:w,offset:T,style:E,className:D,rootClassName:O,classNames:k,styles:A,showZero:j=!1,...M}=e,{getPrefixCls:N,direction:P,className:F,style:I,classNames:L,styles:te}=l(`badge`),R=N(`badge`,n),[ne,re]=ee(R),ie={...e,overflowCount:b,size:S,dot:x,showZero:j},[z,B]=u([L,k],[te,A],{props:ie}),V=v>b?`${b}+`:v,H=V===`0`||V===0||p===`0`||p===0,ae=v===null||H&&!j,U=(m(c)||m(h))&&ae,oe=m(c)||!H,W=x&&!H,G=W?``:V,K=(0,y.useMemo)(()=>(!s(G)&&!s(p)||H&&!j)&&!W,[G,H,j,W,p]),q=(0,y.useRef)(v);K||(q.current=v);let J=q.current,Y=(0,y.useRef)(G);K||(Y.current=G);let X=Y.current,se=(0,y.useRef)(W);K||(se.current=W);let Z=(0,y.useMemo)(()=>{if(!T)return{...I,...E};let e=Number.parseInt(T[0],10);return{marginTop:T[1],insetInlineEnd:-e,...I,...E}},[T,E,I]),ce=w??(typeof J==`string`||f(J)?J:void 0),le=!K&&(p===0?j:!!p&&p!==!0),ue=le?y.createElement(`span`,{className:`${R}-status-text`},p):null,de=d(J)?g(J,e=>({style:{...Z,...e.style}})):void 0,Q=_(h,!1),fe=i(z.indicator,{[`${R}-status-dot`]:U,[`${R}-status-${c}`]:!!c,[`${R}-color-${h}`]:Q}),$={};h&&!Q&&($.color=h,$.background=h);let pe=i(R,{[`${R}-status`]:U,[`${R}-not-a-wrapper`]:!o,[`${R}-rtl`]:P===`rtl`},D,O,F,z.root,ne,re);if(!o&&U&&(p||oe||!ae)){let e=Z.color;return y.createElement(`span`,{ref:t,...M,className:pe,style:{...B.root,...Z}},y.createElement(`span`,{className:fe,style:{...B.indicator,...$}}),le&&y.createElement(`span`,{style:{color:e},className:`${R}-status-text`},p))}return y.createElement(`span`,{ref:t,...M,className:pe,style:B.root},o,y.createElement(r,{visible:!K,motionName:`${R}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:e})=>{let t=N(`scroll-number`,a),n=se.current,r=i(z.indicator,{[`${R}-dot`]:n,[`${R}-count`]:!n,[`${R}-count-sm`]:S===`small`,[`${R}-multiple-words`]:!n&&X&&X.toString().length>1,[`${R}-status-${c}`]:!!c,[`${R}-color-${h}`]:Q}),o={...B.indicator,...Z};return h&&!Q&&(o||={},o.background=h),y.createElement(C,{prefixCls:t,show:!K,motionClassName:e,className:r,count:X,title:ce,style:o,key:`scrollNumber`},de)}),ue)}),P=t=>{let{antCls:n,badgeFontHeight:r,marginXS:i,badgeRibbonOffset:a,calc:o}=t,s=`${n}-ribbon`,l=`${n}-ribbon-wrapper`,u=v(t,(e,{darkColor:t})=>({[`&${s}-color-${e}`]:{background:t,color:t}}));return{[l]:{position:`relative`},[s]:{...e(t),position:`absolute`,top:i,padding:`0 ${c(t.paddingXS)}`,color:t.colorPrimary,lineHeight:c(r),whiteSpace:`nowrap`,backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${s}-content`]:{color:t.badgeTextColor},[`${s}-corner`]:{position:`absolute`,top:`100%`,width:a,height:a,color:`currentcolor`,border:`${c(o(a).div(2).equal())} solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:`top`,filter:t.badgeRibbonCornerFilter},...u,[`&${s}-placement-end`]:{insetInlineEnd:o(a).mul(-1).equal(),borderEndEndRadius:0,[`${s}-corner`]:{insetInlineEnd:0,borderInlineEndColor:`transparent`,borderBlockEndColor:`transparent`}},[`&${s}-placement-start`]:{insetInlineStart:o(a).mul(-1).equal(),borderEndStartRadius:0,[`${s}-corner`]:{insetInlineStart:0,borderBlockEndColor:`transparent`,borderInlineStartColor:`transparent`}},"&-rtl":{direction:`rtl`}}}},F=a([`Badge`,`Ribbon`],e=>P(j(e)),M),I=e=>{let{className:t,prefixCls:n,style:r,color:a,children:o,text:s,placement:c=`end`,rootClassName:d,styles:f,classNames:p}=e,{getPrefixCls:m,direction:h,className:g,style:v,classNames:b,styles:x}=l(`ribbon`),S=m(`ribbon`,n),C=`${S}-wrapper`,[w,T]=F(S,C),E={...e,placement:c},[D,O]=u([b,p],[x,f],{props:E}),k=_(a,!1),A=i(S,`${S}-placement-${c}`,{[`${S}-rtl`]:h===`rtl`,[`${S}-color-${a}`]:k},t,g,D.indicator),j={},M={};return a&&!k&&(j.background=a,M.color=a),y.createElement(`div`,{className:i(C,d,w,T,D.root),style:O.root},o,y.createElement(`div`,{className:i(A,w),style:{...j,...O.indicator,...v,...r}},y.createElement(`span`,{className:i(`${S}-content`,D.content),style:O.content},s),y.createElement(`div`,{className:`${S}-corner`,style:M})))},L=N;L.Ribbon=I;export{L as t}; \ No newline at end of file diff --git a/public/assets/badge-Cim9D6DD.js b/public/assets/badge-Cim9D6DD.js new file mode 100644 index 0000000..4a176be --- /dev/null +++ b/public/assets/badge-Cim9D6DD.js @@ -0,0 +1 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{An as t,Dr as n,Et as r,Ln as i,Mt as a,Ot as o,Pn as s,Tt as c,Vn as l,Wt as u,Zt as d,kt as f,st as p,wt as m,xn as h,xt as g,zn as _}from"./jsx-runtime-ADHq9IcL.js";import{S as v,n as ee}from"./tooltip-CRuv8UNz.js";var y=e(n()),b=e=>{let{prefixCls:t,value:n,current:r,offset:i=0}=e,a;return i&&(a={position:`absolute`,top:`${i}00%`,left:0}),y.createElement(`span`,{style:a,className:l(`${t}-only-unit`,{current:r})},n)};function x(e,t,n){let r=e,i=0;for(;(r+10)%10!==t;)r+=n,i+=n;return i}var S=e=>{let{prefixCls:t,count:n,value:r}=e,i=Number(r),a=Math.abs(n),[o,s]=y.useState(i),[c,l]=y.useState(a),u=()=>{s(i),l(a)};y.useEffect(()=>{let e=setTimeout(u,1e3);return()=>clearTimeout(e)},[i]);let d,f;if(o===i||Number.isNaN(i)||Number.isNaN(o))d=[y.createElement(b,{...e,key:i,current:!0})],f={transition:`none`};else{d=[];let t=i+10,n=[];for(let e=i;e<=t;e+=1)n.push(e);let r=ce%10===o);d=(r<0?n.slice(0,s+1):n.slice(s)).map((t,n)=>{let i=t%10;return y.createElement(b,{...e,key:t,value:i,offset:r<0?n-s:n,current:n===s})}),f={transform:`translateY(${-x(o,i,r)}00%)`}}return y.createElement(`span`,{className:`${t}-only`,style:f,onTransitionEnd:u},d)},C=y.forwardRef((e,t)=>{let{prefixCls:n,count:r,className:a,motionClassName:o,style:s,title:c,show:u,component:d=`sup`,children:f,...m}=e,{getPrefixCls:h}=y.useContext(i),g=h(`scroll-number`,n),_={...m,"data-show":u,style:s,className:l(g,a,o),title:c},v=r;if(r&&Number(r)%1==0){let e=String(r).split(``);v=y.createElement(`bdi`,null,e.map((t,n)=>y.createElement(S,{prefixCls:g,count:Number(r),value:t,key:e.length-n})))}return s?.borderColor&&(_.style={...s,boxShadow:`0 0 0 1px ${s.borderColor} inset`}),f?p(f,e=>({className:l(`${g}-custom-component`,e?.className,o)})):y.createElement(d,{..._,ref:t},v)}),w=new t(`antStatusProcessing`,{"0%":{transform:`scale(0.8)`,opacity:.5},"100%":{transform:`scale(2.4)`,opacity:0}}),T=new t(`antZoomBadgeIn`,{"0%":{transform:`scale(0) translate(50%, -50%)`,opacity:0},"100%":{transform:`scale(1) translate(50%, -50%)`}}),E=new t(`antZoomBadgeOut`,{"0%":{transform:`scale(1) translate(50%, -50%)`},"100%":{transform:`scale(0) translate(50%, -50%)`,opacity:0}}),D=new t(`antNoWrapperZoomBadgeIn`,{"0%":{transform:`scale(0)`,opacity:0},"100%":{transform:`scale(1)`}}),O=new t(`antNoWrapperZoomBadgeOut`,{"0%":{transform:`scale(1)`},"100%":{transform:`scale(0)`,opacity:0}}),k=new t(`antBadgeLoadingCircle`,{"0%":{transformOrigin:`50%`},"100%":{transform:`translate(50%, -50%) rotate(360deg)`,transformOrigin:`50%`}}),A=e=>{let{componentCls:t,iconCls:n,antCls:r,badgeShadowSize:i,textFontSize:a,textFontSizeSM:o,statusSize:c,dotSize:l,textFontWeight:u,indicatorHeight:f,indicatorHeightSM:p,marginXS:m,calc:h}=e,g=`${r}-scroll-number`,_=v(e,(e,{darkColor:n})=>({[`&${t} ${t}-color-${e}`]:{background:n,[`&:not(${t}-count)`]:{color:n},"a:hover &":{background:n}}}));return{[t]:{...d(e),position:`relative`,display:`inline-block`,width:`fit-content`,lineHeight:1,[`${t}-count`]:{display:`inline-flex`,justifyContent:`center`,zIndex:e.indicatorZIndex,minWidth:f,height:f,color:e.badgeTextColor,fontWeight:u,fontSize:a,lineHeight:s(f),whiteSpace:`nowrap`,textAlign:`center`,background:e.badgeColor,borderRadius:h(f).div(2).equal(),boxShadow:`0 0 0 ${s(i)} ${e.badgeShadowColor}`,transition:`background-color ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:p,height:p,fontSize:o,lineHeight:s(p),borderRadius:h(p).div(2).equal()},[`${t}-multiple-words`]:{paddingInline:e.paddingInline,bdi:{unicodeBidi:`plaintext`}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:l,minWidth:l,height:l,background:e.badgeColor,borderRadius:`100%`,boxShadow:`0 0 0 ${s(i)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${g}-custom-component`]:{position:`absolute`,top:0,insetInlineEnd:0,transform:`translate(50%, -50%)`,transformOrigin:`100% 0%`,[`&${n}-spin`]:{animationName:k,animationDuration:`1s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`}},[`&${t}-status`]:{lineHeight:`inherit`,verticalAlign:`baseline`,[`${t}-status-dot`]:{position:`relative`,top:-1,display:`inline-block`,width:c,height:c,verticalAlign:`middle`,borderRadius:`50%`},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:`visible`,color:e.colorInfoTextHover,backgroundColor:e.colorInfo,borderColor:`currentcolor`,"&::after":{position:`absolute`,top:0,insetInlineStart:0,width:`100%`,height:`100%`,borderWidth:i,borderStyle:`solid`,borderColor:`inherit`,borderRadius:`50%`,animationName:w,animationDuration:e.badgeProcessingDuration,animationIterationCount:`infinite`,animationTimingFunction:`ease-in-out`,content:`""`}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:m,color:e.colorText,fontSize:e.fontSize}},..._,[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:T,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:`both`},[`${t}-zoom-leave`]:{animationName:E,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:`both`},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:D,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:O,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:`middle`},[`${g}-custom-component, ${t}-count`]:{transform:`none`},[`${g}-custom-component, ${g}`]:{position:`relative`,top:`auto`,display:`block`,transformOrigin:`50% 50%`}},[g]:{overflow:`hidden`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${g}-only`]:{position:`relative`,display:`inline-block`,height:f,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:`preserve-3d`,WebkitBackfaceVisibility:`hidden`,[`> p${g}-only-unit`]:{height:f,margin:0,WebkitTransformStyle:`preserve-3d`,WebkitBackfaceVisibility:`hidden`}},[`${g}-symbol`]:{verticalAlign:`top`}},"&-rtl":{direction:`rtl`,[`${t}-count, ${t}-dot, ${g}-custom-component`]:{transform:`translate(-50%, -50%)`}}}}},j=e=>{let{fontHeight:t,lineWidth:n,marginXS:r,colorBorderBg:i}=e,a=t,o=n,s=e.colorTextLightSolid,c=e.colorError,l=e.colorErrorHover;return h(e,{badgeFontHeight:a,badgeShadowSize:o,badgeTextColor:s,badgeColor:c,badgeColorHover:l,badgeShadowColor:i,badgeProcessingDuration:`1.2s`,badgeRibbonOffset:r,badgeRibbonCornerTransform:`scaleY(0.75)`,badgeRibbonCornerFilter:`brightness(75%)`})},M=e=>{let{fontSize:t,lineHeight:n,fontSizeSM:r,lineWidth:i,paddingXS:a}=e;return{indicatorZIndex:`auto`,indicatorHeight:Math.round(t*n)-2*i,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:`normal`,statusSize:r/2,paddingInline:a}},te=u(`Badge`,e=>A(j(e)),M),N=y.forwardRef((e,t)=>{let{prefixCls:n,scrollNumberPrefixCls:i,children:s,status:u,text:d,color:h,count:v=null,overflowCount:b=99,dot:x=!1,size:S=`medium`,title:w,offset:T,style:E,className:D,rootClassName:O,classNames:k,styles:A,showZero:j=!1,...M}=e,{getPrefixCls:N,direction:P,className:F,style:I,classNames:L,styles:ne}=_(`badge`),R=N(`badge`,n),[re,ie]=te(R),ae={...e,overflowCount:b,size:S,dot:x,showZero:j},[z,B]=g([L,k],[ne,A],{props:ae}),V=v>b?`${b}+`:v,H=V===`0`||V===0||d===`0`||d===0,U=v===null||H&&!j,W=(m(u)||m(h))&&U,oe=m(u)||!H,G=x&&!H,K=G?``:V,q=(0,y.useMemo)(()=>(!o(K)&&!o(d)||H&&!j)&&!G,[K,H,j,G,d]),J=(0,y.useRef)(v);q||(J.current=v);let Y=J.current,se=(0,y.useRef)(K);q||(se.current=K);let X=se.current,ce=(0,y.useRef)(G);q||(ce.current=G);let Z=(0,y.useMemo)(()=>{if(!T)return{...I,...E};let e=Number.parseInt(T[0],10);return{marginTop:T[1],insetInlineEnd:-e,...I,...E}},[T,E,I]),le=f(Y)||c(Y)?Y:void 0,ue=w===null||w===!1?void 0:w??le,de=!q&&(d===0?j:!!d&&d!==!0),fe=de?y.createElement(`span`,{className:`${R}-status-text`},d):null,pe=r(Y)?p(Y,e=>({style:{...Z,...e.style}})):void 0,Q=ee(h,!1),me=l(z.indicator,{[`${R}-status-dot`]:W,[`${R}-status-${u}`]:!!u,[`${R}-color-${h}`]:Q}),$={};h&&!Q&&($.color=h,$.background=h);let he=l(R,{[`${R}-status`]:W,[`${R}-not-a-wrapper`]:!s,[`${R}-rtl`]:P===`rtl`},D,O,F,z.root,re,ie);if(!s&&W&&(d||oe||!U)){let e=Z.color;return y.createElement(`span`,{ref:t,...M,className:he,style:{...B.root,...Z}},y.createElement(`span`,{className:me,style:{...B.indicator,...$}}),de&&y.createElement(`span`,{style:{color:e},className:`${R}-status-text`},d))}return y.createElement(`span`,{ref:t,...M,className:he,style:B.root},s,y.createElement(a,{visible:!q,motionName:`${R}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:e})=>{let t=N(`scroll-number`,i),n=ce.current,r=l(z.indicator,{[`${R}-dot`]:n,[`${R}-count`]:!n,[`${R}-count-sm`]:S===`small`,[`${R}-multiple-words`]:!n&&X&&X.toString().length>1,[`${R}-status-${u}`]:!!u,[`${R}-color-${h}`]:Q}),a={...B.indicator,...Z};return h&&!Q&&(a||={},a.background=h),y.createElement(C,{prefixCls:t,show:!q,motionClassName:e,className:r,count:X,title:ue,style:a,key:`scrollNumber`},pe)}),fe)}),P=e=>{let{antCls:t,badgeFontHeight:n,marginXS:r,badgeRibbonOffset:i,calc:a}=e,o=`${t}-ribbon`,c=`${t}-ribbon-wrapper`,l=v(e,(e,{darkColor:t})=>({[`&${o}-color-${e}`]:{background:t,color:t}}));return{[c]:{position:`relative`},[o]:{...d(e),position:`absolute`,top:r,padding:`0 ${s(e.paddingXS)}`,color:e.colorPrimary,lineHeight:s(n),whiteSpace:`nowrap`,backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${o}-content`]:{color:e.badgeTextColor},[`${o}-corner`]:{position:`absolute`,top:`100%`,width:i,height:i,color:`currentcolor`,border:`${s(a(i).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:`top`,filter:e.badgeRibbonCornerFilter},...l,[`&${o}-placement-end`]:{insetInlineEnd:a(i).mul(-1).equal(),borderEndEndRadius:0,[`${o}-corner`]:{insetInlineEnd:0,borderInlineEndColor:`transparent`,borderBlockEndColor:`transparent`}},[`&${o}-placement-start`]:{insetInlineStart:a(i).mul(-1).equal(),borderEndStartRadius:0,[`${o}-corner`]:{insetInlineStart:0,borderBlockEndColor:`transparent`,borderInlineStartColor:`transparent`}},"&-rtl":{direction:`rtl`}}}},F=u([`Badge`,`Ribbon`],e=>P(j(e)),M),I=e=>{let{className:t,prefixCls:n,style:r,color:i,children:a,text:o,placement:s=`end`,rootClassName:c,styles:u,classNames:d}=e,{getPrefixCls:f,direction:p,className:m,style:h,classNames:v,styles:b}=_(`ribbon`),x=f(`ribbon`,n),S=`${x}-wrapper`,[C,w]=F(x,S),T={...e,placement:s},[E,D]=g([v,d],[b,u],{props:T}),O=ee(i,!1),k=l(x,`${x}-placement-${s}`,{[`${x}-rtl`]:p===`rtl`,[`${x}-color-${i}`]:O},t,m,E.indicator),A={},j={};return i&&!O&&(A.background=i,j.color=i),y.createElement(`div`,{className:l(S,c,C,w,E.root),style:D.root},a,y.createElement(`div`,{className:l(k,C),style:{...A,...D.indicator,...h,...r}},y.createElement(`span`,{className:l(`${x}-content`,E.content),style:D.content},o),y.createElement(`div`,{className:`${x}-corner`,style:j})))},L=N;L.Ribbon=I;export{L as t}; \ No newline at end of file diff --git a/public/assets/base-layout-ACunaMOz.js b/public/assets/base-layout-ACunaMOz.js new file mode 100644 index 0000000..aadfe54 --- /dev/null +++ b/public/assets/base-layout-ACunaMOz.js @@ -0,0 +1 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Ct as t,Dr as n,St as r,Tt as i,Vn as a,Wt as o,Xn as s,Zt as c,n as l,st as u,t as d,wr as f,xn as p,xt as m,zn as h}from"./jsx-runtime-ADHq9IcL.js";import{t as g}from"./typography-C2UybztD.js";import{n as _}from"./PlusOutlined-W6xCIIXs.js";import{t as v}from"./space-BqavXZJj.js";import{t as y}from"./button-CcpWP-mq.js";import{t as b}from"./avatar-ZeeUR_v9.js";import{t as x}from"./card-BFxeciPE.js";import{n as S,t as C}from"./row-DQ81_S1d.js";import{t as w}from"./descriptions-DRDGXBQ6.js";import{t as T}from"./dropdown-dXoRpGL-.js";import{t as E}from"./flex-BB50-T81.js";import{t as D}from"./progress-C2fffzqa.js";import{t as O}from"./tag-BMkLMUVK.js";import{t as k}from"./RiseOutlined-C6wo3ytm.js";import{t as A}from"./ShoppingOutlined-FR5CTwva.js";import{t as j}from"./TeamOutlined-CZDGTBQJ.js";import{t as M}from"./UserOutlined-DjbONoy-.js";var N=e(n()),P=e=>{let{value:n,formatter:r,precision:a,decimalSeparator:o,groupSeparator:s=``,prefixCls:c,className:l,style:u}=e,d;if(t(r))d=r(n);else{let e=String(n),t=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(!t||e===`-`)d=e;else{let e=t[1],n=t[2]||`0`,r=t[4]||``;n=n.replace(/\B(?=(\d{3})+(?!\d))/g,s),i(a)&&(r=r.padEnd(a,`0`).slice(0,a>0?a:0)),r&&=`${o}${r}`,d=[N.createElement(`span`,{key:`int`,className:`${c}-content-value-int`},e,n),r&&N.createElement(`span`,{key:`decimal`,className:`${c}-content-value-decimal`},r)]}}return N.createElement(`span`,{className:l,style:u},d)},F=e=>{let{componentCls:t,marginXXS:n,padding:r,colorTextDescription:i,titleFontSize:a,colorTextHeading:o,contentFontSize:s,fontFamily:l}=e;return{[t]:{...c(e),[`${t}-header`]:{paddingBottom:n,[`${t}-title`]:{color:i,fontSize:a}},[`${t}-skeleton`]:{paddingTop:r},[`${t}-content`]:{color:o,fontSize:s,fontFamily:l,[`${t}-content-value`]:{display:`inline-block`,direction:`ltr`},[`${t}-content-prefix, ${t}-content-suffix`]:{display:`inline-block`},[`${t}-content-prefix`]:{marginInlineEnd:n},[`${t}-content-suffix`]:{marginInlineStart:n}}}}},I=o(`Statistic`,e=>F(p(e,{})),e=>{let{fontSizeHeading3:t,fontSize:n}=e;return{titleFontSize:n,contentFontSize:t}}),L=N.forwardRef((e,n)=>{let{prefixCls:i,className:o,rootClassName:c,style:l,valueStyle:u,value:d=0,title:f,valueRender:p,prefix:g,suffix:v,loading:y=!1,formatter:b,precision:x,decimalSeparator:S=`.`,groupSeparator:C=`,`,onMouseEnter:w,onMouseLeave:T,styles:E,classNames:D,...O}=e,{getPrefixCls:k,direction:A,className:j,style:M,classNames:F,styles:L}=h(`statistic`),R=k(`statistic`,i),[z,B]=I(R),V={...e,decimalSeparator:S,groupSeparator:C,loading:y,value:d},H=r(M),U=r(l),[W,G]=m([F,D],[L,H,E,U],{props:V}),K=a(R,{[`${R}-rtl`]:A===`rtl`},j,o,c,W.root,z,B),q=a(`${R}-header`,W.header),J=a(`${R}-title`,W.title),Y=a(`${R}-content`,W.content),X=a(`${R}-content-value`,W.value),Z=a(`${R}-content-prefix`,W.prefix),ee=a(`${R}-content-suffix`,W.suffix),Q=N.createElement(P,{decimalSeparator:S,groupSeparator:C,prefixCls:R,formatter:b,precision:x,value:d,className:X,style:G.value}),$=N.useRef(null);N.useImperativeHandle(n,()=>({nativeElement:$.current}));let te=s(O,{aria:!0,data:!0});return N.createElement(`div`,{...te,className:K,style:G.root,ref:$,onMouseEnter:w,onMouseLeave:T},f&&N.createElement(`div`,{className:q,style:G.header},N.createElement(`div`,{className:J,style:G.title},f)),N.createElement(_,{paragraph:!1,loading:y,className:`${R}-skeleton`,active:!0},N.createElement(`div`,{className:Y,style:{...u,...G.content}},g&&N.createElement(`span`,{className:Z,style:G.prefix},g),t(p)?p(Q):Q,v&&N.createElement(`span`,{className:ee,style:G.suffix},v))))}),R=[[`Y`,1e3*60*60*24*365],[`M`,1e3*60*60*24*30],[`D`,1e3*60*60*24],[`H`,1e3*60*60],[`m`,1e3*60],[`s`,1e3],[`S`,1]];function z(e,t){let n=e,r=/\[[^\]]*]/g,i=(t.match(r)||[]).map(e=>e.slice(1,-1)),a=t.replace(r,`[]`),o=R.reduce((e,[t,r])=>{if(e.includes(t)){let i=Math.floor(n/r);return n-=i*r,e.replace(RegExp(`${t}+`,`g`),e=>{let t=e.length;return i.toString().padStart(t,`0`)})}return e},a),s=0;return o.replace(r,()=>{let e=i[s];return s+=1,e})}function B(e,t,n){let{format:r=``}=t,i=new Date(e).getTime(),a=Date.now();return z(Math.max(n?i-a:a-i,0),r)}var V=1e3/60;function H(e){return new Date(e).getTime()}var U=e=>{let{value:t,format:n=`HH:mm:ss`,onChange:r,onFinish:i,type:a,...o}=e,s=a===`countdown`,[c,l]=N.useState(null),d=f(()=>{let e=Date.now(),n=H(t);l({});let a=s?n-e:e-n;return r?.(a),s&&n{let e,t=()=>{d()||window.clearInterval(e)},n=()=>{e=window.setInterval(t,V)},r=()=>{window.clearInterval(e)};return n(),()=>{r()}},[t,s]),N.useEffect(()=>{l({})},[]);let p=(e,t)=>c?B(e,{...t,format:n},s):`-`,m=e=>u(e,{title:void 0});return N.createElement(L,{...o,value:t,valueRender:m,formatter:p})},W=N.memo(e=>N.createElement(U,{...e,type:`countdown`}));L.Timer=U,L.Countdown=W;var G=L,K=d(),{Title:q}=g,J=()=>(0,K.jsxs)(`div`,{style:{minHeight:`100vh`},children:[(0,K.jsx)(x,{variant:`borderless`,style:{marginBottom:20},children:(0,K.jsxs)(E,{justify:`space-between`,align:`center`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(q,{level:3,style:{marginBottom:4},children:`页面标题`}),(0,K.jsx)(g.Text,{type:`secondary`,children:`这是页面的描述信息,可以简要说明页面用途`})]}),(0,K.jsxs)(v,{style:{height:`100%`},children:[(0,K.jsx)(y,{icon:(0,K.jsx)(M,{}),children:`操作一`}),(0,K.jsx)(y,{icon:(0,K.jsx)(j,{}),children:`操作二`}),(0,K.jsx)(y,{type:`primary`,icon:(0,K.jsx)(A,{}),children:`主要操作`}),(0,K.jsx)(T,{trigger:[`click`],menu:{items:[{label:`导出数据`,key:`1`,icon:(0,K.jsx)(k,{})},{label:`批量操作`,key:`2`},{label:`更多设置`,key:`3`}]},children:(0,K.jsx)(y,{style:{padding:`0 8px`},children:(0,K.jsx)(l,{style:{fontSize:18}})})})]})]})}),(0,K.jsxs)(C,{gutter:[16,16],style:{marginBottom:24},children:[(0,K.jsx)(S,{xs:24,sm:12,lg:6,children:(0,K.jsxs)(x,{variant:`borderless`,children:[(0,K.jsx)(G,{title:`总用户数`,value:11893,prefix:(0,K.jsx)(M,{style:{color:`#1677ff`}}),valueStyle:{color:`#1677ff`}}),(0,K.jsxs)(`div`,{style:{marginTop:12},children:[(0,K.jsx)(O,{color:`success`,children:`+12.5%`}),(0,K.jsx)(g.Text,{type:`secondary`,style:{fontSize:12},children:`较上周`})]})]})}),(0,K.jsx)(S,{xs:24,sm:12,lg:6,children:(0,K.jsxs)(x,{variant:`borderless`,children:[(0,K.jsx)(G,{title:`活跃用户`,value:8234,prefix:(0,K.jsx)(j,{style:{color:`#52c41a`}}),valueStyle:{color:`#52c41a`}}),(0,K.jsxs)(`div`,{style:{marginTop:12},children:[(0,K.jsx)(O,{color:`success`,children:`+8.2%`}),(0,K.jsx)(g.Text,{type:`secondary`,style:{fontSize:12},children:`较上周`})]})]})}),(0,K.jsx)(S,{xs:24,sm:12,lg:6,children:(0,K.jsxs)(x,{variant:`borderless`,children:[(0,K.jsx)(G,{title:`总订单`,value:32567,prefix:(0,K.jsx)(A,{style:{color:`#faad14`}}),valueStyle:{color:`#faad14`}}),(0,K.jsxs)(`div`,{style:{marginTop:12},children:[(0,K.jsx)(O,{color:`warning`,children:`+5.3%`}),(0,K.jsx)(g.Text,{type:`secondary`,style:{fontSize:12},children:`较上周`})]})]})}),(0,K.jsx)(S,{xs:24,sm:12,lg:6,children:(0,K.jsxs)(x,{variant:`borderless`,children:[(0,K.jsx)(G,{title:`总收入`,value:98234,prefix:`¥`,valueStyle:{color:`#f5222d`}}),(0,K.jsxs)(`div`,{style:{marginTop:12},children:[(0,K.jsx)(O,{color:`error`,children:`-2.1%`}),(0,K.jsx)(g.Text,{type:`secondary`,style:{fontSize:12},children:`较上周`})]})]})})]}),(0,K.jsxs)(x,{variant:`borderless`,tabList:[{label:`基本信息`,key:`base`},{label:`详细信息`,key:`info`},{label:`数据分析`,key:`analysis`}],activeTabKey:`base`,children:[(0,K.jsxs)(C,{gutter:[16,16],style:{marginBottom:24},children:[(0,K.jsx)(S,{xs:24,lg:24,children:(0,K.jsx)(x,{title:(0,K.jsxs)(`span`,{children:[(0,K.jsx)(M,{style:{marginRight:8}}),`用户信息概览`]}),style:{background:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,color:`#fff`,borderRadius:8},styles:{header:{color:`#fff`,borderBottom:`1px solid rgba(255,255,255,0.2)`}},children:(0,K.jsxs)(C,{gutter:[16,16],children:[(0,K.jsx)(S,{span:6,children:(0,K.jsx)(b,{size:64,icon:(0,K.jsx)(M,{})})}),(0,K.jsxs)(S,{span:18,children:[(0,K.jsx)(g.Title,{level:5,style:{color:`#fff`,marginTop:0},children:`张三 / Zhang San`}),(0,K.jsx)(g.Text,{style:{color:`rgba(255,255,255,0.85)`},children:`高级管理员 · 北京市朝阳区 · 在职`})]})]})})}),(0,K.jsx)(S,{xs:24,lg:16,children:(0,K.jsx)(x,{title:`详细信息`,style:{height:`100%`,borderRadius:8},children:(0,K.jsxs)(w,{column:{xs:1,sm:2},children:[(0,K.jsx)(w.Item,{label:`用户名`,children:`zhangsan`}),(0,K.jsx)(w.Item,{label:`手机号`,children:`138****8888`}),(0,K.jsx)(w.Item,{label:`邮箱`,children:`zhangsan@example.com`}),(0,K.jsx)(w.Item,{label:`部门`,children:`技术部`}),(0,K.jsx)(w.Item,{label:`职位`,children:`高级工程师`}),(0,K.jsx)(w.Item,{label:`入职时间`,children:`2023-01-15`}),(0,K.jsx)(w.Item,{label:`状态`,children:(0,K.jsx)(O,{color:`success`,children:`正常`})}),(0,K.jsx)(w.Item,{label:`权限等级`,children:(0,K.jsx)(O,{color:`blue`,children:`管理员`})})]})})}),(0,K.jsx)(S,{xs:24,lg:8,children:(0,K.jsxs)(x,{title:`任务完成度`,style:{height:`100%`,borderRadius:8},children:[(0,K.jsxs)(`div`,{style:{marginBottom:20},children:[(0,K.jsxs)(`div`,{style:{marginBottom:8},children:[(0,K.jsx)(`span`,{children:`本周任务`}),(0,K.jsx)(`span`,{style:{float:`right`,fontWeight:600},children:`75%`})]}),(0,K.jsx)(D,{percent:75,strokeColor:`#52c41a`})]}),(0,K.jsxs)(`div`,{style:{marginBottom:20},children:[(0,K.jsxs)(`div`,{style:{marginBottom:8},children:[(0,K.jsx)(`span`,{children:`本月目标`}),(0,K.jsx)(`span`,{style:{float:`right`,fontWeight:600},children:`60%`})]}),(0,K.jsx)(D,{percent:60,strokeColor:`#1677ff`})]}),(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{style:{marginBottom:8},children:[(0,K.jsx)(`span`,{children:`年度KPI`}),(0,K.jsx)(`span`,{style:{float:`right`,fontWeight:600},children:`45%`})]}),(0,K.jsx)(D,{percent:45,strokeColor:`#faad14`})]})]})})]}),(0,K.jsxs)(E,{justify:`space-between`,align:`center`,children:[(0,K.jsxs)(v,{children:[(0,K.jsx)(y,{size:`large`,children:`重置`}),(0,K.jsx)(y,{type:`primary`,size:`large`,children:`保存`}),(0,K.jsx)(y,{type:`primary`,size:`large`,ghost:!0,children:`提交审核`})]}),(0,K.jsx)(g.Text,{type:`secondary`,children:`最后更新时间: 2026-01-01 10:30:00`})]})]})]});export{J as default}; \ No newline at end of file diff --git a/public/assets/base-layout-QstweyWe.js b/public/assets/base-layout-QstweyWe.js deleted file mode 100644 index dc7b9a7..0000000 --- a/public/assets/base-layout-QstweyWe.js +++ /dev/null @@ -1 +0,0 @@ -import{$t as e,Bn as t,Bt as n,Or as r,Sr as i,St as a,Tr as o,cn as s,dn as c,fn as l,hr as u,i as d,mn as f,st as p,t as m}from"./jsx-runtime-NwRKtVrk.js";import{t as h}from"./button-CM-rzMOH.js";import{t as g}from"./space-Dvitgohy.js";import{t as _}from"./card-D7XvzVif.js";import{S as v,f as y,g as b,o as x}from"./es-Do50EHua.js";import{t as S}from"./descriptions-LfMkIYzo.js";import{t as C}from"./flex-CfpySdsa.js";import{t as w}from"./progress-B8Wo5U8C.js";import{t as T}from"./tag-C0Yg14A-.js";import{N as E,T as D,Y as O,et as k,h as A,v as j}from"./index-B7MUL4ct.js";var M=r(o()),N=e=>{let{value:t,formatter:n,precision:r,decimalSeparator:i,groupSeparator:a=``,prefixCls:o,className:s,style:c}=e,u;if(l(n))u=n(t);else{let e=String(t),n=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(!n||e===`-`)u=e;else{let e=n[1],t=n[2]||`0`,s=n[4]||``;t=t.replace(/\B(?=(\d{3})+(?!\d))/g,a),f(r)&&(s=s.padEnd(r,`0`).slice(0,r>0?r:0)),s&&=`${i}${s}`,u=[M.createElement(`span`,{key:`int`,className:`${o}-content-value-int`},e,t),s&&M.createElement(`span`,{key:`decimal`,className:`${o}-content-value-decimal`},s)]}}return M.createElement(`span`,{className:s,style:c},u)},P=t=>{let{componentCls:n,marginXXS:r,padding:i,colorTextDescription:a,titleFontSize:o,colorTextHeading:s,contentFontSize:c,fontFamily:l}=t;return{[n]:{...e(t),[`${n}-header`]:{paddingBottom:r,[`${n}-title`]:{color:a,fontSize:o}},[`${n}-skeleton`]:{paddingTop:i},[`${n}-content`]:{color:s,fontSize:c,fontFamily:l,[`${n}-content-value`]:{display:`inline-block`,direction:`ltr`},[`${n}-content-prefix, ${n}-content-suffix`]:{display:`inline-block`},[`${n}-content-prefix`]:{marginInlineEnd:r},[`${n}-content-suffix`]:{marginInlineStart:r}}}}},F=a(`Statistic`,e=>P(n(e,{})),e=>{let{fontSizeHeading3:t,fontSize:n}=e;return{titleFontSize:n,contentFontSize:t}}),I=M.forwardRef((e,n)=>{let{prefixCls:r,className:a,rootClassName:o,style:u,valueStyle:d,value:f=0,title:p,valueRender:m,prefix:h,suffix:g,loading:_=!1,formatter:v,precision:y,decimalSeparator:b=`.`,groupSeparator:x=`,`,onMouseEnter:S,onMouseLeave:C,styles:w,classNames:T,...E}=e,{getPrefixCls:D,direction:O,className:A,style:j,classNames:P,styles:I}=s(`statistic`),L=D(`statistic`,r),[R,z]=F(L),B={...e,decimalSeparator:b,groupSeparator:x,loading:_,value:f},[V,H]=c([P,T],[I,w],{props:B}),U=i(L,{[`${L}-rtl`]:O===`rtl`},A,a,o,V.root,R,z),W=i(`${L}-header`,V.header),G=i(`${L}-title`,V.title),K=i(`${L}-content`,V.content),q=i(`${L}-content-value`,V.value),J=i(`${L}-content-prefix`,V.prefix),Y=i(`${L}-content-suffix`,V.suffix),X=M.createElement(N,{decimalSeparator:b,groupSeparator:x,prefixCls:L,formatter:v,precision:y,value:f,className:q,style:H.value}),Z=M.useRef(null);M.useImperativeHandle(n,()=>({nativeElement:Z.current}));let Q=t(E,{aria:!0,data:!0});return M.createElement(`div`,{...Q,className:U,style:{...H.root,...j,...u},ref:Z,onMouseEnter:S,onMouseLeave:C},p&&M.createElement(`div`,{className:W,style:H.header},M.createElement(`div`,{className:G,style:H.title},p)),M.createElement(k,{paragraph:!1,loading:_,className:`${L}-skeleton`,active:!0},M.createElement(`div`,{className:K,style:{...d,...H.content}},h&&M.createElement(`span`,{className:J,style:H.prefix},h),l(m)?m(X):X,g&&M.createElement(`span`,{className:Y,style:H.suffix},g))))}),L=[[`Y`,1e3*60*60*24*365],[`M`,1e3*60*60*24*30],[`D`,1e3*60*60*24],[`H`,1e3*60*60],[`m`,1e3*60],[`s`,1e3],[`S`,1]];function R(e,t){let n=e,r=/\[[^\]]*]/g,i=(t.match(r)||[]).map(e=>e.slice(1,-1)),a=t.replace(r,`[]`),o=L.reduce((e,[t,r])=>{if(e.includes(t)){let i=Math.floor(n/r);return n-=i*r,e.replace(RegExp(`${t}+`,`g`),e=>{let t=e.length;return i.toString().padStart(t,`0`)})}return e},a),s=0;return o.replace(r,()=>{let e=i[s];return s+=1,e})}function z(e,t,n){let{format:r=``}=t,i=new Date(e).getTime(),a=Date.now();return R(Math.max(n?i-a:a-i,0),r)}var B=1e3/60;function V(e){return new Date(e).getTime()}var H=e=>{let{value:t,format:n=`HH:mm:ss`,onChange:r,onFinish:i,type:a,...o}=e,s=a===`countdown`,[c,l]=M.useState(null),d=u(()=>{let e=Date.now(),n=V(t);l({});let a=s?n-e:e-n;return r?.(a),s&&n{let e,t=()=>{d()||window.clearInterval(e)},n=()=>{e=window.setInterval(t,B)},r=()=>{window.clearInterval(e)};return n(),()=>{r()}},[t,s]),M.useEffect(()=>{l({})},[]);let f=(e,t)=>c?z(e,{...t,format:n},s):`-`,m=e=>p(e,{title:void 0});return M.createElement(I,{...o,value:t,valueRender:m,formatter:f})},U=M.memo(e=>M.createElement(H,{...e,type:`countdown`}));I.Timer=H,I.Countdown=U;var W=I,G=m(),{Title:K}=A,q=()=>(0,G.jsxs)(`div`,{style:{minHeight:`100vh`},children:[(0,G.jsx)(_,{variant:`borderless`,style:{marginBottom:20},children:(0,G.jsxs)(C,{justify:`space-between`,align:`center`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(K,{level:3,style:{marginBottom:4},children:`页面标题`}),(0,G.jsx)(A.Text,{type:`secondary`,children:`这是页面的描述信息,可以简要说明页面用途`})]}),(0,G.jsxs)(g,{style:{height:`100%`},children:[(0,G.jsx)(h,{icon:(0,G.jsx)(x,{}),children:`操作一`}),(0,G.jsx)(h,{icon:(0,G.jsx)(y,{}),children:`操作二`}),(0,G.jsx)(h,{type:`primary`,icon:(0,G.jsx)(b,{}),children:`主要操作`}),(0,G.jsx)(D,{trigger:[`click`],menu:{items:[{label:`导出数据`,key:`1`,icon:(0,G.jsx)(v,{})},{label:`批量操作`,key:`2`},{label:`更多设置`,key:`3`}]},children:(0,G.jsx)(h,{style:{padding:`0 8px`},children:(0,G.jsx)(d,{style:{fontSize:18}})})})]})]})}),(0,G.jsxs)(j,{gutter:[16,16],style:{marginBottom:24},children:[(0,G.jsx)(E,{xs:24,sm:12,lg:6,children:(0,G.jsxs)(_,{variant:`borderless`,children:[(0,G.jsx)(W,{title:`总用户数`,value:11893,prefix:(0,G.jsx)(x,{style:{color:`#1677ff`}}),valueStyle:{color:`#1677ff`}}),(0,G.jsxs)(`div`,{style:{marginTop:12},children:[(0,G.jsx)(T,{color:`success`,children:`+12.5%`}),(0,G.jsx)(A.Text,{type:`secondary`,style:{fontSize:12},children:`较上周`})]})]})}),(0,G.jsx)(E,{xs:24,sm:12,lg:6,children:(0,G.jsxs)(_,{variant:`borderless`,children:[(0,G.jsx)(W,{title:`活跃用户`,value:8234,prefix:(0,G.jsx)(y,{style:{color:`#52c41a`}}),valueStyle:{color:`#52c41a`}}),(0,G.jsxs)(`div`,{style:{marginTop:12},children:[(0,G.jsx)(T,{color:`success`,children:`+8.2%`}),(0,G.jsx)(A.Text,{type:`secondary`,style:{fontSize:12},children:`较上周`})]})]})}),(0,G.jsx)(E,{xs:24,sm:12,lg:6,children:(0,G.jsxs)(_,{variant:`borderless`,children:[(0,G.jsx)(W,{title:`总订单`,value:32567,prefix:(0,G.jsx)(b,{style:{color:`#faad14`}}),valueStyle:{color:`#faad14`}}),(0,G.jsxs)(`div`,{style:{marginTop:12},children:[(0,G.jsx)(T,{color:`warning`,children:`+5.3%`}),(0,G.jsx)(A.Text,{type:`secondary`,style:{fontSize:12},children:`较上周`})]})]})}),(0,G.jsx)(E,{xs:24,sm:12,lg:6,children:(0,G.jsxs)(_,{variant:`borderless`,children:[(0,G.jsx)(W,{title:`总收入`,value:98234,prefix:`¥`,valueStyle:{color:`#f5222d`}}),(0,G.jsxs)(`div`,{style:{marginTop:12},children:[(0,G.jsx)(T,{color:`error`,children:`-2.1%`}),(0,G.jsx)(A.Text,{type:`secondary`,style:{fontSize:12},children:`较上周`})]})]})})]}),(0,G.jsxs)(_,{variant:`borderless`,tabList:[{label:`基本信息`,key:`base`},{label:`详细信息`,key:`info`},{label:`数据分析`,key:`analysis`}],activeTabKey:`base`,children:[(0,G.jsxs)(j,{gutter:[16,16],style:{marginBottom:24},children:[(0,G.jsx)(E,{xs:24,lg:24,children:(0,G.jsx)(_,{title:(0,G.jsxs)(`span`,{children:[(0,G.jsx)(x,{style:{marginRight:8}}),`用户信息概览`]}),style:{background:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,color:`#fff`,borderRadius:8},styles:{header:{color:`#fff`,borderBottom:`1px solid rgba(255,255,255,0.2)`}},children:(0,G.jsxs)(j,{gutter:[16,16],children:[(0,G.jsx)(E,{span:6,children:(0,G.jsx)(O,{size:64,icon:(0,G.jsx)(x,{})})}),(0,G.jsxs)(E,{span:18,children:[(0,G.jsx)(A.Title,{level:5,style:{color:`#fff`,marginTop:0},children:`张三 / Zhang San`}),(0,G.jsx)(A.Text,{style:{color:`rgba(255,255,255,0.85)`},children:`高级管理员 · 北京市朝阳区 · 在职`})]})]})})}),(0,G.jsx)(E,{xs:24,lg:16,children:(0,G.jsx)(_,{title:`详细信息`,style:{height:`100%`,borderRadius:8},children:(0,G.jsxs)(S,{column:{xs:1,sm:2},children:[(0,G.jsx)(S.Item,{label:`用户名`,children:`zhangsan`}),(0,G.jsx)(S.Item,{label:`手机号`,children:`138****8888`}),(0,G.jsx)(S.Item,{label:`邮箱`,children:`zhangsan@example.com`}),(0,G.jsx)(S.Item,{label:`部门`,children:`技术部`}),(0,G.jsx)(S.Item,{label:`职位`,children:`高级工程师`}),(0,G.jsx)(S.Item,{label:`入职时间`,children:`2023-01-15`}),(0,G.jsx)(S.Item,{label:`状态`,children:(0,G.jsx)(T,{color:`success`,children:`正常`})}),(0,G.jsx)(S.Item,{label:`权限等级`,children:(0,G.jsx)(T,{color:`blue`,children:`管理员`})})]})})}),(0,G.jsx)(E,{xs:24,lg:8,children:(0,G.jsxs)(_,{title:`任务完成度`,style:{height:`100%`,borderRadius:8},children:[(0,G.jsxs)(`div`,{style:{marginBottom:20},children:[(0,G.jsxs)(`div`,{style:{marginBottom:8},children:[(0,G.jsx)(`span`,{children:`本周任务`}),(0,G.jsx)(`span`,{style:{float:`right`,fontWeight:600},children:`75%`})]}),(0,G.jsx)(w,{percent:75,strokeColor:`#52c41a`})]}),(0,G.jsxs)(`div`,{style:{marginBottom:20},children:[(0,G.jsxs)(`div`,{style:{marginBottom:8},children:[(0,G.jsx)(`span`,{children:`本月目标`}),(0,G.jsx)(`span`,{style:{float:`right`,fontWeight:600},children:`60%`})]}),(0,G.jsx)(w,{percent:60,strokeColor:`#1677ff`})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{style:{marginBottom:8},children:[(0,G.jsx)(`span`,{children:`年度KPI`}),(0,G.jsx)(`span`,{style:{float:`right`,fontWeight:600},children:`45%`})]}),(0,G.jsx)(w,{percent:45,strokeColor:`#faad14`})]})]})})]}),(0,G.jsxs)(C,{justify:`space-between`,align:`center`,children:[(0,G.jsxs)(g,{children:[(0,G.jsx)(h,{size:`large`,children:`重置`}),(0,G.jsx)(h,{type:`primary`,size:`large`,children:`保存`}),(0,G.jsx)(h,{type:`primary`,size:`large`,ghost:!0,children:`提交审核`})]}),(0,G.jsx)(A.Text,{type:`secondary`,children:`最后更新时间: 2026-01-01 10:30:00`})]})]})]});export{q as default}; \ No newline at end of file diff --git a/public/assets/breadcrumb-CfUsuee6.js b/public/assets/breadcrumb-CfUsuee6.js new file mode 100644 index 0000000..7ffdcc9 --- /dev/null +++ b/public/assets/breadcrumb-CfUsuee6.js @@ -0,0 +1,4 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,Et as n,Jn as r,Jt as i,Ln as a,Ot as o,Pn as s,St as c,Vn as l,Wt as u,Xn as d,Zt as f,st as p,wt as m,xn as h,xt as g,zn as _}from"./jsx-runtime-ADHq9IcL.js";import{t as v}from"./DownOutlined-DUvTsWMS.js";import{t as y}from"./dropdown-DT_NhqjL.js";var b=e(t()),x=b.createContext({}),S=({children:e})=>{let{getPrefixCls:t}=b.useContext(a),n=t(`breadcrumb`),{classNames:r,styles:i}=b.useContext(x);return b.createElement(`li`,{className:l(`${n}-separator`,r?.separator),style:i?.separator,"aria-hidden":`true`},e===``?e:e||`/`)};S.__ANT_BREADCRUMB_SEPARATOR=!0;function C(e,t){if(!o(e.title))return null;let r=Object.keys(t).join(`|`);return n(e.title)?e.title:String(e.title).replace(RegExp(`:(${r})`,`g`),(e,n)=>t[n]||e)}function w(e,t,n,r){if(!o(n))return null;let{className:i,onClick:a,...s}=t,c={...d(s,{data:!0,aria:!0}),onClick:a};return r===void 0?b.createElement(`span`,{...c,className:l(`${e}-link`,i)},n):b.createElement(`a`,{...c,className:l(`${e}-link`,i),href:r},n)}function T(e,t){return(n,r,i,a,o)=>t?t(n,r,i,a):w(e,n,C(n,r),o)}var E=e=>{let{prefixCls:t,separator:n=`/`,children:r,menu:i,dropdownProps:a,href:o,dropdownIcon:s}=e,{classNames:c,styles:u}=b.useContext(x),d=(e=>{if(i){let n={...a};if(i){let{items:e,...t}=i||{};n.menu={...t,items:e?.map(({key:e,title:t,label:n,path:r,...i},a)=>{let s=n??t;return r&&(s=b.createElement(`a`,{href:`${o}${r}`},s)),{...i,key:e??a,label:s}})}}return b.createElement(y,{placement:`bottom`,...n},b.createElement(`span`,{className:`${t}-overlay-link`},e,s))}return e})(r);return m(d)?b.createElement(b.Fragment,null,b.createElement(`li`,{className:l(`${t}-item`,c?.item),style:u?.item},d),n&&b.createElement(S,null,n)):null},D=e=>{let{prefixCls:t,children:n,href:r,...i}=e,{getPrefixCls:o}=b.useContext(a),s=o(`breadcrumb`,t);return b.createElement(E,{...i,prefixCls:s},w(s,i,n,r))};D.__ANT_BREADCRUMB_ITEM=!0;var O=e=>{let{componentCls:t,iconCls:n,calc:r}=e;return{[t]:{...f(e),color:e.itemColor,fontSize:e.fontSize,[n]:{fontSize:e.iconFontSize},ol:{display:`flex`,flexWrap:`wrap`,margin:0,padding:0,listStyle:`none`},[`${t}-item a`]:{color:e.linkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${s(e.paddingXXS)}`,borderRadius:e.borderRadiusSM,height:e.fontHeight,display:`inline-block`,marginInline:r(e.marginXXS).mul(-1).equal(),"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover},...i(e)},[`${t}-item:last-child`]:{color:e.lastItemColor},[`${t}-separator`]:{marginInline:e.separatorMargin,color:e.separatorColor},[`${t}-link`]:{[` + > ${n} + span, + > ${n} + a + `]:{marginInlineStart:e.marginXXS}},[`${t}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.fontHeight,display:`inline-block`,padding:`0 ${s(e.paddingXXS)}`,marginInline:r(e.marginXXS).mul(-1).equal(),[`> ${n}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover,a:{color:e.linkHoverColor}},a:{"&:hover":{backgroundColor:`transparent`}}},[`&${e.componentCls}-rtl`]:{direction:`rtl`}}}},k=u(`Breadcrumb`,e=>O(h(e,{})),e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS}));function A(e){let{breadcrumbName:t,children:n,...r}=e,i={title:t,...r};return n&&(i.menu={items:n.map(({breadcrumbName:e,...t})=>({...t,title:e}))}),i}function j(e,t){return(0,b.useMemo)(()=>e||(t?t.map(A):null),[e,t])}var M=(e,t)=>{if(t===void 0)return t;let n=(t||``).replace(/^\//,``);return Object.keys(e).forEach(t=>{n=n.replace(`:${t}`,e[t])}),n},N=e=>{let{prefixCls:t,separator:n,style:i,className:a,rootClassName:o,routes:s,items:u,children:f,itemRender:m,params:h={},classNames:y,styles:C,dropdownIcon:w,...D}=e,{getPrefixCls:O,direction:A,className:N,style:P,classNames:F,styles:I,separator:L,dropdownIcon:R}=_(`breadcrumb`),z=n??L??`/`,B=w??R??b.createElement(v,null),V,H=O(`breadcrumb`,t),[U,W]=k(H),G=j(u,s),K=b.useMemo(()=>({...e,separator:z}),[e,z]),q=c(P),J=c(i),[Y,X]=g([F,y],[I,q,C,J],{props:K}),Z=T(H,m);if(G&&G.length>0){let e=[],t=u||s;V=G.map((n,r)=>{let{path:i,key:a,type:o,menu:s,onClick:c,className:l,style:u,separator:f,dropdownProps:p}=n,m=M(h,i);m!==void 0&&e.push(m);let g=a??r;if(o===`separator`)return b.createElement(S,{key:g},f);let _={},v=r===G.length-1;s&&(_.menu=s);let{href:y}=n;return e.length&&m!==void 0&&(y=`#/${e.join(`/`)}`),b.createElement(E,{key:g,..._,...d(n,{data:!0,aria:!0}),className:l,style:u,dropdownProps:p,dropdownIcon:B,href:y,separator:v?``:z,onClick:c,prefixCls:H},Z(n,h,t,e,y))})}else if(f){let e=r(f).length;V=r(f).map((t,n)=>t&&p(t,{separator:n===e-1?``:z,key:n}))}let Q=l(H,N,{[`${H}-rtl`]:A===`rtl`},a,o,Y.root,U,W),$={...X.root},ee=b.useMemo(()=>({classNames:Y,styles:X}),[Y,X]);return b.createElement(x.Provider,{value:ee},b.createElement(`nav`,{className:Q,style:$,...D},b.createElement(`ol`,null,V)))};N.Item=D,N.Separator=S;export{N as t}; \ No newline at end of file diff --git a/public/assets/button-CM-rzMOH.js b/public/assets/button-CM-rzMOH.js deleted file mode 100644 index 4f470e1..0000000 --- a/public/assets/button-CM-rzMOH.js +++ /dev/null @@ -1 +0,0 @@ -import{$ as e,Bt as t,Ct as n,D as r,Et as i,F as a,J as o,Ln as s,Lt as c,Or as l,Rt as u,Sn as d,Sr as f,St as p,Tr as m,Vn as ee,Y as te,Zt as ne,_n as re,an as h,cn as ie,ct as g,dn as ae,en as _,fr as oe,hn as se,it as ce,mn as v,or as le,sn as ue,st as y,vn as b,wt as de,xn as fe,xt as x}from"./jsx-runtime-NwRKtVrk.js";import{i as pe,n as me}from"./ColorPresets-BBbJffTn.js";var S=l(m()),he=S.createContext(void 0),ge=e=>{let{getPrefixCls:t,direction:n}=S.useContext(ue),{prefixCls:r,size:i,className:a,...o}=e,s=t(`btn-group`,r),[,,c]=de(),l=S.useMemo(()=>{switch(i){case`large`:return`lg`;case`small`:return`sm`;default:return``}},[i]),u=f(s,{[`${s}-${l}`]:l,[`${s}-rtl`]:n===`rtl`},a,c);return S.createElement(he.Provider,{value:i},S.createElement(`div`,{...o,className:u}))},C=/^[\u4E00-\u9FA5]{2}$/,w=C.test.bind(C);function T(e){return e===`danger`?{danger:!0}:{type:e}}function E(e){return e===`text`||e===`link`}function _e(e,t,n,r){if(!re(e))return;let i=t?` `:``;return!b(e)&&!v(e)&&b(e.type)&&w(e.props.children)?y(e,e=>{let t=f(e.className,r)||void 0,a={...n,...e.style};return{...e,children:e.children.split(``).join(i),className:t,style:a}}):b(e)?S.createElement(`span`,{className:r,style:n},w(e)?e.split(``).join(i):e):g(e)?S.createElement(`span`,{className:r,style:n},e):y(e,e=>({...e,className:f(e.className,r)||void 0,style:{...e.style,...n}}))}function ve(e,t,n,r){let i=!1,a=[];return S.Children.forEach(e,e=>{let t=b(e)||v(e);if(i&&t){let t=a.length-1;a[t]=`${a[t]}${e}`}else a.push(e);i=t}),S.Children.map(a,e=>_e(e,t,n,r))}[`default`,`primary`,`danger`].concat(fe(u));var ye=(0,S.forwardRef)((e,t)=>{let{className:n,style:r,children:i,prefixCls:a}=e,o=f(`${a}-icon`,n);return S.createElement(`span`,{ref:t,className:o,style:r},i)}),D=(0,S.forwardRef)((t,n)=>{let{prefixCls:r,className:i,style:a,iconClassName:o}=t,s=f(`${r}-loading-icon`,i);return S.createElement(ye,{prefixCls:r,className:s,style:a,ref:n},S.createElement(e,{className:o}))}),O=()=>({width:0,opacity:0,transform:`scale(0)`}),k=e=>({width:e.scrollWidth,opacity:1,transform:`scale(1)`}),be=e=>{let{prefixCls:t,loading:n,existIcon:r,className:i,style:a,mount:o}=e,s=!!n;return r?S.createElement(D,{prefixCls:t,className:i,style:a}):S.createElement(d,{visible:s,motionName:`${t}-loading-icon-motion`,motionAppear:!o,motionEnter:!o,motionLeave:!o,removeOnLeave:!0,onAppearStart:O,onAppearActive:k,onEnterStart:O,onEnterActive:k,onLeaveStart:k,onLeaveActive:O},({className:e,style:n},r)=>{let o={...a,...n};return S.createElement(D,{prefixCls:t,className:f(i,e),style:o,ref:r})})},A=()=>({"@media (prefers-reduced-motion: reduce)":{transition:`none`,animation:`none`}}),j=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),xe=e=>{let{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:i,colorErrorHover:a}=e;return{[`${t}-group`]:[{position:`relative`,display:`inline-flex`,[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:`relative`,zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},j(`${t}-primary`,i),j(`${t}-danger`,a)]}},M=e=>{let{paddingInline:n,onlyIconSize:r,borderColorDisabled:i}=e;return t(e,{buttonPaddingHorizontal:n,buttonPaddingVertical:0,buttonIconOnlyFontSize:r,colorBorderDisabled:i})},N=e=>{let t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,o=e.contentLineHeight??c(t),s=e.contentLineHeightSM??c(n),l=e.contentLineHeightLG??c(r),d=me(new a(e.colorBgSolid),`#fff`)?`#000`:`#fff`,f=u.reduce((t,n)=>({...t,[`${n}ShadowColor`]:`0 ${h(e.controlOutlineWidth)} 0 ${i(e[`${n}1`],e.colorBgContainer)}`}),{}),p=e.colorBgContainerDisabled,m=e.colorBgContainerDisabled;return{...f,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:`transparent`,defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:`inherit`,onlyIconSizeSM:`inherit`,onlyIconSizeLG:`inherit`,groupBorderColor:e.colorPrimaryHover,linkHoverBg:`transparent`,textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:d,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:o,contentLineHeightSM:s,contentLineHeightLG:l,paddingBlock:Math.max((e.controlHeight-t*o)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*s)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*l)/2-e.lineWidth,0),defaultBgDisabled:p,dashedBgDisabled:m}},Se=e=>{let{componentCls:t,antCls:n,lineWidth:r}=e,[i,a]=x(n,`btn`);return{[t]:[{[i(`border-width`)]:r,[i(`border-color`)]:`#000`,[i(`border-color-hover`)]:a(`border-color`),[i(`border-color-active`)]:a(`border-color`),[i(`border-color-disabled`)]:a(`border-color`),[i(`border-style`)]:`solid`,[i(`text-color`)]:`#000`,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`),[i(`text-color-disabled`)]:a(`text-color`),[i(`bg-color`)]:`#ddd`,[i(`bg-color-hover`)]:a(`bg-color`),[i(`bg-color-active`)]:a(`bg-color`),[i(`bg-color-disabled`)]:e.colorBgContainerDisabled,[i(`bg-color-container`)]:e.colorBgContainer,[i(`shadow`)]:`none`},{border:[a(`border-width`),a(`border-style`),a(`border-color`)].join(` `),color:a(`text-color`),backgroundColor:a(`bg-color`),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[a(`border-width`),a(`border-style`),a(`border-color-hover`)].join(` `),color:a(`text-color-hover`),backgroundColor:a(`bg-color-hover`)},"&:active":{border:[a(`border-width`),a(`border-style`),a(`border-color-active`)].join(` `),color:a(`text-color-active`),backgroundColor:a(`bg-color-active`)}}},{[`&${t}-variant-solid`]:{[i(`solid-bg-color`)]:a(`color-base`),[i(`solid-bg-color-hover`)]:a(`color-hover`),[i(`solid-bg-color-active`)]:a(`color-active`),[i(`border-color`)]:`transparent`,[i(`text-color`)]:e.colorTextLightSolid,[i(`bg-color`)]:a(`solid-bg-color`),[i(`bg-color-hover`)]:a(`solid-bg-color-hover`),[i(`bg-color-active`)]:a(`solid-bg-color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`border-color`)]:a(`color-base`),[i(`border-color-hover`)]:a(`color-hover`),[i(`border-color-active`)]:a(`color-active`),[i(`bg-color`)]:a(`bg-color-container`),[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-dashed`]:{[i(`border-style`)]:`dashed`,[i(`bg-color-disabled`)]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`bg-color`)]:a(`color-light`),[i(`bg-color-hover`)]:a(`color-light-hover`),[i(`bg-color-active`)]:a(`color-light-active`)},[`&${t}-variant-text, &${t}-variant-link`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),[i(`bg-color`)]:`transparent`,[i(`bg-color-hover`)]:`transparent`,[i(`bg-color-active`)]:`transparent`,[`&:disabled, &${e.componentCls}-disabled`]:{background:`transparent`,borderColor:`transparent`}},[`&${t}-variant-text`]:{[i(`bg-color-hover`)]:a(`color-light`),[i(`bg-color-active`)]:a(`color-light-active`)}},{[`&${t}-variant-link`]:{[i(`color-base`)]:e.colorLink,[i(`color-hover`)]:e.colorLinkHover,[i(`color-active`)]:e.colorLinkActive,[i(`bg-color-hover`)]:e.linkHoverBg},[`&${t}-color-primary`]:{[i(`color-base`)]:e.colorPrimary,[i(`color-hover`)]:e.colorPrimaryHover,[i(`color-active`)]:e.colorPrimaryActive,[i(`color-light`)]:e.colorPrimaryBg,[i(`color-light-hover`)]:e.colorPrimaryBgHover,[i(`color-light-active`)]:e.colorPrimaryBorder,[i(`shadow`)]:e.primaryShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.primaryColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-dangerous`]:{[i(`color-base`)]:e.colorError,[i(`color-hover`)]:e.colorErrorHover,[i(`color-active`)]:e.colorErrorActive,[i(`color-light`)]:e.colorErrorBg,[i(`color-light-hover`)]:e.colorErrorBgFilledHover,[i(`color-light-active`)]:e.colorErrorBgActive,[i(`shadow`)]:e.dangerShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.dangerColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-default`]:{[i(`solid-bg-color`)]:e.colorBgSolid,[i(`solid-bg-color-hover`)]:e.colorBgSolidHover,[i(`solid-bg-color-active`)]:e.colorBgSolidActive,[i(`color-base`)]:e.defaultBorderColor,[i(`color-hover`)]:e.defaultHoverBorderColor,[i(`color-active`)]:e.defaultActiveBorderColor,[i(`color-light`)]:e.colorFillTertiary,[i(`color-light-hover`)]:e.colorFillSecondary,[i(`color-light-active`)]:e.colorFill,[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`shadow`)]:e.defaultShadow,[`&${t}-variant-outlined`]:{[i(`bg-color-disabled`)]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[i(`text-color`)]:e.solidTextColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-filled, &${t}-variant-text`]:{[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`bg-color-container`)]:e.defaultBg,[i(`bg-color-hover`)]:e.defaultHoverBg,[i(`bg-color-active`)]:e.defaultActiveBg},[`&${t}-variant-text`]:{[i(`text-color`)]:e.textTextColor,[i(`text-color-hover`)]:e.textTextHoverColor,[i(`text-color-active`)]:e.textTextActiveColor,[i(`bg-color-hover`)]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultGhostColor,[i(`border-color`)]:e.defaultGhostBorderColor}}}},u.map(n=>{let r=e[`${n}6`],a=e[`${n}1`],o=e[`${n}Hover`],s=e[`${n}2`],c=e[`${n}3`],l=e[`${n}Active`],u=e[`${n}ShadowColor`];return{[`&${t}-color-${n}`]:{[i(`color-base`)]:r,[i(`color-hover`)]:o,[i(`color-active`)]:l,[i(`color-light`)]:a,[i(`color-light-hover`)]:s,[i(`color-light-active`)]:c,[i(`shadow`)]:u}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:`not-allowed`,borderColor:e.colorBorderDisabled,background:a(`bg-color-disabled`),color:e.colorTextDisabled,boxShadow:`none`}},{[`&${t}-background-ghost`]:{[i(`bg-color`)]:e.ghostBg,[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg,[i(`shadow`)]:`none`,[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg}}}]}},Ce=e=>{let{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:a,motionEaseInOut:o,iconGap:s,calc:c}=e;return{[t]:{outline:`none`,position:`relative`,display:`inline-flex`,gap:s,alignItems:`center`,justifyContent:`center`,fontWeight:r,whiteSpace:`nowrap`,textAlign:`center`,backgroundImage:`none`,cursor:`pointer`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:`none`,touchAction:`manipulation`,...A(),"&:disabled > *":{pointerEvents:`none`},[`${t}-icon > svg`]:_(),[`${t}-icon`]:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`},"> a":{color:`currentColor`},"&:not(:disabled)":ne(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:`0.34em`},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:`-0.34em`,letterSpacing:`0.34em`},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:`none`}},[`&${t}-loading`]:{opacity:i,cursor:`default`},[`${t}-loading-icon`]:{transition:[`width`,`opacity`,`margin`].map(e=>`${e} ${a} ${o}`).join(`,`)},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:c(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:`row-reverse`,[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:c(s).mul(-1).equal()}}}}}},P=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:`50%`}),F=(e,t=``)=>{let{componentCls:n,controlHeight:r,fontSize:i,borderRadius:a,buttonPaddingHorizontal:o,iconCls:s,buttonPaddingVertical:c,buttonIconOnlyFontSize:l}=e;return[{[t]:{fontSize:i,height:r,padding:`${h(c)} ${h(o)}`,borderRadius:a,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:l}}}},{[`${n}${n}-circle${t}`]:P(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},I=e=>F(t(e,{fontSize:e.contentFontSize}),e.componentCls),L=e=>F(t(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM}),`${e.componentCls}-sm`),R=e=>F(t(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG}),`${e.componentCls}-lg`),z=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:`100%`}}}},we=p(`Button`,e=>{let t=M(e);return[Ce(t),I(t),L(t),R(t),z(t),Se(t),xe(t)]},N,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function B(e,t,n){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:focus,&:active":{zIndex:3},"&:hover":{zIndex:4},"&[disabled]":{zIndex:0}}}}function V(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function H(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:{...B(e,t,e.componentCls),...V(e.componentCls,t)}}}var U=e=>{let{antCls:t,componentCls:n,lineWidth:r,calc:i,colorBgContainer:a}=e,o=`${n}-variant-solid:not([disabled])`,s=i(r).mul(-1).equal(),[c,l]=x(t,`btn`),u=e=>({[`${n}-compact${e?`-vertical`:``}-item`]:{[c(`compact-connect-border-color`)]:l(`bg-color-hover`),[`&${o}`]:{transition:`none`,[`& + ${o}:before`]:[{position:`absolute`,backgroundColor:l(`compact-connect-border-color`),content:`""`},e?{top:s,insetInline:s,height:r}:{insetBlock:s,insetInlineStart:s,width:r}],"&:hover:before":{display:`none`}}}});return[u(),u(!0),{[`${o}${n}-color-default`]:{[c(`compact-connect-border-color`)]:`color-mix(in srgb, ${l(`bg-color-hover`)} 75%, ${a})`}}]},Te=n([`Button`,`compact`],e=>{let t=M(e);return[r(t),H(t),U(t)]},N);function Ee(e){if(se(e)){let t=e?.delay;return t=v(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}var De={default:[`default`,`outlined`],primary:[`primary`,`solid`],dashed:[`default`,`dashed`],link:[`link`,`link`],text:[`default`,`text`]},W=S.forwardRef((e,t)=>{let{_skipSemantic:n,loading:r=!1,prefixCls:i,color:a,variant:c,type:l,danger:u=!1,shape:d,size:p,disabled:m,className:ne,rootClassName:h,children:g,icon:_,iconPosition:v,iconPlacement:ue,ghost:y=!1,block:b=!1,htmlType:de=`button`,classNames:fe,styles:x,style:me,autoInsertSpace:ge,autoFocus:C,...T}=e,_e=s(g),D=l||`default`,{getPrefixCls:O,direction:k,autoInsertSpace:A,className:j,style:xe,classNames:M,styles:N,loadingIcon:Se,shape:Ce,color:P,variant:F}=ie(`button`),I=d||Ce||`default`,[L,R]=(0,S.useMemo)(()=>{if(a&&c)return[a,c];if(l||u){let e=De[D]||[];return u?[`danger`,e[1]]:e}return c===`solid`?[`primary`,c]:P&&F?[P,F]:F===`solid`?[`primary`,F]:[`default`,`outlined`]},[a,c,l,u,P,F,D]),[z,B]=(0,S.useMemo)(()=>y&&R===`solid`?[L,`outlined`]:[L,R],[L,R,y]),V=z===`danger`,H=V?`dangerous`:z,U=ge??A??!0,W=O(`btn`,i),[Oe,ke]=we(W),Ae=(0,S.useContext)(ce),G=m??Ae,je=(0,S.useContext)(he),K=(0,S.useMemo)(()=>Ee(r),[r]),[q,Me]=(0,S.useState)(K.loading),[J,Ne]=(0,S.useState)(!1),Y=(0,S.useRef)(null),Pe=le(t,Y),Fe=_e.length===1&&!_&&!E(B),X=(0,S.useRef)(!0);S.useEffect(()=>(X.current=!1,()=>{X.current=!0}),[]),oe(()=>{let e=null;K.delay>0?e=setTimeout(()=>{e=null,Me(!0)},K.delay):Me(K.loading);function t(){e&&=(clearTimeout(e),null)}return t},[K.delay,K.loading]),(0,S.useEffect)(()=>{if(!Y.current||!U)return;let e=Y.current.textContent||``;Fe&&w(e)?J||Ne(!0):J&&Ne(!1)}),(0,S.useEffect)(()=>{C&&Y.current&&Y.current.focus()},[]);let Ie=S.useCallback(t=>{if(q||G){t.preventDefault();return}e.onClick?.((`href`in e,t))},[e.onClick,q,G]),{compactSize:Le,compactItemClassnames:Re}=o(W,k),Z=te(e=>p??Le??je??e),ze=q?`loading`:_,Be=ue??v??`start`,Q=ee(T,[`navigate`]),Ve={...e,type:D,color:z,variant:B,danger:V,shape:I,size:Z,disabled:G,loading:q,iconPlacement:Be},[He,Ue]=ae([n?void 0:M,fe],[n?void 0:N,x],{props:Ve}),We=f(W,Oe,ke,{[`${W}-${I}`]:I!=="default"&&I!==`square`&&I,[`${W}-${D}`]:D,[`${W}-dangerous`]:u,[`${W}-color-${H}`]:H,[`${W}-variant-${B}`]:B,[`${W}-lg`]:Z===`large`,[`${W}-sm`]:Z===`small`,[`${W}-icon-only`]:!g&&g!==0&&!!ze,[`${W}-background-ghost`]:y&&!E(B),[`${W}-loading`]:q,[`${W}-two-chinese-chars`]:J&&U&&!q,[`${W}-block`]:b,[`${W}-rtl`]:k===`rtl`,[`${W}-icon-end`]:Be===`end`},Re,ne,h,j,He.root),Ge={...Ue.root,...xe,...me},Ke={className:He.icon,style:Ue.icon},qe=e=>S.createElement(ye,{prefixCls:W,...Ke},e),Je=S.createElement(be,{existIcon:!!_,prefixCls:W,loading:q,mount:X.current,...Ke}),Ye=se(r)&&r.icon||Se,Xe;Xe=_&&!q?qe(_):r&&Ye?qe(Ye):Je;let Ze=re(g)?ve(g,Fe&&U,Ue.content,He.content):null;if(Q.href!==void 0)return S.createElement(`a`,{...Q,className:f(We,{[`${W}-disabled`]:G}),href:G?void 0:Q.href,style:Ge,onClick:Ie,ref:Pe,tabIndex:G?-1:0,"aria-disabled":G},Xe,Ze);let $=S.createElement(`button`,{...T,type:de,className:We,style:Ge,onClick:Ie,disabled:G,ref:Pe},Xe,Ze,Re&&S.createElement(Te,{prefixCls:W}));return E(B)||($=S.createElement(pe,{component:`Button`,disabled:q},$)),$});W.Group=ge,W.__ANT_BUTTON=!0;var Oe=W;export{T as i,W as n,A as r,Oe as t}; \ No newline at end of file diff --git a/public/assets/button-CcpWP-mq.js b/public/assets/button-CcpWP-mq.js new file mode 100644 index 0000000..4a62a75 --- /dev/null +++ b/public/assets/button-CcpWP-mq.js @@ -0,0 +1 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Bn as t,Dr as n,E as r,Et as i,Gt as a,Jn as o,Jt as s,Ln as c,Mt as l,Ot as u,P as d,Pn as f,Q as ee,Qt as te,St as ne,Tt as p,Ut as m,Vn as h,Wt as re,Z as ie,Zn as ae,at as oe,ct as g,en as _,hr as se,kt as v,nn as ce,nt as y,st as b,vn as x,xn as S,xr as le,xt as ue,yn as C,zn as de}from"./jsx-runtime-ADHq9IcL.js";import{i as fe,n as pe}from"./ColorPresets-wH0crouI.js";var w=e(n()),me=w.createContext(void 0),he=e=>{let{getPrefixCls:t,direction:n}=w.useContext(c),{prefixCls:r,size:i,className:a,...o}=e,s=t(`btn-group`,r),[,,l]=_(),u=w.useMemo(()=>{switch(i){case`large`:return`lg`;case`small`:return`sm`;default:return``}},[i]),d=h(s,{[`${s}-${u}`]:u,[`${s}-rtl`]:n===`rtl`},a,l);return w.createElement(me.Provider,{value:i},w.createElement(`div`,{...o,className:d}))},T=/^[\u4E00-\u9FA5]{2}$/,E=T.test.bind(T);function D(e){return e===`danger`?{danger:!0}:{type:e}}function O(e){return e===`text`||e===`link`}function ge(e,t,n,r){if(!u(e))return;let i=t?` `:``;return!v(e)&&!p(e)&&v(e.type)&&E(e.props.children)?b(e,e=>{let t=h(e.className,r)||void 0,a={...n,...e.style};return{...e,children:e.children.split(``).join(i),className:t,style:a}}):v(e)?w.createElement(`span`,{className:r,style:n},E(e)?e.split(``).join(i):e):g(e)?w.createElement(`span`,{className:r,style:n},e):b(e,e=>({...e,className:h(e.className,r)||void 0,style:{...e.style,...n}}))}function _e(e,t,n,r){let i=!1,a=[];return w.Children.forEach(e,e=>{let t=v(e)||p(e);if(i&&t){let t=a.length-1,n=a[t];a[t]=`${n}${e}`}else a.push(e);i=t}),w.Children.map(a,e=>ge(e,t,n,r))}[`default`,`primary`,`danger`].concat(t(C));var ve=(0,w.forwardRef)((e,t)=>{let{className:n,style:r,children:i,prefixCls:a}=e,o=h(`${a}-icon`,n);return w.createElement(`span`,{ref:t,className:o,style:r},i)}),k=(0,w.forwardRef)((e,t)=>{let{prefixCls:n,className:r,style:i,iconClassName:a}=e,o=h(`${n}-loading-icon`,r);return w.createElement(ve,{prefixCls:n,className:o,style:i,ref:t},w.createElement(y,{className:a}))}),A=()=>({width:0,opacity:0,transform:`scale(0)`}),j=e=>({width:e.scrollWidth,opacity:1,transform:`scale(1)`}),ye=e=>{let{prefixCls:t,loading:n,existIcon:r,className:i,style:a,mount:o}=e,s=!!n;return r?w.createElement(k,{prefixCls:t,className:i,style:a}):w.createElement(l,{visible:s,motionName:`${t}-loading-icon-motion`,motionAppear:!o,motionEnter:!o,motionLeave:!o,removeOnLeave:!0,onAppearStart:A,onAppearActive:j,onEnterStart:A,onEnterActive:j,onLeaveStart:j,onLeaveActive:A},({className:e,style:n},r)=>{let o={...a,...n};return w.createElement(k,{prefixCls:t,className:h(i,e),style:o,ref:r})})},M=()=>({"@media (prefers-reduced-motion: reduce)":{transition:`none`,animation:`none`}}),N=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),be=e=>{let{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:i,colorErrorHover:a}=e;return{[`${t}-group`]:[{position:`relative`,display:`inline-flex`,[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:`relative`,zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},N(`${t}-primary`,i),N(`${t}-danger`,a)]}},P=e=>{let{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return S(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},F=e=>{let t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,i=e.contentLineHeight??x(t),a=e.contentLineHeightSM??x(n),o=e.contentLineHeightLG??x(r),s=pe(new d(e.colorBgSolid),`#fff`)?`#000`:`#fff`,c=C.reduce((t,n)=>({...t,[`${n}ShadowColor`]:`0 ${f(e.controlOutlineWidth)} 0 ${ce(e[`${n}1`],e.colorBgContainer)}`}),{}),l=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return{...c,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:`transparent`,defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:`inherit`,onlyIconSizeSM:`inherit`,onlyIconSizeLG:`inherit`,groupBorderColor:e.colorPrimaryHover,linkHoverBg:`transparent`,textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:s,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:i,contentLineHeightSM:a,contentLineHeightLG:o,paddingBlock:Math.max((e.controlHeight-t*i)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*a)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*o)/2-e.lineWidth,0),defaultBgDisabled:l,dashedBgDisabled:u}},xe=e=>{let{componentCls:t,antCls:n,lineWidth:r}=e,[i,a]=m(n,`btn`);return{[t]:[{[i(`border-width`)]:r,[i(`border-color`)]:`#000`,[i(`border-color-hover`)]:a(`border-color`),[i(`border-color-active`)]:a(`border-color`),[i(`border-color-disabled`)]:a(`border-color`),[i(`border-style`)]:`solid`,[i(`text-color`)]:`#000`,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`),[i(`text-color-disabled`)]:a(`text-color`),[i(`bg-color`)]:`#ddd`,[i(`bg-color-hover`)]:a(`bg-color`),[i(`bg-color-active`)]:a(`bg-color`),[i(`bg-color-disabled`)]:e.colorBgContainerDisabled,[i(`bg-color-container`)]:e.colorBgContainer,[i(`shadow`)]:`none`},{border:[a(`border-width`),a(`border-style`),a(`border-color`)].join(` `),color:a(`text-color`),backgroundColor:a(`bg-color`),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[a(`border-width`),a(`border-style`),a(`border-color-hover`)].join(` `),color:a(`text-color-hover`),backgroundColor:a(`bg-color-hover`)},"&:active":{border:[a(`border-width`),a(`border-style`),a(`border-color-active`)].join(` `),color:a(`text-color-active`),backgroundColor:a(`bg-color-active`)}}},{[`&${t}-variant-solid`]:{[i(`solid-bg-color`)]:a(`color-base`),[i(`solid-bg-color-hover`)]:a(`color-hover`),[i(`solid-bg-color-active`)]:a(`color-active`),[i(`border-color`)]:`transparent`,[i(`text-color`)]:e.colorTextLightSolid,[i(`bg-color`)]:a(`solid-bg-color`),[i(`bg-color-hover`)]:a(`solid-bg-color-hover`),[i(`bg-color-active`)]:a(`solid-bg-color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`border-color`)]:a(`color-base`),[i(`border-color-hover`)]:a(`color-hover`),[i(`border-color-active`)]:a(`color-active`),[i(`bg-color`)]:a(`bg-color-container`),[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),boxShadow:a(`shadow`)},[`&${t}-variant-dashed`]:{[i(`border-style`)]:`dashed`,[i(`bg-color-disabled`)]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`bg-color`)]:a(`color-light`),[i(`bg-color-hover`)]:a(`color-light-hover`),[i(`bg-color-active`)]:a(`color-light-active`)},[`&${t}-variant-text, &${t}-variant-link`]:{[i(`border-color`)]:`transparent`,[i(`text-color`)]:a(`color-base`),[i(`text-color-hover`)]:a(`color-hover`),[i(`text-color-active`)]:a(`color-active`),[i(`bg-color`)]:`transparent`,[i(`bg-color-hover`)]:`transparent`,[i(`bg-color-active`)]:`transparent`,[`&:disabled, &${e.componentCls}-disabled`]:{background:`transparent`,borderColor:`transparent`}},[`&${t}-variant-text`]:{[i(`bg-color-hover`)]:a(`color-light`),[i(`bg-color-active`)]:a(`color-light-active`)}},{[`&${t}-variant-link`]:{[i(`color-base`)]:e.colorLink,[i(`color-hover`)]:e.colorLinkHover,[i(`color-active`)]:e.colorLinkActive,[i(`bg-color-hover`)]:e.linkHoverBg},[`&${t}-color-primary`]:{[i(`color-base`)]:e.colorPrimary,[i(`color-hover`)]:e.colorPrimaryHover,[i(`color-active`)]:e.colorPrimaryActive,[i(`color-light`)]:e.colorPrimaryBg,[i(`color-light-hover`)]:e.colorPrimaryBgHover,[i(`color-light-active`)]:e.colorPrimaryBorder,[i(`shadow`)]:e.primaryShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.primaryColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-dangerous`]:{[i(`color-base`)]:e.colorError,[i(`color-hover`)]:e.colorErrorHover,[i(`color-active`)]:e.colorErrorActive,[i(`color-light`)]:e.colorErrorBg,[i(`color-light-hover`)]:e.colorErrorBgFilledHover,[i(`color-light-active`)]:e.colorErrorBgActive,[i(`shadow`)]:e.dangerShadow,[`&${t}-variant-solid`]:{[i(`text-color`)]:e.dangerColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)}},[`&${t}-color-default`]:{[i(`solid-bg-color`)]:e.colorBgSolid,[i(`solid-bg-color-hover`)]:e.colorBgSolidHover,[i(`solid-bg-color-active`)]:e.colorBgSolidActive,[i(`color-base`)]:e.defaultBorderColor,[i(`color-hover`)]:e.defaultHoverBorderColor,[i(`color-active`)]:e.defaultActiveBorderColor,[i(`color-light`)]:e.colorFillTertiary,[i(`color-light-hover`)]:e.colorFillSecondary,[i(`color-light-active`)]:e.colorFill,[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`shadow`)]:e.defaultShadow,[`&${t}-variant-outlined`]:{[i(`bg-color-disabled`)]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[i(`text-color`)]:e.solidTextColor,[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-filled, &${t}-variant-text`]:{[i(`text-color-hover`)]:a(`text-color`),[i(`text-color-active`)]:a(`text-color`)},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultColor,[i(`text-color-hover`)]:e.defaultHoverColor,[i(`text-color-active`)]:e.defaultActiveColor,[i(`bg-color-container`)]:e.defaultBg,[i(`bg-color-hover`)]:e.defaultHoverBg,[i(`bg-color-active`)]:e.defaultActiveBg},[`&${t}-variant-text`]:{[i(`text-color`)]:e.textTextColor,[i(`text-color-hover`)]:e.textTextHoverColor,[i(`text-color-active`)]:e.textTextActiveColor,[i(`bg-color-hover`)]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`text-color`)]:e.defaultGhostColor,[i(`border-color`)]:e.defaultGhostBorderColor}}}},C.map(n=>{let r=e[`${n}6`],a=e[`${n}1`],o=e[`${n}Hover`],s=e[`${n}2`],c=e[`${n}3`],l=e[`${n}Active`],u=e[`${n}ShadowColor`];return{[`&${t}-color-${n}`]:{[i(`color-base`)]:r,[i(`color-hover`)]:o,[i(`color-active`)]:l,[i(`color-light`)]:a,[i(`color-light-hover`)]:s,[i(`color-light-active`)]:c,[i(`shadow`)]:u}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:`not-allowed`,borderColor:e.colorBorderDisabled,background:a(`bg-color-disabled`),color:e.colorTextDisabled,boxShadow:`none`}},{[`&${t}-background-ghost`]:{[i(`bg-color`)]:e.ghostBg,[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg,[i(`shadow`)]:`none`,[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i(`bg-color-hover`)]:e.ghostBg,[i(`bg-color-active`)]:e.ghostBg}}}]}},Se=e=>{let{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:a,motionEaseInOut:o,iconGap:c,calc:l}=e;return{[t]:{outline:`none`,position:`relative`,display:`inline-flex`,gap:c,alignItems:`center`,justifyContent:`center`,fontWeight:r,whiteSpace:`nowrap`,textAlign:`center`,backgroundImage:`none`,cursor:`pointer`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:`none`,touchAction:`manipulation`,...M(),"&:disabled > *":{pointerEvents:`none`},[`${t}-icon > svg`]:te(),"> a":{color:`currentColor`},"&:not(:disabled)":s(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:`0.34em`},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:`-0.34em`,letterSpacing:`0.34em`},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:`none`}},[`&${t}-loading`]:{opacity:i,cursor:`default`},[`${t}-loading-icon`]:{transition:[`width`,`opacity`,`margin`].map(e=>`${e} ${a} ${o}`).join(`,`)},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(c).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(c).mul(-1).equal()}}},"&-icon-end":{flexDirection:`row-reverse`,[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(c).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(c).mul(-1).equal()}}}}}},I=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:`50%`}),L=(e,t=``)=>{let{componentCls:n,controlHeight:r,fontSize:i,borderRadius:a,buttonPaddingHorizontal:o,iconCls:s,buttonPaddingVertical:c,buttonIconOnlyFontSize:l}=e;return[{[t]:{fontSize:i,height:r,padding:`${f(c)} ${f(o)}`,borderRadius:a,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:l}}}},{[`${n}${n}-circle${t}`]:I(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},R=e=>L(S(e,{fontSize:e.contentFontSize}),e.componentCls),z=e=>L(S(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM}),`${e.componentCls}-sm`),B=e=>L(S(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG}),`${e.componentCls}-lg`),V=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:`100%`}}}},Ce=re(`Button`,e=>{let t=P(e);return[Se(t),R(t),z(t),B(t),V(t),xe(t),be(t)]},F,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function H(e,t,n){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:focus,&:active":{zIndex:3},"&:hover":{zIndex:4},"&[disabled]":{zIndex:0}}}}function U(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function W(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:{...H(e,t,e.componentCls),...U(e.componentCls,t)}}}var G=e=>{let{antCls:t,componentCls:n,lineWidth:r,calc:i,colorBgContainer:a}=e,o=`${n}-variant-solid:not([disabled])`,s=i(r).mul(-1).equal(),[c,l]=m(t,`btn`),u=e=>({[`${n}-compact${e?`-vertical`:``}-item`]:{[c(`compact-connect-border-color`)]:l(`bg-color-hover`),[`&${o}`]:{transition:`none`,[`& + ${o}:before`]:[{position:`absolute`,backgroundColor:l(`compact-connect-border-color`),content:`""`},e?{top:s,insetInline:s,height:r}:{insetBlock:s,insetInlineStart:s,width:r}],"&:hover:before":{display:`none`}}}});return[u(),u(!0),{[`${o}${n}-color-default`]:{[c(`compact-connect-border-color`)]:`color-mix(in srgb, ${l(`bg-color-hover`)} 75%, ${a})`}}]},we=a([`Button`,`compact`],e=>{let t=P(e);return[r(t),W(t),G(t)]},F);function Te(e){if(i(e)){let t=e?.delay;return t=p(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}var Ee={default:[`default`,`outlined`],primary:[`primary`,`solid`],dashed:[`default`,`dashed`],link:[`link`,`link`],text:[`default`,`text`]},K=w.forwardRef((e,t)=>{let{_skipSemantic:n,loading:r=!1,prefixCls:a,color:s,variant:c,type:l,danger:d=!1,shape:f,size:te,disabled:p,className:m,rootClassName:re,children:g,icon:_,iconPosition:v,iconPlacement:ce,ghost:y=!1,block:b=!1,htmlType:x=`button`,classNames:S,styles:C,style:pe,autoInsertSpace:he,autoFocus:T,...D}=e,ge=o(g),k=l||`default`,{getPrefixCls:A,direction:j,autoInsertSpace:M,className:N,style:be,classNames:P,styles:F,loadingIcon:xe,shape:Se,color:I,variant:L}=de(`button`),R=f||Se||`default`,[z,B]=(0,w.useMemo)(()=>{if(s&&c)return[s,c];if(l||d){let e=Ee[k]||[];return d?[`danger`,e[1]]:e}return c===`solid`?[`primary`,c]:I&&L?[I,L]:L===`solid`?[`primary`,L]:[`default`,`outlined`]},[s,c,l,d,I,L,k]),[V,H]=(0,w.useMemo)(()=>y&&B===`solid`?[z,`outlined`]:[z,B],[z,B,y]),U=V===`danger`,W=U?`dangerous`:V,G=he??M??!0,K=A(`btn`,a),[De,Oe]=Ce(K),ke=(0,w.useContext)(oe),q=p??ke,Ae=(0,w.useContext)(me),J=(0,w.useMemo)(()=>Te(r),[r]),[Y,je]=(0,w.useState)(J.loading),[X,Me]=(0,w.useState)(!1),Z=(0,w.useRef)(null),Ne=se(t,Z),Pe=ge.length===1&&!_&&!O(H),Fe=(0,w.useRef)(!0);w.useEffect(()=>(Fe.current=!1,()=>{Fe.current=!0}),[]),le(()=>{let e=null;J.delay>0?e=setTimeout(()=>{e=null,je(!0)},J.delay):je(J.loading);function t(){e&&=(clearTimeout(e),null)}return t},[J.delay,J.loading]),(0,w.useEffect)(()=>{if(!Z.current||!G)return;let e=Z.current.textContent||``;Pe&&E(e)?X||Me(!0):X&&Me(!1)}),(0,w.useEffect)(()=>{T&&Z.current&&Z.current.focus()},[]);let Ie=w.useCallback(t=>{if(Y||q){t.preventDefault();return}e.onClick?.((`href`in e,t))},[e.onClick,Y,q]),{compactSize:Le,compactItemClassnames:Re}=ie(K,j),Q=ee(e=>te??Le??Ae??e),ze=Y?`loading`:_,Be=ce??v??`start`,Ve=ae(D,[`navigate`]),He={...e,type:k,color:V,variant:H,danger:U,shape:R,size:Q,disabled:q,loading:Y,iconPlacement:Be},Ue=ne(be),We=ne(pe),[Ge,$]=ue([n?void 0:P,S],[n?void 0:F,Ue,C,We],{props:He}),Ke=h(K,De,Oe,{[`${K}-${R}`]:R!=="default"&&R!==`square`&&R,[`${K}-${k}`]:k,[`${K}-dangerous`]:d,[`${K}-color-${W}`]:W,[`${K}-variant-${H}`]:H,[`${K}-lg`]:Q===`large`,[`${K}-sm`]:Q===`small`,[`${K}-icon-only`]:!g&&g!==0&&!!ze,[`${K}-background-ghost`]:y&&!O(H),[`${K}-loading`]:Y,[`${K}-two-chinese-chars`]:X&&G&&!Y,[`${K}-block`]:b,[`${K}-rtl`]:j===`rtl`,[`${K}-icon-end`]:Be===`end`},Re,m,re,N,Ge.root),qe={className:Ge.icon,style:$.icon},Je=e=>w.createElement(ve,{prefixCls:K,...qe},e),Ye=w.createElement(ye,{existIcon:!!_,prefixCls:K,loading:Y,mount:Fe.current,...qe}),Xe=i(r)&&r.icon||xe,Ze;Ze=_&&!Y?Je(_):r&&Xe?Je(Xe):Ye;let Qe=u(g)?_e(g,Pe&&G,$.content,Ge.content):null;if(Ve.href!==void 0)return w.createElement(`a`,{...Ve,className:h(Ke,{[`${K}-disabled`]:q}),href:q?void 0:Ve.href,style:$.root,onClick:Ie,ref:Ne,tabIndex:q?-1:0,"aria-disabled":q},Ze,Qe);let $e=w.createElement(`button`,{...D,type:x,className:Ke,style:$.root,onClick:Ie,disabled:q,ref:Ne},Ze,Qe,Re&&w.createElement(we,{prefixCls:K}));return O(H)||($e=w.createElement(fe,{component:`Button`,disabled:Y},$e)),$e});K.Group=he,K.__ANT_BUTTON=!0;var De=K;export{D as i,K as n,M as r,De as t}; \ No newline at end of file diff --git a/public/assets/card-BFxeciPE.js b/public/assets/card-BFxeciPE.js new file mode 100644 index 0000000..60e7f5d --- /dev/null +++ b/public/assets/card-BFxeciPE.js @@ -0,0 +1,25 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{$ as t,$t as n,B as r,Dr as i,Et as a,Hn as o,Jn as s,Jt as c,K as l,Kt as u,Ln as d,Mt as f,Pn as p,Q as m,Qn as h,Sr as g,St as _,V as v,Vn as y,Wt as b,Yn as x,Zn as S,Zt as C,hr as w,ir as T,l as E,n as D,q as O,qt as k,r as A,s as j,u as M,wr as N,xn as P,xt as F,yr as I,yt as ee,z as L,zn as te}from"./jsx-runtime-ADHq9IcL.js";import{n as ne,r as re,t as ie}from"./PlusOutlined-W6xCIIXs.js";var R=e(i()),z=(0,R.createContext)(null),ae=e=>{let{activeTabOffset:t,horizontal:n,rtl:r,indicator:i={}}=e,{size:a,align:o=`center`}=i,[s,c]=(0,R.useState)(),l=(0,R.useRef)(),u=R.useCallback(e=>typeof a==`function`?a(e):typeof a==`number`?a:e,[a]);function d(){x.cancel(l.current)}return(0,R.useEffect)(()=>{let e={};if(t)if(n){e.width=u(t.width);let n=r?`right`:`left`;o===`start`&&(e[n]=t[n]),o===`center`&&(e[n]=t[n]+t.width/2,e.transform=r?`translateX(50%)`:`translateX(-50%)`),o===`end`&&(e[n]=t[n]+t.width,e.transform=`translateX(-100%)`)}else e.height=u(t.height),o===`start`&&(e.top=t.top),o===`center`&&(e.top=t.top+t.height/2,e.transform=`translateY(-50%)`),o===`end`&&(e.top=t.top+t.height,e.transform=`translateY(-100%)`);return d(),l.current=x(()=>{s&&e&&Object.keys(e).every(t=>{let n=e[t],r=s[t];return typeof n==`number`&&typeof r==`number`?Math.round(n)===Math.round(r):n===r})||c(e)}),d},[JSON.stringify(t),n,r,o,u]),{style:s}},B={width:0,height:0,left:0,top:0};function V(e,t,n){return(0,R.useMemo)(()=>{let n=new Map,r=t.get(e[0]?.key)||B,i=r.left+r.width;for(let r=0;re.key).join(`_`),t,n])}function H(e,t){let n=R.useRef(e),[,r]=R.useState({});function i(e){let i=typeof e==`function`?e(n.current):e;i!==n.current&&t(i,n.current),n.current=i,r({})}return[n.current,i]}var U=.1,oe=.01,W=20,G=.995**W;function K(e,t){let[n,r]=(0,R.useState)(),[i,a]=(0,R.useState)(0),[o,s]=(0,R.useState)(0),[c,l]=(0,R.useState)(),u=(0,R.useRef)();function d(e){let{screenX:t,screenY:n}=e.touches[0];r({x:t,y:n}),window.clearInterval(u.current)}function f(e){if(!n)return;let{screenX:o,screenY:c}=e.touches[0];r({x:o,y:c});let u=o-n.x,d=c-n.y;t(u,d);let f=Date.now();a(f),s(f-i),l({x:u,y:d})}function p(){if(n&&(r(null),l(null),c)){let e=c.x/o,n=c.y/o;if(Math.max(Math.abs(e),Math.abs(n)){if(Math.abs(r)o?(i=n,m.current=`x`):(i=r,m.current=`y`),t(-i,-i)&&e.preventDefault()}let g=(0,R.useRef)(null);g.current={onTouchStart:d,onTouchMove:f,onTouchEnd:p,onWheel:h},R.useEffect(()=>{function t(e){g.current.onTouchStart(e)}function n(e){g.current.onTouchMove(e)}function r(e){g.current.onTouchEnd(e)}function i(e){g.current.onWheel(e)}return document.addEventListener(`touchmove`,n,{passive:!1}),document.addEventListener(`touchend`,r,{passive:!0}),e.current.addEventListener(`touchstart`,t,{passive:!0}),e.current.addEventListener(`wheel`,i,{passive:!1}),()=>{document.removeEventListener(`touchmove`,n),document.removeEventListener(`touchend`,r)}},[])}function se(e){let[t,n]=(0,R.useState)(0),r=(0,R.useRef)(0),i=(0,R.useRef)();return i.current=e,g(()=>{i.current?.()},[t]),()=>{r.current===t&&(r.current+=1,n(r.current))}}function ce(e){let t=(0,R.useRef)([]),[,n]=(0,R.useState)({}),r=(0,R.useRef)(typeof e==`function`?e():e),i=se(()=>{let e=r.current;t.current.forEach(t=>{e=t(e)}),t.current=[],r.current=e,n({})});function a(e){t.current.push(e),i()}return[r.current,a]}var q={width:0,height:0,left:0,top:0,right:0};function le(e,t,n,r,i,a,{tabs:o,tabPosition:s,rtl:c}){let l,u,d;return[`top`,`bottom`].includes(s)?(l=`width`,u=c?`right`:`left`,d=Math.abs(n)):(l=`height`,u=`top`,d=-n),(0,R.useMemo)(()=>{if(!o.length)return[0,0];let n=o.length,r=n;for(let i=0;iMath.floor(d+t)){r=i-1;break}}let i=0;for(let t=n-1;t>=0;--t)if((e.get(o[t].key)||q)[u]r?[0,-1]:[i,r]},[e,t,r,i,a,d,s,o.map(e=>e.key).join(`_`),c])}function ue(e){let t;return e instanceof Map?(t={},e.forEach((e,n)=>{t[n]=e})):t=e,JSON.stringify(t)}var J=`TABS_DQ`;function de(e){return String(e).replace(/"/g,J)}function fe(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var pe=R.forwardRef((e,t)=>{let{prefixCls:n,editable:r,locale:i,style:a}=e;return!r||r.showAdd===!1?null:R.createElement(`button`,{ref:t,type:`button`,className:`${n}-nav-add`,style:a,"aria-label":i?.addAriaLabel||`Add tab`,onClick:e=>{r.onEdit(`add`,{event:e})}},r.addIcon||`+`)}),me=R.forwardRef((e,t)=>{let{position:n,prefixCls:r,extra:i}=e;if(!i)return null;let a,o={};return typeof i==`object`&&!R.isValidElement(i)?o=i:o.right=i,n===`right`&&(a=o.right),n===`left`&&(a=o.left),a?R.createElement(`div`,{className:`${r}-extra-content`,ref:t},a):null});function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,id:r,tabs:i,locale:a,mobile:o,more:s={},style:c,className:l,editable:u,tabBarGutter:d,rtl:f,removeAriaLabel:p,onTabClick:m,getPopupContainer:h,popupClassName:g,popupStyle:_,classNames:v,styles:b}=e,[x,S]=(0,R.useState)(!1),[C,w]=(0,R.useState)(null),{icon:D=`More`}=s,O=`${r}-more-popup`,k=`${n}-dropdown`,M=C===null?null:`${O}-${C}`,N=a?.dropdownAriaLabel;function P(e,t){e.preventDefault(),e.stopPropagation(),u.onEdit(`remove`,{key:t,event:e})}let F=R.createElement(A,{onClick:({key:e,domEvent:t})=>{m(e,t),S(!1)},prefixCls:`${k}-menu`,id:O,tabIndex:-1,role:`listbox`,"aria-activedescendant":M,selectedKeys:[C],"aria-label":N===void 0?`expanded dropdown`:N},i.map(e=>{let{closable:t,disabled:n,closeIcon:i,key:a,label:o}=e,s=fe(t,i,u,n);return R.createElement(j,{key:a,id:`${O}-${a}`,role:`option`,"aria-controls":r&&`${r}-panel-${a}`,disabled:n},R.createElement(`span`,null,o),s&&R.createElement(`button`,{type:`button`,"aria-label":p||`remove`,tabIndex:0,className:y(`${k}-menu-item-remove`,v?.remove),style:b?.remove,onClick:e=>{e.stopPropagation(),P(e,a)}},i||u.removeIcon||`×`))}));function I(e){let t=i.filter(e=>!e.disabled),n=t.findIndex(e=>e.key===C)||0,r=t.length;for(let i=0;i{let e=document.getElementById(M);e?.scrollIntoView&&e.scrollIntoView(!1)},[M,C]),(0,R.useEffect)(()=>{x||w(null)},[x]);let L={marginInlineStart:d};i.length||(L.visibility=`hidden`,L.order=1);let te=y(g,{[`${k}-rtl`]:f}),ne=o?null:R.createElement(E,Y({prefixCls:k,overlay:F,visible:i.length?x:!1,onVisibleChange:S,overlayClassName:te,overlayStyle:_,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:h},s),R.createElement(`button`,{type:`button`,className:`${n}-nav-more`,style:L,"aria-haspopup":`listbox`,"aria-controls":O,id:`${r}-more`,"aria-expanded":x,onKeyDown:ee},D));return R.createElement(`div`,{className:y(`${n}-nav-operations`,l),style:c,ref:t},ne,R.createElement(pe,{prefixCls:n,locale:a,editable:u}))}),ge=R.memo(he,(e,t)=>t.tabMoving),_e=e=>{let{prefixCls:t,id:n,active:r,focus:i,tab:{key:a,label:o,disabled:s,closeIcon:c,icon:l},closable:u,renderWrapper:d,removeAriaLabel:f,editable:p,onClick:m,onFocus:h,onBlur:g,onKeyDown:_,onMouseDown:v,onMouseUp:b,styles:x,classNames:S,tabCount:C,currentPosition:w}=e,T=`${t}-tab`,E=fe(u,c,p,s);function D(e){s||m(e)}function O(e){e.preventDefault(),e.stopPropagation(),p.onEdit(`remove`,{key:a,event:e})}let k=R.useMemo(()=>l&&typeof o==`string`?R.createElement(`span`,null,o):o,[o,l]),A=R.useRef(null);R.useEffect(()=>{i&&A.current&&A.current.focus()},[i]);let j=R.createElement(`div`,{key:a,"data-node-key":de(a),className:y(T,S?.item,{[`${T}-with-remove`]:E,[`${T}-active`]:r,[`${T}-disabled`]:s,[`${T}-focus`]:i}),style:x?.item,onClick:D},R.createElement(`div`,{ref:A,role:`tab`,"aria-selected":r,id:n&&`${n}-tab-${a}`,className:`${T}-btn`,"aria-controls":n&&`${n}-panel-${a}`,"aria-disabled":s,tabIndex:s?null:r?0:-1,onClick:e=>{e.stopPropagation(),D(e)},onKeyDown:_,onMouseDown:v,onMouseUp:b,onFocus:h,onBlur:g},i&&R.createElement(`div`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`Tab ${w} of ${C}`),l&&R.createElement(`span`,{className:`${T}-icon`},l),o&&k),E&&R.createElement(`button`,{type:`button`,"aria-label":f||`remove`,tabIndex:r?0:-1,className:y(`${T}-remove`,S?.remove),style:x?.remove,onClick:e=>{e.stopPropagation(),O(e)}},c||p.removeIcon||`×`));return d?d(j):j};function ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{offsetWidth:n,offsetHeight:r,offsetTop:i,offsetLeft:a}=e,{width:o,height:s,left:c,top:l}=e.getBoundingClientRect();return Math.abs(o-n)<1?[o,s,c-t.left,l-t.top]:[n,r,a,i]},be=e=>{let{offsetWidth:t=0,offsetHeight:n=0}=e.current||{};if(e.current){let{width:n,height:r}=e.current.getBoundingClientRect();if(Math.abs(n-t)<1)return[n,r]}return[t,n]},xe=(e,t)=>e[+!t],Se=R.forwardRef((e,t)=>{let{className:n,style:r,id:i,animated:a,activeKey:s,rtl:c,extra:l,editable:u,locale:d,tabPosition:f,tabBarGutter:p,children:m,onTabClick:h,onTabScroll:g,indicator:_,classNames:v,styles:b}=e,{prefixCls:x,tabs:S}=R.useContext(z),C=(0,R.useRef)(null),T=(0,R.useRef)(null),E=(0,R.useRef)(null),D=(0,R.useRef)(null),O=(0,R.useRef)(null),k=(0,R.useRef)(null),A=(0,R.useRef)(null),j=f===`top`||f===`bottom`,[M,P]=H(0,(e,t)=>{j&&g&&g({direction:e>t?`left`:`right`})}),[F,I]=H(0,(e,t)=>{!j&&g&&g({direction:e>t?`top`:`bottom`})}),[ee,L]=(0,R.useState)([0,0]),[te,ne]=(0,R.useState)([0,0]),[re,ie]=(0,R.useState)([0,0]),[B,U]=(0,R.useState)([0,0]),[oe,W]=ce(new Map),G=V(S,oe,te[0]),q=xe(ee,j),J=xe(te,j),Y=xe(re,j),he=xe(B,j),Se=Math.floor(q)we?we:e}let Q=(0,R.useRef)(null),[Ee,De]=(0,R.useState)();function Oe(){De(Date.now())}function ke(){Q.current&&clearTimeout(Q.current)}K(D,(e,t)=>{function n(e,t){e(e=>Te(e+t))}return Se?(j?n(P,e):n(I,t),ke(),Oe(),!0):!1}),(0,R.useEffect)(()=>(ke(),Ee&&(Q.current=setTimeout(()=>{De(0)},100)),ke),[Ee]);let[Ae,je]=le(G,X,j?M:F,J,Y,he,{...e,tabs:S}),Me=N((e=s)=>{let t=G.get(e)||{width:0,height:0,left:0,right:0,top:0};if(j){let e=M;c?t.rightM+X&&(e=t.right+t.width-X):t.left<-M?e=-t.left:t.left+t.width>-M+X&&(e=-(t.left+t.width-X)),I(0),P(Te(e))}else{let e=F;t.top<-F?e=-t.top:t.top+t.height>-F+X&&(e=-(t.top+t.height-X)),P(0),I(Te(e))}}),[Ne,Pe]=(0,R.useState)(),[Fe,Ie]=(0,R.useState)(!1),$=S.filter(e=>!e.disabled).map(e=>e.key),Le=e=>{let t=$.indexOf(Ne||s),n=$.length,r=(t+e+n)%n,i=$[r];Pe(i)},Re=(e,t)=>{let n=$.indexOf(e),r=S.find(t=>t.key===e);fe(r?.closable,r?.closeIcon,u,r?.disabled)&&(t.preventDefault(),t.stopPropagation(),u.onEdit(`remove`,{key:e,event:t}),n===$.length-1?Le(-1):Le(1))},ze=(e,t)=>{Ie(!0),t.button===1&&Re(e,t)},Be=e=>{let{code:t}=e,n=c&&j,r=$[0],i=$[$.length-1];switch(t){case`ArrowLeft`:j&&Le(n?1:-1);break;case`ArrowRight`:j&&Le(n?-1:1);break;case`ArrowUp`:e.preventDefault(),j||Le(-1);break;case`ArrowDown`:e.preventDefault(),j||Le(1);break;case`Home`:e.preventDefault(),Pe(r);break;case`End`:e.preventDefault(),Pe(i);break;case`Enter`:case`Space`:e.preventDefault(),h(Ne??s,e);break;case`Backspace`:case`Delete`:Re(Ne,e);break}},Ve={};j?Ve.marginInlineStart=p:Ve.marginTop=p;let He=S.map((e,t)=>{let{key:n}=e;return R.createElement(_e,{id:i,prefixCls:x,key:n,tab:e,classNames:{item:v?.item,remove:v?.remove},styles:{item:t===0?b?.item:{...Ve,...b?.item},remove:b?.remove},closable:e.closable,editable:u,active:n===s,focus:n===Ne,renderWrapper:m,removeAriaLabel:d?.removeAriaLabel,tabCount:$.length,currentPosition:t+1,onClick:e=>{h(n,e)},onKeyDown:Be,onFocus:()=>{Fe||Pe(n),Me(n),Oe(),D.current&&(c||(D.current.scrollLeft=0),D.current.scrollTop=0)},onBlur:()=>{Pe(void 0)},onMouseDown:e=>ze(n,e),onMouseUp:()=>{Ie(!1)}})}),Ue=()=>W(()=>{let e=new Map,t=O.current?.getBoundingClientRect();return S.forEach(({key:n})=>{let r=O.current?.querySelector(`[data-node-key="${de(n)}"]`);if(r){let[i,a,o,s]=ye(r,t);e.set(n,{width:i,height:a,left:o,top:s})}}),e});(0,R.useEffect)(()=>{Ue()},[S.map(e=>e.key).join(`_`)]);let We=se(()=>{let e=be(C),t=be(T),n=be(E);L([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);let r=be(A);ie(r);let i=be(k);U(i);let a=be(O);ne([a[0]-r[0],a[1]-r[1]]),Ue()}),Ge=S.slice(0,Ae),Ke=S.slice(je+1),qe=[...Ge,...Ke],Je=G.get(s),{style:Ye}=ae({activeTabOffset:Je,horizontal:j,indicator:_,rtl:c});(0,R.useEffect)(()=>{Me()},[s,Z,we,ue(Je),ue(G),j]),(0,R.useEffect)(()=>{We()},[c]);let Xe=!!qe.length,Ze=`${x}-nav-wrap`,Qe,$e,et,tt;return j?c?($e=M>0,Qe=M!==we):(Qe=M<0,$e=M!==Z):(et=F<0,tt=F!==Z),R.createElement(o,{onResize:We},R.createElement(`div`,{ref:w(t,C),role:`tablist`,"aria-orientation":j?`horizontal`:`vertical`,className:y(`${x}-nav`,n,v?.header),style:{...b?.header,...r},onKeyDown:()=>{Oe()}},R.createElement(me,{ref:T,position:`left`,extra:l,prefixCls:x}),R.createElement(o,{onResize:We},R.createElement(`div`,{className:y(Ze,{[`${Ze}-ping-left`]:Qe,[`${Ze}-ping-right`]:$e,[`${Ze}-ping-top`]:et,[`${Ze}-ping-bottom`]:tt}),ref:D},R.createElement(o,{onResize:We},R.createElement(`div`,{ref:O,className:`${x}-nav-list`,style:{transform:`translate(${M}px, ${F}px)`,transition:Ee?`none`:void 0}},He,R.createElement(pe,{ref:A,prefixCls:x,locale:d,editable:u,style:{...He.length===0?void 0:Ve,visibility:Xe?`hidden`:null}}),R.createElement(`div`,{className:y(`${x}-ink-bar`,v?.indicator,{[`${x}-ink-bar-animated`]:a.inkBar}),style:{...Ye,...b?.indicator}}))))),R.createElement(ge,ve({},e,{removeAriaLabel:d?.removeAriaLabel,ref:k,prefixCls:x,tabs:qe,className:!Xe&&Ce,popupStyle:b?.popup,tabMoving:!!Ee})),R.createElement(me,{ref:E,position:`right`,extra:l,prefixCls:x})))}),X=({renderTabBar:e,...t})=>e?e(t,Se):R.createElement(Se,t),Ce=R.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,id:a,active:o,tabKey:s,children:c}=e,l=R.Children.count(c)>0;return R.createElement(`div`,{id:a&&`${a}-panel-${s}`,role:`tabpanel`,tabIndex:o&&l?0:-1,"aria-labelledby":a&&`${a}-tab-${s}`,"aria-hidden":!o,style:i,className:y(n,o&&`${n}-active`,r),ref:t},c)});function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,activeKey:n,animated:r,tabPosition:i,destroyOnHidden:a,bodyStyle:o,bodyClassName:s,contentStyle:c,contentClassName:l}=e,{prefixCls:u,tabs:d}=R.useContext(z),p=r.tabPane,m=`${u}-body`,h=`${u}-content`;return R.createElement(`div`,{className:y(`${m}-holder`)},R.createElement(`div`,{className:y(m,`${m}-${i}`,{[`${m}-animated`]:p},s),style:o},d.map(e=>{let{key:i,forceRender:o,style:s,className:u,destroyOnHidden:d,...m}=e,g=i===n;return R.createElement(f,Z({key:i,visible:g,forceRender:o,removeOnLeave:!!(a??d),leavedClassName:`${h}-hidden`},r.tabPaneMotion),({style:e,className:n},r)=>R.createElement(Ce,Z({},m,{prefixCls:h,id:t,tabKey:i,animated:p,active:g,style:{...c,...s,...e},className:y(l,u,n),ref:r})))})))};function Te(e={inkBar:!0,tabPane:!1}){let t;return t=e===!1?{inkBar:!1,tabPane:!1}:e===!0?{inkBar:!0,tabPane:!1}:{inkBar:!0,...typeof e==`object`?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-tabs`,className:i,items:a,direction:o,activeKey:s,defaultActiveKey:c,editable:l,animated:u,tabPosition:d=`top`,tabBarGutter:f,tabBarStyle:p,tabBarExtraContent:m,locale:g,more:_,destroyOnHidden:v,renderTabBar:b,onChange:x,onTabClick:S,onTabScroll:C,getPopupContainer:w,popupClassName:T,indicator:E,classNames:D,styles:O,...k}=e,A=R.useMemo(()=>(a||[]).filter(e=>e&&typeof e==`object`&&`key`in e),[a]),j=o===`rtl`,M=Te(u),[N,P]=(0,R.useState)(!1);(0,R.useEffect)(()=>{P(h())},[]);let[F,ee]=I(c??A[0]?.key,s),[L,te]=(0,R.useState)(()=>A.findIndex(e=>e.key===F));(0,R.useEffect)(()=>{let e=A.findIndex(e=>e.key===F);e===-1&&(e=Math.max(0,Math.min(L,A.length-1)),ee(A[e]?.key)),te(e)},[A.map(e=>e.key).join(`_`),F,L]);let[ne,re]=I(null,n);(0,R.useEffect)(()=>{n||(re(`rc-tabs-${Ee}`),Ee+=1)},[]);function ie(e,t){S?.(e,t);let n=e!==F;ee(e),n&&x?.(e)}let ae={id:ne,activeKey:F,animated:M,tabPosition:d,rtl:j,mobile:N},B={...ae,editable:l,locale:g,more:_,tabBarGutter:f,onTabClick:ie,onTabScroll:C,extra:m,style:p,getPopupContainer:w,popupClassName:y(T,D?.popup),indicator:E,styles:O,classNames:D},V=R.useMemo(()=>({tabs:A,prefixCls:r}),[A,r]);return R.createElement(z.Provider,{value:V},R.createElement(`div`,Q({ref:t,id:n,className:y(r,`${r}-${d}`,{[`${r}-mobile`]:N,[`${r}-editable`]:l,[`${r}-rtl`]:j},i)},k),R.createElement(X,Q({},B,{renderTabBar:b})),R.createElement(we,Q({destroyOnHidden:v},ae,{bodyStyle:O?.body,bodyClassName:D?.body,contentStyle:O?.content,contentClassName:D?.content,animated:M}))))}),Oe={motionAppear:!1,motionEnter:!0,motionLeave:!0};function ke(e,n={inkBar:!0,tabPane:!1}){let r;return r=n===!1?{inkBar:!1,tabPane:!1}:n===!0?{inkBar:!0,tabPane:!0}:{inkBar:!0,...a(n)?n:{}},r.tabPane&&(r.tabPaneMotion={...Oe,motionName:t(e,`switch`)}),r}function Ae(e){return e.filter(e=>e)}function je(e,t){return e?e.map(e=>({...e,destroyOnHidden:e.destroyOnHidden??e.destroyInactiveTabPane})):Ae(s(t).map(e=>{if(R.isValidElement(e)){let{key:t,props:n}=e,{tab:r,...i}=n||{};return{key:String(t),...i,label:r}}return null}))}var Me=e=>{let{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:`none`,"&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:`absolute`,transition:`none`,inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[L(e,`slide-up`),L(e,`slide-down`)]]},Ne=e=>{let{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:a,itemSelectedColor:o}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${p(e.lineWidth)} ${e.lineType} ${a}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:o,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:k(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:`none`},[`${t}-ink-bar`]:{visibility:`hidden`}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:p(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${p(e.borderRadiusLG)} ${p(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${p(e.borderRadiusLG)} ${p(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:p(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${p(e.borderRadiusLG)} 0 0 ${p(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${p(e.borderRadiusLG)} ${p(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},Pe=e=>{let{antCls:t,componentCls:i,itemHoverColor:a,dropdownEdgeChildVerticalPadding:o}=e;return{[`${i}-dropdown`]:{...C(e),position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:`block`,"&-hidden":{display:`none`},[`&${t}-slide-down-enter${t}-slide-down-enter-active${i}-dropdown-placement-bottomLeft, + &${t}-slide-down-appear${t}-slide-down-appear-active${i}-dropdown-placement-bottomLeft, + &${t}-slide-down-enter${t}-slide-down-enter-active${i}-dropdown-placement-bottom, + &${t}-slide-down-appear${t}-slide-down-appear-active${i}-dropdown-placement-bottom, + &${t}-slide-down-enter${t}-slide-down-enter-active${i}-dropdown-placement-bottomRight, + &${t}-slide-down-appear${t}-slide-down-appear-active${i}-dropdown-placement-bottomRight`]:{animationName:l},[`&${t}-slide-up-enter${t}-slide-up-enter-active${i}-dropdown-placement-topLeft, + &${t}-slide-up-appear${t}-slide-up-appear-active${i}-dropdown-placement-topLeft, + &${t}-slide-up-enter${t}-slide-up-enter-active${i}-dropdown-placement-top, + &${t}-slide-up-appear${t}-slide-up-appear-active${i}-dropdown-placement-top, + &${t}-slide-up-enter${t}-slide-up-enter-active${i}-dropdown-placement-topRight, + &${t}-slide-up-appear${t}-slide-up-appear-active${i}-dropdown-placement-topRight`]:{animationName:r},[`&${t}-slide-down-leave${t}-slide-down-leave-active${i}-dropdown-placement-bottomLeft, + &${t}-slide-down-leave${t}-slide-down-leave-active${i}-dropdown-placement-bottom, + &${t}-slide-down-leave${t}-slide-down-leave-active${i}-dropdown-placement-bottomRight`]:{animationName:O},[`&${t}-slide-up-leave${t}-slide-up-leave-active${i}-dropdown-placement-topLeft, + &${t}-slide-up-leave${t}-slide-up-leave-active${i}-dropdown-placement-top, + &${t}-slide-up-leave${t}-slide-up-leave-active${i}-dropdown-placement-topRight`]:{animationName:v},[`${i}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${p(o)} 0`,overflowX:`hidden`,overflowY:`auto`,textAlign:{_skip_check_:!0,value:`left`},listStyleType:`none`,backgroundColor:e.colorBgContainer,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,"&-item":{...n,display:`flex`,alignItems:`center`,minWidth:e.tabsDropdownWidth,margin:0,padding:`${p(e.paddingXXS)} ${p(e.paddingSM)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:`nowrap`},"&-remove":{flex:`none`,marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:0,cursor:`pointer`,"&:hover":{color:a}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:`transparent`,cursor:`not-allowed`}}}}}}},Fe=e=>{let{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:a,verticalItemMargin:o,motionDurationSlow:s,calc:c}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:`column`,[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:`absolute`,right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${p(e.lineWidth)} ${e.lineType} ${r}`,content:`''`},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:[`width`,`left`,`right`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav, + > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-body-holder, > div > ${t}-body-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:`column`,minWidth:c(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:a,textAlign:`center`},[`${t}-tab + ${t}-tab`]:{margin:o},[`${t}-nav-wrap`]:{flexDirection:`column`,"&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:[`height`,`top`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:`1 0 auto`,flexDirection:`column`}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-body-holder, > div > ${t}-body-holder`]:{marginLeft:{_skip_check_:!0,value:p(c(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${p(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-body > ${t}-content`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-body-holder, > div > ${t}-body-holder`]:{order:0,marginRight:{_skip_check_:!0,value:c(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${p(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-body > ${t}-content`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},Ie=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:a,horizontalItemPaddingSM:o,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${p(e.borderRadius)} ${p(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${p(e.borderRadius)} ${p(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${p(e.borderRadius)} ${p(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${p(e.borderRadius)} 0 0 ${p(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}}}}}},$=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:a,horizontalItemPadding:o,itemSelectedColor:s,itemColor:l}=e,u=`${t}-tab`;return{[u]:{position:`relative`,WebkitTouchCallout:`none`,WebkitTapHighlightColor:`transparent`,display:`inline-flex`,alignItems:`center`,padding:o,fontSize:e.titleFontSize,background:`transparent`,border:0,outline:`none`,cursor:`pointer`,color:l,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:`none`,transition:`all ${e.motionDurationSlow}`,[`${u}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":{flex:`none`,lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:`none`,outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading},...c(e)},"&:hover":{color:r},[`&${u}-active ${u}-btn`]:{color:s},[`&${u}-focus ${u}-btn:focus-visible`]:k(e),[`&${u}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${u}-disabled ${u}-btn, &${u}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${u}-remove ${i}`]:{margin:0,verticalAlign:`middle`},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${u} + ${u}`]:{margin:{_skip_check_:!0,value:a}}}},Le=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:a}=e;return{[`${t}-rtl`]:{direction:`rtl`,[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:e.marginSM}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:e.marginXS},marginLeft:{_skip_check_:!0,value:a(e.marginXXS).mul(-1).equal()},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-body-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-body-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:`rtl`},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:`right`}}}}},Re=e=>{let{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:a,itemActiveColor:o,colorBorderSecondary:s}=e;return{[t]:{...C(e),display:`flex`,[`> ${t}-nav, > div > ${t}-nav`]:{position:`relative`,display:`flex`,flex:`none`,alignItems:`center`,[`${t}-nav-wrap`]:{position:`relative`,display:`flex`,flex:`auto`,alignSelf:`stretch`,overflow:`hidden`,whiteSpace:`nowrap`,transform:`translate(0)`,"&::before, &::after":{position:`absolute`,zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:`''`,pointerEvents:`none`}},[`${t}-nav-list`]:{position:`relative`,display:`flex`,transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:`flex`,alignSelf:`stretch`},[`${t}-nav-operations-hidden`]:{position:`absolute`,visibility:`hidden`,pointerEvents:`none`},[`${t}-nav-more`]:{position:`relative`,padding:n,background:`transparent`,border:0,color:e.colorText,"&::after":{position:`absolute`,right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:`translateY(100%)`,content:`''`}},[`${t}-nav-add`]:{minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:`transparent`,border:`${p(e.lineWidth)} ${e.lineType} ${s}`,borderRadius:`${p(e.borderRadiusLG)} ${p(e.borderRadiusLG)} 0 0`,outline:`none`,cursor:`pointer`,color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:a},"&:active, &:focus:not(:focus-visible)":{color:o},...c(e,-3)}},[`${t}-extra-content`]:{flex:`none`},[`${t}-ink-bar`]:{position:`absolute`,background:e.inkBarColor,pointerEvents:`none`},...$(e),[`${t}-body`]:{position:`relative`,width:`100%`},[`${t}-body-holder`]:{flex:`auto`,minWidth:0,minHeight:0},[`${t}-content`]:{...c(e),"&-hidden":{display:`none`}}},[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:`auto`}}}}}},ze=b(`Tabs`,e=>{let t=P(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${p(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${p(e.horizontalItemGutter)}`});return[Ie(t),Le(t),Fe(t),Pe(t),Ne(t),Re(t),Me(t)]},e=>{let{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:a}=e,o=t||a,s=n||i,c=r||a+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:o,cardHeightSM:s,cardHeightLG:c,cardPadding:`${(o-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(c-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:``,horizontalItemMarginRTL:``,horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}),Be=()=>null,Ve=R.forwardRef((e,t)=>{let{type:n,className:r,rootClassName:i,size:a,onEdit:o,hideAdd:s,centered:c,addIcon:l,removeIcon:u,moreIcon:f,more:p,popupClassName:h,children:g,items:v,animated:b,style:x,indicatorSize:S,indicator:C,classNames:w,styles:T,destroyInactiveTabPane:E,destroyOnHidden:O,tabPlacement:k,tabPosition:A,...j}=e,{prefixCls:M}=j,{getPrefixCls:N,direction:P,getPopupContainer:I,className:L,style:ne,classNames:z,styles:ae}=te(`tabs`),{tabs:B}=R.useContext(d),V=N(`tabs`,M),H=ee(V),[U,oe]=ze(V,H),W=R.useRef(null);R.useImperativeHandle(t,()=>({nativeElement:W.current}));let G;n===`editable-card`&&(G={onEdit:(e,{key:t,event:n})=>{o?.(e===`add`?n:t,e)},removeIcon:u??B?.removeIcon??R.createElement(re,null),addIcon:(l??B?.addIcon)||R.createElement(ie,null),showAdd:s!==!0});let K=N(),se=m(a),ce=je(v,g),q=ke(V,b),le={align:C?.align??B?.indicator?.align,size:C?.size??S??B?.indicator?.size??B?.indicatorSize},ue=R.useMemo(()=>{let e=k??A??void 0,t=P===`rtl`;switch(e){case`start`:return t?`right`:`left`;case`end`:return t?`left`:`right`;default:return e}},[k,A,P]),J={...e,size:se,tabPlacement:ue,items:ce},de=_(ne),fe=_(x),[pe,me]=F([z,w],[ae,de,T,fe],{props:J},{popup:{_default:`root`}});return R.createElement(De,{ref:W,direction:P,getPopupContainer:I,...j,items:ce,className:y({[`${V}-large`]:se===`large`,[`${V}-small`]:se===`small`,[`${V}-card`]:[`card`,`editable-card`].includes(n),[`${V}-editable-card`]:n===`editable-card`,[`${V}-centered`]:c},L,r,i,pe.root,U,oe,H),classNames:{...pe,popup:y(h,U,oe,H,pe.popup?.root)},styles:me,style:me.root,editable:G,more:{icon:B?.more?.icon??B?.moreIcon??f??R.createElement(D,null),transitionName:`${K}-slide-up`,...p},prefixCls:V,animated:q,indicator:le,destroyOnHidden:O??E,tabPosition:ue})});Ve.TabPane=Be;var He=({prefixCls:e,className:t,hoverable:n=!0,...r})=>{let{getPrefixCls:i}=R.useContext(d),a=i(`card`,e),o=y(`${a}-grid`,t,{[`${a}-grid-hoverable`]:n});return R.createElement(`div`,{...r,className:o})},Ue=e=>{let{antCls:t,componentCls:r,headerHeight:i,headerPadding:a,tabsMarginBottom:o}=e;return{display:`flex`,justifyContent:`center`,flexDirection:`column`,minHeight:i,marginBottom:-1,padding:`0 ${p(a)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${p(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${p(e.borderRadiusLG)} ${p(e.borderRadiusLG)} 0 0`,...u(),"&-wrapper":{width:`100%`,display:`flex`,alignItems:`center`},"&-title":{display:`inline-block`,flex:1,...n,[` + > ${r}-typography, + > ${r}-typography-edit-content + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${t}-tabs-top`]:{clear:`both`,marginBottom:o,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,"&-bar":{borderBottom:`${p(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}}},We=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:` + ${p(i)} 0 0 0 ${n}, + 0 ${p(i)} 0 0 ${n}, + ${p(i)} ${p(i)} 0 0 ${n}, + ${p(i)} 0 0 0 ${n} inset, + 0 ${p(i)} 0 0 ${n} inset; + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},Ge=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:o}=e;return{margin:0,padding:0,listStyle:`none`,background:o,borderTop:`${p(e.lineWidth)} ${e.lineType} ${a}`,display:`flex`,borderRadius:`0 0 ${p(e.borderRadiusLG)} ${p(e.borderRadiusLG)}`,...u(),"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:p(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:p(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${p(e.lineWidth)} ${e.lineType} ${a}`}}}},Ke=e=>({margin:`${p(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`,...u(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,...n},"&-description":{color:e.colorTextDescription}}),qe=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${p(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${p(e.padding)} ${p(i)}`}}},Je=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},Ye=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:a,bodyPadding:o,extraColor:s,motionDurationMid:c}=e;return{[t]:{...C(e),position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:Ue(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:s,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${p(e.borderRadiusLG)} ${p(e.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:e.borderRadiusLG,borderStartEndRadius:e.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${t}-grid`]:We(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${p(e.borderRadiusLG)} ${p(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:Ge(e),[`${t}-meta`]:Ke(e)},[`${t}-bordered`]:{border:`${p(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:`pointer`,transition:[`box-shadow`,`border-color`].map(e=>`${e} ${c}`).join(`, `),"&:hover":{borderColor:`transparent`,boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${p(e.borderRadiusLG)} ${p(e.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${t}-head))`]:{borderRadius:0},[`${t}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:qe(e),[`${t}-loading`]:Je(e),[`${t}-rtl`]:{direction:`rtl`}}},Xe=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${p(r)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},Ze=b(`Card`,e=>{let t=P(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[Ye(t),Xe(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),Qe=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return R.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return R.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},R.createElement(`span`,null,e))}))},$e=R.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,extra:o,headStyle:c={},bodyStyle:l={},title:u,loading:d,bordered:f,variant:p,size:h,type:g,cover:v,actions:b,tabList:x,children:C,activeTabKey:w,defaultActiveTabKey:T,tabBarExtraContent:E,hoverable:D,tabProps:O={},classNames:k,styles:A,...j}=e,{getPrefixCls:N,direction:P,className:I,style:ee,classNames:L,styles:re}=te(`card`),[ie]=M(`card`,p,f),z=m(h),ae={...e,size:z,variant:ie},B=_(ee),V=_(a),[H,U]=F([L,k],[re,B,A,V],{props:ae}),oe=t=>{e.onTabChange?.(t)},W=R.useMemo(()=>s(C),[C]),G=R.useMemo(()=>W.some(e=>R.isValidElement(e)&&e.type===He),[W]),K=N(`card`,n),[se,ce]=Ze(K),q=R.createElement(ne,{loading:!0,active:!0,paragraph:{rows:4},title:!1},C),le=w!==void 0,ue={...O,[le?`activeKey`:`defaultActiveKey`]:le?w:T,tabBarExtraContent:E},J,de=z===`small`?z:`large`,fe=x?R.createElement(Ve,{size:de,...ue,className:`${K}-head-tabs`,onChange:oe,items:x.map(({tab:e,...t})=>({label:e,...t}))}):null;if(u||o||fe){let e=y(`${K}-head`,H.header),t=y(`${K}-head-title`,H.title),n=y(`${K}-extra`,H.extra),r={...c,...U.header};J=R.createElement(`div`,{className:e,style:r},R.createElement(`div`,{className:`${K}-head-wrapper`},u&&R.createElement(`div`,{className:t,style:U.title},u),o&&R.createElement(`div`,{className:n,style:U.extra},o)),fe)}let pe=y(`${K}-cover`,H.cover),me=v?R.createElement(`div`,{className:pe,style:U.cover},v):null,Y=y(`${K}-body`,H.body),he={...l,...U.body},ge=d||W.length?R.createElement(`div`,{className:Y,style:he},d?q:C):null,_e=y(`${K}-actions`,H.actions),ve=b?.length?R.createElement(Qe,{actionClasses:_e,actionStyle:U.actions,actions:b}):null,ye=S(j,[`onTabChange`]),be=y(K,I,{[`${K}-loading`]:d,[`${K}-bordered`]:ie!==`borderless`,[`${K}-hoverable`]:D,[`${K}-contain-grid`]:G,[`${K}-contain-tabs`]:x?.length,[`${K}-small`]:z===`small`,[`${K}-type-${g}`]:!!g,[`${K}-rtl`]:P===`rtl`},r,i,se,ce,H.root),xe={...U.root};return R.createElement(`div`,{ref:t,...ye,className:be,style:xe},J,me,ge,ve)}),et=e=>{let{prefixCls:t,className:n,avatar:r,title:i,description:a,style:o,classNames:s,styles:c,...l}=e,{getPrefixCls:u,className:d,style:f,classNames:p,styles:m}=te(`cardMeta`),h=`${u(`card`,t)}-meta`,g=_(f),v=_(o),[b,x]=F([p,s],[m,g,c,v],{props:e}),S=y(h,n,d,b.root),C={...x.root},w=y(`${h}-avatar`,b.avatar),T=y(`${h}-title`,b.title),E=y(`${h}-description`,b.description),D=y(`${h}-section`,b.section),O=r?R.createElement(`div`,{className:w,style:x.avatar},r):null,k=i?R.createElement(`div`,{className:T,style:x.title},i):null,A=a?R.createElement(`div`,{className:E,style:x.description},a):null,j=k||A?R.createElement(`div`,{className:D,style:x.section},k,A):null;return R.createElement(`div`,{...l,className:S,style:C},O,j)},tt=$e;tt.Grid=He,tt.Meta=et;export{Ve as n,tt as t}; \ No newline at end of file diff --git a/public/assets/card-D7XvzVif.js b/public/assets/card-D7XvzVif.js deleted file mode 100644 index d363b6d..0000000 --- a/public/assets/card-D7XvzVif.js +++ /dev/null @@ -1,25 +0,0 @@ -import{$t as e,B as t,Bt as n,H as r,Hn as i,Jn as a,Ln as o,Or as s,Rn as c,Sn as l,Sr as u,St as d,Tr as f,U as p,V as m,Vn as h,W as g,X as _,Xt as v,Y as y,Yt as b,Zt as x,a as S,an as C,cn as w,dn as T,dt as E,et as D,f as O,hn as k,hr as A,i as j,l as M,n as N,or as ee,pr as P,r as F,sn as I,tn as L,ur as R,wn as te}from"./jsx-runtime-NwRKtVrk.js";import{et as ne}from"./index-B7MUL4ct.js";var z=s(f()),B=(0,z.createContext)(null),re=e=>{let{activeTabOffset:t,horizontal:n,rtl:r,indicator:i={}}=e,{size:a,align:o=`center`}=i,[s,l]=(0,z.useState)(),u=(0,z.useRef)(),d=z.useCallback(e=>typeof a==`function`?a(e):typeof a==`number`?a:e,[a]);function f(){c.cancel(u.current)}return(0,z.useEffect)(()=>{let e={};if(t)if(n){e.width=d(t.width);let n=r?`right`:`left`;o===`start`&&(e[n]=t[n]),o===`center`&&(e[n]=t[n]+t.width/2,e.transform=r?`translateX(50%)`:`translateX(-50%)`),o===`end`&&(e[n]=t[n]+t.width,e.transform=`translateX(-100%)`)}else e.height=d(t.height),o===`start`&&(e.top=t.top),o===`center`&&(e.top=t.top+t.height/2,e.transform=`translateY(-50%)`),o===`end`&&(e.top=t.top+t.height,e.transform=`translateY(-100%)`);return f(),u.current=c(()=>{s&&e&&Object.keys(e).every(t=>{let n=e[t],r=s[t];return typeof n==`number`&&typeof r==`number`?Math.round(n)===Math.round(r):n===r})||l(e)}),f},[JSON.stringify(t),n,r,o,d]),{style:s}},V={width:0,height:0,left:0,top:0};function H(e,t,n){return(0,z.useMemo)(()=>{let n=new Map,r=t.get(e[0]?.key)||V,i=r.left+r.width;for(let r=0;re.key).join(`_`),t,n])}function U(e,t){let n=z.useRef(e),[,r]=z.useState({});function i(e){let i=typeof e==`function`?e(n.current):e;i!==n.current&&t(i,n.current),n.current=i,r({})}return[n.current,i]}var W=.1,ie=.01,G=20,ae=.995**G;function oe(e,t){let[n,r]=(0,z.useState)(),[i,a]=(0,z.useState)(0),[o,s]=(0,z.useState)(0),[c,l]=(0,z.useState)(),u=(0,z.useRef)();function d(e){let{screenX:t,screenY:n}=e.touches[0];r({x:t,y:n}),window.clearInterval(u.current)}function f(e){if(!n)return;let{screenX:o,screenY:c}=e.touches[0];r({x:o,y:c});let u=o-n.x,d=c-n.y;t(u,d);let f=Date.now();a(f),s(f-i),l({x:u,y:d})}function p(){if(n&&(r(null),l(null),c)){let e=c.x/o,n=c.y/o;if(Math.max(Math.abs(e),Math.abs(n)){if(Math.abs(r)o?(i=n,m.current=`x`):(i=r,m.current=`y`),t(-i,-i)&&e.preventDefault()}let g=(0,z.useRef)(null);g.current={onTouchStart:d,onTouchMove:f,onTouchEnd:p,onWheel:h},z.useEffect(()=>{function t(e){g.current.onTouchStart(e)}function n(e){g.current.onTouchMove(e)}function r(e){g.current.onTouchEnd(e)}function i(e){g.current.onWheel(e)}return document.addEventListener(`touchmove`,n,{passive:!1}),document.addEventListener(`touchend`,r,{passive:!0}),e.current.addEventListener(`touchstart`,t,{passive:!0}),e.current.addEventListener(`wheel`,i,{passive:!1}),()=>{document.removeEventListener(`touchmove`,n),document.removeEventListener(`touchend`,r)}},[])}function se(e){let[t,n]=(0,z.useState)(0),r=(0,z.useRef)(0),i=(0,z.useRef)();return i.current=e,P(()=>{i.current?.()},[t]),()=>{r.current===t&&(r.current+=1,n(r.current))}}function ce(e){let t=(0,z.useRef)([]),[,n]=(0,z.useState)({}),r=(0,z.useRef)(typeof e==`function`?e():e),i=se(()=>{let e=r.current;t.current.forEach(t=>{e=t(e)}),t.current=[],r.current=e,n({})});function a(e){t.current.push(e),i()}return[r.current,a]}var K={width:0,height:0,left:0,top:0,right:0};function le(e,t,n,r,i,a,{tabs:o,tabPosition:s,rtl:c}){let l,u,d;return[`top`,`bottom`].includes(s)?(l=`width`,u=c?`right`:`left`,d=Math.abs(n)):(l=`height`,u=`top`,d=-n),(0,z.useMemo)(()=>{if(!o.length)return[0,0];let n=o.length,r=n;for(let i=0;iMath.floor(d+t)){r=i-1;break}}let i=0;for(let t=n-1;t>=0;--t)if((e.get(o[t].key)||K)[u]r?[0,-1]:[i,r]},[e,t,r,i,a,d,s,o.map(e=>e.key).join(`_`),c])}function ue(e){let t;return e instanceof Map?(t={},e.forEach((e,n)=>{t[n]=e})):t=e,JSON.stringify(t)}var q=`TABS_DQ`;function de(e){return String(e).replace(/"/g,q)}function fe(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var pe=z.forwardRef((e,t)=>{let{prefixCls:n,editable:r,locale:i,style:a}=e;return!r||r.showAdd===!1?null:z.createElement(`button`,{ref:t,type:`button`,className:`${n}-nav-add`,style:a,"aria-label":i?.addAriaLabel||`Add tab`,onClick:e=>{r.onEdit(`add`,{event:e})}},r.addIcon||`+`)}),me=z.forwardRef((e,t)=>{let{position:n,prefixCls:r,extra:i}=e;if(!i)return null;let a,o={};return typeof i==`object`&&!z.isValidElement(i)?o=i:o.right=i,n===`right`&&(a=o.right),n===`left`&&(a=o.left),a?z.createElement(`div`,{className:`${r}-extra-content`,ref:t},a):null});function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,id:r,tabs:i,locale:o,mobile:s,more:c={},style:l,className:d,editable:f,tabBarGutter:p,rtl:m,removeAriaLabel:h,onTabClick:g,getPopupContainer:_,popupClassName:v,popupStyle:y,classNames:b,styles:x}=e,[C,w]=(0,z.useState)(!1),[T,E]=(0,z.useState)(null),{icon:D=`More`}=c,k=`${r}-more-popup`,A=`${n}-dropdown`,j=T===null?null:`${k}-${T}`,N=o?.dropdownAriaLabel;function ee(e,t){e.preventDefault(),e.stopPropagation(),f.onEdit(`remove`,{key:t,event:e})}let P=z.createElement(S,{onClick:({key:e,domEvent:t})=>{g(e,t),w(!1)},prefixCls:`${A}-menu`,id:k,tabIndex:-1,role:`listbox`,"aria-activedescendant":j,selectedKeys:[T],"aria-label":N===void 0?`expanded dropdown`:N},i.map(e=>{let{closable:t,disabled:n,closeIcon:i,key:a,label:o}=e,s=fe(t,i,f,n);return z.createElement(M,{key:a,id:`${k}-${a}`,role:`option`,"aria-controls":r&&`${r}-panel-${a}`,disabled:n},z.createElement(`span`,null,o),s&&z.createElement(`button`,{type:`button`,"aria-label":h||`remove`,tabIndex:0,className:u(`${A}-menu-item-remove`,b?.remove),style:x?.remove,onClick:e=>{e.stopPropagation(),ee(e,a)}},i||f.removeIcon||`×`))}));function F(e){let t=i.filter(e=>!e.disabled),n=t.findIndex(e=>e.key===T)||0,r=t.length;for(let i=0;i{let e=document.getElementById(j);e?.scrollIntoView&&e.scrollIntoView(!1)},[j,T]),(0,z.useEffect)(()=>{C||E(null)},[C]);let L={marginInlineStart:p};i.length||(L.visibility=`hidden`,L.order=1);let R=u(v,{[`${A}-rtl`]:m}),te=s?null:z.createElement(O,J({prefixCls:A,overlay:P,visible:i.length?C:!1,onVisibleChange:w,overlayClassName:R,overlayStyle:y,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:_},c),z.createElement(`button`,{type:`button`,className:`${n}-nav-more`,style:L,"aria-haspopup":`listbox`,"aria-controls":k,id:`${r}-more`,"aria-expanded":C,onKeyDown:I},D));return z.createElement(`div`,{className:u(`${n}-nav-operations`,d),style:l,ref:t},te,z.createElement(pe,{prefixCls:n,locale:o,editable:f}))}),ge=z.memo(he,(e,t)=>t.tabMoving),_e=e=>{let{prefixCls:t,id:n,active:r,focus:i,tab:{key:a,label:o,disabled:s,closeIcon:c,icon:l},closable:d,renderWrapper:f,removeAriaLabel:p,editable:m,onClick:h,onFocus:g,onBlur:_,onKeyDown:v,onMouseDown:y,onMouseUp:b,styles:x,classNames:S,tabCount:C,currentPosition:w}=e,T=`${t}-tab`,E=fe(d,c,m,s);function D(e){s||h(e)}function O(e){e.preventDefault(),e.stopPropagation(),m.onEdit(`remove`,{key:a,event:e})}let k=z.useMemo(()=>l&&typeof o==`string`?z.createElement(`span`,null,o):o,[o,l]),A=z.useRef(null);z.useEffect(()=>{i&&A.current&&A.current.focus()},[i]);let j=z.createElement(`div`,{key:a,"data-node-key":de(a),className:u(T,S?.item,{[`${T}-with-remove`]:E,[`${T}-active`]:r,[`${T}-disabled`]:s,[`${T}-focus`]:i}),style:x?.item,onClick:D},z.createElement(`div`,{ref:A,role:`tab`,"aria-selected":r,id:n&&`${n}-tab-${a}`,className:`${T}-btn`,"aria-controls":n&&`${n}-panel-${a}`,"aria-disabled":s,tabIndex:s?null:r?0:-1,onClick:e=>{e.stopPropagation(),D(e)},onKeyDown:v,onMouseDown:y,onMouseUp:b,onFocus:g,onBlur:_},i&&z.createElement(`div`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`Tab ${w} of ${C}`),l&&z.createElement(`span`,{className:`${T}-icon`},l),o&&k),E&&z.createElement(`button`,{type:`button`,"aria-label":p||`remove`,tabIndex:r?0:-1,className:u(`${T}-remove`,S?.remove),style:x?.remove,onClick:e=>{e.stopPropagation(),O(e)}},c||m.removeIcon||`×`));return f?f(j):j};function ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{offsetWidth:n,offsetHeight:r,offsetTop:i,offsetLeft:a}=e,{width:o,height:s,left:c,top:l}=e.getBoundingClientRect();return Math.abs(o-n)<1?[o,s,c-t.left,l-t.top]:[n,r,a,i]},be=e=>{let{offsetWidth:t=0,offsetHeight:n=0}=e.current||{};if(e.current){let{width:n,height:r}=e.current.getBoundingClientRect();if(Math.abs(n-t)<1)return[n,r]}return[t,n]},xe=(e,t)=>e[+!t],Se=z.forwardRef((e,t)=>{let{className:n,style:r,id:i,animated:a,activeKey:o,rtl:s,extra:c,editable:l,locale:d,tabPosition:f,tabBarGutter:p,children:m,onTabClick:h,onTabScroll:g,indicator:_,classNames:v,styles:y}=e,{prefixCls:b,tabs:x}=z.useContext(B),S=(0,z.useRef)(null),C=(0,z.useRef)(null),w=(0,z.useRef)(null),T=(0,z.useRef)(null),D=(0,z.useRef)(null),O=(0,z.useRef)(null),k=(0,z.useRef)(null),j=f===`top`||f===`bottom`,[M,N]=U(0,(e,t)=>{j&&g&&g({direction:e>t?`left`:`right`})}),[P,F]=U(0,(e,t)=>{!j&&g&&g({direction:e>t?`top`:`bottom`})}),[I,L]=(0,z.useState)([0,0]),[R,te]=(0,z.useState)([0,0]),[ne,V]=(0,z.useState)([0,0]),[W,ie]=(0,z.useState)([0,0]),[G,ae]=ce(new Map),K=H(x,G,R[0]),q=xe(I,j),J=xe(R,j),he=xe(ne,j),Se=xe(W,j),Ce=Math.floor(q)Z?Z:e}let Te=(0,z.useRef)(null),[Ee,De]=(0,z.useState)();function Oe(){De(Date.now())}function ke(){Te.current&&clearTimeout(Te.current)}oe(T,(e,t)=>{function n(e,t){e(e=>Q(e+t))}return Ce?(j?n(N,e):n(F,t),ke(),Oe(),!0):!1}),(0,z.useEffect)(()=>(ke(),Ee&&(Te.current=setTimeout(()=>{De(0)},100)),ke),[Ee]);let[Ae,je]=le(K,Y,j?M:P,J,he,Se,{...e,tabs:x}),Me=A((e=o)=>{let t=K.get(e)||{width:0,height:0,left:0,right:0,top:0};if(j){let e=M;s?t.rightM+Y&&(e=t.right+t.width-Y):t.left<-M?e=-t.left:t.left+t.width>-M+Y&&(e=-(t.left+t.width-Y)),F(0),N(Q(e))}else{let e=P;t.top<-P?e=-t.top:t.top+t.height>-P+Y&&(e=-(t.top+t.height-Y)),N(0),F(Q(e))}}),[Ne,Pe]=(0,z.useState)(),[Fe,Ie]=(0,z.useState)(!1),$=x.filter(e=>!e.disabled).map(e=>e.key),Le=e=>{let t=$.indexOf(Ne||o),n=$.length,r=$[(t+e+n)%n];Pe(r)},Re=(e,t)=>{let n=$.indexOf(e),r=x.find(t=>t.key===e);fe(r?.closable,r?.closeIcon,l,r?.disabled)&&(t.preventDefault(),t.stopPropagation(),l.onEdit(`remove`,{key:e,event:t}),n===$.length-1?Le(-1):Le(1))},ze=(e,t)=>{Ie(!0),t.button===1&&Re(e,t)},Be=e=>{let{code:t}=e,n=s&&j,r=$[0],i=$[$.length-1];switch(t){case`ArrowLeft`:j&&Le(n?1:-1);break;case`ArrowRight`:j&&Le(n?-1:1);break;case`ArrowUp`:e.preventDefault(),j||Le(-1);break;case`ArrowDown`:e.preventDefault(),j||Le(1);break;case`Home`:e.preventDefault(),Pe(r);break;case`End`:e.preventDefault(),Pe(i);break;case`Enter`:case`Space`:e.preventDefault(),h(Ne??o,e);break;case`Backspace`:case`Delete`:Re(Ne,e);break}},Ve={};j?Ve.marginInlineStart=p:Ve.marginTop=p;let He=x.map((e,t)=>{let{key:n}=e;return z.createElement(_e,{id:i,prefixCls:b,key:n,tab:e,classNames:{item:v?.item,remove:v?.remove},styles:{item:t===0?y?.item:{...Ve,...y?.item},remove:y?.remove},closable:e.closable,editable:l,active:n===o,focus:n===Ne,renderWrapper:m,removeAriaLabel:d?.removeAriaLabel,tabCount:$.length,currentPosition:t+1,onClick:e=>{h(n,e)},onKeyDown:Be,onFocus:()=>{Fe||Pe(n),Me(n),Oe(),T.current&&(s||(T.current.scrollLeft=0),T.current.scrollTop=0)},onBlur:()=>{Pe(void 0)},onMouseDown:e=>ze(n,e),onMouseUp:()=>{Ie(!1)}})}),Ue=()=>ae(()=>{let e=new Map,t=D.current?.getBoundingClientRect();return x.forEach(({key:n})=>{let r=D.current?.querySelector(`[data-node-key="${de(n)}"]`);if(r){let[i,a,o,s]=ye(r,t);e.set(n,{width:i,height:a,left:o,top:s})}}),e});(0,z.useEffect)(()=>{Ue()},[x.map(e=>e.key).join(`_`)]);let We=se(()=>{let e=be(S),t=be(C),n=be(w);L([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);let r=be(k);V(r),ie(be(O));let i=be(D);te([i[0]-r[0],i[1]-r[1]]),Ue()}),Ge=x.slice(0,Ae),Ke=x.slice(je+1),qe=[...Ge,...Ke],Je=K.get(o),{style:Ye}=re({activeTabOffset:Je,horizontal:j,indicator:_,rtl:s});(0,z.useEffect)(()=>{Me()},[o,X,Z,ue(Je),ue(K),j]),(0,z.useEffect)(()=>{We()},[s]);let Xe=!!qe.length,Ze=`${b}-nav-wrap`,Qe,$e,et,tt;return j?s?($e=M>0,Qe=M!==Z):(Qe=M<0,$e=M!==X):(et=P<0,tt=P!==X),z.createElement(E,{onResize:We},z.createElement(`div`,{ref:ee(t,S),role:`tablist`,"aria-orientation":j?`horizontal`:`vertical`,className:u(`${b}-nav`,n,v?.header),style:{...y?.header,...r},onKeyDown:()=>{Oe()}},z.createElement(me,{ref:C,position:`left`,extra:c,prefixCls:b}),z.createElement(E,{onResize:We},z.createElement(`div`,{className:u(Ze,{[`${Ze}-ping-left`]:Qe,[`${Ze}-ping-right`]:$e,[`${Ze}-ping-top`]:et,[`${Ze}-ping-bottom`]:tt}),ref:T},z.createElement(E,{onResize:We},z.createElement(`div`,{ref:D,className:`${b}-nav-list`,style:{transform:`translate(${M}px, ${P}px)`,transition:Ee?`none`:void 0}},He,z.createElement(pe,{ref:k,prefixCls:b,locale:d,editable:l,style:{...He.length===0?void 0:Ve,visibility:Xe?`hidden`:null}}),z.createElement(`div`,{className:u(`${b}-ink-bar`,v?.indicator,{[`${b}-ink-bar-animated`]:a.inkBar}),style:{...Ye,...y?.indicator}}))))),z.createElement(ge,ve({},e,{removeAriaLabel:d?.removeAriaLabel,ref:O,prefixCls:b,tabs:qe,className:!Xe&&we,popupStyle:y?.popup,tabMoving:!!Ee})),z.createElement(me,{ref:w,position:`right`,extra:c,prefixCls:b})))}),Ce=({renderTabBar:e,...t})=>e?e(t,Se):z.createElement(Se,t),Y=z.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,id:a,active:o,tabKey:s,children:c}=e,l=z.Children.count(c)>0;return z.createElement(`div`,{id:a&&`${a}-panel-${s}`,role:`tabpanel`,tabIndex:o&&l?0:-1,"aria-labelledby":a&&`${a}-tab-${s}`,"aria-hidden":!o,style:i,className:u(n,o&&`${n}-active`,r),ref:t},c)});function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,activeKey:n,animated:r,tabPosition:i,destroyOnHidden:a,contentStyle:o,contentClassName:s}=e,{prefixCls:c,tabs:d}=z.useContext(B),f=r.tabPane,p=`${c}-tabpane`;return z.createElement(`div`,{className:u(`${c}-content-holder`)},z.createElement(`div`,{className:u(`${c}-content`,`${c}-content-${i}`,{[`${c}-content-animated`]:f})},d.map(e=>{let{key:i,forceRender:c,style:d,className:m,destroyOnHidden:h,...g}=e,_=i===n;return z.createElement(l,we({key:i,visible:_,forceRender:c,removeOnLeave:!!(a??h),leavedClassName:`${p}-hidden`},r.tabPaneMotion),({style:e,className:n},r)=>z.createElement(Y,we({},g,{prefixCls:p,id:t,tabKey:i,animated:f,active:_,style:{...o,...d,...e},className:u(s,m,n),ref:r})))})))};function Z(e={inkBar:!0,tabPane:!1}){let t;return t=e===!1?{inkBar:!1,tabPane:!1}:e===!0?{inkBar:!0,tabPane:!1}:{inkBar:!0,...typeof e==`object`?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-tabs`,className:a,items:o,direction:s,activeKey:c,defaultActiveKey:l,editable:d,animated:f,tabPosition:p=`top`,tabBarGutter:m,tabBarStyle:h,tabBarExtraContent:g,locale:_,more:v,destroyOnHidden:y,renderTabBar:b,onChange:x,onTabClick:S,onTabScroll:C,getPopupContainer:w,popupClassName:T,indicator:E,classNames:D,styles:O,...k}=e,A=z.useMemo(()=>(o||[]).filter(e=>e&&typeof e==`object`&&`key`in e),[o]),j=s===`rtl`,M=Z(f),[N,ee]=(0,z.useState)(!1);(0,z.useEffect)(()=>{ee(i())},[]);let[P,F]=R(l??A[0]?.key,c),[I,L]=(0,z.useState)(()=>A.findIndex(e=>e.key===P));(0,z.useEffect)(()=>{let e=A.findIndex(e=>e.key===P);e===-1&&(e=Math.max(0,Math.min(I,A.length-1)),F(A[e]?.key)),L(e)},[A.map(e=>e.key).join(`_`),P,I]);let[te,ne]=R(null,n);(0,z.useEffect)(()=>{n||(ne(`rc-tabs-${Te}`),Te+=1)},[]);function re(e,t){S?.(e,t);let n=e!==P;F(e),n&&x?.(e)}let V={id:te,activeKey:P,animated:M,tabPosition:p,rtl:j,mobile:N},H={...V,editable:d,locale:_,more:v,tabBarGutter:m,onTabClick:re,onTabScroll:C,extra:g,style:h,getPopupContainer:w,popupClassName:u(T,D?.popup),indicator:E,styles:O,classNames:D},U=z.useMemo(()=>({tabs:A,prefixCls:r}),[A,r]);return z.createElement(B.Provider,{value:U},z.createElement(`div`,Q({ref:t,id:n,className:u(r,`${r}-${p}`,{[`${r}-mobile`]:N,[`${r}-editable`]:d,[`${r}-rtl`]:j},a)},k),z.createElement(Ce,Q({},H,{renderTabBar:b})),z.createElement(X,Q({destroyOnHidden:y},V,{contentStyle:O?.content,contentClassName:D?.content,animated:M}))))}),De={motionAppear:!1,motionEnter:!0,motionLeave:!0};function Oe(e,t={inkBar:!0,tabPane:!1}){let n;return n=t===!1?{inkBar:!1,tabPane:!1}:t===!0?{inkBar:!0,tabPane:!0}:{inkBar:!0,...k(t)?t:{}},n.tabPane&&(n.tabPaneMotion={...De,motionName:_(e,`switch`)}),n}function ke(e){return e.filter(e=>e)}function Ae(e,t){return e?e.map(e=>({...e,destroyOnHidden:e.destroyOnHidden??e.destroyInactiveTabPane})):ke(o(t).map(e=>{if(z.isValidElement(e)){let{key:t,props:n}=e,{tab:r,...i}=n||{};return{key:String(t),...i,label:r}}return null}))}var je=e=>{let{componentCls:n,motionDurationSlow:r}=e;return[{[n]:{[`${n}-switch`]:{"&-appear, &-enter":{transition:`none`,"&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${r}`}},"&-leave":{position:`absolute`,transition:`none`,inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${r}`}}}}},[t(e,`slide-up`),t(e,`slide-down`)]]},Me=e=>{let{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:a,itemSelectedColor:o}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${C(e.lineWidth)} ${e.lineType} ${a}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:o,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:v(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:`none`},[`${t}-ink-bar`]:{visibility:`hidden`}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:C(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${C(e.borderRadiusLG)} ${C(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${C(e.borderRadiusLG)} ${C(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:C(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${C(e.borderRadiusLG)} 0 0 ${C(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${C(e.borderRadiusLG)} ${C(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},Ne=t=>{let{antCls:n,componentCls:i,itemHoverColor:a,dropdownEdgeChildVerticalPadding:o}=t;return{[`${i}-dropdown`]:{...e(t),position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:t.zIndexPopup,display:`block`,"&-hidden":{display:`none`},[`&${n}-slide-down-enter${n}-slide-down-enter-active${i}-dropdown-placement-bottomLeft, - &${n}-slide-down-appear${n}-slide-down-appear-active${i}-dropdown-placement-bottomLeft, - &${n}-slide-down-enter${n}-slide-down-enter-active${i}-dropdown-placement-bottom, - &${n}-slide-down-appear${n}-slide-down-appear-active${i}-dropdown-placement-bottom, - &${n}-slide-down-enter${n}-slide-down-enter-active${i}-dropdown-placement-bottomRight, - &${n}-slide-down-appear${n}-slide-down-appear-active${i}-dropdown-placement-bottomRight`]:{animationName:p},[`&${n}-slide-up-enter${n}-slide-up-enter-active${i}-dropdown-placement-topLeft, - &${n}-slide-up-appear${n}-slide-up-appear-active${i}-dropdown-placement-topLeft, - &${n}-slide-up-enter${n}-slide-up-enter-active${i}-dropdown-placement-top, - &${n}-slide-up-appear${n}-slide-up-appear-active${i}-dropdown-placement-top, - &${n}-slide-up-enter${n}-slide-up-enter-active${i}-dropdown-placement-topRight, - &${n}-slide-up-appear${n}-slide-up-appear-active${i}-dropdown-placement-topRight`]:{animationName:m},[`&${n}-slide-down-leave${n}-slide-down-leave-active${i}-dropdown-placement-bottomLeft, - &${n}-slide-down-leave${n}-slide-down-leave-active${i}-dropdown-placement-bottom, - &${n}-slide-down-leave${n}-slide-down-leave-active${i}-dropdown-placement-bottomRight`]:{animationName:g},[`&${n}-slide-up-leave${n}-slide-up-leave-active${i}-dropdown-placement-topLeft, - &${n}-slide-up-leave${n}-slide-up-leave-active${i}-dropdown-placement-top, - &${n}-slide-up-leave${n}-slide-up-leave-active${i}-dropdown-placement-topRight`]:{animationName:r},[`${i}-dropdown-menu`]:{maxHeight:t.tabsDropdownHeight,margin:0,padding:`${C(o)} 0`,overflowX:`hidden`,overflowY:`auto`,textAlign:{_skip_check_:!0,value:`left`},listStyleType:`none`,backgroundColor:t.colorBgContainer,backgroundClip:`padding-box`,borderRadius:t.borderRadiusLG,outline:`none`,boxShadow:t.boxShadowSecondary,"&-item":{...L,display:`flex`,alignItems:`center`,minWidth:t.tabsDropdownWidth,margin:0,padding:`${C(t.paddingXXS)} ${C(t.paddingSM)}`,color:t.colorText,fontWeight:`normal`,fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:`pointer`,transition:`all ${t.motionDurationSlow}`,"> span":{flex:1,whiteSpace:`nowrap`},"&-remove":{flex:`none`,marginLeft:{_skip_check_:!0,value:t.marginSM},color:t.colorIcon,fontSize:t.fontSizeSM,background:`transparent`,border:0,cursor:`pointer`,"&:hover":{color:a}},"&:hover":{background:t.controlItemBgHover},"&-disabled":{"&, &:hover":{color:t.colorTextDisabled,background:`transparent`,cursor:`not-allowed`}}}}}}},Pe=e=>{let{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:a,verticalItemMargin:o,motionDurationSlow:s,calc:c}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:`column`,[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:`absolute`,right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${C(e.lineWidth)} ${e.lineType} ${r}`,content:`''`},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:[`width`,`left`,`right`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav, - > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:`column`,minWidth:c(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:a,textAlign:`center`},[`${t}-tab + ${t}-tab`]:{margin:o},[`${t}-nav-wrap`]:{flexDirection:`column`,"&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:[`height`,`top`].map(e=>`${e} ${s}`).join(`, `)}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:`1 0 auto`,flexDirection:`column`}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:C(c(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${C(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:c(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${C(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},Fe=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:a,horizontalItemPaddingSM:o,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${C(e.borderRadius)} ${C(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${C(e.borderRadius)} ${C(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${C(e.borderRadius)} ${C(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${C(e.borderRadius)} 0 0 ${C(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}}}}}},Ie=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:a,horizontalItemPadding:o,itemSelectedColor:s,itemColor:c}=e,l=`${t}-tab`;return{[l]:{position:`relative`,WebkitTouchCallout:`none`,WebkitTapHighlightColor:`transparent`,display:`inline-flex`,alignItems:`center`,padding:o,fontSize:e.titleFontSize,background:`transparent`,border:0,outline:`none`,cursor:`pointer`,color:c,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:`none`,transition:`all ${e.motionDurationSlow}`,[`${l}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":{flex:`none`,lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:`none`,outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading},...x(e)},"&:hover":{color:r},[`&${l}-active ${l}-btn`]:{color:s},[`&${l}-focus ${l}-btn:focus-visible`]:v(e),[`&${l}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${l}-disabled ${l}-btn, &${l}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${l}-remove ${i}`]:{margin:0,verticalAlign:`middle`},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${l} + ${l}`]:{margin:{_skip_check_:!0,value:a}}}},$=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:a}=e;return{[`${t}-rtl`]:{direction:`rtl`,[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:e.marginSM}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:e.marginXS},marginLeft:{_skip_check_:!0,value:a(e.marginXXS).mul(-1).equal()},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:`rtl`},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:`right`}}}}},Le=t=>{let{componentCls:n,tabsCardPadding:r,cardHeight:i,cardGutter:a,itemHoverColor:o,itemActiveColor:s,colorBorderSecondary:c}=t;return{[n]:{...e(t),display:`flex`,[`> ${n}-nav, > div > ${n}-nav`]:{position:`relative`,display:`flex`,flex:`none`,alignItems:`center`,[`${n}-nav-wrap`]:{position:`relative`,display:`flex`,flex:`auto`,alignSelf:`stretch`,overflow:`hidden`,whiteSpace:`nowrap`,transform:`translate(0)`,"&::before, &::after":{position:`absolute`,zIndex:1,opacity:0,transition:`opacity ${t.motionDurationSlow}`,content:`''`,pointerEvents:`none`}},[`${n}-nav-list`]:{position:`relative`,display:`flex`,transition:`opacity ${t.motionDurationSlow}`},[`${n}-nav-operations`]:{display:`flex`,alignSelf:`stretch`},[`${n}-nav-operations-hidden`]:{position:`absolute`,visibility:`hidden`,pointerEvents:`none`},[`${n}-nav-more`]:{position:`relative`,padding:r,background:`transparent`,border:0,color:t.colorText,"&::after":{position:`absolute`,right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:t.calc(t.controlHeightLG).div(8).equal(),transform:`translateY(100%)`,content:`''`}},[`${n}-nav-add`]:{minWidth:i,minHeight:i,marginLeft:{_skip_check_:!0,value:a},background:`transparent`,border:`${C(t.lineWidth)} ${t.lineType} ${c}`,borderRadius:`${C(t.borderRadiusLG)} ${C(t.borderRadiusLG)} 0 0`,outline:`none`,cursor:`pointer`,color:t.colorText,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:s},...x(t,-3)}},[`${n}-extra-content`]:{flex:`none`},[`${n}-ink-bar`]:{position:`absolute`,background:t.inkBarColor,pointerEvents:`none`},...Ie(t),[`${n}-content`]:{position:`relative`,width:`100%`},[`${n}-content-holder`]:{flex:`auto`,minWidth:0,minHeight:0},[`${n}-tabpane`]:{...x(t),"&-hidden":{display:`none`}}},[`${n}-centered`]:{[`> ${n}-nav, > div > ${n}-nav`]:{[`${n}-nav-wrap`]:{[`&:not([class*='${n}-nav-wrap-ping']) > ${n}-nav-list`]:{margin:`auto`}}}}}},Re=d(`Tabs`,e=>{let t=n(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${C(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${C(e.horizontalItemGutter)}`});return[Fe(t),$(t),Pe(t),Ne(t),Me(t),Le(t),je(t)]},e=>{let{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:a}=e,o=t||a,s=n||i,c=r||a+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:o,cardHeightSM:s,cardHeightLG:c,cardPadding:`${(o-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(c-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:``,horizontalItemMarginRTL:``,horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}),ze=()=>null,Be=z.forwardRef((e,t)=>{let{type:n,className:r,rootClassName:i,size:a,onEdit:o,hideAdd:s,centered:c,addIcon:l,removeIcon:d,moreIcon:f,more:p,popupClassName:m,children:h,items:g,animated:_,style:v,indicatorSize:b,indicator:x,classNames:S,styles:C,destroyInactiveTabPane:E,destroyOnHidden:O,tabPlacement:k,tabPosition:A,...M}=e,{prefixCls:ee}=M,{getPrefixCls:P,direction:F,getPopupContainer:L,className:R,style:ne,classNames:B,styles:re}=w(`tabs`),{tabs:V}=z.useContext(I),H=P(`tabs`,ee),U=D(H),[W,ie]=Re(H,U),G=z.useRef(null);z.useImperativeHandle(t,()=>({nativeElement:G.current}));let ae;n===`editable-card`&&(ae={onEdit:(e,{key:t,event:n})=>{o?.(e===`add`?n:t,e)},removeIcon:d??V?.removeIcon??z.createElement(te,null),addIcon:(l??V?.addIcon)||z.createElement(N,null),showAdd:s!==!0});let oe=P(),se=y(a),ce=Ae(g,h),K=Oe(H,_),le={align:x?.align??V?.indicator?.align,size:x?.size??b??V?.indicator?.size??V?.indicatorSize},ue=z.useMemo(()=>{let e=k??A??void 0,t=F===`rtl`;switch(e){case`start`:return t?`right`:`left`;case`end`:return t?`left`:`right`;default:return e}},[k,A,F]),q={...e,size:se,tabPlacement:ue,items:ce},[de,fe]=T([B,S],[re,C],{props:q},{popup:{_default:`root`}});return z.createElement(Ee,{ref:G,direction:F,getPopupContainer:L,...M,items:ce,className:u({[`${H}-large`]:se===`large`,[`${H}-small`]:se===`small`,[`${H}-card`]:[`card`,`editable-card`].includes(n),[`${H}-editable-card`]:n===`editable-card`,[`${H}-centered`]:c},R,r,i,de.root,W,ie,U),classNames:{...de,popup:u(m,W,ie,U,de.popup?.root)},styles:fe,style:{...fe.root,...ne,...v},editable:ae,more:{icon:V?.more?.icon??V?.moreIcon??f??z.createElement(j,null),transitionName:`${oe}-slide-up`,...p},prefixCls:H,animated:K,indicator:le,destroyOnHidden:O??E,tabPosition:ue})});Be.TabPane=ze;var Ve=({prefixCls:e,className:t,hoverable:n=!0,...r})=>{let{getPrefixCls:i}=z.useContext(I),a=i(`card`,e),o=u(`${a}-grid`,t,{[`${a}-grid-hoverable`]:n});return z.createElement(`div`,{...r,className:o})},He=e=>{let{antCls:t,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:a}=e;return{display:`flex`,justifyContent:`center`,flexDirection:`column`,minHeight:r,marginBottom:-1,padding:`0 ${C(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${C(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${C(e.borderRadiusLG)} ${C(e.borderRadiusLG)} 0 0`,...b(),"&-wrapper":{width:`100%`,display:`flex`,alignItems:`center`},"&-title":{display:`inline-block`,flex:1,...L,[` - > ${n}-typography, - > ${n}-typography-edit-content - `]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${t}-tabs-top`]:{clear:`both`,marginBottom:a,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,"&-bar":{borderBottom:`${C(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}}},Ue=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:` - ${C(i)} 0 0 0 ${n}, - 0 ${C(i)} 0 0 ${n}, - ${C(i)} ${C(i)} 0 0 ${n}, - ${C(i)} 0 0 0 ${n} inset, - 0 ${C(i)} 0 0 ${n} inset; - `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},We=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:o}=e;return{margin:0,padding:0,listStyle:`none`,background:o,borderTop:`${C(e.lineWidth)} ${e.lineType} ${a}`,display:`flex`,borderRadius:`0 0 ${C(e.borderRadiusLG)} ${C(e.borderRadiusLG)}`,...b(),"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:C(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:C(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${C(e.lineWidth)} ${e.lineType} ${a}`}}}},Ge=e=>({margin:`${C(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`,...b(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,...L},"&-description":{color:e.colorTextDescription}}),Ke=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${C(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${C(e.padding)} ${C(i)}`}}},qe=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},Je=t=>{let{componentCls:n,cardShadow:r,cardHeadPadding:i,colorBorderSecondary:a,boxShadowTertiary:o,bodyPadding:s,extraColor:c,motionDurationMid:l}=t;return{[n]:{...e(t),position:`relative`,background:t.colorBgContainer,borderRadius:t.borderRadiusLG,[`&:not(${n}-bordered)`]:{boxShadow:o},[`${n}-head`]:He(t),[`${n}-extra`]:{marginInlineStart:`auto`,color:c,fontWeight:`normal`,fontSize:t.fontSize},[`${n}-body`]:{padding:s,borderRadius:`0 0 ${C(t.borderRadiusLG)} ${C(t.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:t.borderRadiusLG,borderStartEndRadius:t.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${n}-grid`]:Ue(t),[`${n}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${C(t.borderRadiusLG)} ${C(t.borderRadiusLG)} 0 0`}},[`${n}-actions`]:We(t),[`${n}-meta`]:Ge(t)},[`${n}-bordered`]:{border:`${C(t.lineWidth)} ${t.lineType} ${a}`,[`${n}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${n}-hoverable`]:{cursor:`pointer`,transition:[`box-shadow`,`border-color`].map(e=>`${e} ${l}`).join(`, `),"&:hover":{borderColor:`transparent`,boxShadow:r}},[`${n}-contain-grid`]:{borderRadius:`${C(t.borderRadiusLG)} ${C(t.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${n}-head))`]:{borderRadius:0},[`${n}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${n}-loading) ${n}-body`]:{marginBlockStart:t.calc(t.lineWidth).mul(-1).equal(),marginInlineStart:t.calc(t.lineWidth).mul(-1).equal(),padding:0}},[`${n}-contain-tabs`]:{[`> div${n}-head`]:{minHeight:0,[`${n}-head-title, ${n}-extra`]:{paddingTop:i}}},[`${n}-type-inner`]:Ke(t),[`${n}-loading`]:qe(t),[`${n}-rtl`]:{direction:`rtl`}}},Ye=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${C(r)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},Xe=d(`Card`,e=>{let t=n(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[Je(t),Ye(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),Ze=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return z.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return z.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},z.createElement(`span`,null,e))}))},Qe=z.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,extra:s,headStyle:c={},bodyStyle:l={},title:d,loading:f,bordered:p,variant:m,size:g,type:_,cover:v,actions:b,tabList:x,children:S,activeTabKey:C,defaultActiveTabKey:E,tabBarExtraContent:D,hoverable:O,tabProps:k={},classNames:A,styles:j,...M}=e,{getPrefixCls:N,direction:ee,className:P,style:I,classNames:L,styles:R}=w(`card`),[te]=F(`card`,m,p),B=y(g),re={...e,size:B,variant:te},[V,H]=T([L,A],[R,j],{props:re}),U=t=>{e.onTabChange?.(t)},W=z.useMemo(()=>o(S),[S]),ie=z.useMemo(()=>W.some(e=>z.isValidElement(e)&&e.type===Ve),[W]),G=N(`card`,n),[ae,oe]=Xe(G),se=z.createElement(ne,{loading:!0,active:!0,paragraph:{rows:4},title:!1},S),ce=C!==void 0,K={...k,[ce?`activeKey`:`defaultActiveKey`]:ce?C:E,tabBarExtraContent:D},le,ue=B===`small`?B:`large`,q=x?z.createElement(Be,{size:ue,...K,className:`${G}-head-tabs`,onChange:U,items:x.map(({tab:e,...t})=>({label:e,...t}))}):null;if(d||s||q){let e=u(`${G}-head`,V.header),t=u(`${G}-head-title`,V.title),n=u(`${G}-extra`,V.extra),r={...c,...H.header};le=z.createElement(`div`,{className:e,style:r},z.createElement(`div`,{className:`${G}-head-wrapper`},d&&z.createElement(`div`,{className:t,style:H.title},d),s&&z.createElement(`div`,{className:n,style:H.extra},s)),q)}let de=u(`${G}-cover`,V.cover),fe=v?z.createElement(`div`,{className:de,style:H.cover},v):null,pe=u(`${G}-body`,V.body),me={...l,...H.body},J=f||W.length?z.createElement(`div`,{className:pe,style:me},f?se:S):null,he=u(`${G}-actions`,V.actions),ge=b?.length?z.createElement(Ze,{actionClasses:he,actionStyle:H.actions,actions:b}):null,_e=h(M,[`onTabChange`]),ve=u(G,P,{[`${G}-loading`]:f,[`${G}-bordered`]:te!==`borderless`,[`${G}-hoverable`]:O,[`${G}-contain-grid`]:ie,[`${G}-contain-tabs`]:x?.length,[`${G}-small`]:B===`small`,[`${G}-type-${_}`]:!!_,[`${G}-rtl`]:ee===`rtl`},r,i,ae,oe,V.root),ye={...H.root,...I,...a};return z.createElement(`div`,{ref:t,..._e,className:ve,style:ye},le,fe,J,ge)}),$e=e=>{let{prefixCls:t,className:n,avatar:r,title:i,description:a,style:o,classNames:s,styles:c,...l}=e,{getPrefixCls:d,className:f,style:p,classNames:m,styles:h}=w(`cardMeta`),g=`${d(`card`,t)}-meta`,[_,v]=T([m,s],[h,c],{props:e}),y=u(g,n,f,_.root),b={...p,...v.root,...o},x=u(`${g}-avatar`,_.avatar),S=u(`${g}-title`,_.title),C=u(`${g}-description`,_.description),E=u(`${g}-section`,_.section),D=r?z.createElement(`div`,{className:x,style:v.avatar},r):null,O=i?z.createElement(`div`,{className:S,style:v.title},i):null,k=a?z.createElement(`div`,{className:C,style:v.description},a):null,A=O||k?z.createElement(`div`,{className:E,style:v.section},O,k):null;return z.createElement(`div`,{...l,className:y,style:b},D,A)},et=Qe;et.Grid=Ve,et.Meta=$e;export{Be as n,et as t}; \ No newline at end of file diff --git a/public/assets/carousel-DxRCLgfu.js b/public/assets/carousel-DxRCLgfu.js new file mode 100644 index 0000000..df14f32 --- /dev/null +++ b/public/assets/carousel-DxRCLgfu.js @@ -0,0 +1 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{t}from"./jsx-runtime-ADHq9IcL.js";import{t as n}from"./typography-C2UybztD.js";import{t as r}from"./badge-Cim9D6DD.js";import{n as i}from"./LockOutlined-rb6chlKx.js";import{t as a}from"./image-CBJbXNqF.js";import{t as o}from"./useTranslation-DIuTqE8W.js";import{t as s}from"./XinTable-DP0Q6sQS.js";var c=e(i(),1),l=t(),{Title:u,Text:d}=n;function f(e){return e?typeof e==`string`?e:e.preview_url||e.file_url||``:``}function p(){let{t:e}=o(),t=[{title:e(`system.carousel.id`),dataIndex:`id`,hideInForm:!0,width:80,sorter:!0,align:`center`},{title:e(`system.carousel.title`),dataIndex:`title`,valueType:`text`,colProps:{span:12},rules:[{required:!0,message:e(`system.carousel.title.required`)}]},{title:e(`system.carousel.image`),dataIndex:`image_id`,valueType:`image`,colProps:{span:24},rules:[{required:!0,message:e(`system.carousel.image.required`)}],hideInSearch:!0,fieldProps:{action:`/system/file/list/upload`,mode:`single`,maxCount:1,changeType:`id`},render:(e,t)=>{let n=f(t.image);return n?(0,l.jsx)(a,{src:n,width:120,height:60,style:{objectFit:`cover`,borderRadius:4}}):`-`}},{title:e(`system.carousel.link`),dataIndex:`link`,valueType:`text`,colProps:{span:12},hideInSearch:!0,fieldProps:{placeholder:e(`system.carousel.link.placeholder`)}},{title:e(`system.carousel.status`),dataIndex:`status`,valueType:`select`,filters:[{text:e(`system.carousel.status.normal`),value:0},{text:e(`system.carousel.status.disabled`),value:1}],colProps:{span:12},rules:[{required:!0,message:e(`system.carousel.status.required`)}],fieldProps:{options:[{label:e(`system.carousel.status.normal`),value:0},{label:e(`system.carousel.status.disabled`),value:1}]},render:t=>t===0?(0,l.jsx)(r,{status:`success`,text:e(`system.carousel.status.normal`)}):(0,l.jsx)(r,{status:`error`,text:e(`system.carousel.status.disabled`)})},{title:e(`system.carousel.sort`),dataIndex:`sort`,valueType:`digit`,colProps:{span:12},hideInSearch:!0,initialValue:0,fieldProps:{min:0,style:{width:`100%`}}},{title:e(`system.carousel.createdAt`),dataIndex:`created_at`,render:e=>e?(0,c.default)(e).format(`YYYY-MM-DD HH:mm`):`-`,hideInForm:!0,hideInSearch:!0,width:160}];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`div`,{className:`mb-5`,children:[(0,l.jsx)(u,{level:3,children:e(`system.carousel.page.title`)}),(0,l.jsx)(d,{type:`secondary`,children:e(`system.carousel.page.description`)})]}),(0,l.jsx)(s,{api:`/system/carousel`,columns:t,rowKey:`id`,accessName:`system.carousel`,formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:800},searchProps:!1,scroll:{x:1e3}})]})}export{p as default}; \ No newline at end of file diff --git a/public/assets/chat-22ohU2cR.js b/public/assets/chat-22ohU2cR.js new file mode 100644 index 0000000..db9ed97 --- /dev/null +++ b/public/assets/chat-22ohU2cR.js @@ -0,0 +1,127 @@ +import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{An as n,Dr as r,Er as i,Fn as a,M as o,Mt as s,N as c,Nn as l,Pn as u,Vn as d,bn as f,mn as p,n as m,t as h,wr as g,xn as _,yr as v}from"./jsx-runtime-ADHq9IcL.js";import{o as y,s as b}from"./chunk-KS7C4IRE-CN93VkYO.js";import{t as x}from"./global-CUFwSKUq.js";import{t as S}from"./request-Vytbr90w.js";import{t as C}from"./typography-C2UybztD.js";import{t as w}from"./tooltip-CRuv8UNz.js";import{t as T}from"./config-provider-BFg4S-AS.js";import{r as E,t as D}from"./PlusOutlined-W6xCIIXs.js";import{t as O}from"./space-BqavXZJj.js";import{t as k}from"./button-CcpWP-mq.js";import{t as A}from"./app-BscZ5bao.js";import{t as j}from"./avatar-ZeeUR_v9.js";import{t as ee}from"./card-BFxeciPE.js";import{t as M}from"./divider-qVVmElWH.js";import{t as N}from"./dropdown-dXoRpGL-.js";import{t as te}from"./flex-BB50-T81.js";import{t as P}from"./input-De-xbsfR.js";import{r as ne}from"./CopyOutlined-BfEUU2AX.js";import{t as re}from"./CaretDownFilled-bW_4H-tT.js";import{t as ie}from"./theme-D6zyXNMh.js";import{t as ae}from"./DeleteOutlined-D3Fhpkuo.js";import{t as oe}from"./ArrowUpOutlined-BqDvHB4K.js";import{n as se,r as F,t as ce}from"./ClearOutlined-C3IuM4M9.js";import{t as I}from"./UserOutlined-DjbONoy-.js";import{t as L}from"./useTranslation-DIuTqE8W.js";import{t as le}from"./agent-CqLbN1cd.js";function R(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n`u`?null:G(BigInt.prototype.toString),Le=typeof Symbol>`u`?null:G(Symbol.prototype.toString),U=G(Object.prototype.hasOwnProperty),Re=G(Object.prototype.toString),W=G(RegExp.prototype.test),ze=Be(TypeError);function G(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return be(e,t,n)}}function Be(e){return function(){return xe(e,[...arguments])}}function K(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Oe;if(me&&me(e,null),!De(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(he(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Ve(e){for(let t=0;t/g),it=H(/\${[\w\W]*/g),at=H(/^data-[\-\w.\u00B7-\uFFFF]+$/),ot=H(/^aria-[\-\w]+$/),st=H(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ct=H(/^(?:\w+script|data):/i),lt=H(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ut=H(/^html$/i),dt=H(/^[a-z][.\w]*(-[.\w]+)+$/i),ft=H(/<[/\w!]/g),pt=H(/<[/\w]/g),mt=H(/<\/no(script|embed|frames)/i),ht=H(/\/>/i),gt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},_t=function(){return typeof window>`u`?null:window},vt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},yt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},bt=function(e,t,n,r){return U(e,t)&&De(e[t])?K(r.base?q(r.base):{},e[t],r.transform):n};function xt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_t(),t=e=>xt(e);if(t.version=`3.4.12`,t.removed=[],!e||!e.document||e.document.nodeType!==gt.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=Ue(d,`cloneNode`),p=Ue(d,`remove`),m=Ue(d,`nextSibling`),h=Ue(d,`childNodes`),g=Ue(d,`parentNode`),_=Ue(d,`shadowRoot`),v=Ue(d,`attributes`),y=o&&o.prototype?Ue(o.prototype,`nodeType`):null,b=o&&o.prototype?Ue(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,C,w=!1,T=0,E=function(){if(T>0)throw ze(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},D=function(e){E(),T++;try{return x.createHTML(e)}finally{T--}},O=function(e){E(),T++;try{return x.createScriptURL(e)}finally{T--}},k=function(){return w||=(C=vt(u,i),!0),C},A=n,j=A.implementation,ee=A.createNodeIterator,M=A.createDocumentFragment,N=A.getElementsByTagName,te=r.importNode,P=yt();t.isSupported=typeof pe==`function`&&typeof g==`function`&&j&&j.createHTMLDocument!==void 0;let ne=nt,re=rt,ie=it,ae=at,oe=ot,se=ct,F=lt,ce=dt,I=st,L=null,le=K({},[...Ge,...Ke,...qe,...Ye,...Ze]),R=null,ue=K({},[...Qe,...$e,...et,...tt]),z=Object.seal(ve(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),de=null,fe=null,B=Object.seal(ve(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),me=!0,he=!0,ge=!1,_e=!0,ye=!1,be=!0,xe=!1,Pe=!1,Fe=null,Ie=null,Le=!1,Re=!1,G=!1,Be=!1,Ve=!0,St=!1,Ct=`user-content-`,J=!0,wt=!1,Tt={},Et=null,Dt=K({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ot=null,kt=K({},[`audio`,`video`,`img`,`source`,`image`,`track`]),At=null,jt=K({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Mt=`http://www.w3.org/1998/Math/MathML`,Nt=`http://www.w3.org/2000/svg`,Pt=`http://www.w3.org/1999/xhtml`,Ft=Pt,It=!1,Lt=null,Rt=K({},[Mt,Nt,Pt],ke),zt=V([`mi`,`mo`,`mn`,`ms`,`mtext`]),Bt=K({},zt),Vt=V([`annotation-xml`]),Ht=K({},Vt),Ut=K({},[`title`,`style`,`font`,`a`,`script`]),Wt=null,Gt=[`application/xhtml+xml`,`text/html`],Y=null,Kt=null,qt=n.createElement(`form`),Jt=function(e){return e instanceof RegExp||e instanceof Function},Yt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Kt&&Kt===e)return;(!e||typeof e!=`object`)&&(e={}),e=q(e),Wt=Gt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Y=Wt===`application/xhtml+xml`?ke:Oe,L=bt(e,`ALLOWED_TAGS`,le,{transform:Y}),R=bt(e,`ALLOWED_ATTR`,ue,{transform:Y}),Lt=bt(e,`ALLOWED_NAMESPACES`,Rt,{transform:ke}),At=bt(e,`ADD_URI_SAFE_ATTR`,jt,{transform:Y,base:jt}),Ot=bt(e,`ADD_DATA_URI_TAGS`,kt,{transform:Y,base:kt}),Et=bt(e,`FORBID_CONTENTS`,Dt,{transform:Y}),de=bt(e,`FORBID_TAGS`,q({}),{transform:Y}),fe=bt(e,`FORBID_ATTR`,q({}),{transform:Y}),Tt=U(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?q(e.USE_PROFILES):e.USE_PROFILES:!1,me=e.ALLOW_ARIA_ATTR!==!1,he=e.ALLOW_DATA_ATTR!==!1,ge=e.ALLOW_UNKNOWN_PROTOCOLS||!1,_e=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ye=e.SAFE_FOR_TEMPLATES||!1,be=e.SAFE_FOR_XML!==!1,xe=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,G=e.RETURN_DOM_FRAGMENT||!1,Be=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,Ve=e.SANITIZE_DOM!==!1,St=e.SANITIZE_NAMED_PROPS||!1,J=e.KEEP_CONTENT!==!1,wt=e.IN_PLACE||!1,I=We(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:st,Ft=typeof e.NAMESPACE==`string`?e.NAMESPACE:Pt,Bt=U(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?q(e.MATHML_TEXT_INTEGRATION_POINTS):K({},zt),Ht=U(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?q(e.HTML_INTEGRATION_POINTS):K({},Vt);let t=U(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?q(e.CUSTOM_ELEMENT_HANDLING):ve(null);if(z=ve(null),U(t,`tagNameCheck`)&&Jt(t.tagNameCheck)&&(z.tagNameCheck=t.tagNameCheck),U(t,`attributeNameCheck`)&&Jt(t.attributeNameCheck)&&(z.attributeNameCheck=t.attributeNameCheck),U(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(z.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),H(z),ye&&(he=!1),G&&(Re=!0),Tt&&(L=K({},Ze),R=ve(null),Tt.html===!0&&(K(L,Ge),K(R,Qe)),Tt.svg===!0&&(K(L,Ke),K(R,$e),K(R,tt)),Tt.svgFilters===!0&&(K(L,qe),K(R,$e),K(R,tt)),Tt.mathMl===!0&&(K(L,Ye),K(R,et),K(R,tt))),B.tagCheck=null,B.attributeCheck=null,U(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?B.tagCheck=e.ADD_TAGS:De(e.ADD_TAGS)&&(L===le&&(L=q(L)),K(L,e.ADD_TAGS,Y))),U(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?B.attributeCheck=e.ADD_ATTR:De(e.ADD_ATTR)&&(R===ue&&(R=q(R)),K(R,e.ADD_ATTR,Y))),U(e,`ADD_URI_SAFE_ATTR`)&&De(e.ADD_URI_SAFE_ATTR)&&K(At,e.ADD_URI_SAFE_ATTR,Y),U(e,`FORBID_CONTENTS`)&&De(e.FORBID_CONTENTS)&&(Et===Dt&&(Et=q(Et)),K(Et,e.FORBID_CONTENTS,Y)),U(e,`ADD_FORBID_CONTENTS`)&&De(e.ADD_FORBID_CONTENTS)&&(Et===Dt&&(Et=q(Et)),K(Et,e.ADD_FORBID_CONTENTS,Y)),J&&(L[`#text`]=!0),xe&&K(L,[`html`,`head`,`body`]),L.table&&(K(L,[`tbody`]),delete de.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw ze(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw ze(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=x;x=e.TRUSTED_TYPES_POLICY;try{S=D(``)}catch(e){throw x=t,e}}else e.TRUSTED_TYPES_POLICY===null?(x=void 0,S=``):(x===void 0&&(x=k()),x&&typeof S==`string`&&(S=D(``)));V&&V(e),Kt=e},Xt=K({},[...Ke,...qe,...Je]),Zt=K({},[...Ye,...Xe]),Qt=function(e,t,n){return t.namespaceURI===Pt?e===`svg`:t.namespaceURI===Mt?e===`svg`&&(n===`annotation-xml`||Bt[n]):!!Xt[e]},$t=function(e,t,n){return t.namespaceURI===Pt?e===`math`:t.namespaceURI===Nt?e===`math`&&Ht[n]:!!Zt[e]},en=function(e,t,n){return t.namespaceURI===Nt&&!Ht[n]||t.namespaceURI===Mt&&!Bt[n]?!1:!Zt[e]&&(Ut[e]||!Xt[e])},tn=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:Ft,tagName:`template`});let n=Oe(e.tagName),r=Oe(t.tagName);return Lt[e.namespaceURI]?e.namespaceURI===Nt?Qt(n,t,r):e.namespaceURI===Mt?$t(n,t,r):e.namespaceURI===Pt?en(n,t,r):!!(Wt===`application/xhtml+xml`&&Lt[e.namespaceURI]):!1},nn=function(e){Te(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw ze(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},rn=function(e){sn(e);let t=h(e);if(t){let e=[];Se(t,t=>{Te(e,t)}),Se(e,e=>{try{p(e)}catch{}})}let n=v(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},an=function(e,n){try{Te(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{Te(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(Re||G)try{nn(n)}catch{}else try{n.setAttribute(e,``)}catch{}},on=function(e){let t=v(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||R[Y(i)]))try{e.removeAttribute(i)}catch{}}},sn=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(y?y(e):e.nodeType)===gt.element&&on(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},cn=function(e){if(!be)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=y?y(e):e.nodeType;if(n===gt.processingInstruction||n===gt.comment&&W(pt,e.data)){try{p(e)}catch{}continue}if(n===gt.element){let t=e,n=Y(b?b(e):e.nodeName);try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&n!==`label`&&n!==`output`&&t.removeAttribute(`for`)}catch{}}let r=h(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},ln=function(e){let t=null,r=null;if(Le)e=``+e;else{let t=Ae(e,/^[\r\n\t ]+/);r=t&&t[0]}Wt===`application/xhtml+xml`&&Ft===Pt&&(e=``+e+``);let i=x?D(e):e;if(Ft===Pt)try{t=new l().parseFromString(i,Wt)}catch{}if(!t||!t.documentElement){t=j.createDocument(Ft,`template`,null);try{t.documentElement.innerHTML=It?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ft===Pt?N.call(t,xe?`html`:`body`)[0]:xe?t.documentElement:a},un=function(e){return ee.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},dn=function(e){return e=je(e,ne,` `),e=je(e,re,` `),e=je(e,ie,` `),e},fn=function(e){e.normalize();let t=ee.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;)n.data=dn(n.data),n=t.nextNode();let r=e.querySelectorAll?.call(e,`template`);r&&Se(r,e=>{mn(e.content)&&fn(e.content)})},pn=function(e){let t=b?b(e):null;return typeof t!=`string`||Y(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},mn=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===gt.documentFragment}catch{return!1}},hn=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function gn(e,n,r){e.length!==0&&Se(e,e=>{e.call(t,n,r,Kt)})}let _n=function(e,t){return!!(be&&e.hasChildNodes()&&!hn(e.firstElementChild)&&W(ft,e.textContent)&&W(ft,e.innerHTML)||be&&e.namespaceURI===Pt&&t===`style`&&hn(e.firstElementChild)||e.nodeType===gt.processingInstruction||be&&e.nodeType===gt.comment&&W(pt,e.data))},vn=function(e,t){if(!de[t]&&Sn(t)&&(z.tagNameCheck instanceof RegExp&&W(z.tagNameCheck,t)||z.tagNameCheck instanceof Function&&z.tagNameCheck(t)))return!1;if(J&&!Et[t]){let t=g(e),n=h(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=wt?n[i]:f(n[i],!0);t.insertBefore(r,m(e))}}}return nn(e),!0},yn=function(e,n){if(gn(P.beforeSanitizeElements,e,null),e!==n&&g(e)===null)return!0;if(pn(e))return nn(e),!0;let r=Y(b?b(e):e.nodeName);if(gn(P.uponSanitizeElement,e,{tagName:r,allowedTags:L}),e!==n&&g(e)===null)return!0;if(_n(e,r))return nn(e),!0;if(de[r]||!(B.tagCheck instanceof Function&&B.tagCheck(r))&&!L[r]){let t=vn(e,r);return t===!1&&gn(P.afterSanitizeElements,e,null),t}if((y?y(e):e.nodeType)===gt.element&&!tn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&W(mt,e.innerHTML))return nn(e),!0;if(ye&&e.nodeType===gt.text){let n=dn(e.textContent);e.textContent!==n&&(Te(t.removed,{element:e.cloneNode()}),e.textContent=n)}return gn(P.afterSanitizeElements,e,null),!1},bn=function(e,t,r){if(fe[t]||be&&t===`patchsrc`||be&&t===`for`&&e!==`label`&&e!==`output`||Ve&&(t===`id`||t===`name`)&&(r in n||r in qt))return!1;let i=R[t]||B.attributeCheck instanceof Function&&B.attributeCheck(t,e);if(!(he&&W(ae,t))&&!(me&&W(oe,t))){if(!i){if(!(Sn(e)&&(z.tagNameCheck instanceof RegExp&&W(z.tagNameCheck,e)||z.tagNameCheck instanceof Function&&z.tagNameCheck(e))&&(z.attributeNameCheck instanceof RegExp&&W(z.attributeNameCheck,t)||z.attributeNameCheck instanceof Function&&z.attributeNameCheck(t,e))||t===`is`&&z.allowCustomizedBuiltInElements&&(z.tagNameCheck instanceof RegExp&&W(z.tagNameCheck,r)||z.tagNameCheck instanceof Function&&z.tagNameCheck(r))))return!1}else if(!At[t]&&!W(I,je(r,F,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Me(r,`data:`)===0&&Ot[e])&&!(ge&&!W(se,je(r,F,``)))&&r)return!1}return!0},xn=K({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Sn=function(e){return!xn[Oe(e)]&&W(ce,e)},Cn=function(e,t,n,r){if(x&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return D(r);case`TrustedScriptURL`:return O(r)}return r},wn=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),pn(e)?nn(e):we(t.removed)}catch{an(n,e)}},Tn=function(e){gn(P.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||pn(e))return;let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0},r=t.length,i=Y(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=Y(o),u=c,d=o===`value`?u:Ne(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,gn(P.uponSanitizeAttribute,e,n),d=n.attrValue,St&&(l===`id`||l===`name`)&&Me(d,Ct)!==0&&(an(o,e),d=Ct+d),be&&W(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){an(o,e);continue}if(l===`attributename`&&Ae(d,`href`)){an(o,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr){an(o,e);continue}if(!_e&&W(ht,d)){an(o,e);continue}if(ye&&(d=dn(d)),!bn(i,l,d)){an(o,e);continue}d=Cn(i,l,s,d),d!==u&&wn(e,o,s,d)}}gn(P.afterSanitizeAttributes,e,null)},En=function(e){let t=null,n=un(e);for(gn(P.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(gn(P.uponSanitizeShadowNode,t,null),yn(t,e),Tn(t),mn(t.content)&&En(t.content),(y?y(t):t.nodeType)===gt.element){let e=_(t);mn(e)&&(Dn(e),En(e))}gn(P.afterSanitizeShadowDOM,e,null)},Dn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){En(e.shadow);continue}let n=e.node,r=(y?y(n):n.nodeType)===gt.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=b?b(n):null;if(typeof e==`string`&&Y(e)===`template`){let e=n.content;mn(e)&&t.push({node:e,shadow:null})}}if(r){let e=_(n);mn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(It=!e,It&&(e=``),typeof e!=`string`&&!hn(e)&&(e=He(e),typeof e!=`string`))throw ze(`dirty is not a string, aborting`);if(!t.isSupported)return e;Pe?(L=Fe,R=Ie):Yt(n),(P.uponSanitizeElement.length>0||P.uponSanitizeAttribute.length>0)&&(L=q(L)),P.uponSanitizeAttribute.length>0&&(R=q(R)),t.removed=[];let c=wt&&typeof e!=`string`&&hn(e);if(c){cn(e);let t=b?b(e):e.nodeName;if(typeof t==`string`){let n=Y(t);if(!L[n]||de[n])throw rn(e),ze(`root node is forbidden and cannot be sanitized in-place`)}if(pn(e))throw rn(e),ze(`root node is clobbered and cannot be sanitized in-place`);try{Dn(e)}catch(t){throw rn(e),t}}else if(hn(e))i=ln(``),a=i.ownerDocument.importNode(e,!0),a.nodeType===gt.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Dn(a);else{if(!Re&&!ye&&!xe&&e.indexOf(`<`)===-1)return x&&Be?D(e):e;if(i=ln(e),!i)return Re?null:Be?S:``}i&&Le&&nn(i.firstChild);let l=c?e:i,u=un(l);try{for(;o=u.nextNode();)yn(o,l),Tn(o),mn(o.content)&&En(o.content)}catch(n){throw c&&(rn(e),Se(t.removed,e=>{e.element&&sn(e.element)})),n}if(c)return Se(t.removed,e=>{e.element&&sn(e.element)}),ye&&fn(e),e;if(Re){if(ye&&fn(i),G)for(s=M.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(R.shadowroot||R.shadowrootmode)&&(s=te.call(r,s,!0)),s}let d=xe?i.outerHTML:i.innerHTML;return xe&&L[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&W(ut,i.ownerDocument.doctype.name)&&(d=` +`+d),ye&&(d=dn(d)),x&&Be?D(d):d},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Yt(e),Pe=!0,Fe=L,Ie=R},t.clearConfig=function(){Kt=null,Pe=!1,Fe=null,Ie=null,x=C,S=``},t.isValidAttribute=function(e,t,n){Kt||Yt({});let r=Y(e),i=Y(t);return bn(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&U(P,e)&&Te(P[e],t)},t.removeHook=function(e,t){if(U(P,e)){if(t!==void 0){let n=Ce(P[e],t);return n===-1?void 0:Ee(P[e],n,1)[0]}return we(P[e])}},t.removeHooks=function(e){U(P,e)&&(P[e]=[])},t.removeAllHooks=function(){P=yt()},t}var St=xt(),Ct=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var t=`accept acceptCharset accessKey action allowFullScreen allowTransparency + alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge + charSet checked classID className colSpan cols content contentEditable contextMenu + controls coords crossOrigin data dateTime default defer dir disabled download draggable + encType form formAction formEncType formMethod formNoValidate formTarget frameBorder + headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity + is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media + mediaGroup method min minLength multiple muted name noValidate nonce open + optimum pattern placeholder poster preload radioGroup readOnly rel required + reversed role rowSpan rows sandbox scope scoped scrolling seamless selected + shape size sizes span spellCheck src srcDoc srcLang srcSet start step style + summary tabIndex target title type useMap value width wmode wrap onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown + onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick + onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown + onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel + onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough + onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata + onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`.split(/[\s\n]+/),n=`aria-`,r=`data-`;function i(e,t){return e.indexOf(t)===0}function a(e,a=!1){let o;o=a===!1?{aria:!0,data:!0,attr:!0}:a===!0?{aria:!0}:{...a};let s={};return Object.keys(e).forEach(a=>{(o.aria&&(a===`role`||i(a,n))||o.data&&i(a,r)||o.attr&&t.includes(a))&&(s[a]=e[a])}),s}})),J=e(r());function wt(e,t){return(0,J.useImperativeHandle)(e,()=>{let e=t(),{nativeElement:n}=e;return new Proxy(n,{get(t,n){return e[n]?e[n]:Reflect.get(t,n)}})})}var Tt=J.createContext({}),Et={classNames:{},styles:{},className:``,style:{},shortcutKeys:{}},Dt=e=>{let t=J.useContext(Tt);return J.useMemo(()=>({...Et,...t[e]}),[t[e]])};t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.preMessage=void 0;var t={},n=[],r=e=>{n.push(e)};e.preMessage=r;function i(e,t){}function a(e,t){}function o(){t={}}function s(e,n,r){!n&&!t[r]&&(e(!1,r),t[r]=!0)}function c(e,t){s(i,e,t)}function l(e,t){s(a,e,t)}c.preMessage=r,c.resetWarned=o,c.noteOnce=l,e.default=c}))();function Ot(){}var kt=Ot,At=(0,J.createContext)(void 0),jt=t(((e,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),Mt=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={items_per_page:`/ page`,jump_to:`Go to`,jump_to_confirm:`confirm`,page:`Page`,prev_page:`Previous Page`,next_page:`Next Page`,prev_5:`Previous 5 Pages`,next_5:`Next 5 Pages`,prev_3:`Previous 3 Pages`,next_3:`Next 3 Pages`,page_size:`Page Size`}})),Nt=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),Pt=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={...Nt().commonLocale,locale:`en_US`,today:`Today`,now:`Now`,backToToday:`Back to today`,ok:`OK`,clear:`Clear`,week:`Week`,month:`Month`,year:`Year`,timeSelect:`select time`,dateSelect:`select date`,weekSelect:`Choose a week`,monthSelect:`Choose a month`,yearSelect:`Choose a year`,decadeSelect:`Choose a decade`,previousMonth:`Previous month (PageUp)`,nextMonth:`Next month (PageDown)`,previousYear:`Last year (Control + left)`,nextYear:`Next year (Control + right)`,previousDecade:`Last decade`,nextDecade:`Next decade`,previousCentury:`Last century`,nextCentury:`Next century`}})),Ft=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={placeholder:`Select time`,rangePlaceholder:[`Start time`,`End time`]}})),It=t((e=>{var t=jt().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(Pt()),r=t(Ft());e.default={lang:{placeholder:`Select date`,yearPlaceholder:`Select year`,quarterPlaceholder:`Select quarter`,monthPlaceholder:`Select month`,weekPlaceholder:`Select week`,rangePlaceholder:[`Start date`,`End date`],rangeYearPlaceholder:[`Start year`,`End year`],rangeQuarterPlaceholder:[`Start quarter`,`End quarter`],rangeMonthPlaceholder:[`Start month`,`End month`],rangeWeekPlaceholder:[`Start week`,`End week`],...n.default},timePickerLocale:{...r.default}}})),Lt=t((e=>{var t=jt().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=t(It()).default})),Rt=t((e=>{var t=jt().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(Mt()),r=t(Lt()),i=t(It()),a=t(Ft()),o="${label} is not a valid ${type}";e.default={locale:`en`,Pagination:n.default,DatePicker:i.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:`Please select`,close:`Close`,sortable:`sortable`,show:`Show`,hide:`Hide`},Table:{filterTitle:`Filter menu`,filterConfirm:`OK`,filterReset:`Reset`,filterEmptyText:`No filters`,filterCheckAll:`Select all items`,filterSearchPlaceholder:`Search in filters`,emptyText:`No data`,selectAll:`Select current page`,selectInvert:`Invert current page`,selectNone:`Clear all data`,selectionAll:`Select all data`,sortTitle:`Sort`,expand:`Expand row`,collapse:`Collapse row`,triggerDesc:`Click to sort descending`,triggerAsc:`Click to sort ascending`,cancelSort:`Click to cancel sorting`},Tour:{Next:`Next`,Previous:`Previous`,Finish:`Finish`},Modal:{okText:`OK`,cancelText:`Cancel`,justOkText:`OK`},Popconfirm:{okText:`OK`,cancelText:`Cancel`},Transfer:{titles:[``,``],searchPlaceholder:`Search here`,itemUnit:`item`,itemsUnit:`items`,remove:`Remove`,selectCurrent:`Select current page`,removeCurrent:`Remove current page`,selectAll:`Select all data`,deselectAll:`Deselect all data`,removeAll:`Remove all data`,selectInvert:`Invert current page`},Upload:{uploading:`Uploading...`,removeFile:`Remove file`,uploadError:`Upload error`,previewFile:`Preview file`,downloadFile:`Download file`},Empty:{description:`No data`},Icon:{icon:`icon`},Text:{edit:`Edit`,copy:`Copy`,copied:`Copied`,expand:`Expand`,collapse:`Collapse`},Form:{optional:`(optional)`,defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:`QR code expired`,refresh:`Refresh`,scanned:`Scanned`},ColorPicker:{presetEmpty:`Empty`,transparent:`Transparent`,singleColor:`Single`,gradientColor:`Gradient`}}})),zt=t(((e,t)=>{t.exports=Rt()})),Bt={locale:`en`,Conversations:{create:`New chat`},Sender:{stopLoading:`Stop loading`,speechRecording:`Speech recording`},Actions:{feedbackLike:`Like`,feedbackDislike:`Dislike`,audio:`Play audio`,audioRunning:`Audio playing`,audioError:`Playback error`,audioLoading:`Loading audio`},Bubble:{editableOk:`OK`,editableCancel:`Cancel`},Mermaid:{zoomIn:`Zoom in`,zoomOut:`Zoom out`,zoomReset:`Reset`,download:`Download`,code:`Code`,image:`Image`},Folder:{selectFile:`Please select a file`,loadError:`Failed to load file`,noService:`File content service not configured`,loadFailed:`Failed to load file`}},Vt=e(zt()),Ht=(e,t)=>{let n=J.useContext(At);return[J.useMemo(()=>{let r=t||Bt?.[e]||Vt.default?.[e],i=n?.[e]??{};return{...typeof r==`function`?r():r,...i||{}}},[e,t,n]),J.useMemo(()=>{let e=n?.locale;return n?.exist&&!e?Bt.locale:e},[n])]};function Ut(){let{getPrefixCls:e,direction:t,csp:n,iconPrefixCls:r,theme:i}=J.useContext(T.ConfigContext);return{theme:i,getPrefixCls:e,direction:t,csp:n,iconPrefixCls:r}}var Wt=1e3,Gt=4,Y=140,Kt=Y/2,qt=250,Jt=500,Yt=.8;function Xt({className:e}){let[t]=Ht(`Sender`,Bt.Sender);return J.createElement(`svg`,{color:`currentColor`,viewBox:`0 0 ${Wt} ${Wt}`,xmlns:`http://www.w3.org/2000/svg`,className:e},J.createElement(`title`,null,t.speechRecording),Array.from({length:Gt}).map((e,t)=>{let n=t*286.66666666666663,r=Wt/2-qt/2,i=Wt/2-Jt/2;return J.createElement(`rect`,{fill:`currentColor`,rx:Kt,ry:Kt,height:qt,width:Y,x:n,y:r,key:t},J.createElement(`animate`,{attributeName:`height`,values:`${qt}; ${Jt}; ${qt}`,keyTimes:`0; 0.5; 1`,dur:`${Yt}s`,begin:`${Yt/Gt*t}s`,repeatCount:`indefinite`}),J.createElement(`animate`,{attributeName:`y`,values:`${r}; ${i}; ${r}`,keyTimes:`0; 0.5; 1`,dur:`${Yt}s`,begin:`${Yt/Gt*t}s`,repeatCount:`indefinite`}))}))}var Zt=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:`hidden`,"&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, + opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:`hidden`,transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, + opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),Qt=`2.8.0`,$t={blue:`#1677FF`,purple:`#722ED1`,cyan:`#13C2C2`,green:`#52C41A`,magenta:`#EB2F96`,pink:`#EB2F96`,red:`#F5222D`,orange:`#FA8C16`,yellow:`#FADB14`,volcano:`#FA541C`,geekblue:`#2F54EB`,gold:`#FAAD14`,lime:`#A0D911`,colorPrimary:`#1677ff`,colorSuccess:`#52c41a`,colorWarning:`#faad14`,colorError:`#ff4d4f`,colorInfo:`#1677ff`,colorLink:``,colorTextBase:``,colorBgBase:``,fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, +'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', +'Noto Color Emoji'`,fontFamilyCode:`'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace`,fontSize:14,lineWidth:1,lineType:`solid`,motionUnit:.1,motionBase:0,motionEaseOutCirc:`cubic-bezier(0.08, 0.82, 0.17, 1)`,motionEaseInOutCirc:`cubic-bezier(0.78, 0.14, 0.15, 0.86)`,motionEaseOut:`cubic-bezier(0.215, 0.61, 0.355, 1)`,motionEaseInOut:`cubic-bezier(0.645, 0.045, 0.355, 1)`,motionEaseOutBack:`cubic-bezier(0.12, 0.4, 0.29, 1.46)`,motionEaseInBack:`cubic-bezier(0.71, -0.46, 0.88, 0.6)`,motionEaseInQuint:`cubic-bezier(0.755, 0.05, 0.855, 0.06)`,motionEaseOutQuint:`cubic-bezier(0.23, 1, 0.32, 1)`,borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0};function en(e){return e>=0&&e<=255}function tn(e,t){let{r:n,g:r,b:i,a}=new p(e).toRgb();if(a<1)return e;let{r:o,g:s,b:c}=new p(t).toRgb();for(let e=.01;e<=1;e+=.01){let t=Math.round((n-o*(1-e))/e),a=Math.round((r-s*(1-e))/e),l=Math.round((i-c*(1-e))/e);if(en(t)&&en(a)&&en(l))return new p({r:t,g:a,b:l,a:Math.round(e*100)/100}).toRgbString()}return new p({r:n,g:r,b:i,a:1}).toRgbString()}function nn(e){let{override:t,...n}=e,r={...t};Object.keys($t).forEach(e=>{delete r[e]});let i={...n,...r},a=1200,o=1600;return i.motion===!1&&(i.motionDurationFast=`0s`,i.motionDurationMid=`0s`,i.motionDurationSlow=`0s`),{...i,colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:tn(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:tn(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:tn(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*3,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:tn(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:`none`,linkHoverDecoration:`none`,linkFocusDecoration:`none`,controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowSecondary:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowTertiary:` + 0 1px 2px 0 rgba(0, 0, 0, 0.03), + 0 1px 6px -1px rgba(0, 0, 0, 0.02), + 0 2px 4px 0 rgba(0, 0, 0, 0.02) + `,screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:a-1,screenXL:a,screenXLMin:a,screenXLMax:o-1,screenXXL:o,screenXXLMin:o,boxShadowPopoverArrow:`2px 2px 5px rgba(0, 0, 0, 0.05)`,boxShadowCard:` + 0 1px 2px -2px ${new p(`rgba(0, 0, 0, 0.16)`).toRgbString()}, + 0 3px 6px 0 ${new p(`rgba(0, 0, 0, 0.12)`).toRgbString()}, + 0 5px 12px 4px ${new p(`rgba(0, 0, 0, 0.09)`).toRgbString()} + `,boxShadowDrawerRight:` + -6px 0 16px 0 rgba(0, 0, 0, 0.08), + -3px 0 6px -4px rgba(0, 0, 0, 0.12), + -9px 0 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerLeft:` + 6px 0 16px 0 rgba(0, 0, 0, 0.08), + 3px 0 6px -4px rgba(0, 0, 0, 0.12), + 9px 0 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerUp:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerDown:` + 0 -6px 16px 0 rgba(0, 0, 0, 0.08), + 0 -3px 6px -4px rgba(0, 0, 0, 0.12), + 0 -9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowTabsOverflowLeft:`inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)`,boxShadowTabsOverflowRight:`inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)`,boxShadowTabsOverflowTop:`inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)`,boxShadowTabsOverflowBottom:`inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)`,...r}}var rn={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},an={motionBase:!0,motionUnit:!0},on=a(ie.defaultAlgorithm),sn={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},cn=(e,t,n)=>{let r=n.getDerivativeToken(e),{override:i,...a}=t,o={...r,override:i};return o=nn(o),a&&Object.entries(a).forEach(([e,t])=>{let{theme:n,...r}=t,i=r;n&&(i=cn({...o,...r},{override:r},n)),o[e]=i}),o};function ln(){let{token:e,hashed:t,theme:n,override:r,cssVar:i,zeroRuntime:a}=J.useContext(ie._internalContext),o={prefix:i?.prefix??`ant`,key:i?.key??`css-var-root`},s=n||on,[c,u,d]=l(s,[ie.defaultSeed,e],{salt:`${Qt}-${t||``}`,override:r,getComputedToken:cn,cssVar:{...o,unitless:rn,ignore:an,preserve:sn}});return[s,d,t?u:``,c,o,!!a]}function un(){let[e,t,n]=ln();return{theme:e,token:t,hashId:n}}var{genStyleHooks:dn,genComponentStyleHook:fn,genSubStyleComponent:pn}=f({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=Ut();return{iconPrefixCls:t,rootPrefixCls:e()}},useToken:()=>{let[e,t,n,r,i,a]=ln();return{theme:e,realToken:t,hashId:n,token:r,cssVar:i,zeroRuntime:a}},useCSP:()=>{let{csp:e}=Ut();return e??{}},layer:{name:`antdx`}}),mn=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e,t){let n=Object.assign({},e);return Array.isArray(t)&&t.forEach(e=>{delete n[e]}),n}})),hn=J.createContext({});function gn(e){let t=getComputedStyle(e).display;return t===`block`||t===`flex`||t===`list-item`||t===`table`}function _n(e){let t=[``],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);for(;n.nextNode();){let e=n.currentNode;if(e.nodeType===Node.TEXT_NODE){t[t.length-1]+=e.textContent;continue}e.tagName===`BR`&&e.parentNode?.childElementCount===1||(e.tagName===`BR`||gn(e))&&t.push(``)}return t.join(` +`)}var vn=({content:e,prefixCls:t,okText:n,cancelText:r,onEditConfirm:i,onEditCancel:a})=>{let o=J.useRef(null),[s]=Ht(`Bubble`,Bt.Bubble),c=g(()=>{i?.(_n(o.current))}),l=g(()=>a?.());if(J.useEffect(()=>{o.current.textContent=e,o.current.focus();let t=window.getSelection(),n=document.createRange();n.selectNodeContents(o.current),n.collapse(!1),t.removeAllRanges(),t.addRange(n)},[]),typeof e!=`string`)throw Error(`Content of editable Bubble should be string`);let u=J.useMemo(()=>J.createElement(`div`,{ref:o,contentEditable:!0}),[]);return J.createElement(J.Fragment,null,u,J.createElement(te,{rootClassName:`${t}-editing-opts`,gap:8},J.createElement(k,{type:`primary`,shape:`round`,size:`small`,onClick:c},n||s.editableOk),J.createElement(k,{type:`text`,shape:`round`,size:`small`,onClick:l},r||s.editableCancel)))},yn=({prefixCls:e})=>J.createElement(`span`,{className:`${e}-dot`},J.createElement(`i`,{className:`${e}-dot-item`,key:`item-1`}),J.createElement(`i`,{className:`${e}-dot-item`,key:`item-2`}),J.createElement(`i`,{className:`${e}-dot-item`,key:`item-3`})),bn=new n(`loadingMove`,{"0%":{transform:`translateY(0)`},"10%":{transform:`translateY(4px)`},"20%":{transform:`translateY(0)`},"30%":{transform:`translateY(-4px)`},"40%":{transform:`translateY(0)`}}),xn=new n(`cursorBlink`,{"0%":{opacity:1},"50%":{opacity:0},"100%":{opacity:1}}),Sn=new n(`fadeIn`,{"0%":{opacity:0},"100%":{opacity:1}}),Cn=e=>{let{componentCls:t,fontSize:n,typingContent:r,typingAnimationDuration:i,typingAnimationName:a,lineHeight:o,paddingSM:s,colorText:c,calc:l}=e;return[{[t]:{display:`flex`,columnGap:s,[`&${t}-rtl`]:{direction:`rtl`},[`&${t}-loading`]:{alignItems:`center`},[`${t}-body`]:{display:`flex`,flexDirection:`column`,maxWidth:`100%`},[`${t}-content`]:{position:`relative`,boxSizing:`border-box`,minWidth:0,maxWidth:`100%`,minHeight:l(s).mul(2).add(l(o).mul(n)).equal(),paddingInline:`${u(e.padding)}`,paddingBlock:`${u(s)}`,color:c,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`,"&-string":{whiteSpace:`pre-wrap`}},[`${t}-typing:last-child::after`]:{content:r,fontWeight:900,userSelect:`none`,opacity:1,marginInlineStart:`0.1em`,animationName:a,animationDuration:u(i),animationIterationCount:`infinite`,animationTimingFunction:`linear`},[`${t}-fade-in .fade-in`]:{display:`inline`,animationName:Sn,animationDuration:`1s`,animationTimingFunction:`linear`},[`${t}-dot`]:{position:`relative`,height:e.controlHeight,display:`flex`,alignItems:`center`,columnGap:e.marginXS,padding:`0 ${u(e.paddingXXS)}`,alignSelf:`center`,"&-item":{backgroundColor:e.colorPrimary,borderRadius:`100%`,width:4,height:4,animationName:bn,animationDuration:`2s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`,"&:nth-child(1)":{animationDelay:`0s`},"&:nth-child(2)":{animationDelay:`0.2s`},"&:nth-child(3)":{animationDelay:`0.4s`}}},[`&${t}-start`]:{flexDirection:`row`,alignSelf:`flex-start`,[`& ${t}-header`]:{flexDirection:`row`}},[`&${t}-end`]:{flexDirection:`row-reverse`,alignSelf:`flex-end`,[`& ${t}-header`]:{flexDirection:`row-reverse`},[`& ${t}-editing-opts`]:{flexDirection:`row-reverse`}}}},xn]},wn=e=>{let{componentCls:t}=e;return{[t]:{[`${t}-content`]:{"&-filled":{backgroundColor:e.colorFillContent},"&-outlined":{border:`1px solid ${e.colorBorderSecondary}`},"&-shadow":{boxShadow:e.boxShadowTertiary},"&-borderless":{backgroundColor:`transparent`,padding:0,minHeight:0}}}}},Tn=e=>{let{componentCls:t,fontSize:n,lineHeight:r,paddingSM:i,borderRadius:a,calc:o}=e,s=o(n).mul(r).div(2).add(i).equal(),c=o(a).mul(2).equal(),l=`${t}-content`;return{[t]:{[l]:{"&-default":{borderRadius:{_skip_check_:!0,value:c}},"&-round":{borderRadius:{_skip_check_:!0,value:s}},"&-corner":{borderRadius:{_skip_check_:!0,value:c}},"&-editing":{"div:first-child":{outline:`none`},[`${t}-editing-opts`]:{marginBlockStart:e.marginSM,"button:last-child":{backgroundColor:e.colorBgContainer,"&:hover":{backgroundColor:e.colorBgLayout}}}}},[`&${t}-start ${t}-content-corner`]:{borderStartStartRadius:e.borderRadiusXS},[`&${t}-end ${t}-content-corner`]:{borderStartEndRadius:e.borderRadiusXS}}}},En=e=>{let{componentCls:t}=e;return{[t]:{"&-divider":{width:`100%`,justifyContent:`center`,[`& ${t}-body`]:{width:`100%`}}}}},Dn=e=>{let{componentCls:t}=e;return{[`${t}-list`]:{maxHeight:`100%`,width:`100%`,boxSizing:`border-box`,[`& ${t}`]:{width:`100%`,boxSizing:`border-box`,paddingBlock:e.padding},[`& ${t}-start:not(${t}-divider):not(${t}-system)`]:{paddingInlineEnd:`15%`},[`& ${t}-end:not(${t}-divider):not(${t}-system)`]:{paddingInlineStart:`15%`},[`${t}-list-scroll-box`]:{overflowY:`auto`,display:`flex`,width:`100%`,maxHeight:`100%`,flexDirection:`column`,scrollbarWidth:`thin`,scrollbarColor:`${e.colorTextTertiary} transparent`,"&::-webkit-scrollbar":{width:8,backgroundColor:`transparent`},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:e.borderRadiusSM}},[`${t}-list-autoscroll`]:{flexDirection:`column-reverse`},[`${t}-list-scroll-content`]:{display:`flex`,width:`100%`,height:`fit-content`,flexDirection:`column`,boxSizing:`border-box`,paddingInline:e.paddingXS}}}},On=e=>{let{componentCls:t,fontSize:n,lineHeight:r,paddingXXS:i,margin:a,colorText:o,fontSizeLG:s,calc:c}=e;return{[t]:{[`${t}-header`]:{display:`flex`,marginBottom:i,fontSize:n,lineHeight:r,color:o},[`${t}-footer`]:{display:`flex`,marginBlockStart:a,fontSize:n,lineHeight:r,color:o,"&-start":{flexDirection:`row`},"&-end":{flexDirection:`row-reverse`}},[`${t}-avatar`]:{minWidth:c(s).mul(2).equal()}}}},kn=e=>{let{componentCls:t,paddingSM:n,paddingXS:r,lineHeight:i,fontSize:a,fontSizeSM:o,calc:s}=e;return{[t]:{[`&${t}-system`]:{width:`100%`,justifyContent:`center`,[`${t}-content`]:{display:`flex`,gap:`${u(o)}`,alignItems:`center`,minHeight:s(r).mul(2).add(s(i).mul(a)).equal(),fontSize:`${u(a)}`,paddingInline:`${u(n)}`,paddingBlock:`${u(r)}`},[`${t}-system-content`]:{},[`${t}-system-extra`]:{}}}}},An=dn(`Bubble`,e=>{let t=_(e,{});return[Cn(t),wn(t),Tn(t),On(t),Dn(t),kn(t),En(t)]},()=>({typingContent:`"|"`,typingAnimationName:`cursorBlink`,typingAnimationDuration:`0.8s`})),jn=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}})),Mn=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.useLayoutUpdateEffect=e.default=void 0;var t=o(r()),n=i(jn());function i(e){return e&&e.__esModule?e:{default:e}}function a(e){if(typeof WeakMap!=`function`)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function o(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!=`object`&&typeof e!=`function`)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var s=(0,n.default)()?t.useLayoutEffect:t.useEffect,c=(e,n)=>{let r=t.useRef(!0);s(()=>e(r.current),n),s(()=>(r.current=!1,()=>{r.current=!0}),[])};e.useLayoutUpdateEffect=(e,t)=>{c(t=>{if(!t)return e()},t)},e.default=c}))());function Nn(e){return!e||e.length===0?``:e.reduce((e,t)=>{let n=0;for(;n{let e={effect:`fade-in`,interval:100,step:6,keepPrefix:!0};if(n===!0)return e;let{step:t=6,interval:r=100}=n,i=e=>typeof e==`number`;if(!i(r)||r<=0)throw`[Bubble] invalid prop typing.interval, expect positive number.`;if(!i(t)&&!Array.isArray(t))throw`[Bubble] invalid prop typing.step, expect positive number or positive number array`;if(i(t)&&t<=0)throw`[Bubble] invalid prop typing.step, expect positive number`;if(Array.isArray(t)){if(!i(t[0])||t[0]<=0)throw`[Bubble] invalid prop typing.step[0], expect positive number`;if(!i(t[1])||t[1]<=0)throw`[Bubble] invalid prop typing.step[1], expect positive number`;if(t[0]>t[1])throw`[Bubble] invalid prop typing.step, step[0] should less than step[1]`}return{...e,...n}},[n]),p=J.useRef({content:t,interval:f.interval,step:f.step});p.current={content:t,interval:f.interval,step:f.step};let m=()=>Math.random().toString().slice(2),h=J.useCallback(e=>{let t=0;c.current=f.keepPrefix?Nn([p.current.content,c.current]):``,o(c.current?[{text:c.current,id:m(),taskId:e,done:!0}]:[]);let n=()=>{if(e!==l.current)return;let a=performance.now(),{content:f,interval:h,step:g}=p.current;if(a-t[{text:t.map(({text:e})=>e).join(``),id:m(),taskId:e,done:!0}]),i?.(f),s.current=!1,l.current++;return}c.current+=y;let b={id:m(),text:y,taskId:e,done:!1};o(e=>e.concat(b)),s.current||=!0,t=a,u.current=requestAnimationFrame(n),r?.(c.current,f)};n()},[f.keepPrefix,r,i]),g=J.useCallback(()=>{cancelAnimationFrame(u.current),o([]),c.current=``,s.current=!1},[]);return(0,Mn.default)(()=>{if(!t)return g();t!==c.current&&(s.current&&!t.startsWith(c.current)?(cancelAnimationFrame(u.current),s.current=!1,requestAnimationFrame(()=>h(++l.current))):s.current===!1&&h(l.current))},[t,h]),{renderedData:a,animating:s.current,memoedAnimationCfg:f}}var Fn=({prefixCls:e,streaming:t,content:n,typing:r,onTyping:i,onTypingComplete:a})=>{let{renderedData:o,animating:s,memoedAnimationCfg:c}=Pn({streaming:t,content:n,typing:r,onTyping:i,onTypingComplete:a}),{effect:l}=c,u=o.map(e=>l===`fade-in`&&!e.done?J.createElement(`span`,{key:e.id,className:`fade-in`},e.text):e.text),f=r!==!0&&l===`typing`;return J.createElement(`div`,{className:d({[`${e}-typing`]:f&&s,[`${e}-fade-in`]:!f})},u)},In=e(Ct()),Ln=J.forwardRef(({prefixCls:e,rootClassName:t,style:n,className:r,styles:i={},classNames:a={},placement:s=`start`,content:c,contentRender:l,editable:u=!1,typing:f,streaming:p=!1,variant:m=`filled`,shape:h=`default`,header:g,footer:_,avatar:v,extra:y,footerPlacement:b,loading:x,loadingRender:S,onTyping:C,onTypingComplete:w,onEditConfirm:T,onEditCancel:E,...D},O)=>{let k=J.useRef(null);J.useImperativeHandle(O,()=>({nativeElement:k.current}));let A=Dt(`bubble`),{direction:j,getPrefixCls:ee}=Ut(),M=ee(`bubble`,e),N=J.useContext(hn),[te,P]=An(M),ne={...A.style,...A.styles.root,...i.root,...n},re=d(M,A.className,A.classNames.root,a.root,t,r,te,P,`${M}-${s}`,{[`${M}-${N.status}`]:N.status,[`${M}-rtl`]:j===`rtl`,[`${M}-loading`]:x}),ie=(0,In.default)(D,{attr:!0,aria:!0,data:!0}),ae={key:N?.key,status:N?.status,extraInfo:N?.extraInfo},oe=J.useMemo(()=>l?l(c,ae):c,[c,l,ae.key,ae.status,ae.extraInfo]),se=typeof f==`function`?f(c,ae):f,F=!!se&&typeof oe==`string`;J.useEffect(()=>{F||p||c&&w?.(c)},[oe,F,p]);let ce=b||(s===`start`?`outer-start`:`outer-end`),I=typeof u==`boolean`?u:u.editing,L=()=>{if(x)return S?S():J.createElement(yn,{prefixCls:M});let e=J.createElement(J.Fragment,null,F?J.createElement(Fn,{prefixCls:M,streaming:p,typing:se,content:oe,onTyping:C,onTypingComplete:w}):oe),t=ce.includes(`inner`);return J.createElement(`div`,{className:le(`body`),style:R(`body`)},fe(),J.createElement(`div`,{style:{...A.styles.content,...i.content},className:d(`${M}-content`,`${M}-content-${m}`,A.classNames.content,a.content,{[`${M}-content-${N?.status}`]:N?.status,[`${M}-content-${h}`]:m!==`borderless`,[`${M}-content-editing`]:I,[`${M}-content-string`]:typeof oe==`string`})},I?J.createElement(vn,{prefixCls:M,content:c,okText:u?.okText,cancelText:u?.cancelText,onEditConfirm:T,onEditCancel:E}):J.createElement(J.Fragment,null,t?J.createElement(`div`,{className:d(`${M}-content-with-footer`)},e):e,t&&B())),!I&&!t&&B())},le=e=>d(`${M}-${e}`,A.classNames[e],a[e]),R=e=>({...A.styles[e],...i[e]}),ue=e=>typeof e==`function`?e(c,ae):e,z=()=>v?J.createElement(`div`,{className:le(`avatar`),style:R(`avatar`)},ue(v)):null,de=()=>y?J.createElement(`div`,{className:le(`extra`),style:R(`extra`)},ue(y)):null,fe=()=>g?J.createElement(`div`,{className:le(`header`),style:R(`header`)},ue(g)):null,B=()=>{if(!_)return null;let e=d(le(`footer`),{[`${M}-footer-start`]:ce.includes(`start`),[`${M}-footer-end`]:ce.includes(`end`)});return J.createElement(`div`,{className:e,style:R(`footer`)},ue(_))};return J.createElement(`div`,o({className:re,style:ne},D,ie,{ref:k}),z(),L(),!I&&!x&&de())}),Rn=J.forwardRef(({prefixCls:e,content:t=``,rootClassName:n,style:r,className:i,styles:a={},classNames:s={},dividerProps:c,...l},u)=>{let{getPrefixCls:f}=Ut(),p=Dt(`bubble`),m=f(`bubble`,e),[h,g]=An(m),_=d(h,g,m,`${m}-divider`,p.className,p.classNames.root,i,s.root,n);return J.createElement(Ln,o({ref:u,style:r,styles:a,className:_,classNames:s,prefixCls:m,variant:`borderless`,content:t,contentRender:e=>J.createElement(M,c,e)},l))});function zn(e){return getComputedStyle(e).flexDirection===`column-reverse`}function Bn(e,t){let n=(0,J.useRef)(null),r=(0,J.useRef)(!0),i=(0,J.useRef)(!1),a=(0,J.useRef)(0),o=(0,J.useRef)(void 0),s=(0,J.useRef)(!1),c=(0,J.useRef)(!1);(0,J.useLayoutEffect)(()=>{if(!e||!t)return;if(!n.current){let t=document.createElement(`div`);t.style.bottom=`0`,t.style.flexShrink=`0`,t.style.pointerEvents=`none`,t.style.height=`10px`,t.style.visibility=`hidden`,e.insertBefore(t,e.firstChild),n.current=t}let a=new IntersectionObserver(([e])=>{r.current=e.isIntersecting,i.current=!e.isIntersecting},{root:e,threshold:0});a.observe(n.current);let s=new ResizeObserver(()=>{if(e){if(o.current){c.current&&requestAnimationFrame(()=>e.scrollTo({top:zn(e)?0:e.scrollHeight,behavior:`instant`}));return}zn(e)&&i.current&&d()}});return s.observe(t),()=>{a.disconnect(),s.disconnect(),clearTimeout(o.current),n.current?.parentNode&&(n.current.parentNode.removeChild(n.current),n.current=null)}},[e,t]);let l=(0,J.useCallback)(()=>{o.current=setTimeout(()=>{clearTimeout(o.current),o.current=void 0,c.current=!1},50)},[]),u=(0,J.useCallback)(e=>{let t=e.target;if(!zn(t))return;let{scrollTop:n,scrollHeight:r}=t;if(a.current=r+n,s.current){s.current=!1;return}o.current&&clearTimeout(o.current),l()},[l]);(0,J.useLayoutEffect)(()=>{if(e)return e.addEventListener(`scroll`,u,{capture:!0}),()=>e?.removeEventListener(`scroll`,u,{capture:!0})},[e,u]);let d=(0,J.useCallback)(()=>{e.scrollTop=a.current-e.scrollHeight,s.current=!0},[e]);return{reset:(0,J.useCallback)(()=>{r.current=!0,i.current=!1,a.current=e?.scrollHeight||0},[e]),scrollTo:(0,J.useCallback)(n=>{if(!e||!t)return;let{top:r,intoView:i,intoViewDom:a}=n||{};zn(e)?r!==void 0&&r>=-10?c.current=!0:a&&i?.block===`end`?c.current=t.lastElementChild===a:c.current=!1:r!==void 0&&r>=e.scrollHeight-e.clientHeight-10?c.current=!0:a&&i?.block===`end`?c.current=t.lastElementChild===a:c.current=!1,o.current||l(),a?a.scrollIntoView(i):e.scrollTo(n)},[e,t])}}var Vn=J.forwardRef(({prefixCls:e,content:t,variant:n=`shadow`,shape:r,style:i,className:a,styles:s={},classNames:c={},rootClassName:l,...u},f)=>{let p=Dt(`bubble`),{getPrefixCls:m}=Ut(),h=m(`bubble`,e),[g,_]=An(h),v=d(g,_,`${h}-system`,h,p.className,p.classNames.root,c.root,a,l);return J.createElement(Ln,o({ref:f,style:i,className:v,styles:s,classNames:c,variant:n,shape:r,content:t},u))}),Hn=e(mn());function Un(e){return typeof e==`function`&&e instanceof Function}var Wn=J.memo(Ln),Gn=J.memo(Rn),Kn=J.memo(Vn),qn=e=>{let{_key:t,bubblesRef:n,extraInfo:r,status:i,role:a,classNames:s={},styles:c={},...l}=e,u=J.useCallback(e=>{e?n.current[t]=e:delete n.current[t]},[t]),{root:d,bubble:f,divider:p,system:m,...h}=s,{root:g,bubble:_,divider:v,system:y,...b}=c,x=J.createElement(Wn,o({ref:u,style:g||_,className:d||f,classNames:h,styles:b},l));return a===`divider`?x=J.createElement(Gn,o({ref:u,style:g||v,className:d||p,classNames:h,styles:b},l)):a===`system`&&(x=J.createElement(Kn,o({ref:u,style:g||y,className:d||m,classNames:h,styles:b},l))),J.createElement(hn.Provider,{value:{key:t,status:i,extraInfo:r}},x)};Ln.List=J.forwardRef((e,t)=>{let{prefixCls:n,rootClassName:r,className:i,styles:a={},classNames:s={},style:c,items:l,autoScroll:u=!0,role:f,onScroll:p,...m}=e,h=(0,In.default)(m,{attr:!0,aria:!0}),g=J.useRef(null),_=J.useRef({}),[v,y]=J.useState(),[b,x]=J.useState(),{scrollTo:S}=Bn(v,b),{getPrefixCls:C}=Ut(),w=C(`bubble`,n),T=`${w}-list`,[E,D]=An(w),O=d(T,r,i,s.root,E,D),k={...a.root,...c};return wt(t,()=>({nativeElement:g.current,scrollBoxNativeElement:v,scrollTo:({key:e,top:t,behavior:n=`smooth`,block:r})=>{let{scrollHeight:i,clientHeight:a}=v;if(typeof t==`number`)S({top:u?-i+a+t:t,behavior:n});else if(t===`bottom`)S({top:u?0:i,behavior:n});else if(t===`top`){let e=u?-i:0;S({top:e,behavior:n})}else e&&_.current[e]&&S({intoView:{behavior:n,block:r},intoViewDom:_.current[e].nativeElement})}})),J.createElement(`div`,o({},h,{className:O,style:k,ref:g}),J.createElement(`div`,{className:d(`${T}-scroll-box`,s.scroll,{[`${T}-autoscroll`]:u}),style:a.scroll,ref:e=>y(e),onScroll:p},J.createElement(`div`,{ref:e=>x(e),className:d(`${T}-scroll-content`)},l.map(e=>{let t;if(e.role&&f){let n=f[e.role];t={...Un(n)?n(e):n,...e}}else t=e;return J.createElement(qn,o({classNames:(0,Hn.default)(s,[`root`,`scroll`]),styles:(0,Hn.default)(a,[`root`,`scroll`])},(0,Hn.default)(t,[`key`]),{key:e.key,_key:e.key,bubblesRef:_}))}))))}),Ln.System=Vn,Ln.Divider=Rn;var Jn=Ln,Yn=()=>({height:0,opacity:0}),Xn=e=>{let{scrollHeight:t}=e;return{height:t,opacity:1}},Zn=e=>({height:e?e.offsetHeight:0}),Qn=(e,t)=>t?.deadline===!0||t.propertyName===`height`,$n=(e=`ant`)=>({motionName:`${e}-motion-collapse`,onAppearStart:Yn,onEnterStart:Yn,onAppearActive:Xn,onEnterActive:Xn,onLeaveStart:Zn,onLeaveActive:Yn,onAppearEnd:Qn,onEnterEnd:Qn,onLeaveEnd:Qn,motionDeadline:500}),er=(e,t,n)=>{let r=typeof e==`boolean`||e?.expandedKeys===void 0,[i,a,o,s]=J.useMemo(()=>{let t={expandedKeys:[],defaultExpandedKeys:[],onExpand:()=>{}};return e?(typeof e==`object`&&(t={...t,...e}),[!0,t.defaultExpandedKeys,t.expandedKeys,t.onExpand]):[!1,t.defaultExpandedKeys,t.expandedKeys,t.onExpand]},[e]),[c,l]=v(a||[],r?void 0:o),u=e=>{l(t=>{let n=r?t:o,i=n.includes(e)?n.filter(t=>t!==e):[...n,e];return s?.(i),i})},d=J.useMemo(()=>i?{...$n(n),motionAppear:!1,leavedClassName:`${t}-content-hidden`}:{},[n,t,i]);return[i,c,i?u:void 0,d]},tr=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){let{keyCode:n}=e;if(e.altKey&&!e.ctrlKey||e.metaKey||n>=t.F1&&n<=t.F12)return!1;switch(n){case t.ALT:case t.CAPS_LOCK:case t.CONTEXT_MENU:case t.CTRL:case t.DOWN:case t.END:case t.ESC:case t.HOME:case t.INSERT:case t.LEFT:case t.MAC_FF_META:case t.META:case t.NUMLOCK:case t.NUM_CENTER:case t.PAGE_DOWN:case t.PAGE_UP:case t.PAUSE:case t.PRINT_SCREEN:case t.RIGHT:case t.SHIFT:case t.UP:case t.WIN_KEY:case t.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=t.ZERO&&e<=t.NINE||e>=t.NUM_ZERO&&e<=t.NUM_MULTIPLY||e>=t.A&&e<=t.Z||window.navigator.userAgent.indexOf(`WebKit`)!==-1&&e===0)return!0;switch(e){case t.SPACE:case t.QUESTION_MARK:case t.NUM_PLUS:case t.NUM_MINUS:case t.NUM_PERIOD:case t.NUM_DIVISION:case t.SEMICOLON:case t.DASH:case t.EQUALS:case t.COMMA:case t.PERIOD:case t.SLASH:case t.APOSTROPHE:case t.SINGLE_QUOTE:case t.OPEN_SQUARE_BRACKET:case t.BACKSLASH:case t.CLOSE_SQUARE_BRACKET:return!0;default:return!1}},isEditableTarget:function(e){let t=e.target;if(!(t instanceof HTMLElement))return!1;let n=t.tagName;return!!(n===`INPUT`||n===`TEXTAREA`||n===`SELECT`||t.isContentEditable)}};e.default=t}))()),nr={Alt:[`altKey`,`⌥`,`Alt`],Ctrl:[`ctrlKey`,`⌃`,`Ctrl`],Meta:[`metaKey`,`⌘`,`Win`],Shift:[`shiftKey`,`⇧`,`Shift`]},rr=Array.from({length:9},(e,t)=>tr.default.ONE+t),ir=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<`u`?navigator?.platform:``),ar=e=>e===`number`?e:typeof e==`string`&&nr?.[e]?.[ir?1:2]?nr[e][ir?1:2]:Object.entries(tr.default||{})?.find(([t,n])=>n===e)?.[0]||``,or=(e,t)=>{let n=[...e],r=n.pop();return n.reduce((e,n)=>e&&(t[nr?.[n]?.[0]]||!1),r===t.keyCode)?{actionShortcutKey:e,actionKeyCodeNumber:rr.indexOf(t.keyCode)>-1&&rr.indexOf(t.keyCode),actionKeyCode:t.keyCode,timeStamp:t.timeStamp}:!1},sr=e=>{let t=[...e],n=t.pop();return{keyCodeDict:n===`number`?rr:[n],prefixKeys:t}},cr=(e,t,n)=>{kt(!e.find(({shortcutKey:e})=>e.toString()===t.toString()),n,`Same shortcutKey ${t.toString()}`)},lr=(e,t,n)=>{let r=Object.assign({},t||{},n);return Object.keys(r).reduce(({flattenShortcutKeys:t,shortcutKeysInfo:n},i)=>{let a=r[i];if(!Array.isArray(a))return{flattenShortcutKeys:t,shortcutKeysInfo:n};if(n={...n,[i]:{shortcutKeys:a,shortcutKeysIcon:[]}},a.every(e=>Array.isArray(e)))a.forEach((r,a)=>{let o=r;cr(t,o,e),t.push({name:i,shortcutKey:o,index:a}),n[i].shortcutKeysIcon.push(o?.map(e=>ar(e)))});else{let{keyCodeDict:r,prefixKeys:o}=sr(a);r.forEach(n=>{cr(t,[...o,n],e),t.push({name:i,shortcutKey:[...o,n]})}),n[i].shortcutKeysIcon=a.map(e=>ar(e))}return{flattenShortcutKeys:t,shortcutKeysInfo:n}},{flattenShortcutKeys:[],shortcutKeysInfo:{}})},ur=()=>{let e=(0,J.useRef)(void 0);return[e,t=>{e.current=t}]},dr=(e,t)=>{let{flattenShortcutKeys:n,shortcutKeysInfo:r}=lr(e,Dt(e).shortcutKeys,t),[i,a]=(0,J.useState)(null),[o,s]=ur(),c=(0,J.useRef)(!1),l=e=>{for(let t of n){let n=or(t.shortcutKey,e);if(n){let e={...n,name:t.name,index:t?.index};if(c.current)return;c.current=!0,a(e),o?.current?.(e)}}},u=()=>{c.current=!1};return(0,J.useEffect)(()=>{if(n.length!==0)return document.addEventListener(`keydown`,l),document.addEventListener(`keyup`,u),()=>{document.removeEventListener(`keydown`,l),document.removeEventListener(`keyup`,u)}},[n.length,o]),[i,r,s]},fr=({shortcutKeysIcon:e,prefixCls:t})=>{let[n]=Ht(`Conversations`,Bt.Conversations),r=!!e?.length;return J.createElement(`div`,{className:d(t,{[`${t}-shortcut-keys-show`]:r})},J.createElement(`span`,null,n.create),r&&J.createElement(`span`,{className:d(`${t}-shortcut-keys`)},e.map(e=>J.createElement(`span`,{className:d(`${t}-shortcut-key`),key:e},e))))},pr=({icon:e,label:t,align:n,shortcutKeyInfo:r,prefixCls:i})=>{let{shortcutKeysIcon:a}=r||{},o={label:J.createElement(fr,{prefixCls:`${i}-label`,shortcutKeysIcon:a}),icon:J.createElement(D,{className:`${i}-icon`}),align:`center`};return t&&(o.label=typeof t==`function`?t({shortcutKeyInfo:r,components:{CreationLabel:fr}}):t),e&&(o.icon=typeof e==`function`?e():e),[o.icon,o.label,n||o.align]},mr=({className:e,icon:t,label:n,align:r,style:i,disabled:a,onClick:o,prefixCls:s,shortcutKeyInfo:c})=>{let[l,u,f]=pr({prefixCls:s,label:n,icon:t,align:r,shortcutKeyInfo:c});return J.createElement(`button`,{type:`button`,onClick:e=>{a||o?.(e)},style:i,className:d(s,e,`${s}-${f}`,{[`${s}-disabled`]:a})},l,u)},hr=J.createContext(null),gr=({className:e,children:t})=>{let{prefixCls:n,groupInfo:r,enableCollapse:i,expandedKeys:a,onItemExpand:l,collapseMotion:u}=J.useContext(hr)||{},{label:f,name:p,collapsible:m}=r||{},h=typeof f==`function`?f(p,{groupInfo:r}):f||p,g=m&&i,_=()=>{g&&l?.(r.name)},v=g&&!!a?.includes?.(p);return J.createElement(`li`,{className:e},J.createElement(`div`,{className:d(`${n}-group-title`,{[`${n}-group-title-collapsible`]:g}),onClick:_},h&&J.createElement(`div`,{className:d(`${n}-group-label`)},h),g&&J.createElement(`div`,{className:d(`${n}-group-collapse-trigger `,`${n}-group-collapse-trigger-${v?`open`:`close`}`)},J.createElement(c,null))),J.createElement(s,o({},u,{visible:!g||v}),({className:e,style:n},r)=>J.createElement(`div`,{className:d(e),ref:r,style:n},t)))},_r=(e,t=[])=>{let[n,r,i]=(0,J.useMemo)(()=>{let t={label:``,collapsibleHandle:!1,collapsibleOptions:{}};if(!e)return[``,t.collapsibleHandle,t.collapsibleOptions];if(typeof e==`object`){let{collapsible:n,defaultExpandedKeys:r,expandedKeys:i,onExpand:a,...o}=e;t={...t,...o,collapsibleHandle:n,collapsibleOptions:{defaultExpandedKeys:r,expandedKeys:i,onExpand:a}}}return[t.label,t.collapsibleHandle,t.collapsibleOptions]},[e]);return J.useMemo(()=>{let a=t.reduce((t,i)=>{if(i?.type===`divider`||!i.group||!e)return t.push({data:[i],name:``,label:``,enableGroup:!1,collapsible:!1}),t;let a=i,o=t.some((e,n)=>e.name===a?.group?(t[n].data.push(a),!0):!1),s=typeof r==`function`?r?.(a?.group):r;return o||t.push({data:[a],enableGroup:!0,name:a?.group,label:n,collapsible:s}),t},[]),o=a.reduce((e,t)=>(t.data.forEach(t=>{t.type!==`divider`&&e.push({key:t.key,disabled:t.disabled})}),e),[]);return[a,i,o]},[t,i])},vr=e=>{e.stopPropagation()},yr=e=>{let{prefixCls:t,info:n,className:r,direction:i,onClick:a,active:s,menu:c,...l}=e,u=(0,In.default)(l,{aria:!0,data:!0,attr:!0}),{disabled:f}=n,p=d(r,`${t}-item`,{[`${t}-item-active`]:s&&!f},{[`${t}-item-disabled`]:f}),h=()=>{!f&&a&&a(n.key)},{trigger:g,..._}=c||{},v=_?.getPopupContainer;return J.createElement(`li`,o({title:typeof n.label==`object`?void 0:`${n.label}`},u,{className:p,onClick:h}),n.icon&&J.createElement(`div`,{className:`${t}-icon`},n.icon),J.createElement(C.Text,{className:`${t}-label`},n.label),!f&&c&&J.createElement(`div`,{onClick:vr},J.createElement(N,{menu:_,placement:i===`rtl`?`bottomLeft`:`bottomRight`,trigger:[`click`],disabled:f,getPopupContainer:v},(e=>{let n=J.createElement(m,{onClick:vr,className:`${t}-menu-icon`});return g?typeof g==`function`?g(e,{originNode:n}):g:n})(n))))},br=e=>{let{componentCls:t,calc:n}=e;return{[t]:{display:`flex`,flexDirection:`column`,gap:e.paddingXXS,overflowY:`auto`,padding:e.paddingSM,margin:0,listStyle:`none`,"ul, ol":{margin:0,padding:0,listStyle:`none`},[`&${t}-rtl`]:{direction:`rtl`},[`${t}-creation`]:{backgroundColor:e.creationBgColor,color:e.colorPrimary,border:`none`,fontWeight:500,paddingBlock:e.paddingXS,paddingInline:e.paddingSM,fontSize:e.fontSize,cursor:`pointer`,display:`flex`,gap:e.paddingXS,marginBlockEnd:e.marginSM,lineHeight:e.lineHeight,borderRadius:e.borderRadiusLG,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`&:not(${t}-creation-disabled):hover`]:{color:e.colorPrimary,background:e.creationHoverColor},[`&:not(${t}-creation-disabled)`]:{border:`${u(e.lineWidth)} ${e.lineType}, ${e.creationBorderColor}`},"&-start":{justifyContent:`flex-start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`flex-end`},"&-label":{display:`flex`,justifyContent:`space-between`,alignItems:`center`},"&-label-shortcut-keys-show":{flex:1},"&-label-shortcut-keys":{height:e.controlHeightXS,display:`flex`,alignItems:`center`,gap:u(4)},"&-label-shortcut-key":{borderRadius:e.borderRadiusSM,height:`100%`,boxSizing:`border-box`,fontSize:e.fontSizeIcon,paddingInline:`${u(n(e.paddingXXS).sub(1).equal())}`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:e.shortcutKeyTextColor,border:`${u(e.lineWidth)} ${e.lineType}, ${e.creationBorderColor}`},"&-disabled":{cursor:`not-allowed`,background:e.colorBgContainerDisabled,[`& ${t}-creation-label, ${t}-creation-icon`]:{color:e.colorTextDisabled},[`& ${t}-creation-label-shortcut-keys`]:{color:e.colorTextDisabled,border:`${u(e.lineWidth)} ${e.lineType}, ${e.colorBgContainerDisabled}`}}},[`${t}-divider`]:{marginBlock:e.marginXXS},[`${t}-item`]:{display:`flex`,height:e.controlHeightLG,minHeight:e.controlHeightLG,gap:e.paddingXS,padding:`0 ${u(e.paddingXS)}`,alignItems:`center`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`&:not(${t}-item-disabled):hover`]:{backgroundColor:e.colorBgTextHover},"&-active":{backgroundColor:e.colorBgTextHover,[`& ${t}-label, ${t}-menu-icon`]:{color:e.colorText}},"&-disabled":{cursor:`not-allowed`,[`& ${t}-label, ${t}-icon, ${t}-menu-icon`]:{color:e.colorTextDisabled}},"&:hover, &-active":{[`& ${t}-menu-icon`]:{opacity:.6}},[`${t}-menu-icon:hover`]:{opacity:1}},[`${t}-content-hidden`]:{display:`none`},[`${t}-label`]:{flex:1,color:e.colorText,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},[`${t}-menu-icon`]:{opacity:0,fontSize:e.fontSizeXL},[`${t}-list`]:{display:`flex`,gap:e.paddingXXS,flexDirection:`column`},[`${t}-group-collapsible-list`]:{paddingBlockStart:e.paddingXXS,[`& ${t}-item`]:{paddingInlineStart:e.paddingXL}},[`${t}-group-title`]:{display:`flex`,alignItems:`center`,color:e.colorTextDescription,height:e.controlHeightLG,minHeight:e.controlHeightLG,padding:`0 ${u(e.paddingXS)}`},[`${t}-group-title-collapsible`]:{justifyContent:`space-between`,cursor:`pointer`,color:e.colorText,borderRadius:e.borderRadiusLG,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,"&:hover":{backgroundColor:e.colorBgTextHover}},[`${t}-group-collapse-trigger`]:{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,transform:`rotate(0deg)`,transformOrigin:`center center`},[`${t}-group-collapse-trigger-open`]:{transform:`rotate(90deg)`},[`${t}-group-collapse-trigger-close`]:{transform:`rotate(0deg)`}}}},xr=dn(`Conversations`,e=>{let t=_(e,{});return[br(t),Zt(t)]},e=>{let t=new p(e.colorPrimary).setA(.15),n=new p(e.colorPrimary).setA(.22),r=new p(e.colorPrimary).setA(.25),i=new p(e.colorPrimary).setA(.65);return{creationBgColor:t.toRgbString(),creationBorderColor:n.toRgbString(),creationHoverColor:r.toRgbString(),shortcutKeyTextColor:i.toRgbString()}}),Sr=J.forwardRef((e,t)=>{let{prefixCls:n,shortcutKeys:r,rootClassName:i,items:a,activeKey:s,defaultActiveKey:c,onActiveChange:l,menu:u,styles:f={},classNames:p={},groupable:m,className:h,style:g,creation:_,...y}=e,b=(0,In.default)(y,{attr:!0,aria:!0,data:!0}),x=J.useRef(null);wt(t,()=>({nativeElement:x.current}));let[S,C]=v(c,s),[w,T,E]=_r(m,a),{getPrefixCls:D,direction:O}=Ut(),k=D(`conversations`,n),A=Dt(`conversations`),[j,ee]=xr(k),N=d(k,A.className,A.classNames.root,h,p.root,i,j,ee,{[`${k}-rtl`]:O===`rtl`}),te=e=>{C(e),l?.(e,a?.find(t=>t.key===e))},[P,ne,re]=dr(`conversations`,r);re(e=>{switch(e?.name){case`items`:{let t=e?.actionKeyCodeNumber??e?.index;typeof t==`number`&&!E?.[t]?.disabled&&E?.[t]?.key&&(C(E?.[t]?.key),l?.(E?.[t]?.key,a?.find(e=>e.key===E?.[t]?.key)))}break;case`creation`:typeof _?.onClick==`function`&&!_?.disabled&&_.onClick();break}});let ie=e=>e.map((e,t)=>{if(e.type===`divider`)return J.createElement(M,{key:`key-divider-${t}`,className:`${k}-divider`,dashed:e.dashed});let n=e,{label:r,disabled:i,icon:a,...s}=n;return J.createElement(yr,o({},s,{key:n.key||`key-${t}`,info:n,prefixCls:k,direction:O,className:d(p.item,A.classNames.item,n.className),style:{...A.styles.item,...f.item,...n.style},menu:typeof u==`function`?u(n):u,active:S===n.key,onClick:te}))}),[ae,oe,se,F]=er(T,k,D());return J.createElement(`ul`,o({},b,{style:{...A.style,...g,...A.styles.root,...f.root},className:N,ref:x}),!!_&&J.createElement(mr,o({className:d(A.classNames.creation,p.creation),style:{...A.styles.creation,...f.creation},shortcutKeyInfo:ne?.creation,prefixCls:`${k}-creation`},_)),w.map((e,t)=>{let n=ie(e.data);return e.enableGroup?J.createElement(hr.Provider,{key:e.name||`key-${t}`,value:{prefixCls:k,groupInfo:e,enableCollapse:ae,expandedKeys:oe,onItemExpand:se,collapseMotion:F}},J.createElement(gr,{className:d(A.classNames.group,p.group)},J.createElement(`ul`,{className:d(`${k}-list`,{[`${k}-group-collapsible-list`]:e.collapsible}),style:{...A.styles.group,...f.group}},n))):n}))});Sr.Creation=mr;var Cr=J.createContext(null),wr=J.forwardRef((e,t)=>{let{className:n,action:r,onClick:i,...a}=e,s=(0,J.useContext)(Cr),{prefixCls:c,disabled:l,setSubmitDisabled:u}=s,f=a.disabled??l??s[`${r}Disabled`];return(0,J.useEffect)(()=>{r===`onSend`&&u?.(f)},[f,r,u]),J.createElement(k,o({type:`text`},a,{ref:t,onClick:e=>{f||(s[r]?.(),i?.(e))},disabled:f,className:d(c,n,{[`${c}-disabled`]:f})}))});function Tr(e,t){return J.createElement(wr,o({icon:J.createElement(ce,null)},e,{action:`onClear`,ref:t}))}var Er=J.forwardRef(Tr),Dr=(0,J.memo)(e=>{let{className:t}=e,[n]=Ht(`Sender`,Bt.Sender);return J.createElement(`svg`,{color:`currentColor`,viewBox:`0 0 1000 1000`,xmlns:`http://www.w3.org/2000/svg`,className:t},J.createElement(`title`,null,n.stopLoading),J.createElement(`rect`,{fill:`currentColor`,height:`250`,rx:`24`,ry:`24`,width:`250`,x:`375`,y:`375`}),J.createElement(`circle`,{cx:`500`,cy:`500`,fill:`none`,r:`450`,stroke:`currentColor`,strokeWidth:`100`,opacity:`0.45`}),J.createElement(`circle`,{cx:`500`,cy:`500`,fill:`none`,r:`450`,stroke:`currentColor`,strokeWidth:`100`,strokeDasharray:`600 9999999`},J.createElement(`animateTransform`,{attributeName:`transform`,dur:`1s`,from:`0 500 500`,repeatCount:`indefinite`,to:`360 500 500`,type:`rotate`})))}),Or=J.forwardRef((e,t)=>{let{prefixCls:n}=J.useContext(Cr),{className:r}=e;return J.createElement(wr,o({icon:J.createElement(Dr,{className:`${n}-loading-icon`}),color:`primary`,variant:`text`,shape:`circle`},e,{className:d(r,`${n}-loading-button`),action:`onCancel`,ref:t}))});function kr(e,t){return J.createElement(wr,o({icon:J.createElement(oe,null),type:`primary`,shape:`circle`},e,{action:`onSend`,ref:t}))}var Ar=J.forwardRef(kr),jr=J.createContext({}),Mr=e=>{let t=(0,J.useCallback)(()=>typeof window>`u`?null:window.getSelection(),[]),n=(e,t)=>{if(!e||!t)return t;let n=e,r=null;for(n.nodeType===Node.TEXT_NODE&&(n=n.parentElement);n&&n!==t;)n instanceof HTMLElement&&n.tagName===`SPAN`&&(r=n),n=n.parentElement;return r||t},r=(0,J.useCallback)(()=>{let e=t();if(!e)return{range:null,selection:e};try{return{range:e.getRangeAt(0)||document.createRange(),selection:e}}catch{return{range:document.createRange(),selection:e}}},[t]),i=(0,J.useCallback)((e,t)=>{if(!(!e||!t))try{t.removeAllRanges(),t.addRange(e)}catch(e){kt(!1,`Sender`,`Failed to set range: ${e}`)}},[]),a=(0,J.useCallback)(()=>{let e=t();if(e)try{e.removeAllRanges()}catch(e){kt(!1,`Sender`,`Failed to remove all ranges: ${e}`)}},[t]),o=(0,J.useCallback)((e,t=!1)=>{if(!(!e||typeof e.focus!=`function`))try{e.focus({preventScroll:t})}catch(e){kt(!1,`Sender`,`Failed to focus element: ${e}`)}},[]),s=(0,J.useCallback)((e,t)=>{if(!e)return;o(e,t);let{range:n,selection:a}=r();if(n&&a)try{n.selectNodeContents(e),n.collapse(!1),i(n,a)}catch(e){kt(!1,`Sender`,`Failed to set end cursor: ${e}`)}},[o,r,i]),c=(0,J.useCallback)((e,t)=>{if(!e)return;o(e,t);let{range:n,selection:a}=r();if(n&&a)try{n.selectNodeContents(e),n.collapse(!0),i(n,a)}catch(e){kt(!1,`Sender`,`Failed to set start cursor: ${e}`)}},[o,r,i]),l=(0,J.useCallback)((e,t,n)=>{if(!e)return;o(e,n);let{range:a,selection:s}=r();if(a&&s)try{a.selectNodeContents(e),t&&a.setStart(e,1),i(a,s)}catch(e){kt(!1,`Sender`,`Failed to select all content: ${e}`)}},[o,r,i]),u=(0,J.useCallback)((e,t,n,a)=>{if(!e||typeof n!=`number`||n<0||!t)return{range:null,selection:null};o(t,a);let{range:s,selection:c}=r();if(s&&c)try{let t=Math.min(n,e.childNodes.length);s.setStart(e,t),s.setEnd(e,t),s.collapse(!1),i(s,c)}catch(e){kt(!1,`Sender`,`Failed to set cursor position:: ${e}`)}return{range:s,selection:c}},[o,r,i]),d=(0,J.useCallback)((t,n,r=!1)=>{if(!e||!t?.current)return;let{getSlotDom:i,slotConfigMap:a}=e,o=e=>{let t=i(e);if(!t)return null;let n=a.get(e);if(!n)return null;if(n.type===`input`)return t.querySelector(`input`);let r=t?.getAttribute?.(`data-node-type`)||``;return n.type===`content`&&r!==`nbsp`?t:null},s=(e=>{let n=t.current;if(!n)return null;if(e)return o(e);for(let e of Array.from(n.childNodes)){let t=e?.getAttribute?.(`data-slot-key`);if(t){let e=o(t);if(e)return e}}return null})(n);s&&(s.nodeName===`INPUT`?s.focus({preventScroll:r}):u(s,t.current,0,r))},[e,u]),f=(0,J.useCallback)((e,t,n,r,i)=>{!n||!r||(o(t,i),n?.setStartAfter(e),n.collapse(!1),r.removeAllRanges(),r.addRange(n))},[o]),p=(0,J.useCallback)(e=>{if(!e)return{value:``,startContainer:null,startOffset:0};let n=t();if(!n||n.rangeCount===0)return{value:``,startContainer:null,startOffset:0};try{let t=n.getRangeAt(0),r=t.cloneRange();if(!e.contains(t.startContainer))return{value:``,startContainer:null,startOffset:0};if(t.endContainer===e&&t.endContainer.lastChild?.nodeType===Node.TEXT_NODE){let e=t.endContainer.lastChild;t=document.createRange(),t.setStart(e,e.length),t.setEnd(e,e.length)}return r=t.cloneRange(),r.selectNodeContents(e),r.setEnd(t.startContainer,t.startOffset),{value:r.toString().replace(/\u200B/g,``),startContainer:t.startContainer,startOffset:t.startOffset}}catch(e){return kt(!1,`Sender`,`Failed to get text before cursor: ${e}`),{value:``,startContainer:null,startOffset:0}}},[t]),m=(0,J.useCallback)((i,a,o)=>{if(i===`start`||i===`end`)return{type:i,selection:t()};let l=null,u=null;if(o?.current)l=o.current,u=t();else{let e=r();l=e.range,u=e.selection}if(!l||!u)return{type:`end`,selection:u};let d=a?.current;if(!d)return{type:`end`,selection:u};let f=d.contains(l.endContainer),p=d.contains(l.startContainer);if(!f)return s(d,!0),{type:`end`,selection:u};if(!p)return c(d,!0),{type:`start`,selection:u};let m=n(l.endContainer,d),h=n(l.startContainer,d);if(m===h&&h!==d&&e?.getNodeInfo){let{slotKey:t,slotConfig:n,skillKey:r}=e.getNodeInfo(m)||{};if(t)return{type:`slot`,slotKey:n?.key,slotType:n?.type,range:l,selection:u};if(r)return{type:`start`,selection:u}}return{type:`box`,range:l,selection:u}},[e,r,t,s,c,n]),h=(0,J.useCallback)(e=>{let t=e.childNodes[e.childNodes.length-1],n=t?.nodeType===Node.TEXT_NODE&&t.textContent===` +`?e.childNodes.length-1:e.childNodes.length;return u(e,e,n).range||document.createRange()},[u]),g=(0,J.useCallback)(t=>{let n=+!!e?.getEditorValue?.().skill;return u(t,t,n).range||document.createRange()},[u,e]),_=(0,J.useCallback)(e=>e.replace(/\u200B/g,``).replace(/\n/g,``).replace(/^\n+|\n+$/g,``),[]);return{setEndCursor:s,setStartCursor:c,setAllSelectCursor:l,setCursorPosition:u,setAfterNodeFocus:f,setSlotFocus:d,getTextBeforeCursor:p,getSelection:t,removeAllRanges:a,getRange:r,getInsertPosition:m,getEndRange:h,getStartRange:g,copySelectionString:(0,J.useCallback)(async()=>{try{let e=t();if(!e)return!1;let n=e.toString();if(!n)return!1;let r=_(n);return await navigator.clipboard.writeText(r),!0}catch(e){return kt(!1,`Sender`,`Failed to copy selection: ${e}`),!1}},[t,_]),getCleanedText:_}},Nr=4.35,Pr=(e,t,n)=>{let{token:r}=un(),i=n.current?window.getComputedStyle(n.current):{},a=parseFloat(`${e.lineHeight||r.lineHeight}`),o=parseFloat(`${i?.fontSize||e.fontSize||r.fontSize}`),s=i?.lineHeight?parseFloat(`${i?.lineHeight}`):a*o;return t===!1||!t?{}:t===!0?{height:`auto`}:{minHeight:t.minRows?(s+Nr)*t.minRows:`auto`,maxHeight:t.maxRows?(s+Nr)*t.maxRows:`auto`,overflowY:`auto`}},Fr=e=>{let{prefixCls:t,placeholder:n,slotDomMap:r,slotConfigMap:i}=e,a=(0,J.useCallback)(e=>{let r=document.createElement(`span`);return r.setAttribute(`contenteditable`,`false`),r.dataset.skillKey=e,r.dataset.placeholder=n||``,r.className=`${t}-skill`,r},[t,n]),o=(0,J.useCallback)(e=>{let n=document.createElement(`span`);return n.setAttribute(`contenteditable`,`true`),n.dataset.slotKey=e.key,n.className=d(`${t}-slot`,`${t}-slot-content`),n},[t]),s=(0,J.useCallback)(e=>{let n=document.createElement(`span`);return n.setAttribute(`contenteditable`,`false`),n.dataset.slotKey=e,n.className=`${t}-slot`,n},[t]),c=(0,J.useCallback)((e,n)=>{let r=document.createElement(`span`);return r.setAttribute(`contenteditable`,`false`),r.dataset.slotKey=e,r.dataset.nodeType=`nbsp`,r.className=d(`${t}-slot-${n}`,`${t}-slot-no-width`),r.textContent=`\xA0`,r},[t]),l=(e,t)=>{r.current.set(e,t)},u=e=>r.current.get(e);return{buildSkillSpan:a,buildEditSlotSpan:o,buildSlotSpan:s,buildSpaceSpan:c,saveSlotDom:l,getSlotDom:u,getSlotLastDom:(e,t)=>(t??i.get(e)?.type)===`content`?u(`${e}_after`):u(e)}},Ir=new Set([`input`,`select`,`custom`,`content`]),Lr=e=>e?.reduce((e,t)=>{let{key:n,type:r}=t;if(!n)return e;let i=t.props||{};return e[n]=(Ir.has(r)?i.defaultValue:i.value??i.label)??``,e},{})??{},Rr=(e,t)=>{e?.forEach(e=>{e.key&&t.set(e.key,e)})},zr=(e,t)=>{if(!e?.dataset)return null;let{dataset:n}=e;return{slotKey:n.slotKey,placeholder:n.placeholder,nodeType:n.nodeType,skillKey:n.skillKey,slotConfig:n.slotKey?t.get(n.slotKey):void 0,targetNode:e}},Br=e=>{let[t,n]=(0,J.useState)({}),r=(0,J.useRef)(t),i=(0,J.useRef)(new Map),a=(0,J.useRef)(new Set);(0,J.useEffect)(()=>{if(!e)return;i.current.forEach((e,t)=>{a.current.has(t)||i.current.delete(t)}),Rr(e,i.current);let t=Lr(e);a.current.forEach(e=>{e in r.current&&(t[e]=r.current[e])}),n(t),r.current=t},[e]);let o=(0,J.useCallback)(e=>{let t=typeof e==`function`?e(r.current):e;n(t),r.current=t},[]),s=(0,J.useCallback)(e=>{let t=Lr(e);e.forEach(e=>{e.key&&(i.current.set(e.key,e),a.current.add(e.key))}),n(e=>({...e,...t})),r.current={...r.current,...t}},[]),c=(0,J.useCallback)(()=>{i.current.clear(),a.current.clear(),n({}),r.current={}},[]),l=(0,J.useCallback)(e=>zr(e,i.current),[]);return[i.current,{getSlotValues:()=>r.current,setSlotValues:o,mergeSlotConfig:s,getNodeInfo:l,getNodeTextValue:e=>{let t=e.nodeType;if(t===Node.TEXT_NODE)return e.textContent||``;if(t!==Node.ELEMENT_NODE)return``;let n=e,i=l(n);if(!i)return n.innerText||``;let{slotKey:a,skillKey:o,nodeType:s,slotConfig:c}=i;if(o)return``;let u=n.innerText||``;if(a){if(s===`nbsp`)return` `;if(!c||c.type===`content`)return u;let e=r.current[a]??``;return c.formatResult?.(e)??e}return u},clear:c}]},Vr=({removeSkill:e,prefixCls:t,toolTip:n,closable:r,title:i,value:a})=>{let o=`${t}-skill`,s=(0,J.useMemo)(()=>{if(!r)return[null];let t=typeof r==`boolean`?{}:r,n=n=>{t.disabled||(n.stopPropagation(),e(),t.onClose?.(n))},i=t.closeIcon||J.createElement(E,{className:`${o}-close-icon`});return J.createElement(`div`,{className:d(`${o}-close`,{[`${o}-close-disabled`]:t.disabled}),onClick:n,role:`button`,"aria-label":`Close skill`,tabIndex:0},i)},[r,e]),c=i||a,l=n?J.createElement(w,n,c):c;return J.createElement(`div`,{className:`${o}-wrapper`,contentEditable:!1},J.createElement(`div`,{className:`${o}-tag`,contentEditable:!1,role:`button`,tabIndex:0},J.createElement(`span`,{className:`${o}-tag-text`},l),s),J.createElement(`div`,{className:`${o}-holder`}))};Vr.displayName=`Skill`;var Hr=e(i()),Ur=J.forwardRef((e,t)=>{let{onChange:n,onKeyUp:r,onKeyDown:i,onPaste:a,onPasteFile:s,disabled:c,readOnly:l,submitType:u=`enter`,prefixCls:f,styles:p={},classNames:m={},autoSize:h,triggerSend:g,placeholder:_,onFocus:v,onBlur:y,slotConfig:b,skill:x,...S}=J.useContext(jr),{direction:C,getPrefixCls:w}=Ut(),T=`${w(`sender`,f)}`,E=Dt(`sender`),D=`${T}-input`,O=(0,J.useRef)(null),k=(0,J.useRef)(new Map),A=(0,J.useRef)(!1),j=(0,J.useRef)(!1),ee=(0,J.useRef)(null),M=(0,J.useRef)(null),te=(0,J.useRef)(null),ne={...E.styles?.input,...p.input},ie=Pr(ne,h,O),ae={...(0,In.default)(S,{attr:!0,aria:!0,data:!0}),ref:O},[oe,{getSlotValues:se,setSlotValues:F,getNodeInfo:ce,mergeSlotConfig:I,getNodeTextValue:L,clear:le}]=Br(b),[R,ue]=(0,J.useState)(new Map),[z,de]=(0,J.useState)(null),{setEndCursor:fe,setStartCursor:B,setAllSelectCursor:pe,setCursorPosition:me,setSlotFocus:he,setAfterNodeFocus:ge,getTextBeforeCursor:_e,removeAllRanges:V,getRange:H,getInsertPosition:ve,getEndRange:ye,getStartRange:be,getSelection:xe,copySelectionString:Se,getCleanedText:Ce}=Mr({prefixCls:T,getSlotDom:e=>k.current.get(e),slotConfigMap:oe,getNodeInfo:ce,getEditorValue:()=>Fe()}),{buildSkillSpan:we,buildEditSlotSpan:Te,buildSlotSpan:Ee,buildSpaceSpan:De,getSlotDom:Oe,saveSlotDom:ke,getSlotLastDom:Ae}=Fr({prefixCls:T,placeholder:_,slotDomMap:k,slotConfigMap:oe}),je=e=>{let t=Fe();M.current&&(!t?.value&&t.slotConfig.length===0&&_?(M.current.setAttribute(`contenteditable`,`true`),M.current.classList.add(`${T}-skill-empty`)):(M.current.setAttribute(`contenteditable`,`false`),M.current.classList.remove(`${T}-skill-empty`))),n?.(t.value,e,t.slotConfig,t.skill)},Me=(e,t,n)=>{let r=Oe(e),i=oe.get(e);if(F(n=>({...n,[e]:t})),r&&i){let t=Ne(i,r);ue(n=>{let r=new Map(n);return r.set(e,t),r}),je(n)}},Ne=(e,t)=>{if(!e.key)return null;let n=se()[e.key];return(0,Hr.createPortal)((()=>{switch(e.type){case`content`:return t.innerHTML=n||``,t.setAttribute(`data-placeholder`,e.props?.placeholder||``),null;case`input`:return J.createElement(P,{readOnly:l,className:`${T}-slot-input`,placeholder:e.props?.placeholder||``,"data-slot-input":e.key,size:`small`,variant:`borderless`,value:n||``,tabIndex:0,onKeyDown:We,onChange:t=>{Me(e.key,t.target.value,t)},spellCheck:!1});case`select`:return J.createElement(N,{disabled:l,menu:{items:e.props?.options?.map(e=>({label:e,key:e})),defaultSelectedKeys:e.props?.defaultValue?[e.props.defaultValue]:[],selectable:!0,onSelect:({key:t,domEvent:n})=>{Me(e.key,t,n)}},trigger:[`click`]},J.createElement(`span`,{className:d(`${T}-slot-select`,{placeholder:!n,[`${T}-slot-select-selector-value`]:n})},J.createElement(`span`,{"data-placeholder":e.props?.placeholder,className:`${T}-slot-select-value`},n||``),J.createElement(`span`,{className:`${T}-slot-select-arrow`},J.createElement(re,null))));case`tag`:return J.createElement(`span`,{className:`${T}-slot-tag`},e.props?.label||e.props?.value||``);case`custom`:return e.customRender?.(n,t=>{Me(e.key,t)},{disabled:c,readOnly:l},e);default:return null}})(),t)},Pe=e=>e.reduce((e,t)=>{if(t.type===`text`)return e.push(document.createTextNode(t.value||``)),e;let n=t.key;if(kt(!!n,`Sender`,`Slot key is missing: ${n}`),n){let r,i;if(t.type===`content`){i=Te(t);let e=De(n,`before`),a=De(n,`after`);r=[e,i,a],ke(`${n}_before`,e),ke(n,i),ke(`${n}_after`,a)}else i=Ee(n),r=[i],ke(n,i);if(i){let a=Ne(t,i);a&&(ue(e=>{let t=new Map(e);return t.set(n,a),t}),e.push(...r))}}return e},[]),Fe=()=>{let e=O.current,t={value:``,slotConfig:[],skill:void 0};if(!e)return t;let n=e.childNodes;if(n.length===0)return e.innerHTML=``,M.current=null,t;let r=!!x,i=Array(n.length),a=[],o,s=0;for(let e=0;e{let e=O.current;e&&(e.innerHTML=``,M.current=null,te.current=null,ee.current=null,V(),k?.current?.clear())},Le=e=>{e.forEach(e=>{O.current?.appendChild(e)})},U=(e,t)=>{let n=O.current;n&&(n.querySelectorAll(`[data-slot-key="${e}"]`).forEach(e=>{e.remove()}),k.current.delete(e),F(t=>{let{[e]:n,...r}=t;return r}),ue(t=>{let n=new Map(t);return n.delete(e),n}),je(t))},Re=()=>{if(x&&te.current!==x){W(!1),te.current=x;let e=we(x.value),t=(0,Hr.createPortal)(J.createElement(Vr,o({removeSkill:W},x,{prefixCls:T})),e);de(t);let n=document.createRange(),r=O.current;if(!r)return;n.setStart(r,0),n.insertNode(e),M.current=e,je()}},W=(e=!0)=>{!O.current||!M.current||(M.current?.remove(),M.current=null,te.current=null,e&&je())},ze=e=>{u!==`enter`||!e||e.querySelectorAll(`br`).forEach(e=>{e.remove()})},G=()=>{b&&b.length>0&&O.current&&(Ie(),Le(Pe(b)))},Be=e=>{let t=i?.(e);return j.current||A.current||t===!1},K=(e,t)=>{if(!O.current)return!1;let{range:n,selection:r}=H();if(!r||r.rangeCount===0)return!1;let{focusOffset:i,anchorNode:a}=r;if(!a||!O.current.contains(a))return!1;if(a.nodeType===Node.TEXT_NODE&&n){let r=a.parentNode,o=ce(r),s=n.toString(),c=a.textContent?.length===s.length,l=a.textContent?.length===1&&i===1;if(o?.slotConfig?.type===`content`&&(c||l))return e.preventDefault(),t===`cut`&&Se(),a.parentNode.innerHTML=``,!0}if(t===`backspace`&&i===0){let t=a.previousSibling;if(t){let n=ce(t);if(n){let{slotKey:t,skillKey:r}=n;if(t)return e.preventDefault(),U(t,e),!0;if(r)return e.preventDefault(),W(),!0}}}return!1},Ve=e=>{let{key:t,shiftKey:n,ctrlKey:r,altKey:i,metaKey:a}=e;if(t!==`Enter`)return!1;let o=r||i||a;return u===`enter`&&!n&&!o||u===`shiftEnter`&&n&&!o},q=()=>{if(!M.current||!O.current||M.current.getAttribute(`contenteditable`)===`false`)return;let e=xe();!e?.anchorNode||!M.current.contains(e.anchorNode)||!O.current.contains(e.anchorNode)||(M.current.setAttribute(`contenteditable`,`false`),M.current.classList.remove(`${T}-skill-empty`),rt({cursor:`end`}))},He=()=>{A.current=!0},Ue=()=>{A.current=!1,j.current=!1},We=e=>{if(!Be(e)&&!(e.key===`Backspace`&&K(e,`backspace`))){if(Ve(e)){e.preventDefault(),j.current=!0,g?.();return}if((e.key===`a`||e.key===`A`)&&(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey){pe(O.current,M.current),e.preventDefault();return}q()}},Ge=e=>{v?.(e)},Ke=e=>{j.current&&=!1;let{range:t}=H();ee.current=t;let n=setTimeout(()=>{ee.current=null,clearTimeout(n)},200);y?.(e)},qe=e=>{ze(O?.current),je(e)},Je=e=>{K(e,`cut`)},Ye=e=>{e.preventDefault();let t=e.clipboardData?.files,n=e.clipboardData?.getData(`text/plain`);if(!n&&t?.length&&s){s(t);return}if(n){let e=!1,t=Ce(n);try{e=document.execCommand(`insertText`,!1,t)}catch(e){kt(!1,`Sender`,`insertText command failed: ${e}`)}e||Qe([{type:`text`,value:t}])}a?.(e)},Xe=e=>{e.key===`Enter`&&(j.current=!1),r?.(e)},Ze=()=>{let e=O.current,t=xe();e&&t?.focusNode===e&&t.focusOffset===0&&Fe().skill&&me(e,O.current,1)},Qe=(e,t,n,r)=>{let i=O.current;if(i)try{I(e);let a=Pe(e);if(a.length===0)return;let o=$e(t,i);if(!o.range||!o.selection)return;let{range:s,selection:c}=o;n?.length&&et(s,n,i),s.deleteContents(),tt(a,s,o),nt(a,s,c,r)}catch(e){kt(!1,`Sender`,`Insert operation failed: ${e}`)}},$e=(e,t)=>{let{type:n,slotKey:r,slotType:i,range:a,selection:o}=ve(e,O,ee);if(!o)return{range:null,selection:null,type:n};let s=null;switch(n){case`end`:s=ye(t);break;case`start`:s=be(t);break;case`slot`:s=H().range;break;case`box`:s=a||null,s&&M.current&&s.collapsed&&s.startOffset===0&&s.setStartAfter(M.current);break}return{range:s,selection:o,type:n,slotKey:r,slotType:i}},et=(e,t,n)=>{let{value:r,startContainer:i,startOffset:a}=_e(n);r.length>=t.length&&r.endsWith(t)&&i&&a>=0&&(e.setStart(i,a-t.length),e.setEnd(i,a),e.deleteContents())},tt=(e,t,n)=>{let{type:r,slotKey:i,slotType:a}=n,o=!0;e.forEach(e=>{if(o&&r===`slot`&&(a!==`content`||e.nodeType!==Node.TEXT_NODE)&&i){o=!1;let e=Ae(i);e&&t.setStartAfter(e)}t.insertNode(e),t.setStartAfter(e)})},nt=(e,t,n,r)=>{let i=e[e.length-1];ge(i,O.current,t,n,r),setTimeout(()=>{qe(null)},0)},rt=e=>{let t={preventScroll:e?.preventScroll??!1,cursor:e?.cursor??`end`,key:e?.key};switch(t.cursor){case`slot`:he(O,e?.key,t.preventScroll);break;case`start`:B(O.current,t.preventScroll);break;case`all`:pe(O.current,M.current,t.preventScroll);break;case`end`:fe(O.current,t.preventScroll);break}},it=()=>{let e=O.current;e&&(e.innerHTML=``,te.current=null,M.current=null,le(),Re(),ee.current=null,k?.current?.clear(),qe(null))};return(0,J.useEffect)(()=>{G(),x?Re():je()},[b]),(0,J.useEffect)(()=>{Re()},[x]),(0,J.useImperativeHandle)(t,()=>({nativeElement:O.current,focus:rt,blur:()=>O.current?.blur(),insert:Qe,clear:it,getValue:Fe})),J.createElement(J.Fragment,null,J.createElement(`div`,o({},ae,{role:`textbox`,tabIndex:0,style:{...ne,...ie},className:d(D,`${D}-slot`,E.classNames.input,m.input,{[`${T}-rtl`]:C===`rtl`}),"data-placeholder":_,contentEditable:!l,suppressContentEditableWarning:!0,spellCheck:!1,onCut:Je,onKeyDown:We,onKeyUp:Xe,onPaste:Ye,onCompositionStart:He,onCompositionEnd:Ue,onFocus:Ge,onBlur:Ke,onSelect:Ze,onInput:qe},S)),J.createElement(`div`,{style:{display:`none`},id:`${T}-slot-placeholders`},Array.from(R.values()),z))}),Wr=J.forwardRef((e,t)=>{let{speechRecording:n,disabled:r,onSpeechDisabled:i,prefixCls:a}=J.useContext(Cr),s=e.disabled??r??i,c=null;return c=n?J.createElement(Xt,{className:`${a}-recording-icon`}):s?J.createElement(F,null):J.createElement(se,null),J.createElement(wr,o({icon:c,variant:`text`,color:`primary`},e,{action:`onSpeech`,ref:t}))}),Gr=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e,t){let n=e;for(let e=0;e{let{value:n,onChange:r,onKeyUp:i,onKeyDown:a,onPaste:s,onPasteFile:c,disabled:l,readOnly:u,submitType:f=`enter`,prefixCls:p,styles:m={},classNames:h={},autoSize:g,components:_,triggerSend:v,placeholder:y,onFocus:b,onBlur:x,...S}=J.useContext(jr),C=J.useRef(null),w=(e,t=`cursor`)=>{let n=C.current?.resizableTextArea?.textArea,i=n.value,a=i.length,o=i.length;t===`cursor`&&(a=n?.selectionStart,o=n?.selectionEnd),t===`start`&&(a=0,o=0),n.value=i.substring(0,a)+e+i.substring(o,i.length),n.selectionStart=a+e.length,n.selectionEnd=a+e.length,n.focus(),r?.(n.value)},T=()=>{r?.(``)},E=()=>({value:n||``,slotConfig:[]});J.useImperativeHandle(t,()=>({nativeElement:C.current?.resizableTextArea?.textArea,focus:C.current?.focus,blur:C.current?.blur,insert:w,clear:T,getValue:E}));let D=J.useRef(!1),O=()=>{D.current=!0},k=()=>{D.current=!1},A=e=>{let t=a?.(e),{key:n,shiftKey:r,ctrlKey:i,altKey:o,metaKey:s}=e;if(!(D.current||n!==`Enter`||t===!1)&&n===`Enter`){let t=i||o||s;if(f===`enter`&&!r&&!t||f===`shiftEnter`&&r&&!t){e.preventDefault(),v?.();return}}},j=e=>{let t=e.clipboardData?.files;!e.clipboardData?.getData(`text/plain`)&&t?.length&&c&&(c(t),e.preventDefault()),s?.(e)},ee=Kr(_,[`input`],P.TextArea),M={...(0,In.default)(S,{attr:!0,aria:!0,data:!0}),ref:C};return J.createElement(ee,o({},M,{disabled:l,style:m.input,className:d(`${p}-input`,h.input),autoSize:g,value:n,onChange:e=>{r?.(e.target.value,e)},onKeyUp:i,onCompositionStart:O,onCompositionEnd:k,onKeyDown:A,onPaste:j,variant:`borderless`,readOnly:u,placeholder:y,onFocus:b,onBlur:x}))});function Jr(e,t){let n=g(e),[r,i,a]=J.useMemo(()=>typeof t==`object`?[t.recording,t.onRecordingChange,typeof t.recording==`boolean`]:[void 0,void 0,!1],[t]),[o,s]=J.useState(null);J.useEffect(()=>{if(!a&&`permissions`in navigator){let e=null;return navigator.permissions.query({name:`microphone`}).then(t=>{s(t.state),t.onchange=function(){s(this.state)},e=t}).catch(e=>{kt(!1,`Sender`,`Browser does not support querying microphone permission. ${e instanceof Error?e.message:String(e)}`)}),()=>{e&&(e.onchange=null)}}},[a]);let c;!c&&typeof window<`u`&&(c=window.SpeechRecognition||window.webkitSpeechRecognition);let l=!!(a||c&&o!==`denied`),u=J.useRef(null),[d,f]=v(!1,r),p=J.useRef(!1),m=()=>{if(l&&!u.current){let e=new c;e.onstart=()=>{f(!0)},e.onend=()=>{f(!1)},e.onresult=e=>{if(!p.current){let t=e.results?.[0]?.[0]?.transcript;n(t)}p.current=!1},u.current=e}};return[l,g(e=>{e&&!d||(p.current=e,a?i?.(!d):(m(),u.current&&(d?(u.current.stop(),i?.(!1)):(u.current.start(),i?.(!0)))))}),d]}var Yr=J.createContext({}),Xr=()=>({height:0}),Zr=e=>({height:e.scrollHeight});function Qr(e){let{title:t,onOpenChange:n,open:r,children:i,className:a,style:o,classNames:c={},styles:l={},prefixCls:u,closable:f,forceRender:p}=e,{prefixCls:m}=J.useContext(Yr),{direction:h,getPrefixCls:g}=Ut(),_=g(`sender`,u||m),v=`${_}-header`,y=()=>{n?.(!r)};return J.createElement(s,{motionEnter:!0,motionLeave:!0,motionName:`${v}-motion`,leavedClassName:`${v}-motion-hidden`,onEnterStart:Xr,onEnterActive:Zr,onLeaveStart:Zr,onLeaveActive:Xr,visible:r,forceRender:p},({className:e,style:n})=>J.createElement(`div`,{className:d(_,v,e,a,{[`${v}-rtl`]:h===`rtl`}),style:{...n,...o}},(f!==!1||t)&&J.createElement(`div`,{className:d(`${v}-header`,c.header),style:{...l.header}},J.createElement(`div`,{className:`${v}-title`},t),f!==!1&&J.createElement(`div`,{className:`${v}-close`},J.createElement(k,{type:`text`,icon:J.createElement(E,null),size:`small`,onClick:y}))),i&&J.createElement(`div`,{className:d(`${v}-content`,c.content),style:{...l.content}},i)))}var $r=e=>{let{componentCls:t,calc:n}=e,r=`${t}-header`;return{[t]:{[`&${r}-rtl`]:{direction:`rtl`},[`${r}`]:{borderBottomWidth:e.lineWidth,borderBottomStyle:`solid`,borderBottomColor:e.colorBorderInput,[`${r}-header`]:{background:e.colorFillAlter,fontSize:e.fontSize,lineHeight:e.lineHeight,paddingBlock:n(e.paddingSM).sub(e.lineWidthBold).equal(),paddingInlineStart:e.padding,paddingInlineEnd:e.paddingXS,display:`flex`,borderRadius:{_skip_check_:!0,value:n(e.borderRadius).mul(2).equal()},borderEndStartRadius:0,borderEndEndRadius:0,[`${r}-title`]:{flex:`auto`}},[`${r}-content`]:{padding:e.padding}},[`${r}-motion`]:{transition:[`height`,`border`].map(t=>`${t} ${e.motionDurationSlow}`).join(`,`),overflow:`hidden`,"&-enter-start, &-leave-active":{borderBottomColor:`transparent`},"&-hidden":{display:`none`}}}}},ei=e=>{let{componentCls:t,antCls:n,calc:r}=e,i=`${t}-slot`,a=`${n}-input`,o=`${n}-dropdown-trigger`,s=`${t}-slot-input`,c=`${t}-slot-select`,l=`${t}-slot-tag`,d=`${t}-slot-content`,f=`${t}-skill`;return{[t]:{[`${t}-input-slot`]:{outline:`none`,cursor:`text`,whiteSpace:`pre-wrap`,width:`100%`,caretColor:e.colorPrimary,fontSize:e.fontSize,lineHeight:e.lineHeight,"&:empty::before":{content:`attr(data-placeholder)`,color:e.colorTextPlaceholder}},[`${i}:not(${d})`]:{display:`inline-block`,verticalAlign:`middle`,alignItems:`center`,marginBlock:1,height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),wordBreak:`break-all`,marginInline:e.marginXXS},[`${a}${s}`]:{height:`100%`,background:e.colorBgSlot,outline:`none`,color:e.colorTextSlot,borderRadius:e.borderRadius,paddingInline:e.paddingXXS,fontSize:`inherit`,lineHeight:`inherit`,position:`relative`,"&::placeholder":{color:e.colorTextSlotPlaceholder,fontSize:`inherit`,lineHeight:`inherit`},[i]:{display:`inline-flex`,margin:`0 ${u(e.marginXXS)}`,verticalAlign:`bottom`,alignItems:`center`,marginBlock:u(r(e.marginXXS).div(2).equal()),minHeight:e.controlHeightSM,wordBreak:`break-all`}},[c]:{fontSize:e.fontSize,lineHeight:e.lineHeight,paddingInline:e.paddingXXS,transition:`border-color ${e.motionDurationMid}`,position:`relative`,display:`inline-flex`,alignItems:`center`,cursor:`pointer`,background:e.colorBgSlot,height:`100%`,boxSizing:`border-box`,borderRadius:e.borderRadius,color:e.colorTextSlot,border:`1px solid ${e.colorBorderSlot}`,"&.placeholder":{color:e.colorTextSlotPlaceholder},[`${c}`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,padding:`0 ${u(e.paddingXXS)}`,transition:`border-color ${e.motionDurationMid}`,position:`relative`,display:`inline`,cursor:`pointer`,background:e.colorBgSlot,alignItems:`center`,justifyContent:`center`,borderRadius:e.borderRadius,color:e.colorTextSlot,border:`1px solid ${e.colorBorderSlot}`,"&.placeholder":{color:e.colorTextSlotPlaceholder},[`&${o}-open`]:{borderColor:e.colorBorderSlotHover}},[`${c}-value`]:{flex:1,fontSize:e.fontSize,lineHeight:e.lineHeight,"&:empty::before":{content:`attr(data-placeholder)`}},[`${c}-arrow`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSize,lineHeight:e.lineHeight,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},[`${l}`]:{background:e.colorBgSlot,border:`1px solid ${e.colorBorderSlot}`,outline:`none`,color:e.colorTextSlot,borderRadius:e.borderRadius,padding:`0 ${u(e.paddingXXS)}`,fontSize:e.fontSize,lineHeight:e.lineHeight,position:`relative`,cursor:`default`}},[`${c}-arrow`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSize,lineHeight:e.lineHeight,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},[l]:{background:e.colorBgSlot,border:`1px solid ${e.colorBorderSlot}`,outline:`none`,color:e.colorTextSlot,borderRadius:e.borderRadius,padding:`0 ${u(e.paddingXXS)}`,fontSize:e.fontSize,lineHeight:e.lineHeight,height:`100%`,boxSizing:`border-box`,position:`relative`,cursor:`default`},[d]:{height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),caretColor:e.colorPrimary,background:e.colorBgSlot,outline:`none`,color:e.colorTextSlot,borderRadius:e.borderRadius,paddingInline:e.paddingXXS,boxSizing:`border-box`,verticalAlign:`middle`,fontSize:e.fontSize,marginBlock:1,lineHeight:e.lineHeight,display:`inline-block`,position:`relative`,cursor:`text`,"&:empty":{width:`fit-content`,"&::after":{display:`inline-block`,height:`inherit`,content:`attr(data-placeholder)`,color:e.colorTextSlotPlaceholder}}},[`${i}-no-width`]:{userSelect:`none`,width:`3px`,display:`inline-block`,lineHeight:`inherit`},[f]:{display:`inline-block`,verticalAlign:`baseline`,alignItems:`center`,marginBlock:1,height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),wordBreak:`break-all`,paddingInlineEnd:0,paddingInlineStart:0,marginInlineEnd:0,marginInlineStart:-1,[`&${f}-empty`]:{"&::after":{display:`inline-block`,pointerEvents:`none`,height:`inherit`,content:`attr(data-placeholder)`,color:e.colorTextPlaceholder}}},[`${f}-wrapper`]:{height:`100%`,display:`inline-flex`},[`${f}-tag`]:{paddingInline:e.paddingXS,height:`100%`,backgroundColor:e.colorBgSkill,borderRadius:e.borderRadius,color:e.colorPrimary,alignItems:`center`,fontWeight:500,display:`inline-flex`,cursor:`pointer`,gap:e.marginXXS,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorBgSkillHover,[`${f}-tag-close:not(${f}-tag-close-disabled)`]:{color:e.colorPrimaryHover}},"&-close":{fontSize:e.fontSizeSM,display:`inline-flex`,transition:`color ${e.motionDurationMid}`,color:e.colorPrimary},"&-close-disabled":{cursor:`not-allowed`,color:e.colorTextDisabled}},[`${f}-holder`]:{width:e.marginXS,height:`100%`}}}},ti=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-switch`;return{[t]:{[`&${r}-rtl`]:{direction:`rtl`},[`&${r}`]:{display:`inline-block`,[`${n}-btn:not(:disabled):not(${n}-btn-disabled):hover`]:{background:e.switchUncheckedHoverBg,borderColor:e.colorBorder,color:e.colorText},[`&${r}-checked`]:{[`${n}-btn:not(:disabled):not(${n}-btn-disabled):hover`]:{background:e.switchCheckedHoverBg,borderColor:e.colorPrimary,color:e.colorPrimaryText},[`${r}-content`]:{background:e.switchCheckedBg}}}}}},ni=e=>{let{antCls:t,componentCls:n,paddingSM:r,paddingXS:i,paddingXXS:a,lineWidth:o,calc:s}=e;return{[n]:{[`&${n}-main`]:{position:`relative`,width:`100%`,boxSizing:`border-box`,boxShadow:`${e.boxShadowTertiary}`,borderRadius:{_skip_check_:!0,value:s(e.borderRadius).mul(2).equal()},borderColor:e.colorBorderInput,borderWidth:o,borderStyle:`solid`},[`&${n}-disabled`]:{background:e.colorBgContainerDisabled,borderColor:`transparent`},[`&${n}-rtl`]:{direction:`rtl`},[`${n}-content`]:{display:`flex`,gap:i,width:`100%`,paddingBlock:r,paddingInlineStart:r,paddingInlineEnd:r,boxSizing:`border-box`,alignItems:`flex-end`},[`${n}-prefix`]:{flex:`none`},[`${n}-input`]:{paddingInline:0,borderRadius:0,flex:`auto`,alignSelf:`center`,caretColor:e.colorPrimary,fontSize:e.fontSize},[`${n}-actions-list`]:{flex:`none`,display:`flex`,"&-presets":{gap:e.paddingXS}},[`${n}-actions-btn`]:{[`&-disabled:where(${t}-btn-variant-text)`]:{color:e.colorTextActionsDisabled,borderColor:`transparent`},[`&-disabled:not(${t}-btn-variant-text)`]:{background:e.colorBgActionsDisabled,color:e.colorTextLightSolid,borderColor:`transparent`},"&-loading-button":{padding:0,border:0},"&-loading-icon":{height:e.controlHeight,width:e.controlHeight,verticalAlign:`top`},"&-recording-icon":{height:`1.2em`,width:`1.2em`,verticalAlign:`top`}},[`${n}-footer`]:{paddingInlineStart:r,paddingInlineEnd:r,paddingBlockEnd:r,paddingBlockStart:a,boxSizing:`border-box`}}}},ri=dn(`Sender`,e=>{let{paddingXS:t,calc:n}=e,r=_(e,{SenderContentMaxWidth:`calc(100% - ${u(n(t).add(32).equal())})`});return[ni(r),$r(r),ti(r),ei(r)]},e=>{let{colorPrimary:t,colorFillTertiary:n}=e,r=new p(t).setA(.06).toRgbString(),i=new p(t).setA(.08).toRgbString(),a=new p(t).setA(.15).toRgbString(),o=t,s=new p(t).setA(.25).toRgbString(),c=new p(t).setA(.1).toRgbString(),l=r,u=new p(t).setA(.08).toRgbString(),d=new p(n).setA(.04).toRgbString(),f=new p(t).setA(.1).toRgbString(),m=new p(n).setA(.1).toRgbString(),h=`0 4px 12px 0 ${new p(t).setA(.1).toRgbString()}`,g=new p(t).setA(.45).toRgbString();return{colorBgSlot:r,colorBgSkill:i,colorBgSkillHover:a,colorTextSlot:o,colorTextSlotPlaceholder:s,colorBorderSlotHover:c,colorBorderSlot:l,switchCheckedBg:u,switchCheckedHoverBg:f,switchUncheckedHoverBg:d,colorBorderInput:m,boxShadowInput:h,colorBgActionsDisabled:g,colorTextActionsDisabled:g}}),ii={SendButton:Ar,ClearButton:Er,LoadingButton:Or,SpeechButton:Wr},ai=J.forwardRef((e,t)=>{let{prefixCls:n,styles:r={},classNames:i={},className:a,rootClassName:s,style:c,defaultValue:l,value:u,slotConfig:f,readOnly:p,submitType:m=`enter`,onSubmit:h,loading:g,components:_,onCancel:y,onChange:b,suffix:x,onKeyUp:S,onKeyDown:C,disabled:w,allowSpeech:T,prefix:E,footer:D,header:O,onPaste:k,onPasteFile:A,autoSize:j={maxRows:8},placeholder:ee,onFocus:M,onBlur:N,skill:P,...ne}=e,re=(0,In.default)(ne,{attr:!0,aria:!0,data:!0}),ie=J.useId(),ae=Array.isArray(f)||P?.value,{direction:oe,getPrefixCls:se}=Ut(),F=se(`sender`,n),ce=J.useRef(null),I=J.useRef(null);wt(t,()=>({nativeElement:ce.current,inputElement:I.current?.nativeElement,focus:e=>I.current?.focus(e),blur:()=>I.current?.blur(),insert:(...e)=>I.current?.insert?.(...e),clear:()=>I.current?.clear(),getValue:()=>I.current?.getValue()??{value:``,slotConfig:[],skill:void 0}}));let L=Dt(`sender`),le=`${F}-input`,[R,ue]=ri(F),z=d(F,L.className,a,s,L.classNames.root,i.root,R,ue,`${F}-main`,{[`${F}-rtl`]:oe===`rtl`,[`${F}-disabled`]:w}),de=`${F}-actions-btn`,fe=`${F}-actions-list`,[B,pe]=v(l||``,u),me=(e,t,n,r)=>{pe(e),b?.(e,t,n??[],r)},[he,ge,_e]=Jr(e=>{ae?I.current?.insert?.([{type:`text`,value:e}]):me(`${B} ${e}`)},T),V=()=>{if(I?.current&&h&&!g&&!Ce){let e=I.current.getValue();h(e.value,e.slotConfig,e.skill)}},H=()=>{me(``),ae&&I.current?.clear?.()},ve=J.createElement(te,{className:`${fe}-presets`},T&&J.createElement(Wr,null),g?J.createElement(Or,null):J.createElement(Ar,null)),ye=ve;typeof x==`function`?ye=x(ve,{components:ii}):(x||x===!1)&&(ye=x);let be=typeof E==`function`?E(ve,{components:ii}):E||null,xe=typeof O==`function`?O(ve,{components:ii}):O||null,Se=typeof D==`function`?D(ve,{components:ii}):D||null,[Ce,we]=(0,J.useState)(!B),Te={prefixCls:de,onSend:V,onSendDisabled:!B,onClear:H,onClearDisabled:!B,onCancel:y,onCancelDisabled:!g,onSpeech:()=>ge(!1),onSpeechDisabled:!he,speechRecording:_e,disabled:w,setSubmitDisabled:we},Ee=J.useMemo(()=>({value:B,onChange:me,slotConfig:f,onKeyUp:S,onKeyDown:C,onPaste:k,onPasteFile:A,disabled:w,readOnly:p,submitType:m,prefixCls:F,styles:r,classNames:i,autoSize:j,components:_,triggerSend:V,placeholder:ee,onFocus:M,onBlur:N,skill:P,...ne}),[B,me,f,S,C,k,A,w,p,m,F,r,i,j,_,V,ee,M,N,P,ne]),De=e=>{!ae&&e.target!==ce.current?.querySelector(`.${le}`)&&e.preventDefault(),e.target===ce.current?.querySelector(`.${le}`)&&I.current?.focus()};return J.createElement(`div`,o({key:ie,ref:ce,className:z,style:{...L.style,...c,...L.styles.root,...r.root}},re),J.createElement(jr.Provider,{value:Ee},J.createElement(Cr.Provider,{value:Te},xe&&J.createElement(Yr.Provider,{value:{prefixCls:F}},xe),J.createElement(`div`,{className:d(`${F}-content`,i.content),style:r.content,onMouseDown:De},be&&J.createElement(`div`,{className:d(`${F}-prefix`,L.classNames.prefix,i.prefix),style:{...L.styles.prefix,...r.prefix}},be),ae?J.createElement(Ur,{ref:I}):J.createElement(qr,{ref:I}),ye&&J.createElement(`div`,{className:d(fe,L.classNames.suffix,i.suffix),style:{...L.styles.suffix,...r.suffix}},ye)),Se&&J.createElement(`div`,{className:d(`${F}-footer`,L.classNames.footer,i.footer),style:{...L.styles.footer,...r.footer}},Se))))}),oi=J.forwardRef((e,t)=>{let{children:n,className:r,classNames:i={},styles:a={},icon:s,style:c,onChange:l,rootClassName:u,loading:f,defaultValue:p,value:m,checkedChildren:h,unCheckedChildren:g,disabled:_,prefixCls:y,...b}=e,{styles:x={},classNames:S={},prefixCls:C}=J.useContext(jr),w=(0,In.default)(b,{attr:!0,aria:!0,data:!0}),T=J.useId(),{direction:E,getPrefixCls:D}=Ut(),O=D(`sender`,y||C),A=`${O}-switch`,[j,ee]=ri(O),M=J.useRef(null);wt(t,()=>({nativeElement:M.current}));let[N,te]=v(p,m),P=Dt(`sender`),ne=d(O,A,r,u,P.classNames.switch,S.switch,i.root,j,ee,{[`${A}-checked`]:N,[`${A}-rtl`]:E===`rtl`});return J.createElement(`div`,o({ref:M,className:ne,key:T,style:{...c,...P.styles.switch,...x.switch,...a.root}},w),J.createElement(k,{disabled:_,loading:f,className:d(`${A}-content`,i.content),style:a.content,styles:{icon:a.icon,content:a.title},classNames:{icon:i.icon,content:i.title},variant:`outlined`,color:N?`primary`:`default`,icon:s,onClick:()=>{let e=!N;te(e),l?.(e)}},N?h:g,n))}),si=ai;si.Header=Qr,si.Switch=oi;var ci=e=>{let{componentCls:t,calc:n}=e,r=n(e.fontSizeHeading3).mul(e.lineHeightHeading3).equal(),i=n(e.fontSize).mul(e.lineHeight).equal();return{[t]:{gap:e.padding,[`${t}-icon`]:{height:n(r).add(i).add(e.paddingXXS).equal(),display:`flex`,img:{height:`100%`}},[`${t}-content-wrapper`]:{gap:e.paddingXS,flex:`auto`,minWidth:0,[`${t}-title-wrapper`]:{gap:e.paddingXS},[`${t}-title`]:{margin:0},[`${t}-extra`]:{marginInlineStart:`auto`}}}}},li=e=>{let{componentCls:t}=e;return{[t]:{"&-filled":{paddingInline:e.padding,paddingBlock:e.paddingSM,background:e.colorFillContent,borderRadius:e.borderRadiusLG},"&-borderless":{[`${t}-title`]:{fontSize:e.fontSizeHeading3,lineHeight:e.lineHeightHeading3}}}}},ui=dn(`Welcome`,e=>{let t=_(e,{});return[ci(t),li(t)]},()=>({})),di=J.forwardRef((e,t)=>{let{prefixCls:n,rootClassName:r,className:i,style:a,variant:o=`filled`,classNames:s={},styles:c={},icon:l,title:u,description:f,extra:p}=e,{direction:m,getPrefixCls:h}=Ut(),g=h(`welcome`,n),_=Dt(`welcome`),[v,y]=ui(g),b=J.useMemo(()=>{if(!l)return null;let e=l;return typeof l==`string`&&l.startsWith(`http`)&&(e=J.createElement(`img`,{src:l,alt:`icon`})),J.createElement(`div`,{className:d(`${g}-icon`,_.classNames.icon,s.icon),style:c.icon},e)},[l]),x=J.useMemo(()=>u?J.createElement(C.Title,{level:4,className:d(`${g}-title`,_.classNames.title,s.title),style:c.title},u):null,[u]),S=J.useMemo(()=>p?J.createElement(`div`,{className:d(`${g}-extra`,_.classNames.extra,s.extra),style:c.extra},p):null,[p]);return J.createElement(te,{ref:t,className:d(g,_.className,i,r,s.root,v,y,`${g}-${o}`,{[`${g}-rtl`]:m===`rtl`}),style:{...a,...c.root}},b,J.createElement(te,{vertical:!0,className:`${g}-content-wrapper`},p?J.createElement(te,{align:`flex-start`,className:`${g}-title-wrapper`},x,S):x,f&&J.createElement(C.Text,{className:d(`${g}-description`,_.classNames.description,s.description),style:c.description},f)))}),fi={_chatMessagesStores:new Map,get:e=>fi._chatMessagesStores.get(e),set:(e,t)=>{fi._chatMessagesStores.set(e,t)},delete:e=>{fi._chatMessagesStores.delete(e)},getMessages:e=>fi._chatMessagesStores.get(e)?.getMessages()},pi={_allConversationStores:new Map,set:(e,t)=>{pi._allConversationStores.set(e,t)},delete:e=>{pi._allConversationStores.delete(e)},getConversation:e=>{for(let t of pi._allConversationStores.values())if(t){let n=t.getConversation(e);if(n)return n}}},mi=class{conversations=[];listeners=[];storeKey;activeConversationKey;emitListeners(){this.listeners.forEach(e=>{e()})}constructor(e,t){this.setConversations(e),this.storeKey=Math.random().toString(),pi.set(this.storeKey,this),this.activeConversationKey=t}setActiveConversationKey=e=>(this.activeConversationKey=e,this.emitListeners(),!0);setConversations=e=>(this.conversations=[...e],this.emitListeners(),!0);getConversation=e=>this.conversations.find(t=>t.key===e);addConversation=(e,t)=>this.getConversation(e.key)?!1:(this.setConversations(t===`prepend`?[e,...this.conversations]:[...this.conversations,e]),!0);setConversation=(e,t)=>{let n=this.getConversation(e);return n?(Object.assign(n,t),this.setConversations([...this.conversations]),!0):!1};removeConversation=e=>{let t=this.conversations.findIndex(t=>t.key===e);return t===-1?!1:(this.conversations.splice(t,1),this.setConversations([...this.conversations]),!0)};getMessages=e=>fi.getMessages(e);getSnapshot=()=>this.conversations;getActiveConversationKey=()=>this.activeConversationKey;subscribe=e=>(this.listeners.push(e),()=>{this.listeners=this.listeners.filter(t=>t!==e)});destroy=()=>{pi.delete(this.storeKey)}};function hi(e){let[t]=(0,J.useState)(()=>new mi(e?.defaultConversations||[],e?.defaultActiveConversationKey||``));return(0,J.useEffect)(()=>()=>{t.destroy()},[]),{conversations:(0,J.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getSnapshot),activeConversationKey:(0,J.useSyncExternalStore)(t.subscribe,t.getActiveConversationKey,t.getActiveConversationKey),setActiveConversationKey:t.setActiveConversationKey,addConversation:t.addConversation,removeConversation:t.removeConversation,setConversation:t.setConversation,getConversation:t.getConversation,setConversations:t.setConversations,getMessages:t.getMessages}}var gi=` + +`,_i=` +`,vi=`:`,yi=e=>(e??``).trim()!==``;function bi(e=gi){let t=``;return new TransformStream({transform(n,r){t+=n;let i=t.split(e);i.slice(0,-1).forEach(e=>{yi(e)&&r.enqueue(e)}),t=i[i.length-1]},flush(e){yi(t)&&e.enqueue(t)}})}function xi(e=_i,t=vi){return new TransformStream({transform(n,r){let i=n.split(e).reduce((e,n)=>{let r=n.indexOf(t);if(r===-1)return console.warn(`The key-value separator "${t}" is not found in the sse line: ${n} !`),e;let i=n.slice(0,r).trim();if(!yi(i))return e;let a=n.slice(r+1).trim();return{...e,[i]:a}},{});Object.keys(i).length!==0&&r.enqueue(i)}})}function Si(){if(typeof TextDecoderStream<`u`)return new TextDecoderStream;let e=new TextDecoder(`utf-8`);return new TransformStream({transform(t,n){n.enqueue(e.decode(t,{stream:!0}))},flush(t){t.enqueue(e.decode())}})}function Ci(e){let{readableStream:t,transformStream:n,streamSeparator:r,partSeparator:i,kvSeparator:a}=e;if(!(t instanceof ReadableStream))throw Error(`The options.readableStream must be an instance of ReadableStream.`);let o=Si(),s=n?t.pipeThrough(o).pipeThrough(n):t.pipeThrough(o).pipeThrough(bi(r)).pipeThrough(xi(i,a));return s[Symbol.asyncIterator]=async function*(){let e=this.getReader();for(;;){let{done:t,value:n}=await e.read();if(t)break;n&&(yield n)}},s}var wi=async(e,t)=>{let{fetch:n=globalThis.fetch,middlewares:r={},...i}=t;if(typeof n!=`function`)throw Error(`The options.fetch must be a typeof fetch function!`);let a=[e,i];typeof r.onRequest==`function`&&(a=await r.onRequest(...a));let o=await n(...a);if(typeof r.onResponse==`function`){let e=await r.onResponse(o);if(!(e instanceof Response))throw Error(`The options.onResponse must return a Response instance!`);o=e}if(!o.ok)throw Error(`Fetch failed with status ${o.status}`);if(!o.body)throw Error(`The response body is empty.`);return o},Ti={manual:!1,headers:{"Content-Type":`application/json`}},Ei=`Last-Event-ID`,Di=class{baseURL;options;constructor(e,t){if(!e||typeof e!=`string`)throw Error(`The baseURL is not valid!`);this.baseURL=e,this.options=t||{}}},Oi=class extends Di{_asyncHandler;timeoutHandler;_isTimeout=!1;streamTimeoutHandler;_isStreamTimeout=!1;abortController;_isRequesting=!1;_manual=!1;lastManualParams;retryTimes=0;retryTimer;lastEventId=void 0;get asyncHandler(){return this._asyncHandler}get isTimeout(){return this._isTimeout}set isTimeout(e){this._isTimeout=e}get isStreamTimeout(){return this._isStreamTimeout}set isStreamTimeout(e){this._isStreamTimeout=e}get isRequesting(){return this._isRequesting}get manual(){return this._manual}constructor(e,t){super(e,t),this._manual=t?.manual||!1,this.manual||this.init()}run(e){return this.manual?(this.resetRetry(),this.lastManualParams=e,this.init(e),!0):(console.warn(`The request is not manual, so it cannot be run!`),!1)}abort(){clearTimeout(this.timeoutHandler),clearTimeout(this.streamTimeoutHandler),this.abortController.abort()}init(e,t){this.abortController=new AbortController;let{callbacks:n,params:r,headers:i={},transformStream:a,fetch:o,timeout:s,streamTimeout:c,middlewares:l,streamSeparator:u,partSeparator:d,kvSeparator:f,...p}=this.options,m=Object.assign({},Ti.headers||{},i,t||{}),h={...p,method:`POST`,body:JSON.stringify({...r,...e||{}}),params:{...r,...e},headers:m,signal:this.abortController.signal,middlewares:l};s&&s>0&&(this.timeoutHandler=window.setTimeout(()=>{this.isTimeout=!0,this.finishRequest(),n?.onError?.(Error(`TimeoutError`))},s)),this.startRequest(),this._asyncHandler=wi(this.baseURL,{fetch:o,...h}).then(async e=>{if(clearTimeout(this.timeoutHandler),this.isTimeout)return;if(a){let t=a;typeof a==`function`&&(t=a(this.baseURL,e.headers)),await this.customResponseHandler(e,n,t,c,u,d,f);return}let t=e.headers.get(`content-type`)||``;switch(t.split(`;`)[0].trim()){case`text/event-stream`:await this.sseResponseHandler(e,n,c,u,d,f);break;case`application/json`:await this.jsonResponseHandler(e,n);break;default:throw Error(`The response content-type: ${t} is not support!`)}}).catch(e=>{clearTimeout(this.timeoutHandler),this.finishRequest();let t=e instanceof Error||e instanceof DOMException?e:Error(`Unknown error!`),r=n?.onError?.(t);if(t.name!==`AbortError`){let e=typeof r==`number`?r:this.options.retryInterval;if(e&&e>0){if(typeof this.options.retryTimes==`number`&&this.retryTimes>=this.options.retryTimes)return;clearTimeout(this.retryTimer),this.retryTimer=setTimeout(()=>{let e={};this.lastEventId!==void 0&&(e[Ei]=this.lastEventId),this.init(this.lastManualParams,e)},e),this.retryTimes+=1}}})}startRequest(){this._isRequesting=!0}finishRequest(){this._isRequesting=!1}customResponseHandler=async(e,t,n,r,i,a,o)=>{let s=Ci({readableStream:e.body,transformStream:n,streamSeparator:i,partSeparator:a,kvSeparator:o});await this.processStream(s,e,t,r)};sseResponseHandler=async(e,t,n,r,i,a)=>{let o=Ci({readableStream:e.body,streamSeparator:r,partSeparator:i,kvSeparator:a});await this.processStream(o,e,t,n)};async processStream(e,t,n,r){let i=[],a=e[Symbol.asyncIterator](),o;do{if(r&&(this.streamTimeoutHandler=window.setTimeout(()=>{this.isStreamTimeout=!0,this.finishRequest(),n?.onError?.(Error(`StreamTimeoutError`),void 0,t.headers)},r)),o=await a.next(),clearTimeout(this.streamTimeoutHandler),this.isStreamTimeout)break;o.value&&(i.push(o.value),n?.onUpdate?.(o.value,t.headers),o?.value?.id!==void 0&&(this.lastEventId=o.value.id))}while(!o.done);if(r&&(clearTimeout(this.streamTimeoutHandler),this.isStreamTimeout)){this.finishRequest();return}this.finishRequest(),n?.onSuccess?.(i,t.headers)}jsonResponseHandler=async(e,t)=>{let n=await e.json();if(n?.success===!1){let r=Error(n.message||`System error`);r.name=n.name||`SystemError`,t?.onError?.(r,n,e.headers)}else t?.onUpdate?.(n,e.headers),this.finishRequest(),t?.onSuccess?.([n],e.headers)};resetRetry(){clearTimeout(this.retryTimer),this.retryTimes=0,this.lastEventId=void 0}};function ki(e,t){return new Oi(e,t)}function Ai(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ji=Ai();function Mi(e){ji=e}var Ni={exec:()=>null};function X(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Pi.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Pi={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},Fi=/^(?:[ \t]*(?:\n|$))+/,Ii=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Li=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ri=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,zi=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Bi=/(?:[*+-]|\d{1,9}[.)])/,Vi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Hi=X(Vi).replace(/bull/g,Bi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Ui=X(Vi).replace(/bull/g,Bi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Wi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Gi=/^[^\n]+/,Ki=/(?!\s*\])(?:\\.|[^\[\]\\])+/,qi=X(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Ki).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ji=X(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Bi).getRegex(),Yi=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Xi=/|$))/,Zi=X(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Xi).replace(`tag`,Yi).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qi=X(Wi).replace(`hr`,Ri).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Yi).getRegex(),$i={blockquote:X(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Qi).getRegex(),code:Ii,def:qi,fences:Li,heading:zi,hr:Ri,html:Zi,lheading:Hi,list:Ji,newline:Fi,paragraph:Qi,table:Ni,text:Gi},ea=X(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Ri).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Yi).getRegex(),ta={...$i,lheading:Ui,table:ea,paragraph:X(Wi).replace(`hr`,Ri).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,ea).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Yi).getRegex()},na={...$i,html:X(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Xi).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ni,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:X(Wi).replace(`hr`,Ri).replace(`heading`,` *#{1,6} *[^ +]`).replace(`lheading`,Hi).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},ra=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ia=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,aa=/^( {2,}|\\)\n(?!\s*$)/,oa=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,ha=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ga=X(ha,`u`).replace(/punct/g,sa).getRegex(),_a=X(ha,`u`).replace(/punct/g,da).getRegex(),va=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,ya=X(va,`gu`).replace(/notPunctSpace/g,la).replace(/punctSpace/g,ca).replace(/punct/g,sa).getRegex(),ba=X(va,`gu`).replace(/notPunctSpace/g,pa).replace(/punctSpace/g,fa).replace(/punct/g,da).getRegex(),xa=X(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,la).replace(/punctSpace/g,ca).replace(/punct/g,sa).getRegex(),Sa=X(/\\(punct)/,`gu`).replace(/punct/g,sa).getRegex(),Ca=X(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),wa=X(Xi).replace(`(?:-->|$)`,`-->`).getRegex(),Ta=X(`^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^`).replace(`comment`,wa).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ea=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Da=X(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,Ea).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Oa=X(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Ea).replace(`ref`,Ki).getRegex(),ka=X(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Ki).getRegex(),Aa={_backpedal:Ni,anyPunctuation:Sa,autolink:Ca,blockSkip:ma,br:aa,code:ia,del:Ni,emStrongLDelim:ga,emStrongRDelimAst:ya,emStrongRDelimUnd:xa,escape:ra,link:Da,nolink:ka,punctuation:ua,reflink:Oa,reflinkSearch:X(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Oa).replace(`nolink`,ka).getRegex(),tag:Ta,text:oa,url:Ni},ja={...Aa,link:X(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Ea).getRegex(),reflink:X(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Ea).getRegex()},Ma={...Aa,emStrongRDelimAst:ba,emStrongLDelim:_a,url:X(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,`i`).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":`>`,'"':`"`,"'":`'`},La=e=>Ia[e];function Ra(e,t){if(t){if(Pi.escapeTest.test(e))return e.replace(Pi.escapeReplace,La)}else if(Pi.escapeTestNoEncode.test(e))return e.replace(Pi.escapeReplaceNoEncode,La);return e}function za(e){try{e=encodeURI(e).replace(Pi.percentDecode,`%`)}catch{return null}return e}function Ba(e,t){let n=e.replace(Pi.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Pi.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}function Ua(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Wa(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(` +`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(` +`)}var Ga=class{options;rules;lexer;constructor(e){this.options=e||ji}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:Va(e,` +`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Wa(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Va(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:Va(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Va(t[0],` +`).split(` +`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,e=>` `.repeat(3*e.length)),l=e.split(` +`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+` +`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){let f=e.split(` +`,1)[0],p;if(l=f,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),p=l):p=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||t.test(l)||n.test(l))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=` +`+p.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=` +`+l}!u&&!l.trim()&&(u=!0),r+=f+` +`,e=e.substring(f.length+1),c=p.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let f=null,p;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p=f[0]!==`[ ] `,s=s.replace(this.rules.other.listReplaceTask,``))),i.items.push({type:`list_item`,raw:r,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e=0;ee.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Va(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Ha(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Ua(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Ua(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(r&&!(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},Ka=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ji,this.options.tokenizer=this.options.tokenizer||new Ga,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Pi,block:Pa.normal,inline:Fa.normal};this.options.pedantic?(t.block=Pa.pedantic,t.inline=Fa.pedantic):this.options.gfm&&(t.block=Pa.gfm,this.options.breaks?t.inline=Fa.breaks:t.inline=Fa.gfm),this.tokenizer.rules=t}static get rules(){return{block:Pa,inline:Fa}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Pi.carriageReturn,` +`),this.blockTokens(e,this.tokens);for(let e=0;e(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=` +`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=` +`+r.raw,n.text+=` +`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=` +`+r.raw,n.text+=` +`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=` +`+r.raw,a.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=` +`+r.raw,n.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,a=``;for(;e;){i||(a=``),i=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,a)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(o)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(a=r.raw.slice(-1)),i=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},qa=class{options;parser;constructor(e){this.options=e||ji}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Pi.notSpaceStart)?.[0],i=e.replace(Pi.endingNewline,``)+` +`;return r?`
`+(n?i:Ra(i,!0))+`
+`:`
`+(n?i:Ra(i,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t +`+r+` +`}listitem(e){let t=``;if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type===`paragraph`?(e.tokens[0].text=n+` `+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type===`text`&&(e.tokens[0].tokens[0].text=n+` `+Ra(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:n+` `,text:n+` `,escaped:!0}):t+=n+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • +`}checkbox({checked:e}){return``}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    +`}table(e){let t=``,n=``;for(let t=0;t${r}`,` + +`+t+` +`+r+`
    +`}tablerow({text:e}){return` +${e} +`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${Ra(e,!0)}`}br(e){return`
    `}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=za(e);if(i===null)return r;e=i;let a=`
    `+r+``,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=za(e);if(i===null)return Ra(n);e=i;let a=`${n}`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Ra(e.text)}},Ja=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}},Ya=class e{options;renderer;textRenderer;constructor(e){this.options=e||ji,this.options.renderer=this.options.renderer||new qa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ja}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n=``;for(let r=0;r{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new qa(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Ga(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Xa;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];Xa.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then(e=>a.call(t,e));let n=i.call(t,e);return a.call(t,n)}:t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Ka.lex(e,t??this.defaults)}parser(e,t){return Ya.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(t==null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let o=i.hooks?i.hooks.provideLexer():e?Ka.lex:Ka.lexInline,s=i.hooks?i.hooks.provideParser():e?Ya.parse:Ya.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(e=>o(e,i)).then(e=>i.hooks?i.hooks.processAllTokens(e):e).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>s(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let e=o(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=s(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let e=`

    An error occurred:

    `+Ra(n.message+``,!0)+`
    `;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},Qa=new Za;function Z(e,t){return Qa.parse(e,t)}Z.options=Z.setOptions=function(e){return Qa.setOptions(e),Z.defaults=Qa.defaults,Mi(Z.defaults),Z},Z.getDefaults=Ai,Z.defaults=ji,Z.use=function(...e){return Qa.use(...e),Z.defaults=Qa.defaults,Mi(Z.defaults),Z},Z.walkTokens=function(e,t){return Qa.walkTokens(e,t)},Z.parseInline=Qa.parseInline,Z.Parser=Ya,Z.parser=Ya.parse,Z.Renderer=qa,Z.TextRenderer=Ja,Z.Lexer=Ka,Z.lexer=Ka.lex,Z.Tokenizer=Ga,Z.Hooks=Xa,Z.parse=Z,Z.options,Z.setOptions,Z.use,Z.walkTokens,Z.parseInline,Ya.parse,Ka.lex;var $a={escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeTest:/[&<>"'/]/,notSpaceStart:/^\S*/,endingNewline:/\n$/,escapeReplace:/[&<>"'/]/g,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,completeFencedCode:/^ {0,3}(`{3,}|~{3,})([\s\S]*?)\n {0,3}\1[ \n\t]*$/},eo={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},to=e=>eo[e];function no(e,t){if(t){if($a.escapeTest.test(e))return e.replace($a.escapeReplace,to)}else if($a.escapeTestNoEncode.test(e))return e.replace($a.escapeReplaceNoEncode,to);return e}var ro=Symbol(`tailMarker`),io=`X_MD_NL_`,ao=``,oo=/\uE000X_MD_NL_\d+\uE001/g,so=class{options;markdownInstance;injectTail=!1;constructor(e={}){this.options=e,this.markdownInstance=new Za,this.configureLinkRenderer(),this.configureParagraphRenderer(),this.configureCodeRenderer(),this.configureHtmlEscapeRenderer(),this.configureTailInjection(),this.markdownInstance.use(e.markedConfig||{})}configureHtmlEscapeRenderer(){this.options.escapeRawHtml&&this.markdownInstance.use({renderer:{html(e){let{raw:t=``,text:n=``}=e;return no(t||n,!0)}}})}configureLinkRenderer(){this.options.openLinksInNewTab&&this.markdownInstance.use({renderer:{link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n);return`${r}`}}})}configureParagraphRenderer(){let{paragraphTag:e}=this.options;e&&this.markdownInstance.use({renderer:{paragraph({tokens:t}){return`<${e}>${this.parser.parseInline(t)}\n`}}})}configureCodeRenderer(){this.markdownInstance.use({renderer:{code({text:e,raw:t,lang:n,escaped:r,codeBlockStyle:i}){let a=(n||``).trim(),o=a.match($a.notSpaceStart)?.[0],s=`${e.replace($a.endingNewline,``)}\n`,c=i===`indented`||$a.completeFencedCode.test(t)?`done`:`loading`,l=r?s:no(s,!0),u=o?` class="language-${no(o)}"`:``;return`
    ${l}
    \n`}}})}configureTailInjection(){let e=this;this.markdownInstance.use({hooks:{processAllTokens(t){if(!e.injectTail)return t;let n=e.findLastTextToken(t);return n&&(n[ro]=!0),t}},renderer:{text(e){let t=`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`text`in e?e.text:``;return e[ro]?`${t}`:t}}})}protectCustomTags(e,t){let n=new Map,r=Object.keys(this.options.components||{});if(r.length===0)return{protected:e,placeholders:n};let i=0,a=e=>e.replace(/\n/g,()=>{let e=`${io}${i++}${ao}`;return n.set(e,` +`),e}),o=r.map(e=>e.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),s=RegExp(`<(${o})(?:\\s[^>]*)?>`,`gi`),c=RegExp(``,`gi`),l=[],u=s.exec(e);for(;u!==null;)l.push({index:u.index,type:`open`,tagName:u[1].toLowerCase(),match:u[0]}),u=s.exec(e);for(c.lastIndex=0,u=c.exec(e);u!==null;)l.push({index:u.index,type:`close`,tagName:u[1].toLowerCase(),match:u[0]}),u=c.exec(e);l.sort((e,t)=>e.index-t.index);let d=[],f=[],p=0;for(let n of l)if(n.type===`open`)n.match.endsWith(`/>`)||d.push({tagName:n.tagName,start:n.index,openTag:n.match});else if(n.type===`close`&&d.length>0&&d[d.length-1].tagName===n.tagName){let r=d.pop();if(d.length===0){let i=r.start,o=n.index+n.match.length,s=r.openTag,c=n.match,l=e.slice(i+s.length,n.index);if(pa(e));f.push(s+e+c)}else f.push(s+l+c);p=o}}return pt.get(e)??e)}findLastNonEmptyToken(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.type===`list`&&`items`in n&&Array.isArray(n.items))for(let e=n.items.length-1;e>=0;e--){let t=n.items[e];if(`tokens`in t&&t.tokens&&t.tokens.length>0){let e=this.findLastNonEmptyToken(t.tokens);if(e)return e}}if(`tokens`in n&&n.tokens&&n.tokens.length>0){let e=this.findLastNonEmptyToken(n.tokens);if(e)return e}if(n.type===`text`){if((`text`in n?n.text:``).trim())return n}else if(n.type===`html`||n.type===`tag`)return n}return null}findLastTextToken(e){let t=this.findLastNonEmptyToken(e);return t?.type===`text`?t:null}parse(e,t){if(this.injectTail=t?.injectTail??!1,this.options.protectCustomTagNewlines||this.options.disableCustomTagBlockMarkdown){let{protected:t,placeholders:n}=this.protectCustomTags(e,!!this.options.disableCustomTagBlockMarkdown),r=this.markdownInstance.parse(t);return this.restorePlaceholders(r,n)}return this.markdownInstance.parse(e)}},co=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(function(e){e.Root=`root`,e.Text=`text`,e.Directive=`directive`,e.Comment=`comment`,e.Script=`script`,e.Style=`style`,e.Tag=`tag`,e.CDATA=`cdata`,e.Doctype=`doctype`})(t=e.ElementType||={});function n(e){return e.type===t.Tag||e.type===t.Script||e.type===t.Style}e.isTag=n,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})),lo=t((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=e&&e.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),n}(i);e.NodeWithChildren=l;var u=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=r.ElementType.CDATA,t}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),n}(l);e.CDATA=u;var d=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=r.ElementType.Root,t}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),n}(l);e.Document=d;var f=function(e){t(n,e);function n(t,n,i,a){i===void 0&&(i=[]),a===void 0&&(a=t===`script`?r.ElementType.Script:t===`style`?r.ElementType.Style:r.ElementType.Tag);var o=e.call(this,i)||this;return o.name=t,o.attribs=n,o.type=a,o}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){return{name:t,value:e.attribs[t],namespace:e[`x-attribsNamespace`]?.[t],prefix:e[`x-attribsPrefix`]?.[t]}})},enumerable:!1,configurable:!0}),n}(l);e.Element=f;function p(e){return(0,r.isTag)(e)}e.isTag=p;function m(e){return e.type===r.ElementType.CDATA}e.isCDATA=m;function h(e){return e.type===r.ElementType.Text}e.isText=h;function g(e){return e.type===r.ElementType.Comment}e.isComment=g;function _(e){return e.type===r.ElementType.Directive}e.isDirective=_;function v(e){return e.type===r.ElementType.Root}e.isDocument=v;function y(e){return Object.prototype.hasOwnProperty.call(e,`children`)}e.hasChildren=y;function b(e,t){t===void 0&&(t=!1);var r;if(h(e))r=new o(e.data);else if(g(e))r=new s(e.data);else if(p(e)){var i=t?x(e.children):[],a=new f(e.name,n({},e.attribs),i);i.forEach(function(e){return e.parent=a}),e.namespace!=null&&(a.namespace=e.namespace),e[`x-attribsNamespace`]&&(a[`x-attribsNamespace`]=n({},e[`x-attribsNamespace`])),e[`x-attribsPrefix`]&&(a[`x-attribsPrefix`]=n({},e[`x-attribsPrefix`])),r=a}else if(m(e)){var i=t?x(e.children):[],l=new u(i);i.forEach(function(e){return e.parent=l}),r=l}else if(v(e)){var i=t?x(e.children):[],y=new d(i);i.forEach(function(e){return e.parent=y}),e[`x-mode`]&&(y[`x-mode`]=e[`x-mode`]),r=y}else if(_(e)){var b=new c(e.name,e.data);e[`x-name`]!=null&&(b[`x-name`]=e[`x-name`],b[`x-publicId`]=e[`x-publicId`],b[`x-systemId`]=e[`x-systemId`]),r=b}else throw Error(`Not implemented yet: ${e.type}`);return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}e.cloneNode=b;function x(e){for(var t=e.map(function(e){return b(e,!0)}),n=1;n{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var r=co(),i=lo();n(lo(),e);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},o=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof t==`function`&&(n=t,t=a),typeof e==`object`&&(t=e,e=void 0),this.callback=e??null,this.options=t??a,this.elementCB=n??null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?r.ElementType.Tag:void 0,a=new i.Element(e,t,void 0,n);this.addNode(a),this.tagStack.push(a)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===r.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=e;return}var t=new i.Comment(e);this.addNode(t),this.lastNode=t},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(``),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if(typeof this.callback==`function`)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();e.DomHandler=o,e.default=o})),fo=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=e.CARRIAGE_RETURN_PLACEHOLDER=e.CARRIAGE_RETURN_REGEX=e.CARRIAGE_RETURN=e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.CASE_SENSITIVE_TAG_NAMES=`animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.linearGradient.radialGradient.textPath`.split(`.`),e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,t){return e[t.toLowerCase()]=t,e},{}),e.CARRIAGE_RETURN=`\r`,e.CARRIAGE_RETURN_REGEX=new RegExp(e.CARRIAGE_RETURN,`g`),e.CARRIAGE_RETURN_PLACEHOLDER=`__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_${Date.now().toString()}__`,e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER,`g`)})),po=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatAttributes=i,e.hasOpenTag=o,e.escapeSpecialCharacters=s,e.revertEscapedCharacters=c,e.formatDOM=l;var t=uo(),n=fo();function r(e){return n.CASE_SENSITIVE_TAG_NAMES_MAP[e]}function i(e){for(var t={},n=0,r=e.length;n`||i===` `||i===` `||i===` +`||i===`\r`||i===`/`}function s(e){return e.replace(n.CARRIAGE_RETURN_REGEX,n.CARRIAGE_RETURN_PLACEHOLDER)}function c(e){return e.replace(n.CARRIAGE_RETURN_PLACEHOLDER_REGEX,n.CARRIAGE_RETURN)}function l(e,n,r){n===void 0&&(n=null);for(var o=[],s,u=0,d=e.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.default=h;var t=po(),n=`html`,r=`head`,i=`body`,a=/<([a-zA-Z]+[0-9]?)/,o=function(e,t){throw Error("This browser does not support `document.implementation.createHTMLDocument`")},s=function(e,t){throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},c=typeof window==`object`&&window.DOMParser;if(typeof c==`function`){var l=new c,u=`text/html`;s=function(e,t){return t&&(e=`<${t}>${e}`),l.parseFromString(e,u)},o=s}if(typeof document==`object`&&document.implementation){var d=document.implementation.createHTMLDocument();o=function(e,t){if(t){var n=d.documentElement.querySelector(t);return n&&(n.innerHTML=e),d}return d.documentElement.innerHTML=e,d}}var f=typeof document==`object`&&document.createElement(`template`),p;f&&f.content&&(p=function(e){return f.innerHTML=e,f.content.childNodes});var m=function(){return document.createDocumentFragment().childNodes};function h(e){var c,l;e=(0,t.escapeSpecialCharacters)(e);var u=(a.exec(e)?.[1])?.toLowerCase();switch(u){case n:var d=s(e);if(!(0,t.hasOpenTag)(e,r)){var f=d.querySelector(r);(c=f?.parentNode)==null||c.removeChild(f)}if(!(0,t.hasOpenTag)(e,i)){var f=d.querySelector(i);(l=f?.parentNode)==null||l.removeChild(f)}return d.querySelectorAll(n);case r:case i:var h=o(e).querySelectorAll(u);return(0,t.hasOpenTag)(e,i)&&(0,t.hasOpenTag)(e,r)?h[0].parentNode?.childNodes??m():h;default:if(p)return p(e);var f=o(e,i).querySelector(i);return f?.childNodes??m()}}})),ho=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=t(mo()),r=po(),i=/<(![a-zA-Z\s]+)>/;function a(e){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];var t=i.exec(e),a=t?t[1]:void 0;return(0,r.formatDOM)((0,n.default)(e),null,a)}})),go=t((e=>{e.SAME=0,e.CAMELCASE=1,e.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":`acceptCharset`,accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:`className`,classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:`htmlFor`,form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":`httpEquiv`,icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":`accentHeight`,accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":`alignmentBaseline`,allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":`arabicForm`,ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":`baselineShift`,baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":`capHeight`,clip:0,clipPath:1,"clip-path":`clipPath`,clipPathUnits:1,clipRule:1,"clip-rule":`clipRule`,color:0,colorInterpolation:1,"color-interpolation":`colorInterpolation`,colorInterpolationFilters:1,"color-interpolation-filters":`colorInterpolationFilters`,colorProfile:1,"color-profile":`colorProfile`,colorRendering:1,"color-rendering":`colorRendering`,contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":`dominantBaseline`,dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":`enableBackground`,end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":`fillOpacity`,fillRule:1,"fill-rule":`fillRule`,filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":`floodOpacity`,floodColor:1,"flood-color":`floodColor`,focusable:0,fontFamily:1,"font-family":`fontFamily`,fontSize:1,"font-size":`fontSize`,fontSizeAdjust:1,"font-size-adjust":`fontSizeAdjust`,fontStretch:1,"font-stretch":`fontStretch`,fontStyle:1,"font-style":`fontStyle`,fontVariant:1,"font-variant":`fontVariant`,fontWeight:1,"font-weight":`fontWeight`,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":`glyphName`,glyphOrientationHorizontal:1,"glyph-orientation-horizontal":`glyphOrientationHorizontal`,glyphOrientationVertical:1,"glyph-orientation-vertical":`glyphOrientationVertical`,glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":`horizAdvX`,horizOriginX:1,"horiz-origin-x":`horizOriginX`,ideographic:0,imageRendering:1,"image-rendering":`imageRendering`,in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":`letterSpacing`,lightingColor:1,"lighting-color":`lightingColor`,limitingConeAngle:1,local:0,markerEnd:1,"marker-end":`markerEnd`,markerHeight:1,markerMid:1,"marker-mid":`markerMid`,markerStart:1,"marker-start":`markerStart`,markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":`overlinePosition`,overlineThickness:1,"overline-thickness":`overlineThickness`,paintOrder:1,"paint-order":`paintOrder`,panose1:0,"panose-1":`panose1`,pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":`pointerEvents`,points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":`renderingIntent`,repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":`shapeRendering`,slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":`stopColor`,stopOpacity:1,"stop-opacity":`stopOpacity`,strikethroughPosition:1,"strikethrough-position":`strikethroughPosition`,strikethroughThickness:1,"strikethrough-thickness":`strikethroughThickness`,string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":`strokeDasharray`,strokeDashoffset:1,"stroke-dashoffset":`strokeDashoffset`,strokeLinecap:1,"stroke-linecap":`strokeLinecap`,strokeLinejoin:1,"stroke-linejoin":`strokeLinejoin`,strokeMiterlimit:1,"stroke-miterlimit":`strokeMiterlimit`,strokeWidth:1,"stroke-width":`strokeWidth`,strokeOpacity:1,"stroke-opacity":`strokeOpacity`,suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":`textAnchor`,textDecoration:1,"text-decoration":`textDecoration`,textLength:1,textRendering:1,"text-rendering":`textRendering`,to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":`underlinePosition`,underlineThickness:1,"underline-thickness":`underlineThickness`,unicode:0,unicodeBidi:1,"unicode-bidi":`unicodeBidi`,unicodeRange:1,"unicode-range":`unicodeRange`,unitsPerEm:1,"units-per-em":`unitsPerEm`,unselectable:0,vAlphabetic:1,"v-alphabetic":`vAlphabetic`,values:0,vectorEffect:1,"vector-effect":`vectorEffect`,version:0,vertAdvY:1,"vert-adv-y":`vertAdvY`,vertOriginX:1,"vert-origin-x":`vertOriginX`,vertOriginY:1,"vert-origin-y":`vertOriginY`,vHanging:1,"v-hanging":`vHanging`,vIdeographic:1,"v-ideographic":`vIdeographic`,viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":`vMathematical`,vocab:0,widths:0,wordSpacing:1,"word-spacing":`wordSpacing`,writingMode:1,"writing-mode":`writingMode`,x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":`xHeight`,xlinkActuate:1,"xlink:actuate":`xlinkActuate`,xlinkArcrole:1,"xlink:arcrole":`xlinkArcrole`,xlinkHref:1,"xlink:href":`xlinkHref`,xlinkRole:1,"xlink:role":`xlinkRole`,xlinkShow:1,"xlink:show":`xlinkShow`,xlinkTitle:1,"xlink:title":`xlinkTitle`,xlinkType:1,"xlink:type":`xlinkType`,xmlBase:1,"xml:base":`xmlBase`,xmlLang:1,"xml:lang":`xmlLang`,xmlns:0,"xml:space":`xmlSpace`,xmlnsXlink:1,"xmlns:xlink":`xmlnsXlink`,xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}})),_o=t((e=>{var t=0,n=1,r=2,i=3,a=4,o=5,s=6;function c(e){return u.hasOwnProperty(e)?u[e]:null}function l(e,t,n,o,s,c,l){this.acceptsBooleans=t===r||t===i||t===a,this.attributeName=o,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=l}var u={};[`children`,`dangerouslySetInnerHTML`,`defaultValue`,`defaultChecked`,`innerHTML`,`suppressContentEditableWarning`,`suppressHydrationWarning`,`style`].forEach(e=>{u[e]=new l(e,t,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(([e,t])=>{u[e]=new l(e,n,!1,t,null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(e=>{u[e]=new l(e,r,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(e=>{u[e]=new l(e,r,!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`].forEach(e=>{u[e]=new l(e,i,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(e=>{u[e]=new l(e,i,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(e=>{u[e]=new l(e,a,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(e=>{u[e]=new l(e,s,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(e=>{u[e]=new l(e,o,!1,e.toLowerCase(),null,!1,!1)});var d=/[\-\:]([a-z])/g,f=e=>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(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,null,!1,!1)}),[`xlink:actuate`,`xlink:arcrole`,`xlink:role`,`xlink:show`,`xlink:title`,`xlink:type`].forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(e=>{u[e]=new l(e,n,!1,e.toLowerCase(),null,!1,!1)});var p=`xlinkHref`;u[p]=new l(`xlinkHref`,n,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(e=>{u[e]=new l(e,n,!1,e.toLowerCase(),null,!0,!0)});var{CAMELCASE:m,SAME:h,possibleStandardNames:g}=go(),_=RegExp.prototype.test.bind(RegExp(`^(data|aria)-[: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]*$`)),v=Object.keys(g).reduce((e,t)=>{let n=g[t];return n===h?e[t]=t:n===m?e[t.toLowerCase()]=t:e[t]=n,e},{});e.BOOLEAN=i,e.BOOLEANISH_STRING=r,e.NUMERIC=o,e.OVERLOADED_BOOLEAN=a,e.POSITIVE_NUMERIC=s,e.RESERVED=t,e.STRING=n,e.getPropertyInfo=c,e.isCustomAttribute=_,e.possibleStandardNames=v})),vo=t(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(` +`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(!(e.charAt(0)!=`/`||e.charAt(1)!=`*`)){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),yo=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(vo());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),bo=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),xo=t(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(yo()),r=bo();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),So=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=o,e.setStyleProp=c;var n=r(),i=t(xo()),a=new Set([`annotation-xml`,`color-profile`,`font-face`,`font-face-src`,`font-face-uri`,`font-face-format`,`font-face-name`,`missing-glyph`]);function o(e,t){return e.includes(`-`)?!a.has(e):!!(t&&typeof t.is==`string`)}var s={reactCompat:!0};function c(e,t){if(typeof e==`string`){if(!e.trim()){t.style={};return}try{t.style=(0,i.default)(e,s)}catch{t.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(`.`)[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set([`tr`,`tbody`,`thead`,`tfoot`,`colgroup`,`table`,`head`,`html`,`frameset`]),e.canTextBeChildOfNode=function(t){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(t.name)},e.returnFirstArg=function(e){return e}})),Co=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var t=_o(),n=So(),r=[`checked`,`value`],i=[`input`,`select`,`textarea`],a={reset:!0,submit:!0};function o(e,o){e===void 0&&(e={});var c={},l=!!(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,t.isCustomAttribute)(u)){c[u]=d;continue}var f=u.toLowerCase(),p=s(f);if(p){var m=(0,t.getPropertyInfo)(p);switch(r.includes(p)&&i.includes(o)&&!l&&(p=s(`default`+f)),c[p]=d,m?.type){case t.BOOLEAN:c[p]=!0;break;case t.OVERLOADED_BOOLEAN:d===``&&(c[p]=!0);break}continue}n.PRESERVE_CUSTOM_ATTRIBUTES&&(c[u]=d)}return(0,n.setStyleProp)(e.style,c),c}function s(e){return t.possibleStandardNames[e]}})),wo=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=r(),i=t(Co()),a=So(),o={cloneElement:n.cloneElement,createElement:n.createElement,isValidElement:n.isValidElement};function s(e,t){t===void 0&&(t={});for(var n=[],r=typeof t.replace==`function`,l=t.transform??a.returnFirstArg,u=t.library??o,d=u.cloneElement,f=u.createElement,p=u.isValidElement,m=e.length,h=0;h1&&(_=d(_,{key:_.key??h})),n.push(l(_,g,h));continue}}if(g.type===`text`){var v=!g.data.trim().length;if(v&&g.parent&&!(0,a.canTextBeChildOfNode)(g.parent)||t.trim&&v)continue;n.push(l(g.data,g,h));continue}var y=g,b={};c(y)?((0,a.setStyleProp)(y.attribs.style,y.attribs),b=y.attribs):y.attribs&&(b=(0,i.default)(y.attribs,y.name));var x=void 0;switch(g.type){case`script`:case`style`:g.children[0]&&(b.dangerouslySetInnerHTML={__html:g.children[0].data});break;case`tag`:g.name===`textarea`&&g.children[0]?b.defaultValue=g.children[0].data:g.children?.length&&(x=s(g.children,t));break;default:continue}m>1&&(b.key=h),n.push(l(f(g.name,b,x),g,h))}return n.length===1?n[0]:n}function c(e){return a.PRESERVE_CUSTOM_ATTRIBUTES&&e.type===`tag`&&(0,a.isCustomComponent)(e.name,e.attribs)}})),To=e(t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=o;var n=t(ho());e.htmlToDOM=n.default,e.attributesToProps=t(Co()).default;var r=t(wo());e.domToReact=r.default;var i=uo();Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return i.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return i.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return i.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return i.Text}});var a={lowerCaseAttributeNames:!1};function o(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);return e?(0,r.default)((0,n.default)(e,t?.htmlparser2??a),t):[]}}))(),1),Eo=To.default.default||To.default,Do=J.memo(e=>{let{text:t,animationConfig:n}=e,{fadeDuration:r=200,easing:i=`ease-in-out`}=n||{},[a,o]=(0,J.useState)([]),s=(0,J.useRef)(``);(0,J.useEffect)(()=>{if(t===s.current)return;if(!(s.current&&t.indexOf(s.current)===0)){o([t]),s.current=t;return}let e=t.slice(s.current.length);e&&(o(t=>[...t,e]),s.current=t)},[t]);let c=(0,J.useMemo)(()=>({animation:`x-markdown-fade-in ${r}ms ${i} forwards`,color:`inherit`}),[r,i]);return J.createElement(J.Fragment,null,a.map((e,t)=>J.createElement(`span`,{style:c,key:`animation-text-${t}`},e)))}),Oo=/\s/,ko=/[a-zA-Z0-9-]/,Ao=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),jo=``,No=``,Fo=(e,t)=>`${e}-${t}`,Io=(e,t)=>{if(!e.startsWith(jo,t))return t;let n=e.indexOf(Mo,t+4);return n===-1?e.length:n+3},Lo=(e,t)=>{if(!e.startsWith(No,t))return t;let n=e.indexOf(Po,t+9);return n===-1?e.length:n+3},Ro=(e,t)=>{if(e[t+1]!==`/`)return null;let n=t+2,r=``;for(;n`?null:{tagName:r.toLowerCase(),endPos:n+1}},zo=(e,t)=>{let n=t+1,r=``;for(;n`){i=!0,a=e[n-1]===`/`;break}if(e[n]===`"`||e[n]===`'`){let t=e[n];for(n++;ne.toLowerCase()));if(n.size===0||e.length===0)return new Set;let r=new Set,i={},a={},o=0;for(;o{r.add(Fo(e,t))});return r}var Vo=null;function Ho(){if(Vo)return Vo;if(typeof window<`u`&&typeof Node<`u`)try{let e=document.createElement(`template`);e.innerHTML=``;let t=e.content.firstChild;if(t){let n=Object.getOwnPropertyDescriptor(Node.prototype,`nodeName`)?.get,r=Object.getOwnPropertyDescriptor(Node.prototype,`nodeValue`)?.get,i=n&&t.nodeName&&!n.call(t);if(i){let e=n;Object.defineProperty(Node.prototype,"nodeName",{get:function(){let t=e.call(this);if(t)return t;if(this.nodeType===1&&`tagName`in this)return this.tagName;switch(this.nodeType){case 3:return`#text`;case 4:return`#cdata-section`;case 7:return`#processing-instruction`;case 8:return`#comment`;case 9:return`#document`;case 11:return`#document-fragment`}return t},configurable:!0,enumerable:!0})}let a=r&&(()=>{e.innerHTML=`
    test
    `;let t=e.content.firstChild?.firstChild;if(!t)return!1;let n=r.call(t);return t.nodeValue!=null&&n==null})();if(a){let e=r;Object.defineProperty(Node.prototype,"nodeValue",{get:function(){let t=e.call(this);return t==null&&(this.nodeType===3||this.nodeType===4||this.nodeType===8)&&`data`in this?this.data:t},configurable:!0,enumerable:!0})}if(i||a)return Vo=St(window),Vo}}catch{}return Vo=St,Vo}var Uo=class e{options;static NON_WHITESPACE_REGEX=/[^\r\n\s]+/;constructor(e){this.options=e}detectUnclosedTags(e){return Bo(e,Object.keys(this.options.components??{}))}configureDOMPurify(){let e=Object.keys(this.options.components||{}),t=this.options.dompurifyConfig||{},n=Array.isArray(t.ADD_TAGS)?t.ADD_TAGS:[],r=Array.isArray(t.ADD_ATTR)?t.ADD_ATTR:[];return{...t,ADD_TAGS:Array.from(new Set([...e,...n])),ADD_ATTR:Array.from(new Set([`target`,`rel`,...r]))}}createReplaceElement(t,n){let{enableAnimation:r,animationConfig:i}=this.options.streaming||{};return a=>{let o=`x-markdown-component-${n.current++}`,s=a.type===`text`&&a.data&&e.NON_WHITESPACE_REGEX.test(a.data),c=a.parent?.name,l=c&&this.options.components?.[c];if(r&&s&&!l)return J.createElement(Do,{text:a.data,key:o,animationConfig:i});if(!(`name`in a))return;let{name:u,attribs:d,children:f}=a,p=this.options.components?.[u];if(p){n.tagIndexes[u]=(n.tagIndexes[u]??0)+1;let e={domNode:a,streamStatus:t?.has(Fo(u,n.tagIndexes[u]))?`loading`:`done`,key:o,...d,...d.disabled!==void 0&&{disabled:!0},...d.checked!==void 0&&{checked:!0}};if(e.className=[e.className,e.classname,e.class].filter(Boolean).join(` `).trim()||``,u===`code`){let{"data-block":t=`false`,"data-state":n=`done`}=d||{};e.block=t===`true`,e.streamStatus=n===`loading`?`loading`:`done`;let r=d?.[`data-lang`],i=d?.class?.match(/(?:^|\s)language-([^\s]+)/)?.[1]??d?.class?.match(/(?:^|\s)lang-([^\s]+)/)?.[1],a=r||i;a&&(e.lang=a)}return f&&(e.children=this.processChildren(f,t,n)),J.createElement(p,e)}}}processChildren(e,t,n){return(0,To.domToReact)(e,{replace:this.createReplaceElement(t,n)})}processHtml(e){if(typeof St.sanitize!=`function`)return null;let t=this.detectUnclosedTags(e),n={current:0,tagIndexes:{}},r=Ho(),i=this.configureDOMPurify();return Eo(r.sanitize(e,i),{replace:this.createReplaceElement(t,n)})}render(e){return this.processHtml(e)}},Wo={FPS_THRESHOLD:{GOOD:55,WARNING:40},COLORS:{GOOD:`#52c41a`,WARNING:`#faad14`,DANGER:`#ff4d4f`},CHART:{WIDTH:750,HEIGHT:400,PADDING:80}},Go=()=>typeof window>`u`?{x:12,y:12}:{x:window.innerWidth-220,y:window.innerHeight/2-100},Ko=()=>{let[e,t]=(0,J.useState)(0),[n,r]=(0,J.useState)(0),[i,a]=(0,J.useState)(!1),[o,s]=(0,J.useState)(!1),[c,l]=(0,J.useState)([]),[u,d]=(0,J.useState)(Go()),[f,p]=(0,J.useState)(!1),m=(0,J.useRef)([]),h=(0,J.useRef)([]),g=(0,J.useRef)(0),_=(0,J.useRef)(0),v=(0,J.useRef)(void 0),y=(0,J.useRef)({isDragging:!1,startX:0,startY:0,initialX:0,initialY:0});(0,J.useEffect)(()=>{if(typeof window>`u`)return;f||(p(!0),g.current=performance.now());let e=()=>{let n=performance.now(),a=n-g.current;if(h.current.push(a),h.current.length>60&&h.current.shift(),_.current++,a>=1e3){let e=Math.round(_.current*1e3/a),o=b();t(e),r(o),i&&m.current.push({timestamp:Date.now(),fps:e,memory:o}),_.current=0,g.current=n}v.current=requestAnimationFrame(e)};return v.current=requestAnimationFrame(e),()=>{v.current!==void 0&&cancelAnimationFrame(v.current)}},[i,f]);let b=()=>{let e=performance;return e.memory?Math.round(e.memory.usedJSHeapSize/1024/1024):0},x=e=>e<1?`${Math.round(e*1024)} KB`:e>=1024?`${(e/1024).toFixed(2)} GB`:`${e.toFixed(2)} MB`,S=e=>e>=Wo.FPS_THRESHOLD.GOOD?Wo.COLORS.GOOD:e>=Wo.FPS_THRESHOLD.WARNING?Wo.COLORS.WARNING:Wo.COLORS.DANGER,C=(0,J.useCallback)(()=>{i?(a(!1),l([...m.current]),s(!0)):(m.current=[],a(!0))},[i]),w=(0,J.useCallback)(e=>{e.target.closest(`.x-markdown-debug-action`)||(y.current={isDragging:!0,startX:e.clientX,startY:e.clientY,initialX:u.x,initialY:u.y})},[u]),T=(0,J.useCallback)(e=>{if(!y.current.isDragging)return;let t=e.clientX-y.current.startX,n=e.clientY-y.current.startY;d({x:y.current.initialX+t,y:y.current.initialY+n})},[]),E=(0,J.useCallback)(()=>{y.current.isDragging=!1},[]);return(0,J.useEffect)(()=>{if(!(typeof window>`u`))return document.addEventListener(`mousemove`,T),document.addEventListener(`mouseup`,E),()=>{document.removeEventListener(`mousemove`,T),document.removeEventListener(`mouseup`,E)}},[T,E]),J.createElement(J.Fragment,null,J.createElement(`div`,{className:`x-markdown-debug-panel`,style:{left:u.x,top:u.y,cursor:y.current.isDragging?`grabbing`:`grab`},onMouseDown:w},J.createElement(`div`,{className:`x-markdown-debug-row`},J.createElement(`span`,{className:`x-markdown-debug-label`},`FPS`),J.createElement(`span`,{className:`x-markdown-debug-value`,style:{color:S(e)}},e)),J.createElement(`div`,{className:`x-markdown-debug-row`},J.createElement(`span`,{className:`x-markdown-debug-label`},`Memory`),J.createElement(`span`,{className:`x-markdown-debug-value`},x(n))),J.createElement(`div`,{className:`x-markdown-debug-actions`},J.createElement(`button`,{type:`button`,className:`x-markdown-debug-action x-markdown-debug-record-btn ${i?`recording`:``}`,onClick:C},i?`⏹ Stop`:`⏺ Record`),c.length>0&&!i&&J.createElement(`button`,{type:`button`,className:`x-markdown-debug-action`,onClick:()=>s(!0)},`📊 View`))),o&&c.length>0?J.createElement(`div`,{className:`x-markdown-debug-modal-overlay`,onClick:()=>s(!1)},J.createElement(`div`,{className:`x-markdown-debug-modal`,onClick:e=>e.stopPropagation()},J.createElement(`div`,{className:`x-markdown-debug-modal-header`},J.createElement(`span`,{style:{color:`#fff`,fontSize:18,fontWeight:`600`}},`Performance Recording`),J.createElement(`button`,{type:`button`,className:`x-markdown-debug-close-btn`,onClick:()=>s(!1)},`✕`)),J.createElement(()=>{if(!c.length)return null;let{WIDTH:e,HEIGHT:t,PADDING:n}=Wo.CHART,r=e-n*2,i=t-n*2,a=c[0]?.timestamp??0,o=(c[c.length-1]?.timestamp??0)-a||1,s=Math.max(...c.map(e=>e.fps),60),l=Math.max(...c.map(e=>e.memory),0)*1.1,u=c.length>0?c.reduce((e,t)=>e+t.fps,0)/c.length:0,d=c.length>0?c.reduce((e,t)=>e+t.memory,0)/c.length:0,f=c.length>0?Math.min(...c.map(e=>e.fps)):0,p=c.length>0?Math.max(...c.map(e=>e.fps)):0,m=(e,t)=>c.map(s=>`${n+(s.timestamp-a)/o*r},${n+i-s[e]/t*i}`).join(` `);return J.createElement(`div`,{className:`x-markdown-debug-modal-content`},J.createElement(`div`,{className:`x-markdown-debug-stats-summary`},J.createElement(`div`,{className:`x-markdown-debug-stat-item`},J.createElement(`div`,{className:`x-markdown-debug-stat-label`},`Duration`),J.createElement(`div`,{className:`x-markdown-debug-stat-value`},(o/1e3).toFixed(2),`s`)),J.createElement(`div`,{className:`x-markdown-debug-stat-item`},J.createElement(`div`,{className:`x-markdown-debug-stat-label`},`FPS Avg`),J.createElement(`div`,{className:`x-markdown-debug-stat-value`,style:{color:S(u)}},u.toFixed(1))),J.createElement(`div`,{className:`x-markdown-debug-stat-item`},J.createElement(`div`,{className:`x-markdown-debug-stat-label`},`FPS Range`),J.createElement(`div`,{className:`x-markdown-debug-stat-value`},f,` - `,p)),J.createElement(`div`,{className:`x-markdown-debug-stat-item`},J.createElement(`div`,{className:`x-markdown-debug-stat-label`},`Memory Avg`),J.createElement(`div`,{className:`x-markdown-debug-stat-value`},x(d)))),J.createElement(`svg`,{width:e,height:t,className:`x-markdown-debug-chart-full`,role:`img`,"aria-label":`Performance chart showing FPS and memory usage over time`},J.createElement(`title`,null,`Performance Chart`),[0,.25,.5,.75,1].map(a=>J.createElement(`g`,{key:a},J.createElement(`line`,{x1:n,y1:n+i*a,x2:e-n,y2:n+i*a,stroke:`rgba(255,255,255,0.1)`,strokeWidth:`1`}),J.createElement(`line`,{x1:n+r*a,y1:n,x2:n+r*a,y2:t-n,stroke:`rgba(255,255,255,0.1)`,strokeWidth:`1`}))),J.createElement(`polyline`,{points:m(`fps`,s),fill:`none`,stroke:Wo.COLORS.GOOD,strokeWidth:`2`,className:`fps-line`}),J.createElement(`polyline`,{points:m(`memory`,l),fill:`none`,stroke:`#1890ff`,strokeWidth:`2`,className:`memory-line`}),J.createElement(`text`,{x:n-10,y:n,fill:Wo.COLORS.GOOD,fontSize:`12`,textAnchor:`end`},s.toFixed(0)),J.createElement(`text`,{x:n-10,y:t-n,fill:Wo.COLORS.GOOD,fontSize:`12`,textAnchor:`end`},`0`),J.createElement(`text`,{x:n-10,y:n-15,fill:Wo.COLORS.GOOD,fontSize:`14`,fontWeight:`bold`,textAnchor:`end`},`FPS`),J.createElement(`text`,{x:e-n+10,y:n+20,fill:`#1890ff`,fontSize:`12`,textAnchor:`start`},x(l)),J.createElement(`text`,{x:e-n+10,y:t-n,fill:`#1890ff`,fontSize:`12`,textAnchor:`start`},x(0)),J.createElement(`text`,{x:e-n+10,y:n+5,fill:`#1890ff`,fontSize:`14`,fontWeight:`bold`,textAnchor:`start`},`Memory`),J.createElement(`text`,{x:n,y:t-n+20,fill:`rgba(255,255,255,0.6)`,fontSize:`12`,textAnchor:`middle`},`0s`),J.createElement(`text`,{x:e-n,y:t-n+20,fill:`rgba(255,255,255,0.6)`,fontSize:`12`,textAnchor:`middle`},(o/1e3).toFixed(1),`s`)),J.createElement(`div`,{className:`x-markdown-debug-legend`},J.createElement(`div`,{className:`x-markdown-debug-legend-item`},J.createElement(`span`,{className:`x-markdown-debug-legend-color`,style:{backgroundColor:Wo.COLORS.GOOD}}),J.createElement(`span`,null,`FPS`)),J.createElement(`div`,{className:`x-markdown-debug-legend-item`},J.createElement(`span`,{className:`x-markdown-debug-legend-color`,style:{backgroundColor:`#1890ff`}}),J.createElement(`span`,null,`Memory`))))},null))):null)},Q=function(e){return e.Text=`text`,e.Link=`link`,e.Image=`image`,e.Html=`html`,e.Emphasis=`emphasis`,e.List=`list`,e.Table=`table`,e.InlineCode=`inline-code`,e}({}),qo={image:[/^!\[[^\]\r\n]{0,1000}$/,/^!\[[^\r\n]{0,1000}\]\(*[^)\r\n]{0,1000}$/],link:[/^\[[^\]\r\n]{0,1000}$/,/^\[[^\r\n]{0,1000}\]\(*[^)\r\n]{0,1000}$/],html:[/^<\/$/,/^<\/?[a-zA-Z][a-zA-Z0-9-]{0,100}[^>\r\n]{0,1000}$/],commonEmphasis:[/^(\*{1,3}|_{1,3})(?!\s)(?!.*\1$)[^\r\n]{0,1000}$/],list:[/^[-+*]\s{0,3}$/,/^[-+*]\s{1,3}(\*{1,3}|_{1,3})(?!\s)(?!.*\1$)[^\r\n]{0,1000}$/],"inline-code":[/^`[^`\r\n]{0,300}$/]},Jo=e=>{if(e.includes(` + +`))return!1;let t=e.split(` +`);if(t.length<=1)return!0;let[n,r]=t,i=n.trim();if(!/^\|.*\|$/.test(i))return!1;let a=r.trim().split(`|`).map(e=>e.trim()).filter(Boolean),o=/^:?-+:?$/;return a.every((e,t)=>t===a.length-1&&e===`:`||o.test(e))},Yo={[Q.Link]:{tokenType:Q.Link,isStartOfToken:e=>e.startsWith(`[`),isStreamingValid:e=>qo.link.some(t=>t.test(e))},[Q.Image]:{tokenType:Q.Image,isStartOfToken:e=>e.startsWith(`!`),isStreamingValid:e=>qo.image.some(t=>t.test(e))},[Q.Html]:{tokenType:Q.Html,isStartOfToken:e=>e.startsWith(`<`),isStreamingValid:e=>qo.html.some(t=>t.test(e))},[Q.Emphasis]:{tokenType:Q.Emphasis,isStartOfToken:e=>e.startsWith(`*`)||e.startsWith(`_`),isStreamingValid:e=>qo.commonEmphasis.some(t=>t.test(e))},[Q.List]:{tokenType:Q.List,isStartOfToken:e=>/^[-+*]/.test(e),isStreamingValid:e=>qo.list.some(t=>t.test(e)),getCommitPrefix:e=>{let t=e.match(/^([-+*]\s{0,3})/)?.[1],n=t?e.slice(t.length):``;return t&&n.startsWith("`")?t:null}},[Q.Table]:{tokenType:Q.Table,isStartOfToken:e=>e.startsWith(`|`),isStreamingValid:Jo},[Q.InlineCode]:{tokenType:Q.InlineCode,isStartOfToken:e=>e.startsWith("`"),isStreamingValid:e=>qo[`inline-code`].some(t=>t.test(e))}},Xo=(e,t)=>{let n=Yo[t];if(!n)return;let{token:r,pending:i}=e;if(r===Q.Text&&n.isStartOfToken(i)){e.token=t;return}if(r===t&&!n.isStreamingValid(i)){let t=n.getCommitPrefix?.(i);if(t){e.completeMarkdown+=t,e.pending=i.slice(t.length),e.token=Q.Text;return}$o(e)}},Zo=Object.values(Yo).map(e=>({tokenType:e.tokenType,recognize:t=>Xo(t,e.tokenType)})),Qo=()=>({pending:``,token:Q.Text,processedLength:0,completeMarkdown:``}),$o=e=>{e.pending&&=(e.completeMarkdown+=e.pending,``),e.token=Q.Text},es=(e,t=!1)=>{let n=e.split(` +`),r=!1,i=``,a=0;for(let e=0;e=a&&/^\s*$/.test(c)&&(t||e{let t=``;for(let n=0;n=55296&&r<=56319?n+1=56320&&e.charCodeAt(n+1)<=57343&&(t+=e[n]+e[n+1],n++):(r<56320||r>57343)&&(t+=e[n])}return t},ns=e=>{try{return encodeURIComponent(e)}catch(t){return t instanceof URIError?encodeURIComponent(ts(e)):``}},rs=(e,t)=>{let{streaming:n,components:r={}}=t||{},{hasNextChunk:i=!1,incompleteMarkdownComponentMap:a}=n||{},[o,s]=(0,J.useState)(``),c=i?o:typeof e==`string`?e:``,l=(0,J.useRef)(Qo()),u=(0,J.useCallback)(e=>{let{token:t,pending:n}=e;if(t===Q.Text||t===Q.Image&&n===`!`)return;if(t===Q.Table&&n.split(` +`).length>2)return n;let i=(a||{})[t]||`incomplete-${t}`,o=ns(n);return r?.[i]?`<${i} data-raw="${o}" />`:void 0},[a,r]),d=(0,J.useCallback)(e=>{if(!e){s(``),l.current=Qo();return}let t=l.current.completeMarkdown+l.current.pending;e.startsWith(t)||(l.current=Qo());let n=l.current,r=e.slice(n.processedLength);if(!r)return;n.processedLength+=r.length;for(let e of r){if(n.pending+=e,es(n.completeMarkdown+n.pending)){$o(n);continue}if(n.token===Q.Text)for(let e of Zo)e.recognize(n);else if(Zo.find(e=>e.tokenType===n.token)?.recognize(n),n.token===Q.Text)for(let e of Zo)e.recognize(n);n.token===Q.Text&&$o(n)}let i=u(n);s(n.completeMarkdown+(i||``))},[u]);return(0,J.useEffect)(()=>{if(typeof e!=`string`){console.error(`X-Markdown: input must be string, not ${typeof e}.`),s(``);return}i&&d(e)},[e,i,d]),c},is=e=>e?typeof e==`boolean`?`▋`:e.content||`▋`:null,as=J.memo(e=>{let{streaming:t,config:n,components:r,paragraphTag:i,content:a,children:o,rootClassName:s,className:c,style:l,openLinksInNewTab:u,dompurifyConfig:f,protectCustomTagNewlines:p,disableCustomTagBlockMarkdown:m,escapeRawHtml:h,debug:g,disableDefaultStyles:_}=e,v=(0,J.useMemo)(()=>is(t?.tail),[t?.tail]),y=typeof t?.tail==`object`?t.tail.component:void 0,b=!!t?.hasNextChunk&&v,x=d(`x-markdown`,(0,J.useMemo)(()=>{if(_===!0)return`x-md-disable-all`;if(Array.isArray(_))return _.map(e=>`x-md-disable-${e}`)},[_]),s,c),S=rs(a||o||``,{streaming:t,components:r}),C=(0,J.useMemo)(()=>{if(!b)return r;let e=y?J.createElement(y,{content:v}):J.createElement(`span`,{className:`xmd-tail`},v);return{...r,"xmd-tail":()=>e}},[b,r,y,v]),w=(0,J.useMemo)(()=>new so({markedConfig:n,paragraphTag:i,openLinksInNewTab:u,components:C,protectCustomTagNewlines:p,disableCustomTagBlockMarkdown:m,escapeRawHtml:h}),[n,i,u,C,p,m,h]),T=(0,J.useMemo)(()=>new Uo({components:C,dompurifyConfig:f,streaming:t}),[C,f,t]),E=(0,J.useMemo)(()=>S?w.parse(S,{injectTail:!!b}):``,[S,w,b]),D=(0,J.useMemo)(()=>E?T.render(E):null,[E,T]);return S?J.createElement(J.Fragment,null,J.createElement(`div`,{className:x,style:l},D),g?J.createElement(Ko,null):null):null});async function os(){return S({url:`/ai/chat/conversations`,method:`get`})}async function ss(e){return S({url:`/ai/chat/messages/${e}`,method:`get`})}async function cs(e){return S({url:`/ai/chat/conversations/${e}`,method:`delete`})}var $=h(),{Text:ls}=C,us=()=>{let{t:e}=L(),{message:t,modal:n}=A.useApp(),{token:r}=ie.useToken(),i=x(e=>e.themeConfig),a=y(),[o]=b(),s=o.get(`agent_id`),[c,l]=(0,J.useState)(null),u=(0,J.useRef)(null),{conversations:d,setConversations:f,activeConversationKey:p,setActiveConversationKey:m}=hi({}),[h,g]=(0,J.useState)([]),[_,v]=(0,J.useState)(!1),[S,C]=(0,J.useState)(``),[w,T]=(0,J.useState)(!1),E=async()=>{let{data:e}=await os();e.success&&e.data&&f(e.data)},D=async e=>{let{data:t}=await ss(e);t.success&&t.data&&(g(t.data),setTimeout(()=>{u.current?.scrollTo({top:`bottom`})},100))};(0,J.useEffect)(()=>{E()},[]),(0,J.useEffect)(()=>{s&&le(Number(s)).then(({data:e})=>{e.success&&e.data&&l(e.data)})},[s]);let M=e=>{m(e),D(e)},N=()=>{m(``),g([])},te=r=>{n.confirm({title:e(`ai.chat.delete.confirm`),okButtonProps:{danger:!0},onOk:async()=>{await cs(r),t.success(e(`ai.chat.delete.success`)),p===r&&(m(``),g([])),await E()}})},P=async e=>{if(!e.trim()||_)return;let t={key:`user-${Date.now()}`,role:`user`,content:e,status:`success`},n={key:`assistant-${Date.now()}`,role:`assistant`,content:``,loading:!0,extraInfo:{isStreaming:!0}};g(e=>[...e,t,n]),v(!0),T(!0);let r=localStorage.getItem(`token`),i=``;ki(`/index.php/ai/chat/send`,{headers:{"Content-Type":`application/json`,Authorization:`Bearer ${r}`,Accept:`text/event-stream`},method:`post`,params:{conversation_id:p,message:e,agent_id:s?Number(s):void 0},callbacks:{onSuccess:async()=>{if(v(!1),C(``),T(!1),!p){let{data:e}=await os();if(e.success&&e.data&&e.data.length>0){f(e.data);let t=e.data[0].key;m(t)}}},onError:()=>{v(!1),T(!1)},onUpdate:e=>{console.log(`onUpdate`,e);let t=e.data;if(t!==`[DONE]`)try{let e=JSON.parse(t);e.type===`text_delta`&&e.delta&&(i+=e.delta,g(e=>e.map(e=>e.key===n.key?{...e,content:i,loading:!1}:e))),e.type===`text_end`&&g(t=>t.map(t=>t.key===n.key?{...t,key:e.message_id,loading:!1}:t))}catch{}}}})},re={assistant:{placement:`start`,variant:`filled`,avatar:(0,$.jsx)(j,{src:c?.icon||`https://file.xinadmin.cn/file/favicons.ico`}),contentRender:(e,t)=>{if(!e)return null;let n=t?.extraInfo?.isStreaming===!0;return(0,$.jsx)(as,{content:e,streaming:{hasNextChunk:n,enableAnimation:!0,tail:n},openLinksInNewTab:!0,escapeRawHtml:!0})}},user:{placement:`end`,variant:`filled`,avatar:(0,$.jsx)(j,{icon:(0,$.jsx)(I,{}),style:{background:r.colorFillSecondary,color:r.colorTextSecondary},size:36})}},oe=h.length>0;return(0,$.jsxs)(ee,{styles:{body:{padding:0,overflow:`hidden`,display:`flex`,height:`calc(100vh - 180px)`}},title:(0,$.jsx)(O,{align:`center`,children:c?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(j,{src:c.icon,size:36}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:18,fontWeight:600,marginRight:10},children:c.name}),c.description&&(0,$.jsx)(ls,{type:`secondary`,style:{fontSize:12,lineHeight:1},children:c.description})]})]}):(0,$.jsx)(`span`,{children:e(`ai.chat.defaultTitle`)})}),extra:(0,$.jsx)(k,{onClick:()=>a(`/ai/agent`),children:e(`ai.chat.switchAgent`)}),children:[(0,$.jsx)(`div`,{style:{width:280,borderRight:`1px solid ${r.colorBorderSecondary}`},children:(0,$.jsx)(Sr,{items:d,activeKey:p,onActiveChange:M,menu:e=>({items:[{label:`Rename`,key:`Rename`,icon:(0,$.jsx)(ne,{})},{type:`divider`},{label:`Delete Chat`,key:`delete`,icon:(0,$.jsx)(ae,{}),danger:!0,onClick:()=>te(e.key)}]}),creation:{onClick:N},style:{flex:1,overflow:`auto`}})}),(0,$.jsxs)(`div`,{className:`flex-1 flex flex-col min-w-0 px-1`,children:[!oe&&(0,$.jsx)(`div`,{className:`h-full flex items-center justify-center`,children:(0,$.jsx)(di,{icon:c?.icon||`https://file.xinadmin.cn/file/favicons.ico`,style:{backgroundImage:i.themeScheme===`dark`?`linear-gradient(97deg, rgba(90,196,255,0.12) 0%, rgba(174,136,255,0.12) 100%)`:`linear-gradient(97deg, #f2f9fe 0%, #f7f3ff 100%)`,borderRadius:20,width:`80%`,padding:`20px`},title:e(`ai.chat.welcome.title`),description:e(`ai.chat.welcome.description`),variant:`borderless`})}),oe&&(0,$.jsx)(`div`,{style:{flex:1,overflow:`hidden`},children:(0,$.jsx)(Jn.List,{ref:u,items:h,autoScroll:!0,style:{height:`100%`,padding:16},role:re})}),(0,$.jsx)(`div`,{style:{padding:`0 16px 16px`},children:(0,$.jsx)(si,{loading:_,disabled:w,value:S,onChange:C,placeholder:e(`ai.chat.placeholder`),onSubmit:P,onCancel:()=>v(!1),autoSize:{minRows:1,maxRows:6}})})]})]})};export{us as default}; \ No newline at end of file diff --git a/public/assets/chat-CqIY9PTi.js b/public/assets/chat-CqIY9PTi.js deleted file mode 100644 index ff14c66..0000000 --- a/public/assets/chat-CqIY9PTi.js +++ /dev/null @@ -1,127 +0,0 @@ -import{Bt as e,Er as t,N as n,Or as r,P as i,Sn as a,Sr as o,Tr as s,an as c,hr as l,i as u,in as d,n as f,nn as p,on as m,t as h,tt as g,ur as _,wn as v,wr as y,xr as b,zt as x}from"./jsx-runtime-NwRKtVrk.js";import{t as S}from"./request-Blbag3Ot.js";import{r as C}from"./CopyOutlined-bJLUKQgS.js";import{r as w}from"./statusUtils-G17j4Ng-.js";import{t as T}from"./button-CM-rzMOH.js";import{t as E}from"./space-Dvitgohy.js";import{t as D}from"./card-D7XvzVif.js";import{$ as O,St as k,ct as A,lt as ee,mt as te,o as j,st as M}from"./es-Do50EHua.js";import{t as ne}from"./flex-CfpySdsa.js";import{$ as N,M as re,S as ie,T as ae,Y as P,at as oe,g as se,h as F,it as ce,rt as I,s as L}from"./index-B7MUL4ct.js";import{t as le}from"./agent-D8tKYnoa.js";var R=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var t=`accept acceptCharset accessKey action allowFullScreen allowTransparency - alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge - charSet checked classID className colSpan cols content contentEditable contextMenu - controls coords crossOrigin data dateTime default defer dir disabled download draggable - encType form formAction formEncType formMethod formNoValidate formTarget frameBorder - headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity - is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media - mediaGroup method min minLength multiple muted name noValidate nonce open - optimum pattern placeholder poster preload radioGroup readOnly rel required - reversed role rowSpan rows sandbox scope scoped scrolling seamless selected - shape size sizes span spellCheck src srcDoc srcLang srcSet start step style - summary tabIndex target title type useMap value width wmode wrap onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown - onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick - onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown - onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel - onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough - onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata - onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`.split(/[\s\n]+/),n=`aria-`,r=`data-`;function i(e,t){return e.indexOf(t)===0}function a(e,a=!1){let o;o=a===!1?{aria:!0,data:!0,attr:!0}:a===!0?{aria:!0}:{...a};let s={};return Object.keys(e).forEach(a=>{(o.aria&&(a===`role`||i(a,n))||o.data&&i(a,r)||o.attr&&t.includes(a))&&(s[a]=e[a])}),s}})),z=r(s()),B=z.createContext({}),ue={classNames:{},styles:{},className:``,style:{},shortcutKeys:{}},de=e=>{let t=z.useContext(B);return z.useMemo(()=>({...ue,...t[e]}),[t[e]])};function V(){let{getPrefixCls:e,direction:t,csp:n,iconPrefixCls:r,theme:i}=z.useContext(g.ConfigContext);return{theme:i,getPrefixCls:e,direction:t,csp:n,iconPrefixCls:r}}var fe=z.createContext({}),pe=t(((e,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),me=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={items_per_page:`/ page`,jump_to:`Go to`,jump_to_confirm:`confirm`,page:`Page`,prev_page:`Previous Page`,next_page:`Next Page`,prev_5:`Previous 5 Pages`,next_5:`Next 5 Pages`,prev_3:`Previous 3 Pages`,next_3:`Next 3 Pages`,page_size:`Page Size`}})),he=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),ge=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=he();function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={placeholder:`Select time`,rangePlaceholder:[`Start time`,`End time`]}})),ve=t((e=>{var t=pe().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(ge()),r=t(_e());e.default={lang:{placeholder:`Select date`,yearPlaceholder:`Select year`,quarterPlaceholder:`Select quarter`,monthPlaceholder:`Select month`,weekPlaceholder:`Select week`,rangePlaceholder:[`Start date`,`End date`],rangeYearPlaceholder:[`Start year`,`End year`],rangeQuarterPlaceholder:[`Start quarter`,`End quarter`],rangeMonthPlaceholder:[`Start month`,`End month`],rangeWeekPlaceholder:[`Start week`,`End week`],...n.default},timePickerLocale:{...r.default}}})),ye=t((e=>{var t=pe().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=t(ve()).default})),be=t((e=>{var t=pe().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(me()),r=t(ye()),i=t(ve()),a=t(_e()),o="${label} is not a valid ${type}";e.default={locale:`en`,Pagination:n.default,DatePicker:i.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:`Please select`,close:`Close`,sortable:`sortable`,show:`Show`,hide:`Hide`},Table:{filterTitle:`Filter menu`,filterConfirm:`OK`,filterReset:`Reset`,filterEmptyText:`No filters`,filterCheckAll:`Select all items`,filterSearchPlaceholder:`Search in filters`,emptyText:`No data`,selectAll:`Select current page`,selectInvert:`Invert current page`,selectNone:`Clear all data`,selectionAll:`Select all data`,sortTitle:`Sort`,expand:`Expand row`,collapse:`Collapse row`,triggerDesc:`Click to sort descending`,triggerAsc:`Click to sort ascending`,cancelSort:`Click to cancel sorting`},Tour:{Next:`Next`,Previous:`Previous`,Finish:`Finish`},Modal:{okText:`OK`,cancelText:`Cancel`,justOkText:`OK`},Popconfirm:{okText:`OK`,cancelText:`Cancel`},Transfer:{titles:[``,``],searchPlaceholder:`Search here`,itemUnit:`item`,itemsUnit:`items`,remove:`Remove`,selectCurrent:`Select current page`,removeCurrent:`Remove current page`,selectAll:`Select all data`,deselectAll:`Deselect all data`,removeAll:`Remove all data`,selectInvert:`Invert current page`},Upload:{uploading:`Uploading...`,removeFile:`Remove file`,uploadError:`Upload error`,previewFile:`Preview file`,downloadFile:`Download file`},Empty:{description:`No data`},Icon:{icon:`icon`},Text:{edit:`Edit`,copy:`Copy`,copied:`Copied`,expand:`Expand`,collapse:`Collapse`},Form:{optional:`(optional)`,defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:`QR code expired`,refresh:`Refresh`,scanned:`Scanned`},ColorPicker:{presetEmpty:`Empty`,transparent:`Transparent`,singleColor:`Single`,gradientColor:`Gradient`}}})),xe=t(((e,t)=>{t.exports=be()})),Se=(0,z.createContext)(void 0),H={locale:`en`,Conversations:{create:`New chat`},Sender:{stopLoading:`Stop loading`,speechRecording:`Speech recording`},Actions:{feedbackLike:`Like`,feedbackDislike:`Dislike`,audio:`Play audio`,audioRunning:`Audio playing`,audioError:`Playback error`,audioLoading:`Loading audio`},Bubble:{editableOk:`OK`,editableCancel:`Cancel`},Mermaid:{zoomIn:`Zoom in`,zoomOut:`Zoom out`,zoomReset:`Reset`,download:`Download`,code:`Code`,image:`Image`},Folder:{selectFile:`Please select a file`,loadError:`Failed to load file`,noService:`File content service not configured`,loadFailed:`Failed to load file`}},Ce=r(xe()),we=(e,t)=>{let n=z.useContext(Se);return[z.useMemo(()=>{let r=t||H?.[e]||Ce.default?.[e],i=n?.[e]??{};return{...typeof r==`function`?r():r,...i||{}}},[e,t,n]),z.useMemo(()=>{let e=n?.locale;return n?.exist&&!e?H.locale:e},[n])]};function Te(e){let t=getComputedStyle(e).display;return t===`block`||t===`flex`||t===`list-item`||t===`table`}function Ee(e){let t=[``],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);for(;n.nextNode();){let e=n.currentNode;if(e.nodeType===Node.TEXT_NODE){t[t.length-1]+=e.textContent;continue}e.tagName===`BR`&&e.parentNode?.childElementCount===1||(e.tagName===`BR`||Te(e))&&t.push(``)}return t.join(` -`)}var De=({content:e,prefixCls:t,okText:n,cancelText:r,onEditConfirm:i,onEditCancel:a})=>{let o=z.useRef(null),[s]=we(`Bubble`,H.Bubble),c=l(()=>{i?.(Ee(o.current))}),u=l(()=>a?.());if(z.useEffect(()=>{o.current.textContent=e,o.current.focus();let t=window.getSelection(),n=document.createRange();n.selectNodeContents(o.current),n.collapse(!1),t.removeAllRanges(),t.addRange(n)},[]),typeof e!=`string`)throw Error(`Content of editable Bubble should be string`);let d=z.useMemo(()=>z.createElement(`div`,{ref:o,contentEditable:!0}),[]);return z.createElement(z.Fragment,null,d,z.createElement(ne,{rootClassName:`${t}-editing-opts`,gap:8},z.createElement(T,{type:`primary`,shape:`round`,size:`small`,onClick:c},n||s.editableOk),z.createElement(T,{type:`text`,shape:`round`,size:`small`,onClick:u},r||s.editableCancel)))},Oe=({prefixCls:e})=>z.createElement(`span`,{className:`${e}-dot`},z.createElement(`i`,{className:`${e}-dot-item`,key:`item-1`}),z.createElement(`i`,{className:`${e}-dot-item`,key:`item-2`}),z.createElement(`i`,{className:`${e}-dot-item`,key:`item-3`})),ke=`2.8.0`,Ae={blue:`#1677FF`,purple:`#722ED1`,cyan:`#13C2C2`,green:`#52C41A`,magenta:`#EB2F96`,pink:`#EB2F96`,red:`#F5222D`,orange:`#FA8C16`,yellow:`#FADB14`,volcano:`#FA541C`,geekblue:`#2F54EB`,gold:`#FAAD14`,lime:`#A0D911`,colorPrimary:`#1677ff`,colorSuccess:`#52c41a`,colorWarning:`#faad14`,colorError:`#ff4d4f`,colorInfo:`#1677ff`,colorLink:``,colorTextBase:``,colorBgBase:``,fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, -'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', -'Noto Color Emoji'`,fontFamilyCode:`'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace`,fontSize:14,lineWidth:1,lineType:`solid`,motionUnit:.1,motionBase:0,motionEaseOutCirc:`cubic-bezier(0.08, 0.82, 0.17, 1)`,motionEaseInOutCirc:`cubic-bezier(0.78, 0.14, 0.15, 0.86)`,motionEaseOut:`cubic-bezier(0.215, 0.61, 0.355, 1)`,motionEaseInOut:`cubic-bezier(0.645, 0.045, 0.355, 1)`,motionEaseOutBack:`cubic-bezier(0.12, 0.4, 0.29, 1.46)`,motionEaseInBack:`cubic-bezier(0.71, -0.46, 0.88, 0.6)`,motionEaseInQuint:`cubic-bezier(0.755, 0.05, 0.855, 0.06)`,motionEaseOutQuint:`cubic-bezier(0.23, 1, 0.32, 1)`,borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0};function je(e){return e>=0&&e<=255}function Me(e,t){let{r:n,g:r,b:i,a}=new b(e).toRgb();if(a<1)return e;let{r:o,g:s,b:c}=new b(t).toRgb();for(let e=.01;e<=1;e+=.01){let t=Math.round((n-o*(1-e))/e),a=Math.round((r-s*(1-e))/e),l=Math.round((i-c*(1-e))/e);if(je(t)&&je(a)&&je(l))return new b({r:t,g:a,b:l,a:Math.round(e*100)/100}).toRgbString()}return new b({r:n,g:r,b:i,a:1}).toRgbString()}function Ne(e){let{override:t,...n}=e,r={...t};Object.keys(Ae).forEach(e=>{delete r[e]});let i={...n,...r},a=1200,o=1600;return i.motion===!1&&(i.motionDurationFast=`0s`,i.motionDurationMid=`0s`,i.motionDurationSlow=`0s`),{...i,colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:Me(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:Me(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:Me(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*3,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:Me(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:`none`,linkHoverDecoration:`none`,linkFocusDecoration:`none`,controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:` - 0 6px 16px 0 rgba(0, 0, 0, 0.08), - 0 3px 6px -4px rgba(0, 0, 0, 0.12), - 0 9px 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowSecondary:` - 0 6px 16px 0 rgba(0, 0, 0, 0.08), - 0 3px 6px -4px rgba(0, 0, 0, 0.12), - 0 9px 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowTertiary:` - 0 1px 2px 0 rgba(0, 0, 0, 0.03), - 0 1px 6px -1px rgba(0, 0, 0, 0.02), - 0 2px 4px 0 rgba(0, 0, 0, 0.02) - `,screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:a-1,screenXL:a,screenXLMin:a,screenXLMax:o-1,screenXXL:o,screenXXLMin:o,boxShadowPopoverArrow:`2px 2px 5px rgba(0, 0, 0, 0.05)`,boxShadowCard:` - 0 1px 2px -2px ${new b(`rgba(0, 0, 0, 0.16)`).toRgbString()}, - 0 3px 6px 0 ${new b(`rgba(0, 0, 0, 0.12)`).toRgbString()}, - 0 5px 12px 4px ${new b(`rgba(0, 0, 0, 0.09)`).toRgbString()} - `,boxShadowDrawerRight:` - -6px 0 16px 0 rgba(0, 0, 0, 0.08), - -3px 0 6px -4px rgba(0, 0, 0, 0.12), - -9px 0 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowDrawerLeft:` - 6px 0 16px 0 rgba(0, 0, 0, 0.08), - 3px 0 6px -4px rgba(0, 0, 0, 0.12), - 9px 0 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowDrawerUp:` - 0 6px 16px 0 rgba(0, 0, 0, 0.08), - 0 3px 6px -4px rgba(0, 0, 0, 0.12), - 0 9px 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowDrawerDown:` - 0 -6px 16px 0 rgba(0, 0, 0, 0.08), - 0 -3px 6px -4px rgba(0, 0, 0, 0.12), - 0 -9px 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowTabsOverflowLeft:`inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)`,boxShadowTabsOverflowRight:`inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)`,boxShadowTabsOverflowTop:`inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)`,boxShadowTabsOverflowBottom:`inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)`,...r}}var Pe={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},Fe={motionBase:!0,motionUnit:!0},Ie=m(se.defaultAlgorithm),Le={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},Re=(e,t,n)=>{let r=n.getDerivativeToken(e),{override:i,...a}=t,o={...r,override:i};return o=Ne(o),a&&Object.entries(a).forEach(([e,t])=>{let{theme:n,...r}=t,i=r;n&&(i=Re({...o,...r},{override:r},n)),o[e]=i}),o};function ze(){let{token:e,hashed:t,theme:n,override:r,cssVar:i,zeroRuntime:a}=z.useContext(se._internalContext),o={prefix:i?.prefix??`ant`,key:i?.key??`css-var-root`},s=n||Ie,[c,l,u]=d(s,[se.defaultSeed,e],{salt:`${ke}-${t||``}`,override:r,getComputedToken:Re,cssVar:{...o,unitless:Pe,ignore:Fe,preserve:Le}});return[s,u,t?l:``,c,o,!!a]}function Be(){let[e,t,n]=ze();return{theme:e,token:t,hashId:n}}var{genStyleHooks:Ve,genComponentStyleHook:He,genSubStyleComponent:Ue}=x({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=V();return{iconPrefixCls:t,rootPrefixCls:e()}},useToken:()=>{let[e,t,n,r,i,a]=ze();return{theme:e,realToken:t,hashId:n,token:r,cssVar:i,zeroRuntime:a}},useCSP:()=>{let{csp:e}=V();return e??{}},layer:{name:`antdx`}}),We=new p(`loadingMove`,{"0%":{transform:`translateY(0)`},"10%":{transform:`translateY(4px)`},"20%":{transform:`translateY(0)`},"30%":{transform:`translateY(-4px)`},"40%":{transform:`translateY(0)`}}),Ge=new p(`cursorBlink`,{"0%":{opacity:1},"50%":{opacity:0},"100%":{opacity:1}}),Ke=new p(`fadeIn`,{"0%":{opacity:0},"100%":{opacity:1}}),qe=e=>{let{componentCls:t,fontSize:n,typingContent:r,typingAnimationDuration:i,typingAnimationName:a,lineHeight:o,paddingSM:s,colorText:l,calc:u}=e;return[{[t]:{display:`flex`,columnGap:s,[`&${t}-rtl`]:{direction:`rtl`},[`&${t}-loading`]:{alignItems:`center`},[`${t}-body`]:{display:`flex`,flexDirection:`column`,maxWidth:`100%`},[`${t}-content`]:{position:`relative`,boxSizing:`border-box`,minWidth:0,maxWidth:`100%`,minHeight:u(s).mul(2).add(u(o).mul(n)).equal(),paddingInline:`${c(e.padding)}`,paddingBlock:`${c(s)}`,color:l,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`,"&-string":{whiteSpace:`pre-wrap`}},[`${t}-typing:last-child::after`]:{content:r,fontWeight:900,userSelect:`none`,opacity:1,marginInlineStart:`0.1em`,animationName:a,animationDuration:c(i),animationIterationCount:`infinite`,animationTimingFunction:`linear`},[`${t}-fade-in .fade-in`]:{display:`inline`,animationName:Ke,animationDuration:`1s`,animationTimingFunction:`linear`},[`${t}-dot`]:{position:`relative`,height:e.controlHeight,display:`flex`,alignItems:`center`,columnGap:e.marginXS,padding:`0 ${c(e.paddingXXS)}`,alignSelf:`center`,"&-item":{backgroundColor:e.colorPrimary,borderRadius:`100%`,width:4,height:4,animationName:We,animationDuration:`2s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`,"&:nth-child(1)":{animationDelay:`0s`},"&:nth-child(2)":{animationDelay:`0.2s`},"&:nth-child(3)":{animationDelay:`0.4s`}}},[`&${t}-start`]:{flexDirection:`row`,alignSelf:`flex-start`,[`& ${t}-header`]:{flexDirection:`row`}},[`&${t}-end`]:{flexDirection:`row-reverse`,alignSelf:`flex-end`,[`& ${t}-header`]:{flexDirection:`row-reverse`},[`& ${t}-editing-opts`]:{flexDirection:`row-reverse`}}}},Ge]},Je=e=>{let{componentCls:t}=e;return{[t]:{[`${t}-content`]:{"&-filled":{backgroundColor:e.colorFillContent},"&-outlined":{border:`1px solid ${e.colorBorderSecondary}`},"&-shadow":{boxShadow:e.boxShadowTertiary},"&-borderless":{backgroundColor:`transparent`,padding:0,minHeight:0}}}}},Ye=e=>{let{componentCls:t,fontSize:n,lineHeight:r,paddingSM:i,borderRadius:a,calc:o}=e,s=o(n).mul(r).div(2).add(i).equal(),c=o(a).mul(2).equal(),l=`${t}-content`;return{[t]:{[l]:{"&-default":{borderRadius:{_skip_check_:!0,value:c}},"&-round":{borderRadius:{_skip_check_:!0,value:s}},"&-corner":{borderRadius:{_skip_check_:!0,value:c}},"&-editing":{"div:first-child":{outline:`none`},[`${t}-editing-opts`]:{marginBlockStart:e.marginSM,"button:last-child":{backgroundColor:e.colorBgContainer,"&:hover":{backgroundColor:e.colorBgLayout}}}}},[`&${t}-start ${t}-content-corner`]:{borderStartStartRadius:e.borderRadiusXS},[`&${t}-end ${t}-content-corner`]:{borderStartEndRadius:e.borderRadiusXS}}}},Xe=e=>{let{componentCls:t}=e;return{[t]:{"&-divider":{width:`100%`,justifyContent:`center`,[`& ${t}-body`]:{width:`100%`}}}}},U=e=>{let{componentCls:t}=e;return{[`${t}-list`]:{maxHeight:`100%`,width:`100%`,boxSizing:`border-box`,[`& ${t}`]:{width:`100%`,boxSizing:`border-box`,paddingBlock:e.padding},[`& ${t}-start:not(${t}-divider):not(${t}-system)`]:{paddingInlineEnd:`15%`},[`& ${t}-end:not(${t}-divider):not(${t}-system)`]:{paddingInlineStart:`15%`},[`${t}-list-scroll-box`]:{overflowY:`auto`,display:`flex`,width:`100%`,maxHeight:`100%`,flexDirection:`column`,scrollbarWidth:`thin`,scrollbarColor:`${e.colorTextTertiary} transparent`,"&::-webkit-scrollbar":{width:8,backgroundColor:`transparent`},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:e.borderRadiusSM}},[`${t}-list-autoscroll`]:{flexDirection:`column-reverse`},[`${t}-list-scroll-content`]:{display:`flex`,width:`100%`,height:`fit-content`,flexDirection:`column`,boxSizing:`border-box`,paddingInline:e.paddingXS}}}},Ze=e=>{let{componentCls:t,fontSize:n,lineHeight:r,paddingXXS:i,margin:a,colorText:o,fontSizeLG:s,calc:c}=e;return{[t]:{[`${t}-header`]:{display:`flex`,marginBottom:i,fontSize:n,lineHeight:r,color:o},[`${t}-footer`]:{display:`flex`,marginBlockStart:a,fontSize:n,lineHeight:r,color:o,"&-start":{flexDirection:`row`},"&-end":{flexDirection:`row-reverse`}},[`${t}-avatar`]:{minWidth:c(s).mul(2).equal()}}}},Qe=e=>{let{componentCls:t,paddingSM:n,paddingXS:r,lineHeight:i,fontSize:a,fontSizeSM:o,calc:s}=e;return{[t]:{[`&${t}-system`]:{width:`100%`,justifyContent:`center`,[`${t}-content`]:{display:`flex`,gap:`${c(o)}`,alignItems:`center`,minHeight:s(r).mul(2).add(s(i).mul(a)).equal(),fontSize:`${c(a)}`,paddingInline:`${c(n)}`,paddingBlock:`${c(r)}`},[`${t}-system-content`]:{},[`${t}-system-extra`]:{}}}}},$e=Ve(`Bubble`,t=>{let n=e(t,{});return[qe(n),Je(n),Ye(n),Ze(n),U(n),Qe(n),Xe(n)]},()=>({typingContent:`"|"`,typingAnimationName:`cursorBlink`,typingAnimationDuration:`0.8s`})),et=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}})),tt=r(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.useLayoutUpdateEffect=e.default=void 0;var t=a(s()),n=r(et());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(typeof WeakMap!=`function`)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function a(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!=`object`&&typeof e!=`function`)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var o=(0,n.default)()?t.useLayoutEffect:t.useEffect,c=(e,n)=>{let r=t.useRef(!0);o(()=>e(r.current),n),o(()=>(r.current=!1,()=>{r.current=!0}),[])};e.useLayoutUpdateEffect=(e,t)=>{c(t=>{if(!t)return e()},t)},e.default=c}))());function nt(e){return!e||e.length===0?``:e.reduce((e,t)=>{let n=0;for(;n{let e={effect:`fade-in`,interval:100,step:6,keepPrefix:!0};if(n===!0)return e;let{step:t=6,interval:r=100}=n,i=e=>typeof e==`number`;if(!i(r)||r<=0)throw`[Bubble] invalid prop typing.interval, expect positive number.`;if(!i(t)&&!Array.isArray(t))throw`[Bubble] invalid prop typing.step, expect positive number or positive number array`;if(i(t)&&t<=0)throw`[Bubble] invalid prop typing.step, expect positive number`;if(Array.isArray(t)){if(!i(t[0])||t[0]<=0)throw`[Bubble] invalid prop typing.step[0], expect positive number`;if(!i(t[1])||t[1]<=0)throw`[Bubble] invalid prop typing.step[1], expect positive number`;if(t[0]>t[1])throw`[Bubble] invalid prop typing.step, step[0] should less than step[1]`}return{...e,...n}},[n]),p=z.useRef({content:t,interval:f.interval,step:f.step});p.current={content:t,interval:f.interval,step:f.step};let m=()=>Math.random().toString().slice(2),h=z.useCallback(e=>{let t=0;c.current=f.keepPrefix?nt([p.current.content,c.current]):``,o(c.current?[{text:c.current,id:m(),taskId:e,done:!0}]:[]);let n=()=>{if(e!==l.current)return;let a=performance.now(),{content:f,interval:h,step:g}=p.current;if(a-t[{text:t.map(({text:e})=>e).join(``),id:m(),taskId:e,done:!0}]),i?.(f),s.current=!1,l.current++;return}c.current+=y;let b={id:m(),text:y,taskId:e,done:!1};o(e=>e.concat(b)),s.current||=!0,t=a,u.current=requestAnimationFrame(n),r?.(c.current,f)};n()},[f.keepPrefix,r,i]),g=z.useCallback(()=>{cancelAnimationFrame(u.current),o([]),c.current=``,s.current=!1},[]);return(0,tt.default)(()=>{if(!t)return g();t!==c.current&&(s.current&&!t.startsWith(c.current)?(cancelAnimationFrame(u.current),s.current=!1,requestAnimationFrame(()=>h(++l.current))):s.current===!1&&h(l.current))},[t,h]),{renderedData:a,animating:s.current,memoedAnimationCfg:f}}var it=({prefixCls:e,streaming:t,content:n,typing:r,onTyping:i,onTypingComplete:a})=>{let{renderedData:s,animating:c,memoedAnimationCfg:l}=rt({streaming:t,content:n,typing:r,onTyping:i,onTypingComplete:a}),{effect:u}=l,d=s.map(e=>u===`fade-in`&&!e.done?z.createElement(`span`,{key:e.id,className:`fade-in`},e.text):e.text),f=r===!0?!1:u===`typing`;return z.createElement(`div`,{className:o({[`${e}-typing`]:f&&c,[`${e}-fade-in`]:!f})},d)},at=r(R()),ot=z.forwardRef(({prefixCls:e,rootClassName:t,style:r,className:i,styles:a={},classNames:s={},placement:c=`start`,content:l,contentRender:u,editable:d=!1,typing:f,streaming:p=!1,variant:m=`filled`,shape:h=`default`,header:g,footer:_,avatar:v,extra:y,footerPlacement:b,loading:x,loadingRender:S,onTyping:C,onTypingComplete:w,onEditConfirm:T,onEditCancel:E,...D},O)=>{let k=z.useRef(null);z.useImperativeHandle(O,()=>({nativeElement:k.current}));let A=de(`bubble`),{direction:ee,getPrefixCls:te}=V(),j=te(`bubble`,e),M=z.useContext(fe),[ne,N]=$e(j),re={...A.style,...A.styles.root,...a.root,...r},ie=o(j,A.className,A.classNames.root,s.root,t,i,ne,N,`${j}-${c}`,{[`${j}-${M.status}`]:M.status,[`${j}-rtl`]:ee===`rtl`,[`${j}-loading`]:x}),ae=(0,at.default)(D,{attr:!0,aria:!0,data:!0}),P={key:M?.key,status:M?.status,extraInfo:M?.extraInfo},oe=z.useMemo(()=>u?u(l,P):l,[l,u,P.key,P.status,P.extraInfo]),se=typeof f==`function`?f(l,P):f,F=!!se&&typeof oe==`string`;z.useEffect(()=>{F||p||l&&w?.(l)},[oe,F,p]);let ce=b||(c===`start`?`outer-start`:`outer-end`),I=typeof d==`boolean`?d:d.editing,L=()=>{if(x)return S?S():z.createElement(Oe,{prefixCls:j});let e=z.createElement(z.Fragment,null,F?z.createElement(it,{prefixCls:j,streaming:p,typing:se,content:oe,onTyping:C,onTypingComplete:w}):oe),t=ce.includes(`inner`);return z.createElement(`div`,{className:le(`body`),style:R(`body`)},me(),z.createElement(`div`,{style:{...A.styles.content,...a.content},className:o(`${j}-content`,`${j}-content-${m}`,A.classNames.content,s.content,{[`${j}-content-${M?.status}`]:M?.status,[`${j}-content-${h}`]:m!==`borderless`,[`${j}-content-editing`]:I,[`${j}-content-string`]:typeof oe==`string`})},I?z.createElement(De,{prefixCls:j,content:l,okText:d?.okText,cancelText:d?.cancelText,onEditConfirm:T,onEditCancel:E}):z.createElement(z.Fragment,null,t?z.createElement(`div`,{className:o(`${j}-content-with-footer`)},e):e,t&&he())),!I&&!t&&he())},le=e=>o(`${j}-${e}`,A.classNames[e],s[e]),R=e=>({...A.styles[e],...a[e]}),B=e=>typeof e==`function`?e(l,P):e,ue=()=>v?z.createElement(`div`,{className:le(`avatar`),style:R(`avatar`)},B(v)):null,pe=()=>y?z.createElement(`div`,{className:le(`extra`),style:R(`extra`)},B(y)):null,me=()=>g?z.createElement(`div`,{className:le(`header`),style:R(`header`)},B(g)):null,he=()=>{if(!_)return null;let e=o(le(`footer`),{[`${j}-footer-start`]:ce.includes(`start`),[`${j}-footer-end`]:ce.includes(`end`)});return z.createElement(`div`,{className:e,style:R(`footer`)},B(_))};return z.createElement(`div`,n({className:ie,style:re},D,ae,{ref:k}),ue(),L(),!I&&!x&&pe())}),st=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e,t){let n=Object.assign({},e);return Array.isArray(t)&&t.forEach(e=>{delete n[e]}),n}}));function ct(e,t){return(0,z.useImperativeHandle)(e,()=>{let e=t(),{nativeElement:n}=e;return new Proxy(n,{get(t,n){return e[n]?e[n]:Reflect.get(t,n)}})})}var lt=z.forwardRef(({prefixCls:e,content:t=``,rootClassName:r,style:i,className:a,styles:s={},classNames:c={},dividerProps:l,...u},d)=>{let{getPrefixCls:f}=V(),p=de(`bubble`),m=f(`bubble`,e),[h,g]=$e(m),_=o(h,g,m,`${m}-divider`,p.className,p.classNames.root,a,c.root,r);return z.createElement(ot,n({ref:d,style:i,styles:s,className:_,classNames:c,prefixCls:m,variant:`borderless`,content:t,contentRender:e=>z.createElement(re,l,e)},u))});function ut(e){return getComputedStyle(e).flexDirection===`column-reverse`}function dt(e,t){let n=(0,z.useRef)(null),r=(0,z.useRef)(!0),i=(0,z.useRef)(!1),a=(0,z.useRef)(0),o=(0,z.useRef)(void 0),s=(0,z.useRef)(!1),c=(0,z.useRef)(!1);(0,z.useLayoutEffect)(()=>{if(!e||!t)return;if(!n.current){let t=document.createElement(`div`);t.style.bottom=`0`,t.style.flexShrink=`0`,t.style.pointerEvents=`none`,t.style.height=`10px`,t.style.visibility=`hidden`,e.insertBefore(t,e.firstChild),n.current=t}let a=new IntersectionObserver(([e])=>{r.current=e.isIntersecting,i.current=!e.isIntersecting},{root:e,threshold:0});a.observe(n.current);let s=new ResizeObserver(()=>{if(e){if(o.current){c.current&&requestAnimationFrame(()=>e.scrollTo({top:ut(e)?0:e.scrollHeight,behavior:`instant`}));return}ut(e)&&i.current&&d()}});return s.observe(t),()=>{a.disconnect(),s.disconnect(),clearTimeout(o.current),n.current?.parentNode&&(n.current.parentNode.removeChild(n.current),n.current=null)}},[e,t]);let l=(0,z.useCallback)(()=>{o.current=setTimeout(()=>{clearTimeout(o.current),o.current=void 0,c.current=!1},50)},[]),u=(0,z.useCallback)(e=>{let t=e.target;if(!ut(t))return;let{scrollTop:n,scrollHeight:r}=t;if(a.current=r+n,s.current){s.current=!1;return}o.current&&clearTimeout(o.current),l()},[l]);(0,z.useLayoutEffect)(()=>{if(e)return e.addEventListener(`scroll`,u,{capture:!0}),()=>e?.removeEventListener(`scroll`,u,{capture:!0})},[e,u]);let d=(0,z.useCallback)(()=>{e.scrollTop=a.current-e.scrollHeight,s.current=!0},[e]);return{reset:(0,z.useCallback)(()=>{r.current=!0,i.current=!1,a.current=e?.scrollHeight||0},[e]),scrollTo:(0,z.useCallback)(n=>{if(!e||!t)return;let{top:r,intoView:i,intoViewDom:a}=n||{};ut(e)?r!==void 0&&r>=-10?c.current=!0:a&&i?.block===`end`?c.current=t.lastElementChild===a:c.current=!1:r!==void 0&&r>=e.scrollHeight-e.clientHeight-10?c.current=!0:a&&i?.block===`end`?c.current=t.lastElementChild===a:c.current=!1,o.current||l(),a?a.scrollIntoView(i):e.scrollTo(n)},[e,t])}}var ft=z.forwardRef(({prefixCls:e,content:t,variant:r=`shadow`,shape:i,style:a,className:s,styles:c={},classNames:l={},rootClassName:u,...d},f)=>{let p=de(`bubble`),{getPrefixCls:m}=V(),h=m(`bubble`,e),[g,_]=$e(h),v=o(g,_,`${h}-system`,h,p.className,p.classNames.root,l.root,s,u);return z.createElement(ot,n({ref:f,style:a,className:v,styles:c,classNames:l,variant:r,shape:i,content:t},d))}),pt=r(st());function mt(e){return typeof e==`function`&&e instanceof Function}var ht=z.memo(ot),gt=z.memo(lt),_t=z.memo(ft),vt=e=>{let{_key:t,bubblesRef:r,extraInfo:i,status:a,role:o,classNames:s={},styles:c={},...l}=e,u=z.useCallback(e=>{e?r.current[t]=e:delete r.current[t]},[t]),{root:d,bubble:f,divider:p,system:m,...h}=s,{root:g,bubble:_,divider:v,system:y,...b}=c,x=z.createElement(ht,n({ref:u,style:g||_,className:d||f,classNames:h,styles:b},l));return o===`divider`?x=z.createElement(gt,n({ref:u,style:g||v,className:d||p,classNames:h,styles:b},l)):o===`system`&&(x=z.createElement(_t,n({ref:u,style:g||y,className:d||m,classNames:h,styles:b},l))),z.createElement(fe.Provider,{value:{key:t,status:a,extraInfo:i}},x)};ot.List=z.forwardRef((e,t)=>{let{prefixCls:r,rootClassName:i,className:a,styles:s={},classNames:c={},style:l,items:u,autoScroll:d=!0,role:f,onScroll:p,...m}=e,h=(0,at.default)(m,{attr:!0,aria:!0}),g=z.useRef(null),_=z.useRef({}),[v,y]=z.useState(),[b,x]=z.useState(),{scrollTo:S}=dt(v,b),{getPrefixCls:C}=V(),w=C(`bubble`,r),T=`${w}-list`,[E,D]=$e(w),O=o(T,i,a,c.root,E,D),k={...s.root,...l};return ct(t,()=>({nativeElement:g.current,scrollBoxNativeElement:v,scrollTo:({key:e,top:t,behavior:n=`smooth`,block:r})=>{let{scrollHeight:i,clientHeight:a}=v;typeof t==`number`?S({top:d?-i+a+t:t,behavior:n}):t===`bottom`?S({top:d?0:i,behavior:n}):t===`top`?S({top:d?-i:0,behavior:n}):e&&_.current[e]&&S({intoView:{behavior:n,block:r},intoViewDom:_.current[e].nativeElement})}})),z.createElement(`div`,n({},h,{className:O,style:k,ref:g}),z.createElement(`div`,{className:o(`${T}-scroll-box`,c.scroll,{[`${T}-autoscroll`]:d}),style:s.scroll,ref:e=>y(e),onScroll:p},z.createElement(`div`,{ref:e=>x(e),className:o(`${T}-scroll-content`)},u.map(e=>{let t;if(e.role&&f){let n=f[e.role];t={...mt(n)?n(e):n,...e}}else t=e;return z.createElement(vt,n({classNames:(0,pt.default)(c,[`root`,`scroll`]),styles:(0,pt.default)(s,[`root`,`scroll`])},(0,pt.default)(t,[`key`]),{key:e.key,_key:e.key,bubblesRef:_}))}))))}),ot.System=ft,ot.Divider=lt;var yt=ot,bt=()=>({height:0,opacity:0}),xt=e=>{let{scrollHeight:t}=e;return{height:t,opacity:1}},St=e=>({height:e?e.offsetHeight:0}),Ct=(e,t)=>t?.deadline===!0||t.propertyName===`height`,wt=(e=`ant`)=>({motionName:`${e}-motion-collapse`,onAppearStart:bt,onEnterStart:bt,onAppearActive:xt,onEnterActive:xt,onLeaveStart:St,onLeaveActive:bt,onAppearEnd:Ct,onEnterEnd:Ct,onLeaveEnd:Ct,motionDeadline:500}),Tt=(e,t,n)=>{let r=typeof e==`boolean`||e?.expandedKeys===void 0,[i,a,o,s]=z.useMemo(()=>{let t={expandedKeys:[],defaultExpandedKeys:[],onExpand:()=>{}};return e?(typeof e==`object`&&(t={...t,...e}),[!0,t.defaultExpandedKeys,t.expandedKeys,t.onExpand]):[!1,t.defaultExpandedKeys,t.expandedKeys,t.onExpand]},[e]),[c,l]=_(a||[],r?void 0:o),u=e=>{l(t=>{let n=r?t:o,i=n.includes(e)?n.filter(t=>t!==e):[...n,e];return s?.(i),i})},d=z.useMemo(()=>i?{...wt(n),motionAppear:!1,leavedClassName:`${t}-content-hidden`}:{},[n,t,i]);return[i,c,i?u:void 0,d]},Et=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){let{keyCode:n}=e;if(e.altKey&&!e.ctrlKey||e.metaKey||n>=t.F1&&n<=t.F12)return!1;switch(n){case t.ALT:case t.CAPS_LOCK:case t.CONTEXT_MENU:case t.CTRL:case t.DOWN:case t.END:case t.ESC:case t.HOME:case t.INSERT:case t.LEFT:case t.MAC_FF_META:case t.META:case t.NUMLOCK:case t.NUM_CENTER:case t.PAGE_DOWN:case t.PAGE_UP:case t.PAUSE:case t.PRINT_SCREEN:case t.RIGHT:case t.SHIFT:case t.UP:case t.WIN_KEY:case t.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=t.ZERO&&e<=t.NINE||e>=t.NUM_ZERO&&e<=t.NUM_MULTIPLY||e>=t.A&&e<=t.Z||window.navigator.userAgent.indexOf(`WebKit`)!==-1&&e===0)return!0;switch(e){case t.SPACE:case t.QUESTION_MARK:case t.NUM_PLUS:case t.NUM_MINUS:case t.NUM_PERIOD:case t.NUM_DIVISION:case t.SEMICOLON:case t.DASH:case t.EQUALS:case t.COMMA:case t.PERIOD:case t.SLASH:case t.APOSTROPHE:case t.SINGLE_QUOTE:case t.OPEN_SQUARE_BRACKET:case t.BACKSLASH:case t.CLOSE_SQUARE_BRACKET:return!0;default:return!1}},isEditableTarget:function(e){let t=e.target;if(!(t instanceof HTMLElement))return!1;let n=t.tagName;return!!(n===`INPUT`||n===`TEXTAREA`||n===`SELECT`||t.isContentEditable)}};e.default=t}));t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.preMessage=void 0;var t={},n=[],r=e=>{n.push(e)};e.preMessage=r;function i(e,t){}function a(e,t){}function o(){t={}}function s(e,n,r){!n&&!t[r]&&(e(!1,r),t[r]=!0)}function c(e,t){s(i,e,t)}function l(e,t){s(a,e,t)}c.preMessage=r,c.resetWarned=o,c.noteOnce=l,e.default=c}))();function Dt(){}var W=Dt,Ot=r(Et()),kt={Alt:[`altKey`,`⌥`,`Alt`],Ctrl:[`ctrlKey`,`⌃`,`Ctrl`],Meta:[`metaKey`,`⌘`,`Win`],Shift:[`shiftKey`,`⇧`,`Shift`]},At=Array.from({length:9},(e,t)=>Ot.default.ONE+t),jt=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<`u`?navigator?.platform:``),Mt=e=>e===`number`?e:typeof e==`string`&&kt?.[e]?.[jt?1:2]?kt[e][jt?1:2]:Object.entries(Ot.default||{})?.find(([t,n])=>n===e)?.[0]||``,Nt=(e,t)=>{let n=[...e],r=n.pop();return n.reduce((e,n)=>e&&(t[kt?.[n]?.[0]]||!1),r===t.keyCode)?{actionShortcutKey:e,actionKeyCodeNumber:At.indexOf(t.keyCode)>-1?At.indexOf(t.keyCode):!1,actionKeyCode:t.keyCode,timeStamp:t.timeStamp}:!1},Pt=e=>{let t=[...e],n=t.pop();return{keyCodeDict:n===`number`?At:[n],prefixKeys:t}},Ft=(e,t,n)=>{W(!e.find(({shortcutKey:e})=>e.toString()===t.toString()),n,`Same shortcutKey ${t.toString()}`)},It=(e,t,n)=>{let r=Object.assign({},t||{},n);return Object.keys(r).reduce(({flattenShortcutKeys:t,shortcutKeysInfo:n},i)=>{let a=r[i];if(!Array.isArray(a))return{flattenShortcutKeys:t,shortcutKeysInfo:n};if(n={...n,[i]:{shortcutKeys:a,shortcutKeysIcon:[]}},a.every(e=>Array.isArray(e)))a.forEach((r,a)=>{let o=r;Ft(t,o,e),t.push({name:i,shortcutKey:o,index:a}),n[i].shortcutKeysIcon.push(o?.map(e=>Mt(e)))});else{let{keyCodeDict:r,prefixKeys:o}=Pt(a);r.forEach(n=>{Ft(t,[...o,n],e),t.push({name:i,shortcutKey:[...o,n]})}),n[i].shortcutKeysIcon=a.map(e=>Mt(e))}return{flattenShortcutKeys:t,shortcutKeysInfo:n}},{flattenShortcutKeys:[],shortcutKeysInfo:{}})},Lt=()=>{let e=(0,z.useRef)(void 0);return[e,t=>{e.current=t}]},Rt=(e,t)=>{let{flattenShortcutKeys:n,shortcutKeysInfo:r}=It(e,de(e).shortcutKeys,t),[i,a]=(0,z.useState)(null),[o,s]=Lt(),c=(0,z.useRef)(!1),l=e=>{for(let t of n){let n=Nt(t.shortcutKey,e);if(n){let e={...n,name:t.name,index:t?.index};if(c.current)return;c.current=!0,a(e),o?.current?.(e)}}},u=()=>{c.current=!1};return(0,z.useEffect)(()=>{if(n.length!==0)return document.addEventListener(`keydown`,l),document.addEventListener(`keyup`,u),()=>{document.removeEventListener(`keydown`,l),document.removeEventListener(`keyup`,u)}},[n.length,o]),[i,r,s]},zt=({shortcutKeysIcon:e,prefixCls:t})=>{let[n]=we(`Conversations`,H.Conversations),r=!!e?.length;return z.createElement(`div`,{className:o(t,{[`${t}-shortcut-keys-show`]:r})},z.createElement(`span`,null,n.create),r&&z.createElement(`span`,{className:o(`${t}-shortcut-keys`)},e.map(e=>z.createElement(`span`,{className:o(`${t}-shortcut-key`),key:e},e))))},Bt=({icon:e,label:t,align:n,shortcutKeyInfo:r,prefixCls:i})=>{let{shortcutKeysIcon:a}=r||{},o={label:z.createElement(zt,{prefixCls:`${i}-label`,shortcutKeysIcon:a}),icon:z.createElement(f,{className:`${i}-icon`}),align:`center`};return t&&(o.label=typeof t==`function`?t({shortcutKeyInfo:r,components:{CreationLabel:zt}}):t),e&&(o.icon=typeof e==`function`?e():e),[o.icon,o.label,n||o.align]},Vt=({className:e,icon:t,label:n,align:r,style:i,disabled:a,onClick:s,prefixCls:c,shortcutKeyInfo:l})=>{let[u,d,f]=Bt({prefixCls:c,label:n,icon:t,align:r,shortcutKeyInfo:l});return z.createElement(`button`,{type:`button`,onClick:e=>{a||s?.(e)},style:i,className:o(c,e,`${c}-${f}`,{[`${c}-disabled`]:a})},u,d)},Ht=z.createContext(null),Ut=({className:e,children:t})=>{let{prefixCls:r,groupInfo:s,enableCollapse:c,expandedKeys:l,onItemExpand:u,collapseMotion:d}=z.useContext(Ht)||{},{label:f,name:p,collapsible:m}=s||{},h=typeof f==`function`?f(p,{groupInfo:s}):f||p,g=m&&c,_=()=>{g&&u?.(s.name)},v=g&&!!l?.includes?.(p);return z.createElement(`li`,{className:e},z.createElement(`div`,{className:o(`${r}-group-title`,{[`${r}-group-title-collapsible`]:g}),onClick:_},h&&z.createElement(`div`,{className:o(`${r}-group-label`)},h),g&&z.createElement(`div`,{className:o(`${r}-group-collapse-trigger `,`${r}-group-collapse-trigger-${v?`open`:`close`}`)},z.createElement(i,null))),z.createElement(a,n({},d,{visible:g?v:!0}),({className:e,style:n},r)=>z.createElement(`div`,{className:o(e),ref:r,style:n},t)))},Wt=(e,t=[])=>{let[n,r,i]=(0,z.useMemo)(()=>{let t={label:``,collapsibleHandle:!1,collapsibleOptions:{}};if(!e)return[``,t.collapsibleHandle,t.collapsibleOptions];if(typeof e==`object`){let{collapsible:n,defaultExpandedKeys:r,expandedKeys:i,onExpand:a,...o}=e;t={...t,...o,collapsibleHandle:n,collapsibleOptions:{defaultExpandedKeys:r,expandedKeys:i,onExpand:a}}}return[t.label,t.collapsibleHandle,t.collapsibleOptions]},[e]);return z.useMemo(()=>{let a=t.reduce((t,i)=>{if(i?.type===`divider`||!i.group||!e)return t.push({data:[i],name:``,label:``,enableGroup:!1,collapsible:!1}),t;let a=i,o=t.some((e,n)=>e.name===a?.group?(t[n].data.push(a),!0):!1),s=typeof r==`function`?r?.(a?.group):r;return o||t.push({data:[a],enableGroup:!0,name:a?.group,label:n,collapsible:s}),t},[]);return[a,i,a.reduce((e,t)=>(t.data.forEach(t=>{t.type!==`divider`&&e.push({key:t.key,disabled:t.disabled})}),e),[])]},[t,i])},Gt=e=>{e.stopPropagation()},Kt=e=>{let{prefixCls:t,info:r,className:i,direction:a,onClick:s,active:c,menu:l,...d}=e,f=(0,at.default)(d,{aria:!0,data:!0,attr:!0}),{disabled:p}=r,m=o(i,`${t}-item`,{[`${t}-item-active`]:c&&!p},{[`${t}-item-disabled`]:p}),h=()=>{!p&&s&&s(r.key)},{trigger:g,..._}=l||{},v=_?.getPopupContainer;return z.createElement(`li`,n({title:typeof r.label==`object`?void 0:`${r.label}`},f,{className:m,onClick:h}),r.icon&&z.createElement(`div`,{className:`${t}-icon`},r.icon),z.createElement(F.Text,{className:`${t}-label`},r.label),!p&&l&&z.createElement(`div`,{onClick:Gt},z.createElement(ae,{menu:_,placement:a===`rtl`?`bottomLeft`:`bottomRight`,trigger:[`click`],disabled:p,getPopupContainer:v},(e=>{let n=z.createElement(u,{onClick:Gt,className:`${t}-menu-icon`});return g?typeof g==`function`?g(e,{originNode:n}):g:n})(r))))},qt=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:`hidden`,"&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, - opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:`hidden`,transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, - opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),Jt=e=>{let{componentCls:t,calc:n}=e;return{[t]:{display:`flex`,flexDirection:`column`,gap:e.paddingXXS,overflowY:`auto`,padding:e.paddingSM,margin:0,listStyle:`none`,"ul, ol":{margin:0,padding:0,listStyle:`none`},[`&${t}-rtl`]:{direction:`rtl`},[`${t}-creation`]:{backgroundColor:e.creationBgColor,color:e.colorPrimary,border:`none`,fontWeight:500,paddingBlock:e.paddingXS,paddingInline:e.paddingSM,fontSize:e.fontSize,cursor:`pointer`,display:`flex`,gap:e.paddingXS,marginBlockEnd:e.marginSM,lineHeight:e.lineHeight,borderRadius:e.borderRadiusLG,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`&:not(${t}-creation-disabled):hover`]:{color:e.colorPrimary,background:e.creationHoverColor},[`&:not(${t}-creation-disabled)`]:{border:`${c(e.lineWidth)} ${e.lineType}, ${e.creationBorderColor}`},"&-start":{justifyContent:`flex-start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`flex-end`},"&-label":{display:`flex`,justifyContent:`space-between`,alignItems:`center`},"&-label-shortcut-keys-show":{flex:1},"&-label-shortcut-keys":{height:e.controlHeightXS,display:`flex`,alignItems:`center`,gap:c(4)},"&-label-shortcut-key":{borderRadius:e.borderRadiusSM,height:`100%`,boxSizing:`border-box`,fontSize:e.fontSizeIcon,paddingInline:`${c(n(e.paddingXXS).sub(1).equal())}`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:e.shortcutKeyTextColor,border:`${c(e.lineWidth)} ${e.lineType}, ${e.creationBorderColor}`},"&-disabled":{cursor:`not-allowed`,background:e.colorBgContainerDisabled,[`& ${t}-creation-label, ${t}-creation-icon`]:{color:e.colorTextDisabled},[`& ${t}-creation-label-shortcut-keys`]:{color:e.colorTextDisabled,border:`${c(e.lineWidth)} ${e.lineType}, ${e.colorBgContainerDisabled}`}}},[`${t}-divider`]:{marginBlock:e.marginXXS},[`${t}-item`]:{display:`flex`,height:e.controlHeightLG,minHeight:e.controlHeightLG,gap:e.paddingXS,padding:`0 ${c(e.paddingXS)}`,alignItems:`center`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`&:not(${t}-item-disabled):hover`]:{backgroundColor:e.colorBgTextHover},"&-active":{backgroundColor:e.colorBgTextHover,[`& ${t}-label, ${t}-menu-icon`]:{color:e.colorText}},"&-disabled":{cursor:`not-allowed`,[`& ${t}-label, ${t}-icon, ${t}-menu-icon`]:{color:e.colorTextDisabled}},"&:hover, &-active":{[`& ${t}-menu-icon`]:{opacity:.6}},[`${t}-menu-icon:hover`]:{opacity:1}},[`${t}-content-hidden`]:{display:`none`},[`${t}-label`]:{flex:1,color:e.colorText,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},[`${t}-menu-icon`]:{opacity:0,fontSize:e.fontSizeXL},[`${t}-list`]:{display:`flex`,gap:e.paddingXXS,flexDirection:`column`},[`${t}-group-collapsible-list`]:{paddingBlockStart:e.paddingXXS,[`& ${t}-item`]:{paddingInlineStart:e.paddingXL}},[`${t}-group-title`]:{display:`flex`,alignItems:`center`,color:e.colorTextDescription,height:e.controlHeightLG,minHeight:e.controlHeightLG,padding:`0 ${c(e.paddingXS)}`},[`${t}-group-title-collapsible`]:{justifyContent:`space-between`,cursor:`pointer`,color:e.colorText,borderRadius:e.borderRadiusLG,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,"&:hover":{backgroundColor:e.colorBgTextHover}},[`${t}-group-collapse-trigger`]:{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,transform:`rotate(0deg)`,transformOrigin:`center center`},[`${t}-group-collapse-trigger-open`]:{transform:`rotate(90deg)`},[`${t}-group-collapse-trigger-close`]:{transform:`rotate(0deg)`}}}},Yt=Ve(`Conversations`,t=>{let n=e(t,{});return[Jt(n),qt(n)]},e=>{let t=new b(e.colorPrimary).setA(.15),n=new b(e.colorPrimary).setA(.22),r=new b(e.colorPrimary).setA(.25),i=new b(e.colorPrimary).setA(.65);return{creationBgColor:t.toRgbString(),creationBorderColor:n.toRgbString(),creationHoverColor:r.toRgbString(),shortcutKeyTextColor:i.toRgbString()}}),Xt=z.forwardRef((e,t)=>{let{prefixCls:r,shortcutKeys:i,rootClassName:a,items:s,activeKey:c,defaultActiveKey:l,onActiveChange:u,menu:d,styles:f={},classNames:p={},groupable:m,className:h,style:g,creation:v,...y}=e,b=(0,at.default)(y,{attr:!0,aria:!0,data:!0}),x=z.useRef(null);ct(t,()=>({nativeElement:x.current}));let[S,C]=_(l,c),[w,T,E]=Wt(m,s),{getPrefixCls:D,direction:O}=V(),k=D(`conversations`,r),A=de(`conversations`),[ee,te]=Yt(k),j=o(k,A.className,A.classNames.root,h,p.root,a,ee,te,{[`${k}-rtl`]:O===`rtl`}),M=e=>{C(e),u?.(e,s?.find(t=>t.key===e))},[ne,N,ie]=Rt(`conversations`,i);ie(e=>{switch(e?.name){case`items`:{let t=e?.actionKeyCodeNumber??e?.index;typeof t==`number`&&!E?.[t]?.disabled&&E?.[t]?.key&&(C(E?.[t]?.key),u?.(E?.[t]?.key,s?.find(e=>e.key===E?.[t]?.key)))}break;case`creation`:typeof v?.onClick==`function`&&!v?.disabled&&v.onClick();break}});let ae=e=>e.map((e,t)=>{if(e.type===`divider`)return z.createElement(re,{key:`key-divider-${t}`,className:`${k}-divider`,dashed:e.dashed});let r=e,{label:i,disabled:a,icon:s,...c}=r;return z.createElement(Kt,n({},c,{key:r.key||`key-${t}`,info:r,prefixCls:k,direction:O,className:o(p.item,A.classNames.item,r.className),style:{...A.styles.item,...f.item,...r.style},menu:typeof d==`function`?d(r):d,active:S===r.key,onClick:M}))}),[P,oe,se,F]=Tt(T,k,D());return z.createElement(`ul`,n({},b,{style:{...A.style,...g,...A.styles.root,...f.root},className:j,ref:x}),!!v&&z.createElement(Vt,n({className:o(A.classNames.creation,p.creation),style:{...A.styles.creation,...f.creation},shortcutKeyInfo:N?.creation,prefixCls:`${k}-creation`},v)),w.map((e,t)=>{let n=ae(e.data);return e.enableGroup?z.createElement(Ht.Provider,{key:e.name||`key-${t}`,value:{prefixCls:k,groupInfo:e,enableCollapse:P,expandedKeys:oe,onItemExpand:se,collapseMotion:F}},z.createElement(Ut,{className:o(A.classNames.group,p.group)},z.createElement(`ul`,{className:o(`${k}-list`,{[`${k}-group-collapsible-list`]:e.collapsible}),style:{...A.styles.group,...f.group}},n))):n}))});Xt.Creation=Vt;var Zt=z.createContext(null),Qt=z.forwardRef((e,t)=>{let{className:r,action:i,onClick:a,...s}=e,c=(0,z.useContext)(Zt),{prefixCls:l,disabled:u,setSubmitDisabled:d}=c,f=s.disabled??u??c[`${i}Disabled`];return(0,z.useEffect)(()=>{i===`onSend`&&d?.(f)},[f,i,d]),z.createElement(T,n({type:`text`},s,{ref:t,onClick:e=>{f||(c[i]?.(),a?.(e))},disabled:f,className:o(l,r,{[`${l}-disabled`]:f})}))});function $t(e,t){return z.createElement(Qt,n({icon:z.createElement(O,null)},e,{action:`onClear`,ref:t}))}var en=z.forwardRef($t),tn=(0,z.memo)(e=>{let{className:t}=e,[n]=we(`Sender`,H.Sender);return z.createElement(`svg`,{color:`currentColor`,viewBox:`0 0 1000 1000`,xmlns:`http://www.w3.org/2000/svg`,className:t},z.createElement(`title`,null,n.stopLoading),z.createElement(`rect`,{fill:`currentColor`,height:`250`,rx:`24`,ry:`24`,width:`250`,x:`375`,y:`375`}),z.createElement(`circle`,{cx:`500`,cy:`500`,fill:`none`,r:`450`,stroke:`currentColor`,strokeWidth:`100`,opacity:`0.45`}),z.createElement(`circle`,{cx:`500`,cy:`500`,fill:`none`,r:`450`,stroke:`currentColor`,strokeWidth:`100`,strokeDasharray:`600 9999999`},z.createElement(`animateTransform`,{attributeName:`transform`,dur:`1s`,from:`0 500 500`,repeatCount:`indefinite`,to:`360 500 500`,type:`rotate`})))}),nn=z.forwardRef((e,t)=>{let{prefixCls:r}=z.useContext(Zt),{className:i}=e;return z.createElement(Qt,n({icon:z.createElement(tn,{className:`${r}-loading-icon`}),color:`primary`,variant:`text`,shape:`circle`},e,{className:o(i,`${r}-loading-button`),action:`onCancel`,ref:t}))});function rn(e,t){return z.createElement(Qt,n({icon:z.createElement(ee,null),type:`primary`,shape:`circle`},e,{action:`onSend`,ref:t}))}var an=z.forwardRef(rn),on=z.createContext({}),sn=e=>{let t=(0,z.useCallback)(()=>typeof window>`u`?null:window.getSelection(),[]),n=(e,t)=>{if(!e||!t)return t;let n=e,r=null;for(n.nodeType===Node.TEXT_NODE&&(n=n.parentElement);n&&n!==t;)n instanceof HTMLElement&&n.tagName===`SPAN`&&(r=n),n=n.parentElement;return r||t},r=(0,z.useCallback)(()=>{let e=t();if(!e)return{range:null,selection:e};try{return{range:e.getRangeAt(0)||document.createRange(),selection:e}}catch{return{range:document.createRange(),selection:e}}},[t]),i=(0,z.useCallback)((e,t)=>{if(!(!e||!t))try{t.removeAllRanges(),t.addRange(e)}catch(e){W(!1,`Sender`,`Failed to set range: ${e}`)}},[]),a=(0,z.useCallback)(()=>{let e=t();if(e)try{e.removeAllRanges()}catch(e){W(!1,`Sender`,`Failed to remove all ranges: ${e}`)}},[t]),o=(0,z.useCallback)((e,t=!1)=>{if(!(!e||typeof e.focus!=`function`))try{e.focus({preventScroll:t})}catch(e){W(!1,`Sender`,`Failed to focus element: ${e}`)}},[]),s=(0,z.useCallback)((e,t)=>{if(!e)return;o(e,t);let{range:n,selection:a}=r();if(n&&a)try{n.selectNodeContents(e),n.collapse(!1),i(n,a)}catch(e){W(!1,`Sender`,`Failed to set end cursor: ${e}`)}},[o,r,i]),c=(0,z.useCallback)((e,t)=>{if(!e)return;o(e,t);let{range:n,selection:a}=r();if(n&&a)try{n.selectNodeContents(e),n.collapse(!0),i(n,a)}catch(e){W(!1,`Sender`,`Failed to set start cursor: ${e}`)}},[o,r,i]),l=(0,z.useCallback)((e,t,n)=>{if(!e)return;o(e,n);let{range:a,selection:s}=r();if(a&&s)try{a.selectNodeContents(e),t&&a.setStart(e,1),i(a,s)}catch(e){W(!1,`Sender`,`Failed to select all content: ${e}`)}},[o,r,i]),u=(0,z.useCallback)((e,t,n,a)=>{if(!e||typeof n!=`number`||n<0||!t)return{range:null,selection:null};o(t,a);let{range:s,selection:c}=r();if(s&&c)try{let t=Math.min(n,e.childNodes.length);s.setStart(e,t),s.setEnd(e,t),s.collapse(!1),i(s,c)}catch(e){W(!1,`Sender`,`Failed to set cursor position:: ${e}`)}return{range:s,selection:c}},[o,r,i]),d=(0,z.useCallback)((t,n,r=!1)=>{if(!e||!t?.current)return;let{getSlotDom:i,slotConfigMap:a}=e,o=e=>{let t=i(e);if(!t)return null;let n=a.get(e);if(!n)return null;if(n.type===`input`)return t.querySelector(`input`);let r=t?.getAttribute?.(`data-node-type`)||``;return n.type===`content`&&r!==`nbsp`?t:null},s=(e=>{let n=t.current;if(!n)return null;if(e)return o(e);for(let e of Array.from(n.childNodes)){let t=e?.getAttribute?.(`data-slot-key`);if(t){let e=o(t);if(e)return e}}return null})(n);s&&(s.nodeName===`INPUT`?s.focus({preventScroll:r}):u(s,t.current,0,r))},[e,u]),f=(0,z.useCallback)((e,t,n,r,i)=>{!n||!r||(o(t,i),n?.setStartAfter(e),n.collapse(!1),r.removeAllRanges(),r.addRange(n))},[o]),p=(0,z.useCallback)(e=>{if(!e)return{value:``,startContainer:null,startOffset:0};let n=t();if(!n||n.rangeCount===0)return{value:``,startContainer:null,startOffset:0};try{let t=n.getRangeAt(0),r=t.cloneRange();if(!e.contains(t.startContainer))return{value:``,startContainer:null,startOffset:0};if(t.endContainer===e&&t.endContainer.lastChild?.nodeType===Node.TEXT_NODE){let e=t.endContainer.lastChild;t=document.createRange(),t.setStart(e,e.length),t.setEnd(e,e.length)}return r=t.cloneRange(),r.selectNodeContents(e),r.setEnd(t.startContainer,t.startOffset),{value:r.toString().replace(/\u200B/g,``),startContainer:t.startContainer,startOffset:t.startOffset}}catch(e){return W(!1,`Sender`,`Failed to get text before cursor: ${e}`),{value:``,startContainer:null,startOffset:0}}},[t]),m=(0,z.useCallback)((i,a,o)=>{if(i===`start`||i===`end`)return{type:i,selection:t()};let l=null,u=null;if(o?.current)l=o.current,u=t();else{let e=r();l=e.range,u=e.selection}if(!l||!u)return{type:`end`,selection:u};let d=a?.current;if(!d)return{type:`end`,selection:u};let f=d.contains(l.endContainer),p=d.contains(l.startContainer);if(!f)return s(d,!0),{type:`end`,selection:u};if(!p)return c(d,!0),{type:`start`,selection:u};let m=n(l.endContainer,d),h=n(l.startContainer,d);if(m===h&&h!==d&&e?.getNodeInfo){let{slotKey:t,slotConfig:n,skillKey:r}=e.getNodeInfo(m)||{};if(t)return{type:`slot`,slotKey:n?.key,slotType:n?.type,range:l,selection:u};if(r)return{type:`start`,selection:u}}return{type:`box`,range:l,selection:u}},[e,r,t,s,c,n]),h=(0,z.useCallback)(e=>{let t=e.childNodes[e.childNodes.length-1];return u(e,e,t?.nodeType===Node.TEXT_NODE&&t.textContent===` -`?e.childNodes.length-1:e.childNodes.length).range||document.createRange()},[u]),g=(0,z.useCallback)(t=>u(t,t,+!!e?.getEditorValue?.().skill).range||document.createRange(),[u,e]),_=(0,z.useCallback)(e=>e.replace(/\u200B/g,``).replace(/\n/g,``).replace(/^\n+|\n+$/g,``),[]);return{setEndCursor:s,setStartCursor:c,setAllSelectCursor:l,setCursorPosition:u,setAfterNodeFocus:f,setSlotFocus:d,getTextBeforeCursor:p,getSelection:t,removeAllRanges:a,getRange:r,getInsertPosition:m,getEndRange:h,getStartRange:g,copySelectionString:(0,z.useCallback)(async()=>{try{let e=t();if(!e)return!1;let n=e.toString();if(!n)return!1;let r=_(n);return await navigator.clipboard.writeText(r),!0}catch(e){return W(!1,`Sender`,`Failed to copy selection: ${e}`),!1}},[t,_]),getCleanedText:_}},cn=4.35,ln=(e,t,n)=>{let{token:r}=Be(),i=n.current?window.getComputedStyle(n.current):{},a=parseFloat(`${e.lineHeight||r.lineHeight}`),o=parseFloat(`${i?.fontSize||e.fontSize||r.fontSize}`),s=i?.lineHeight?parseFloat(`${i?.lineHeight}`):a*o;return t===!1||!t?{}:t===!0?{height:`auto`}:{minHeight:t.minRows?(s+cn)*t.minRows:`auto`,maxHeight:t.maxRows?(s+cn)*t.maxRows:`auto`,overflowY:`auto`}},un=e=>{let{prefixCls:t,placeholder:n,slotDomMap:r,slotConfigMap:i}=e,a=(0,z.useCallback)(e=>{let r=document.createElement(`span`);return r.setAttribute(`contenteditable`,`false`),r.dataset.skillKey=e,r.dataset.placeholder=n||``,r.className=`${t}-skill`,r},[t,n]),s=(0,z.useCallback)(e=>{let n=document.createElement(`span`);return n.setAttribute(`contenteditable`,`true`),n.dataset.slotKey=e.key,n.className=o(`${t}-slot`,`${t}-slot-content`),n},[t]),c=(0,z.useCallback)(e=>{let n=document.createElement(`span`);return n.setAttribute(`contenteditable`,`false`),n.dataset.slotKey=e,n.className=`${t}-slot`,n},[t]),l=(0,z.useCallback)((e,n)=>{let r=document.createElement(`span`);return r.setAttribute(`contenteditable`,`false`),r.dataset.slotKey=e,r.dataset.nodeType=`nbsp`,r.className=o(`${t}-slot-${n}`,`${t}-slot-no-width`),r.textContent=`\xA0`,r},[t]),u=(e,t)=>{r.current.set(e,t)},d=e=>r.current.get(e);return{buildSkillSpan:a,buildEditSlotSpan:s,buildSlotSpan:c,buildSpaceSpan:l,saveSlotDom:u,getSlotDom:d,getSlotLastDom:(e,t)=>(t??i.get(e)?.type)===`content`?d(`${e}_after`):d(e)}},dn=new Set([`input`,`select`,`custom`,`content`]),fn=e=>e?.reduce((e,t)=>{let{key:n,type:r}=t;if(!n)return e;let i=t.props||{};return e[n]=(dn.has(r)?i.defaultValue:i.value??i.label)??``,e},{})??{},pn=(e,t)=>{e?.forEach(e=>{e.key&&t.set(e.key,e)})},mn=(e,t)=>{if(!e?.dataset)return null;let{dataset:n}=e;return{slotKey:n.slotKey,placeholder:n.placeholder,nodeType:n.nodeType,skillKey:n.skillKey,slotConfig:n.slotKey?t.get(n.slotKey):void 0,targetNode:e}},hn=e=>{let[t,n]=(0,z.useState)({}),r=(0,z.useRef)(t),i=(0,z.useRef)(new Map),a=(0,z.useRef)(new Set);(0,z.useEffect)(()=>{if(!e)return;i.current.forEach((e,t)=>{a.current.has(t)||i.current.delete(t)}),pn(e,i.current);let t=fn(e);a.current.forEach(e=>{e in r.current&&(t[e]=r.current[e])}),n(t),r.current=t},[e]);let o=(0,z.useCallback)(e=>{let t=typeof e==`function`?e(r.current):e;n(t),r.current=t},[]),s=(0,z.useCallback)(e=>{let t=fn(e);e.forEach(e=>{e.key&&(i.current.set(e.key,e),a.current.add(e.key))}),n(e=>({...e,...t})),r.current={...r.current,...t}},[]),c=(0,z.useCallback)(()=>{i.current.clear(),a.current.clear(),n({}),r.current={}},[]),l=(0,z.useCallback)(e=>mn(e,i.current),[]);return[i.current,{getSlotValues:()=>r.current,setSlotValues:o,mergeSlotConfig:s,getNodeInfo:l,getNodeTextValue:e=>{let t=e.nodeType;if(t===Node.TEXT_NODE)return e.textContent||``;if(t!==Node.ELEMENT_NODE)return``;let n=e,i=l(n);if(!i)return n.innerText||``;let{slotKey:a,skillKey:o,nodeType:s,slotConfig:c}=i;if(o)return``;let u=n.innerText||``;if(a){if(s===`nbsp`)return` `;if(!c||c.type===`content`)return u;let e=r.current[a]??``;return c.formatResult?.(e)??e}return u},clear:c}]},gn=({removeSkill:e,prefixCls:t,toolTip:n,closable:r,title:i,value:a})=>{let s=`${t}-skill`,c=(0,z.useMemo)(()=>{if(!r)return[null];let t=typeof r==`boolean`?{}:r,n=n=>{t.disabled||(n.stopPropagation(),e(),t.onClose?.(n))},i=t.closeIcon||z.createElement(v,{className:`${s}-close-icon`});return z.createElement(`div`,{className:o(`${s}-close`,{[`${s}-close-disabled`]:t.disabled}),onClick:n,role:`button`,"aria-label":`Close skill`,tabIndex:0},i)},[r,e]),l=i||a,u=n?z.createElement(w,n,l):l;return z.createElement(`div`,{className:`${s}-wrapper`,contentEditable:!1},z.createElement(`div`,{className:`${s}-tag`,contentEditable:!1,role:`button`,tabIndex:0},z.createElement(`span`,{className:`${s}-tag-text`},u),c),z.createElement(`div`,{className:`${s}-holder`}))};gn.displayName=`Skill`;var _n=r(y()),vn=z.forwardRef((e,t)=>{let{onChange:r,onKeyUp:i,onKeyDown:a,onPaste:s,onPasteFile:c,disabled:l,readOnly:u,submitType:d=`enter`,prefixCls:f,styles:p={},classNames:m={},autoSize:h,triggerSend:g,placeholder:_,onFocus:v,onBlur:y,slotConfig:b,skill:x,...S}=z.useContext(on),{direction:C,getPrefixCls:w}=V(),T=`${w(`sender`,f)}`,E=de(`sender`),D=`${T}-input`,O=(0,z.useRef)(null),A=(0,z.useRef)(new Map),ee=(0,z.useRef)(!1),te=(0,z.useRef)(!1),j=(0,z.useRef)(null),M=(0,z.useRef)(null),ne=(0,z.useRef)(null),N={...E.styles?.input,...p.input},re=ln(N,h,O),P={...(0,at.default)(S,{attr:!0,aria:!0,data:!0}),ref:O},[oe,{getSlotValues:se,setSlotValues:F,getNodeInfo:ce,mergeSlotConfig:I,getNodeTextValue:L,clear:le}]=hn(b),[R,B]=(0,z.useState)(new Map),[ue,fe]=(0,z.useState)(null),{setEndCursor:pe,setStartCursor:me,setAllSelectCursor:he,setCursorPosition:ge,setSlotFocus:_e,setAfterNodeFocus:ve,getTextBeforeCursor:ye,removeAllRanges:be,getRange:xe,getInsertPosition:Se,getEndRange:H,getStartRange:Ce,getSelection:we,copySelectionString:Te,getCleanedText:Ee}=sn({prefixCls:T,getSlotDom:e=>A.current.get(e),slotConfigMap:oe,getNodeInfo:ce,getEditorValue:()=>Re()}),{buildSkillSpan:De,buildEditSlotSpan:Oe,buildSlotSpan:ke,buildSpaceSpan:Ae,getSlotDom:je,saveSlotDom:Me,getSlotLastDom:Ne}=un({prefixCls:T,placeholder:_,slotDomMap:A,slotConfigMap:oe}),Pe=e=>{let t=Re();M.current&&(!t?.value&&t.slotConfig.length===0&&_?(M.current.setAttribute(`contenteditable`,`true`),M.current.classList.add(`${T}-skill-empty`)):(M.current.setAttribute(`contenteditable`,`false`),M.current.classList.remove(`${T}-skill-empty`))),r?.(t.value,e,t.slotConfig,t.skill)},Fe=(e,t,n)=>{let r=je(e),i=oe.get(e);if(F(n=>({...n,[e]:t})),r&&i){let t=Ie(i,r);B(n=>{let r=new Map(n);return r.set(e,t),r}),Pe(n)}},Ie=(e,t)=>{if(!e.key)return null;let n=se()[e.key];return(0,_n.createPortal)((()=>{switch(e.type){case`content`:return t.innerHTML=n||``,t.setAttribute(`data-placeholder`,e.props?.placeholder||``),null;case`input`:return z.createElement(ie,{readOnly:u,className:`${T}-slot-input`,placeholder:e.props?.placeholder||``,"data-slot-input":e.key,size:`small`,variant:`borderless`,value:n||``,tabIndex:0,onKeyDown:Ze,onChange:t=>{Fe(e.key,t.target.value,t)},spellCheck:!1});case`select`:return z.createElement(ae,{disabled:u,menu:{items:e.props?.options?.map(e=>({label:e,key:e})),defaultSelectedKeys:e.props?.defaultValue?[e.props.defaultValue]:[],selectable:!0,onSelect:({key:t,domEvent:n})=>{Fe(e.key,t,n)}},trigger:[`click`]},z.createElement(`span`,{className:o(`${T}-slot-select`,{placeholder:!n,[`${T}-slot-select-selector-value`]:n})},z.createElement(`span`,{"data-placeholder":e.props?.placeholder,className:`${T}-slot-select-value`},n||``),z.createElement(`span`,{className:`${T}-slot-select-arrow`},z.createElement(k,null))));case`tag`:return z.createElement(`span`,{className:`${T}-slot-tag`},e.props?.label||e.props?.value||``);case`custom`:return e.customRender?.(n,t=>{Fe(e.key,t)},{disabled:l,readOnly:u},e);default:return null}})(),t)},Le=e=>e.reduce((e,t)=>{if(t.type===`text`)return e.push(document.createTextNode(t.value||``)),e;let n=t.key;if(W(!!n,`Sender`,`Slot key is missing: ${n}`),n){let r,i;if(t.type===`content`){i=Oe(t);let e=Ae(n,`before`),a=Ae(n,`after`);r=[e,i,a],Me(`${n}_before`,e),Me(n,i),Me(`${n}_after`,a)}else i=ke(n),r=[i],Me(n,i);if(i){let a=Ie(t,i);a&&(B(e=>{let t=new Map(e);return t.set(n,a),t}),e.push(...r))}}return e},[]),Re=()=>{let e=O.current,t={value:``,slotConfig:[],skill:void 0};if(!e)return t;let n=e.childNodes;if(n.length===0)return e.innerHTML=``,M.current=null,t;let r=!!x,i=Array(n.length),a=[],o,s=0;for(let e=0;e{let e=O.current;e&&(e.innerHTML=``,M.current=null,ne.current=null,j.current=null,be(),A?.current?.clear())},Be=e=>{e.forEach(e=>{O.current?.appendChild(e)})},Ve=(e,t)=>{let n=O.current;n&&(n.querySelectorAll(`[data-slot-key="${e}"]`).forEach(e=>{e.remove()}),A.current.delete(e),F(t=>{let{[e]:n,...r}=t;return r}),B(t=>{let n=new Map(t);return n.delete(e),n}),Pe(t))},He=()=>{if(x&&ne.current!==x){Ue(!1),ne.current=x;let e=De(x.value);fe((0,_n.createPortal)(z.createElement(gn,n({removeSkill:Ue},x,{prefixCls:T})),e));let t=document.createRange(),r=O.current;if(!r)return;t.setStart(r,0),t.insertNode(e),M.current=e,Pe()}},Ue=(e=!0)=>{!O.current||!M.current||(M.current?.remove(),M.current=null,ne.current=null,e&&Pe())},We=e=>{d!==`enter`||!e||e.querySelectorAll(`br`).forEach(e=>{e.remove()})},Ge=()=>{b&&b.length>0&&O.current&&(ze(),Be(Le(b)))},Ke=e=>{let t=a?.(e);return te.current||ee.current||t===!1},qe=(e,t)=>{if(!O.current)return!1;let{range:n,selection:r}=xe();if(!r||r.rangeCount===0)return!1;let{focusOffset:i,anchorNode:a}=r;if(!a||!O.current.contains(a))return!1;if(a.nodeType===Node.TEXT_NODE&&n){let r=a.parentNode,o=ce(r),s=n.toString(),c=a.textContent?.length===s.length,l=a.textContent?.length===1&&i===1;if(o?.slotConfig?.type===`content`&&(c||l))return e.preventDefault(),t===`cut`&&Te(),a.parentNode.innerHTML=``,!0}if(t===`backspace`&&i===0){let t=a.previousSibling;if(t){let n=ce(t);if(n){let{slotKey:t,skillKey:r}=n;if(t)return e.preventDefault(),Ve(t,e),!0;if(r)return e.preventDefault(),Ue(),!0}}}return!1},Je=e=>{let{key:t,shiftKey:n,ctrlKey:r,altKey:i,metaKey:a}=e;if(t!==`Enter`)return!1;let o=r||i||a;return d===`enter`&&!n&&!o||d===`shiftEnter`&&n&&!o},Ye=()=>{if(!M.current||!O.current||M.current.getAttribute(`contenteditable`)===`false`)return;let e=we();!e?.anchorNode||!M.current.contains(e.anchorNode)||!O.current.contains(e.anchorNode)||(M.current.setAttribute(`contenteditable`,`false`),M.current.classList.remove(`${T}-skill-empty`),dt({cursor:`end`}))},Xe=()=>{ee.current=!0},U=()=>{ee.current=!1,te.current=!1},Ze=e=>{if(!Ke(e)&&!(e.key===`Backspace`&&qe(e,`backspace`))){if(Je(e)){e.preventDefault(),te.current=!0,g?.();return}if((e.key===`a`||e.key===`A`)&&(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey){he(O.current,M.current),e.preventDefault();return}Ye()}},Qe=e=>{v?.(e)},$e=e=>{te.current&&=!1;let{range:t}=xe();j.current=t;let n=setTimeout(()=>{j.current=null,clearTimeout(n)},200);y?.(e)},et=e=>{We(O?.current),Pe(e)},tt=e=>{qe(e,`cut`)},nt=e=>{e.preventDefault();let t=e.clipboardData?.files,n=e.clipboardData?.getData(`text/plain`);if(!n&&t?.length&&c){c(t);return}if(n){let e=!1,t=Ee(n);try{e=document.execCommand(`insertText`,!1,t)}catch(e){W(!1,`Sender`,`insertText command failed: ${e}`)}e||ot([{type:`text`,value:t}])}s?.(e)},rt=e=>{e.key===`Enter`&&(te.current=!1),i?.(e)},it=()=>{let e=O.current,t=we();e&&t?.focusNode===e&&t.focusOffset===0&&Re().skill&&ge(e,O.current,1)},ot=(e,t,n,r)=>{let i=O.current;if(i)try{I(e);let a=Le(e);if(a.length===0)return;let o=st(t,i);if(!o.range||!o.selection)return;let{range:s,selection:c}=o;n?.length&&ct(s,n,i),s.deleteContents(),lt(a,s,o),ut(a,s,c,r)}catch(e){W(!1,`Sender`,`Insert operation failed: ${e}`)}},st=(e,t)=>{let{type:n,slotKey:r,slotType:i,range:a,selection:o}=Se(e,O,j);if(!o)return{range:null,selection:null,type:n};let s=null;switch(n){case`end`:s=H(t);break;case`start`:s=Ce(t);break;case`slot`:s=xe().range;break;case`box`:s=a||null,s&&M.current&&s.collapsed&&s.startOffset===0&&s.setStartAfter(M.current);break}return{range:s,selection:o,type:n,slotKey:r,slotType:i}},ct=(e,t,n)=>{let{value:r,startContainer:i,startOffset:a}=ye(n);r.length>=t.length&&r.endsWith(t)&&i&&a>=0&&(e.setStart(i,a-t.length),e.setEnd(i,a),e.deleteContents())},lt=(e,t,n)=>{let{type:r,slotKey:i,slotType:a}=n,o=!0;e.forEach(e=>{if(o&&r===`slot`&&(a!==`content`||e.nodeType!==Node.TEXT_NODE)&&i){o=!1;let e=Ne(i);e&&t.setStartAfter(e)}t.insertNode(e),t.setStartAfter(e)})},ut=(e,t,n,r)=>{let i=e[e.length-1];ve(i,O.current,t,n,r),setTimeout(()=>{et(null)},0)},dt=e=>{let t={preventScroll:e?.preventScroll??!1,cursor:e?.cursor??`end`,key:e?.key};switch(t.cursor){case`slot`:_e(O,e?.key,t.preventScroll);break;case`start`:me(O.current,t.preventScroll);break;case`all`:he(O.current,M.current,t.preventScroll);break;case`end`:pe(O.current,t.preventScroll);break}},ft=()=>{let e=O.current;e&&(e.innerHTML=``,ne.current=null,M.current=null,le(),He(),j.current=null,A?.current?.clear(),et(null))};return(0,z.useEffect)(()=>{Ge(),x?He():Pe()},[b]),(0,z.useEffect)(()=>{He()},[x]),(0,z.useImperativeHandle)(t,()=>({nativeElement:O.current,focus:dt,blur:()=>O.current?.blur(),insert:ot,clear:ft,getValue:Re})),z.createElement(z.Fragment,null,z.createElement(`div`,n({},P,{role:`textbox`,tabIndex:0,style:{...N,...re},className:o(D,`${D}-slot`,E.classNames.input,m.input,{[`${T}-rtl`]:C===`rtl`}),"data-placeholder":_,contentEditable:!u,suppressContentEditableWarning:!0,spellCheck:!1,onCut:tt,onKeyDown:Ze,onKeyUp:rt,onPaste:nt,onCompositionStart:Xe,onCompositionEnd:U,onFocus:Qe,onBlur:$e,onSelect:it,onInput:et},S)),z.createElement(`div`,{style:{display:`none`},id:`${T}-slot-placeholders`},Array.from(R.values()),ue))}),yn=1e3,bn=4,xn=140,Sn=xn/2,Cn=250,wn=500,Tn=.8;function En({className:e}){let[t]=we(`Sender`,H.Sender);return z.createElement(`svg`,{color:`currentColor`,viewBox:`0 0 ${yn} ${yn}`,xmlns:`http://www.w3.org/2000/svg`,className:e},z.createElement(`title`,null,t.speechRecording),Array.from({length:bn}).map((e,t)=>{let n=t*286.66666666666663,r=yn/2-Cn/2,i=yn/2-wn/2;return z.createElement(`rect`,{fill:`currentColor`,rx:Sn,ry:Sn,height:Cn,width:xn,x:n,y:r,key:t},z.createElement(`animate`,{attributeName:`height`,values:`${Cn}; ${wn}; ${Cn}`,keyTimes:`0; 0.5; 1`,dur:`${Tn}s`,begin:`${Tn/bn*t}s`,repeatCount:`indefinite`}),z.createElement(`animate`,{attributeName:`y`,values:`${r}; ${i}; ${r}`,keyTimes:`0; 0.5; 1`,dur:`${Tn}s`,begin:`${Tn/bn*t}s`,repeatCount:`indefinite`}))}))}var Dn=z.forwardRef((e,t)=>{let{speechRecording:r,disabled:i,onSpeechDisabled:a,prefixCls:o}=z.useContext(Zt),s=e.disabled??i??a,c=null;return c=r?z.createElement(En,{className:`${o}-recording-icon`}):s?z.createElement(A,null):z.createElement(M,null),z.createElement(Qt,n({icon:c,variant:`text`,color:`primary`},e,{action:`onSpeech`,ref:t}))}),On=r(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e,t){let n=e;for(let e=0;e{let{value:r,onChange:i,onKeyUp:a,onKeyDown:s,onPaste:c,onPasteFile:l,disabled:u,readOnly:d,submitType:f=`enter`,prefixCls:p,styles:m={},classNames:h={},autoSize:g,components:_,triggerSend:v,placeholder:y,onFocus:b,onBlur:x,...S}=z.useContext(on),C=z.useRef(null),w=(e,t=`cursor`)=>{let n=C.current?.resizableTextArea?.textArea,r=n.value,a=r.length,o=r.length;t===`cursor`&&(a=n?.selectionStart,o=n?.selectionEnd),t===`start`&&(a=0,o=0),n.value=r.substring(0,a)+e+r.substring(o,r.length),n.selectionStart=a+e.length,n.selectionEnd=a+e.length,n.focus(),i?.(n.value)},T=()=>{i?.(``)},E=()=>({value:r||``,slotConfig:[]});z.useImperativeHandle(t,()=>({nativeElement:C.current?.resizableTextArea?.textArea,focus:C.current?.focus,blur:C.current?.blur,insert:w,clear:T,getValue:E}));let D=z.useRef(!1),O=()=>{D.current=!0},k=()=>{D.current=!1},A=e=>{let t=s?.(e),{key:n,shiftKey:r,ctrlKey:i,altKey:a,metaKey:o}=e;if(!(D.current||n!==`Enter`||t===!1)&&n===`Enter`){let t=i||a||o;if(f===`enter`&&!r&&!t||f===`shiftEnter`&&r&&!t){e.preventDefault(),v?.();return}}},ee=e=>{let t=e.clipboardData?.files;!e.clipboardData?.getData(`text/plain`)&&t?.length&&l&&(l(t),e.preventDefault()),c?.(e)},te=kn(_,[`input`],ie.TextArea),j={...(0,at.default)(S,{attr:!0,aria:!0,data:!0}),ref:C};return z.createElement(te,n({},j,{disabled:u,style:m.input,className:o(`${p}-input`,h.input),autoSize:g,value:r,onChange:e=>{i?.(e.target.value,e)},onKeyUp:a,onCompositionStart:O,onCompositionEnd:k,onKeyDown:A,onPaste:ee,variant:`borderless`,readOnly:d,placeholder:y,onFocus:b,onBlur:x}))});function jn(e,t){let n=l(e),[r,i,a]=z.useMemo(()=>typeof t==`object`?[t.recording,t.onRecordingChange,typeof t.recording==`boolean`]:[void 0,void 0,!1],[t]),[o,s]=z.useState(null);z.useEffect(()=>{if(!a&&`permissions`in navigator){let e=null;return navigator.permissions.query({name:`microphone`}).then(t=>{s(t.state),t.onchange=function(){s(this.state)},e=t}).catch(e=>{W(!1,`Sender`,`Browser does not support querying microphone permission. ${e instanceof Error?e.message:String(e)}`)}),()=>{e&&(e.onchange=null)}}},[a]);let c;!c&&typeof window<`u`&&(c=window.SpeechRecognition||window.webkitSpeechRecognition);let u=!!(a||c&&o!==`denied`),d=z.useRef(null),[f,p]=_(!1,r),m=z.useRef(!1),h=()=>{if(u&&!d.current){let e=new c;e.onstart=()=>{p(!0)},e.onend=()=>{p(!1)},e.onresult=e=>{if(!m.current){let t=e.results?.[0]?.[0]?.transcript;n(t)}m.current=!1},d.current=e}};return[u,l(e=>{e&&!f||(m.current=e,a?i?.(!f):(h(),d.current&&(f?(d.current.stop(),i?.(!1)):(d.current.start(),i?.(!0)))))}),f]}var Mn=z.createContext({}),Nn=()=>({height:0}),Pn=e=>({height:e.scrollHeight});function Fn(e){let{title:t,onOpenChange:n,open:r,children:i,className:s,style:c,classNames:l={},styles:u={},prefixCls:d,closable:f,forceRender:p}=e,{prefixCls:m}=z.useContext(Mn),{direction:h,getPrefixCls:g}=V(),_=g(`sender`,d||m),y=`${_}-header`,b=()=>{n?.(!r)};return z.createElement(a,{motionEnter:!0,motionLeave:!0,motionName:`${y}-motion`,leavedClassName:`${y}-motion-hidden`,onEnterStart:Nn,onEnterActive:Pn,onLeaveStart:Pn,onLeaveActive:Nn,visible:r,forceRender:p},({className:e,style:n})=>z.createElement(`div`,{className:o(_,y,e,s,{[`${y}-rtl`]:h===`rtl`}),style:{...n,...c}},(f!==!1||t)&&z.createElement(`div`,{className:o(`${y}-header`,l.header),style:{...u.header}},z.createElement(`div`,{className:`${y}-title`},t),f!==!1&&z.createElement(`div`,{className:`${y}-close`},z.createElement(T,{type:`text`,icon:z.createElement(v,null),size:`small`,onClick:b}))),i&&z.createElement(`div`,{className:o(`${y}-content`,l.content),style:{...u.content}},i)))}var In=e=>{let{componentCls:t,calc:n}=e,r=`${t}-header`;return{[t]:{[`&${r}-rtl`]:{direction:`rtl`},[`${r}`]:{borderBottomWidth:e.lineWidth,borderBottomStyle:`solid`,borderBottomColor:e.colorBorderInput,[`${r}-header`]:{background:e.colorFillAlter,fontSize:e.fontSize,lineHeight:e.lineHeight,paddingBlock:n(e.paddingSM).sub(e.lineWidthBold).equal(),paddingInlineStart:e.padding,paddingInlineEnd:e.paddingXS,display:`flex`,borderRadius:{_skip_check_:!0,value:n(e.borderRadius).mul(2).equal()},borderEndStartRadius:0,borderEndEndRadius:0,[`${r}-title`]:{flex:`auto`}},[`${r}-content`]:{padding:e.padding}},[`${r}-motion`]:{transition:[`height`,`border`].map(t=>`${t} ${e.motionDurationSlow}`).join(`,`),overflow:`hidden`,"&-enter-start, &-leave-active":{borderBottomColor:`transparent`},"&-hidden":{display:`none`}}}}},Ln=e=>{let{componentCls:t,antCls:n,calc:r}=e,i=`${t}-slot`,a=`${n}-input`,o=`${n}-dropdown-trigger`,s=`${t}-slot-input`,l=`${t}-slot-select`,u=`${t}-slot-tag`,d=`${t}-slot-content`,f=`${t}-skill`;return{[t]:{[`${t}-input-slot`]:{outline:`none`,cursor:`text`,whiteSpace:`pre-wrap`,width:`100%`,caretColor:e.colorPrimary,fontSize:e.fontSize,lineHeight:e.lineHeight,"&:empty::before":{content:`attr(data-placeholder)`,color:e.colorTextPlaceholder}},[`${i}:not(${d})`]:{display:`inline-block`,verticalAlign:`middle`,alignItems:`center`,marginBlock:1,height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),wordBreak:`break-all`,marginInline:e.marginXXS},[`${a}${s}`]:{height:`100%`,background:e.colorBgSlot,outline:`none`,color:e.colorTextSlot,borderRadius:e.borderRadius,paddingInline:e.paddingXXS,fontSize:`inherit`,lineHeight:`inherit`,position:`relative`,"&::placeholder":{color:e.colorTextSlotPlaceholder,fontSize:`inherit`,lineHeight:`inherit`},[i]:{display:`inline-flex`,margin:`0 ${c(e.marginXXS)}`,verticalAlign:`bottom`,alignItems:`center`,marginBlock:c(r(e.marginXXS).div(2).equal()),minHeight:e.controlHeightSM,wordBreak:`break-all`}},[l]:{fontSize:e.fontSize,lineHeight:e.lineHeight,paddingInline:e.paddingXXS,transition:`border-color ${e.motionDurationMid}`,position:`relative`,display:`inline-flex`,alignItems:`center`,cursor:`pointer`,background:e.colorBgSlot,height:`100%`,boxSizing:`border-box`,borderRadius:e.borderRadius,color:e.colorTextSlot,border:`1px solid ${e.colorBorderSlot}`,"&.placeholder":{color:e.colorTextSlotPlaceholder},[`${l}`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,padding:`0 ${c(e.paddingXXS)}`,transition:`border-color ${e.motionDurationMid}`,position:`relative`,display:`inline`,cursor:`pointer`,background:e.colorBgSlot,alignItems:`center`,justifyContent:`center`,borderRadius:e.borderRadius,color:e.colorTextSlot,border:`1px solid ${e.colorBorderSlot}`,"&.placeholder":{color:e.colorTextSlotPlaceholder},[`&${o}-open`]:{borderColor:e.colorBorderSlotHover}},[`${l}-value`]:{flex:1,fontSize:e.fontSize,lineHeight:e.lineHeight,"&:empty::before":{content:`attr(data-placeholder)`}},[`${l}-arrow`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSize,lineHeight:e.lineHeight,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},[`${u}`]:{background:e.colorBgSlot,border:`1px solid ${e.colorBorderSlot}`,outline:`none`,color:e.colorTextSlot,borderRadius:e.borderRadius,padding:`0 ${c(e.paddingXXS)}`,fontSize:e.fontSize,lineHeight:e.lineHeight,position:`relative`,cursor:`default`}},[`${l}-arrow`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSize,lineHeight:e.lineHeight,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},[u]:{background:e.colorBgSlot,border:`1px solid ${e.colorBorderSlot}`,outline:`none`,color:e.colorTextSlot,borderRadius:e.borderRadius,padding:`0 ${c(e.paddingXXS)}`,fontSize:e.fontSize,lineHeight:e.lineHeight,height:`100%`,boxSizing:`border-box`,position:`relative`,cursor:`default`},[d]:{height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),caretColor:e.colorPrimary,background:e.colorBgSlot,outline:`none`,color:e.colorTextSlot,borderRadius:e.borderRadius,paddingInline:e.paddingXXS,boxSizing:`border-box`,verticalAlign:`middle`,fontSize:e.fontSize,marginBlock:1,lineHeight:e.lineHeight,display:`inline-block`,position:`relative`,cursor:`text`,"&:empty":{width:`fit-content`,"&::after":{display:`inline-block`,height:`inherit`,content:`attr(data-placeholder)`,color:e.colorTextSlotPlaceholder}}},[`${i}-no-width`]:{userSelect:`none`,width:`3px`,display:`inline-block`,lineHeight:`inherit`},[f]:{display:`inline-block`,verticalAlign:`baseline`,alignItems:`center`,marginBlock:1,height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),wordBreak:`break-all`,paddingInlineEnd:0,paddingInlineStart:0,marginInlineEnd:0,marginInlineStart:-1,[`&${f}-empty`]:{"&::after":{display:`inline-block`,pointerEvents:`none`,height:`inherit`,content:`attr(data-placeholder)`,color:e.colorTextPlaceholder}}},[`${f}-wrapper`]:{height:`100%`,display:`inline-flex`},[`${f}-tag`]:{paddingInline:e.paddingXS,height:`100%`,backgroundColor:e.colorBgSkill,borderRadius:e.borderRadius,color:e.colorPrimary,alignItems:`center`,fontWeight:500,display:`inline-flex`,cursor:`pointer`,gap:e.marginXXS,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorBgSkillHover,[`${f}-tag-close:not(${f}-tag-close-disabled)`]:{color:e.colorPrimaryHover}},"&-close":{fontSize:e.fontSizeSM,display:`inline-flex`,transition:`color ${e.motionDurationMid}`,color:e.colorPrimary},"&-close-disabled":{cursor:`not-allowed`,color:e.colorTextDisabled}},[`${f}-holder`]:{width:e.marginXS,height:`100%`}}}},Rn=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-switch`;return{[t]:{[`&${r}-rtl`]:{direction:`rtl`},[`&${r}`]:{display:`inline-block`,[`${n}-btn:not(:disabled):not(${n}-btn-disabled):hover`]:{background:e.switchUncheckedHoverBg,borderColor:e.colorBorder,color:e.colorText},[`&${r}-checked`]:{[`${n}-btn:not(:disabled):not(${n}-btn-disabled):hover`]:{background:e.switchCheckedHoverBg,borderColor:e.colorPrimary,color:e.colorPrimaryText},[`${r}-content`]:{background:e.switchCheckedBg}}}}}},zn=e=>{let{antCls:t,componentCls:n,paddingSM:r,paddingXS:i,paddingXXS:a,lineWidth:o,calc:s}=e;return{[n]:{[`&${n}-main`]:{position:`relative`,width:`100%`,boxSizing:`border-box`,boxShadow:`${e.boxShadowTertiary}`,borderRadius:{_skip_check_:!0,value:s(e.borderRadius).mul(2).equal()},borderColor:e.colorBorderInput,borderWidth:o,borderStyle:`solid`},[`&${n}-disabled`]:{background:e.colorBgContainerDisabled,borderColor:`transparent`},[`&${n}-rtl`]:{direction:`rtl`},[`${n}-content`]:{display:`flex`,gap:i,width:`100%`,paddingBlock:r,paddingInlineStart:r,paddingInlineEnd:r,boxSizing:`border-box`,alignItems:`flex-end`},[`${n}-prefix`]:{flex:`none`},[`${n}-input`]:{paddingInline:0,borderRadius:0,flex:`auto`,alignSelf:`center`,caretColor:e.colorPrimary,fontSize:e.fontSize},[`${n}-actions-list`]:{flex:`none`,display:`flex`,"&-presets":{gap:e.paddingXS}},[`${n}-actions-btn`]:{[`&-disabled:where(${t}-btn-variant-text)`]:{color:e.colorTextActionsDisabled,borderColor:`transparent`},[`&-disabled:not(${t}-btn-variant-text)`]:{background:e.colorBgActionsDisabled,color:e.colorTextLightSolid,borderColor:`transparent`},"&-loading-button":{padding:0,border:0},"&-loading-icon":{height:e.controlHeight,width:e.controlHeight,verticalAlign:`top`},"&-recording-icon":{height:`1.2em`,width:`1.2em`,verticalAlign:`top`}},[`${n}-footer`]:{paddingInlineStart:r,paddingInlineEnd:r,paddingBlockEnd:r,paddingBlockStart:a,boxSizing:`border-box`}}}},Bn=Ve(`Sender`,t=>{let{paddingXS:n,calc:r}=t,i=e(t,{SenderContentMaxWidth:`calc(100% - ${c(r(n).add(32).equal())})`});return[zn(i),In(i),Rn(i),Ln(i)]},e=>{let{colorPrimary:t,colorFillTertiary:n}=e,r=new b(t).setA(.06).toRgbString(),i=new b(t).setA(.08).toRgbString(),a=new b(t).setA(.15).toRgbString(),o=t,s=new b(t).setA(.25).toRgbString(),c=new b(t).setA(.1).toRgbString(),l=r,u=new b(t).setA(.08).toRgbString(),d=new b(n).setA(.04).toRgbString(),f=new b(t).setA(.1).toRgbString(),p=new b(n).setA(.1).toRgbString(),m=`0 4px 12px 0 ${new b(t).setA(.1).toRgbString()}`,h=new b(t).setA(.45).toRgbString();return{colorBgSlot:r,colorBgSkill:i,colorBgSkillHover:a,colorTextSlot:o,colorTextSlotPlaceholder:s,colorBorderSlotHover:c,colorBorderSlot:l,switchCheckedBg:u,switchCheckedHoverBg:f,switchUncheckedHoverBg:d,colorBorderInput:p,boxShadowInput:m,colorBgActionsDisabled:h,colorTextActionsDisabled:h}}),Vn={SendButton:an,ClearButton:en,LoadingButton:nn,SpeechButton:Dn},Hn=z.forwardRef((e,t)=>{let{prefixCls:r,styles:i={},classNames:a={},className:s,rootClassName:c,style:l,defaultValue:u,value:d,slotConfig:f,readOnly:p,submitType:m=`enter`,onSubmit:h,loading:g,components:v,onCancel:y,onChange:b,suffix:x,onKeyUp:S,onKeyDown:C,disabled:w,allowSpeech:T,prefix:E,footer:D,header:O,onPaste:k,onPasteFile:A,autoSize:ee={maxRows:8},placeholder:te,onFocus:j,onBlur:M,skill:N,...re}=e,ie=(0,at.default)(re,{attr:!0,aria:!0,data:!0}),ae=z.useId(),P=Array.isArray(f)||N?.value,{direction:oe,getPrefixCls:se}=V(),F=se(`sender`,r),ce=z.useRef(null),I=z.useRef(null);ct(t,()=>({nativeElement:ce.current,inputElement:I.current?.nativeElement,focus:e=>I.current?.focus(e),blur:()=>I.current?.blur(),insert:(...e)=>I.current?.insert?.(...e),clear:()=>I.current?.clear(),getValue:()=>I.current?.getValue()??{value:``,slotConfig:[],skill:void 0}}));let L=de(`sender`),le=`${F}-input`,[R,B]=Bn(F),ue=o(F,L.className,s,c,L.classNames.root,a.root,R,B,`${F}-main`,{[`${F}-rtl`]:oe===`rtl`,[`${F}-disabled`]:w}),fe=`${F}-actions-btn`,pe=`${F}-actions-list`,[me,he]=_(u||``,d),ge=(e,t,n,r)=>{he(e),b?.(e,t,n??[],r)},[_e,ve,ye]=jn(e=>{P?I.current?.insert?.([{type:`text`,value:e}]):ge(`${me} ${e}`)},T),be=()=>{if(I?.current&&h&&!g&&!Ee){let e=I.current.getValue();h(e.value,e.slotConfig,e.skill)}},xe=()=>{ge(``),P&&I.current?.clear?.()},Se=z.createElement(ne,{className:`${pe}-presets`},T&&z.createElement(Dn,null),g?z.createElement(nn,null):z.createElement(an,null)),H=Se;typeof x==`function`?H=x(Se,{components:Vn}):(x||x===!1)&&(H=x);let Ce=typeof E==`function`?E(Se,{components:Vn}):E||null,we=typeof O==`function`?O(Se,{components:Vn}):O||null,Te=typeof D==`function`?D(Se,{components:Vn}):D||null,[Ee,De]=(0,z.useState)(!me),Oe={prefixCls:fe,onSend:be,onSendDisabled:!me,onClear:xe,onClearDisabled:!me,onCancel:y,onCancelDisabled:!g,onSpeech:()=>ve(!1),onSpeechDisabled:!_e,speechRecording:ye,disabled:w,setSubmitDisabled:De},ke=z.useMemo(()=>({value:me,onChange:ge,slotConfig:f,onKeyUp:S,onKeyDown:C,onPaste:k,onPasteFile:A,disabled:w,readOnly:p,submitType:m,prefixCls:F,styles:i,classNames:a,autoSize:ee,components:v,triggerSend:be,placeholder:te,onFocus:j,onBlur:M,skill:N,...re}),[me,ge,f,S,C,k,A,w,p,m,F,i,a,ee,v,be,te,j,M,N,re]),Ae=e=>{!P&&e.target!==ce.current?.querySelector(`.${le}`)&&e.preventDefault(),e.target===ce.current?.querySelector(`.${le}`)&&I.current?.focus()};return z.createElement(`div`,n({key:ae,ref:ce,className:ue,style:{...L.style,...l,...L.styles.root,...i.root}},ie),z.createElement(on.Provider,{value:ke},z.createElement(Zt.Provider,{value:Oe},we&&z.createElement(Mn.Provider,{value:{prefixCls:F}},we),z.createElement(`div`,{className:o(`${F}-content`,a.content),style:i.content,onMouseDown:Ae},Ce&&z.createElement(`div`,{className:o(`${F}-prefix`,L.classNames.prefix,a.prefix),style:{...L.styles.prefix,...i.prefix}},Ce),P?z.createElement(vn,{ref:I}):z.createElement(An,{ref:I}),H&&z.createElement(`div`,{className:o(pe,L.classNames.suffix,a.suffix),style:{...L.styles.suffix,...i.suffix}},H)),Te&&z.createElement(`div`,{className:o(`${F}-footer`,L.classNames.footer,a.footer),style:{...L.styles.footer,...i.footer}},Te))))}),Un=z.forwardRef((e,t)=>{let{children:r,className:i,classNames:a={},styles:s={},icon:c,style:l,onChange:u,rootClassName:d,loading:f,defaultValue:p,value:m,checkedChildren:h,unCheckedChildren:g,disabled:v,prefixCls:y,...b}=e,{styles:x={},classNames:S={},prefixCls:C}=z.useContext(on),w=(0,at.default)(b,{attr:!0,aria:!0,data:!0}),E=z.useId(),{direction:D,getPrefixCls:O}=V(),k=O(`sender`,y||C),A=`${k}-switch`,[ee,te]=Bn(k),j=z.useRef(null);ct(t,()=>({nativeElement:j.current}));let[M,ne]=_(p,m),N=de(`sender`),re=o(k,A,i,d,N.classNames.switch,S.switch,a.root,ee,te,{[`${A}-checked`]:M,[`${A}-rtl`]:D===`rtl`});return z.createElement(`div`,n({ref:j,className:re,key:E,style:{...l,...N.styles.switch,...x.switch,...s.root}},w),z.createElement(T,{disabled:v,loading:f,className:o(`${A}-content`,a.content),style:s.content,styles:{icon:s.icon,content:s.title},classNames:{icon:a.icon,content:a.title},variant:`outlined`,color:M?`primary`:`default`,icon:c,onClick:()=>{let e=!M;ne(e),u?.(e)}},M?h:g,r))}),Wn=Hn;Wn.Header=Fn,Wn.Switch=Un;var Gn=e=>{let{componentCls:t,calc:n}=e,r=n(e.fontSizeHeading3).mul(e.lineHeightHeading3).equal(),i=n(e.fontSize).mul(e.lineHeight).equal();return{[t]:{gap:e.padding,[`${t}-icon`]:{height:n(r).add(i).add(e.paddingXXS).equal(),display:`flex`,img:{height:`100%`}},[`${t}-content-wrapper`]:{gap:e.paddingXS,flex:`auto`,minWidth:0,[`${t}-title-wrapper`]:{gap:e.paddingXS},[`${t}-title`]:{margin:0},[`${t}-extra`]:{marginInlineStart:`auto`}}}}},Kn=e=>{let{componentCls:t}=e;return{[t]:{"&-filled":{paddingInline:e.padding,paddingBlock:e.paddingSM,background:e.colorFillContent,borderRadius:e.borderRadiusLG},"&-borderless":{[`${t}-title`]:{fontSize:e.fontSizeHeading3,lineHeight:e.lineHeightHeading3}}}}},qn=Ve(`Welcome`,t=>{let n=e(t,{});return[Gn(n),Kn(n)]},()=>({})),Jn=z.forwardRef((e,t)=>{let{prefixCls:n,rootClassName:r,className:i,style:a,variant:s=`filled`,classNames:c={},styles:l={},icon:u,title:d,description:f,extra:p}=e,{direction:m,getPrefixCls:h}=V(),g=h(`welcome`,n),_=de(`welcome`),[v,y]=qn(g),b=z.useMemo(()=>{if(!u)return null;let e=u;return typeof u==`string`&&u.startsWith(`http`)&&(e=z.createElement(`img`,{src:u,alt:`icon`})),z.createElement(`div`,{className:o(`${g}-icon`,_.classNames.icon,c.icon),style:l.icon},e)},[u]),x=z.useMemo(()=>d?z.createElement(F.Title,{level:4,className:o(`${g}-title`,_.classNames.title,c.title),style:l.title},d):null,[d]),S=z.useMemo(()=>p?z.createElement(`div`,{className:o(`${g}-extra`,_.classNames.extra,c.extra),style:l.extra},p):null,[p]);return z.createElement(ne,{ref:t,className:o(g,_.className,i,r,c.root,v,y,`${g}-${s}`,{[`${g}-rtl`]:m===`rtl`}),style:{...a,...l.root}},b,z.createElement(ne,{vertical:!0,className:`${g}-content-wrapper`},p?z.createElement(ne,{align:`flex-start`,className:`${g}-title-wrapper`},x,S):x,f&&z.createElement(F.Text,{className:o(`${g}-description`,_.classNames.description,c.description),style:l.description},f)))}),Yn={_chatMessagesStores:new Map,get:e=>Yn._chatMessagesStores.get(e),set:(e,t)=>{Yn._chatMessagesStores.set(e,t)},delete:e=>{Yn._chatMessagesStores.delete(e)},getMessages:e=>Yn._chatMessagesStores.get(e)?.getMessages()},Xn={_allConversationStores:new Map,set:(e,t)=>{Xn._allConversationStores.set(e,t)},delete:e=>{Xn._allConversationStores.delete(e)},getConversation:e=>{for(let t of Xn._allConversationStores.values())if(t){let n=t.getConversation(e);if(n)return n}}},Zn=class{conversations=[];listeners=[];storeKey;activeConversationKey;emitListeners(){this.listeners.forEach(e=>{e()})}constructor(e,t){this.setConversations(e),this.storeKey=Math.random().toString(),Xn.set(this.storeKey,this),this.activeConversationKey=t}setActiveConversationKey=e=>(this.activeConversationKey=e,this.emitListeners(),!0);setConversations=e=>(this.conversations=[...e],this.emitListeners(),!0);getConversation=e=>this.conversations.find(t=>t.key===e);addConversation=(e,t)=>this.getConversation(e.key)?!1:(this.setConversations(t===`prepend`?[e,...this.conversations]:[...this.conversations,e]),!0);setConversation=(e,t)=>{let n=this.getConversation(e);return n?(Object.assign(n,t),this.setConversations([...this.conversations]),!0):!1};removeConversation=e=>{let t=this.conversations.findIndex(t=>t.key===e);return t===-1?!1:(this.conversations.splice(t,1),this.setConversations([...this.conversations]),!0)};getMessages=e=>Yn.getMessages(e);getSnapshot=()=>this.conversations;getActiveConversationKey=()=>this.activeConversationKey;subscribe=e=>(this.listeners.push(e),()=>{this.listeners=this.listeners.filter(t=>t!==e)});destroy=()=>{Xn.delete(this.storeKey)}};function Qn(e){let[t]=(0,z.useState)(()=>new Zn(e?.defaultConversations||[],e?.defaultActiveConversationKey||``));return(0,z.useEffect)(()=>()=>{t.destroy()},[]),{conversations:(0,z.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getSnapshot),activeConversationKey:(0,z.useSyncExternalStore)(t.subscribe,t.getActiveConversationKey,t.getActiveConversationKey),setActiveConversationKey:t.setActiveConversationKey,addConversation:t.addConversation,removeConversation:t.removeConversation,setConversation:t.setConversation,getConversation:t.getConversation,setConversations:t.setConversations,getMessages:t.getMessages}}var $n=` - -`,er=` -`,tr=`:`,nr=e=>(e??``).trim()!==``;function rr(e=$n){let t=``;return new TransformStream({transform(n,r){t+=n;let i=t.split(e);i.slice(0,-1).forEach(e=>{nr(e)&&r.enqueue(e)}),t=i[i.length-1]},flush(e){nr(t)&&e.enqueue(t)}})}function ir(e=er,t=tr){return new TransformStream({transform(n,r){let i=n.split(e).reduce((e,n)=>{let r=n.indexOf(t);if(r===-1)return console.warn(`The key-value separator "${t}" is not found in the sse line: ${n} !`),e;let i=n.slice(0,r).trim();if(!nr(i))return e;let a=n.slice(r+1).trim();return{...e,[i]:a}},{});Object.keys(i).length!==0&&r.enqueue(i)}})}function ar(){if(typeof TextDecoderStream<`u`)return new TextDecoderStream;let e=new TextDecoder(`utf-8`);return new TransformStream({transform(t,n){n.enqueue(e.decode(t,{stream:!0}))},flush(t){t.enqueue(e.decode())}})}function or(e){let{readableStream:t,transformStream:n,streamSeparator:r,partSeparator:i,kvSeparator:a}=e;if(!(t instanceof ReadableStream))throw Error(`The options.readableStream must be an instance of ReadableStream.`);let o=ar(),s=n?t.pipeThrough(o).pipeThrough(n):t.pipeThrough(o).pipeThrough(rr(r)).pipeThrough(ir(i,a));return s[Symbol.asyncIterator]=async function*(){let e=this.getReader();for(;;){let{done:t,value:n}=await e.read();if(t)break;n&&(yield n)}},s}var sr=async(e,t)=>{let{fetch:n=globalThis.fetch,middlewares:r={},...i}=t;if(typeof n!=`function`)throw Error(`The options.fetch must be a typeof fetch function!`);let a=[e,i];typeof r.onRequest==`function`&&(a=await r.onRequest(...a));let o=await n(...a);if(typeof r.onResponse==`function`){let e=await r.onResponse(o);if(!(e instanceof Response))throw Error(`The options.onResponse must return a Response instance!`);o=e}if(!o.ok)throw Error(`Fetch failed with status ${o.status}`);if(!o.body)throw Error(`The response body is empty.`);return o},cr={manual:!1,headers:{"Content-Type":`application/json`}},lr=`Last-Event-ID`,ur=class{baseURL;options;constructor(e,t){if(!e||typeof e!=`string`)throw Error(`The baseURL is not valid!`);this.baseURL=e,this.options=t||{}}},dr=class extends ur{_asyncHandler;timeoutHandler;_isTimeout=!1;streamTimeoutHandler;_isStreamTimeout=!1;abortController;_isRequesting=!1;_manual=!1;lastManualParams;retryTimes=0;retryTimer;lastEventId=void 0;get asyncHandler(){return this._asyncHandler}get isTimeout(){return this._isTimeout}set isTimeout(e){this._isTimeout=e}get isStreamTimeout(){return this._isStreamTimeout}set isStreamTimeout(e){this._isStreamTimeout=e}get isRequesting(){return this._isRequesting}get manual(){return this._manual}constructor(e,t){super(e,t),this._manual=t?.manual||!1,this.manual||this.init()}run(e){return this.manual?(this.resetRetry(),this.lastManualParams=e,this.init(e),!0):(console.warn(`The request is not manual, so it cannot be run!`),!1)}abort(){clearTimeout(this.timeoutHandler),clearTimeout(this.streamTimeoutHandler),this.abortController.abort()}init(e,t){this.abortController=new AbortController;let{callbacks:n,params:r,headers:i={},transformStream:a,fetch:o,timeout:s,streamTimeout:c,middlewares:l,streamSeparator:u,partSeparator:d,kvSeparator:f,...p}=this.options,m=Object.assign({},cr.headers||{},i,t||{}),h={...p,method:`POST`,body:JSON.stringify({...r,...e||{}}),params:{...r,...e},headers:m,signal:this.abortController.signal,middlewares:l};s&&s>0&&(this.timeoutHandler=window.setTimeout(()=>{this.isTimeout=!0,this.finishRequest(),n?.onError?.(Error(`TimeoutError`))},s)),this.startRequest(),this._asyncHandler=sr(this.baseURL,{fetch:o,...h}).then(async e=>{if(clearTimeout(this.timeoutHandler),this.isTimeout)return;if(a){let t=a;typeof a==`function`&&(t=a(this.baseURL,e.headers)),await this.customResponseHandler(e,n,t,c,u,d,f);return}let t=e.headers.get(`content-type`)||``;switch(t.split(`;`)[0].trim()){case`text/event-stream`:await this.sseResponseHandler(e,n,c,u,d,f);break;case`application/json`:await this.jsonResponseHandler(e,n);break;default:throw Error(`The response content-type: ${t} is not support!`)}}).catch(e=>{clearTimeout(this.timeoutHandler),this.finishRequest();let t=e instanceof Error||e instanceof DOMException?e:Error(`Unknown error!`),r=n?.onError?.(t);if(t.name!==`AbortError`){let e=typeof r==`number`?r:this.options.retryInterval;if(e&&e>0){if(typeof this.options.retryTimes==`number`&&this.retryTimes>=this.options.retryTimes)return;clearTimeout(this.retryTimer),this.retryTimer=setTimeout(()=>{let e={};this.lastEventId!==void 0&&(e[lr]=this.lastEventId),this.init(this.lastManualParams,e)},e),this.retryTimes+=1}}})}startRequest(){this._isRequesting=!0}finishRequest(){this._isRequesting=!1}customResponseHandler=async(e,t,n,r,i,a,o)=>{let s=or({readableStream:e.body,transformStream:n,streamSeparator:i,partSeparator:a,kvSeparator:o});await this.processStream(s,e,t,r)};sseResponseHandler=async(e,t,n,r,i,a)=>{let o=or({readableStream:e.body,streamSeparator:r,partSeparator:i,kvSeparator:a});await this.processStream(o,e,t,n)};async processStream(e,t,n,r){let i=[],a=e[Symbol.asyncIterator](),o;do{if(r&&(this.streamTimeoutHandler=window.setTimeout(()=>{this.isStreamTimeout=!0,this.finishRequest(),n?.onError?.(Error(`StreamTimeoutError`),void 0,t.headers)},r)),o=await a.next(),clearTimeout(this.streamTimeoutHandler),this.isStreamTimeout)break;o.value&&(i.push(o.value),n?.onUpdate?.(o.value,t.headers),o?.value?.id!==void 0&&(this.lastEventId=o.value.id))}while(!o.done);if(r&&(clearTimeout(this.streamTimeoutHandler),this.isStreamTimeout)){this.finishRequest();return}this.finishRequest(),n?.onSuccess?.(i,t.headers)}jsonResponseHandler=async(e,t)=>{let n=await e.json();if(n?.success===!1){let r=Error(n.message||`System error`);r.name=n.name||`SystemError`,t?.onError?.(r,n,e.headers)}else t?.onUpdate?.(n,e.headers),this.finishRequest(),t?.onSuccess?.([n],e.headers)};resetRetry(){clearTimeout(this.retryTimer),this.retryTimes=0,this.lastEventId=void 0}};function fr(e,t){return new dr(e,t)}function pr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var mr=pr();function hr(e){mr=e}var gr={exec:()=>null};function G(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(_r.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var _r={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},vr=/^(?:[ \t]*(?:\n|$))+/,yr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,br=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,xr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Sr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Cr=/(?:[*+-]|\d{1,9}[.)])/,wr=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Tr=G(wr).replace(/bull/g,Cr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Er=G(wr).replace(/bull/g,Cr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Dr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Or=/^[^\n]+/,kr=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Ar=G(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,kr).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),jr=G(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Cr).getRegex(),Mr=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Nr=/|$))/,Pr=G(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Nr).replace(`tag`,Mr).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Fr=G(Dr).replace(`hr`,xr).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Mr).getRegex(),Ir={blockquote:G(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Fr).getRegex(),code:yr,def:Ar,fences:br,heading:Sr,hr:xr,html:Pr,lheading:Tr,list:jr,newline:vr,paragraph:Fr,table:gr,text:Or},Lr=G(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,xr).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Mr).getRegex(),Rr={...Ir,lheading:Er,table:Lr,paragraph:G(Dr).replace(`hr`,xr).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Lr).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Mr).getRegex()},zr={...Ir,html:G(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Nr).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:gr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:G(Dr).replace(`hr`,xr).replace(`heading`,` *#{1,6} *[^ -]`).replace(`lheading`,Tr).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Br=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Vr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Hr=/^( {2,}|\\)\n(?!\s*$)/,Ur=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Qr=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,$r=G(Qr,`u`).replace(/punct/g,Wr).getRegex(),ei=G(Qr,`u`).replace(/punct/g,Jr).getRegex(),ti=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,ni=G(ti,`gu`).replace(/notPunctSpace/g,Kr).replace(/punctSpace/g,Gr).replace(/punct/g,Wr).getRegex(),ri=G(ti,`gu`).replace(/notPunctSpace/g,Xr).replace(/punctSpace/g,Yr).replace(/punct/g,Jr).getRegex(),ii=G(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Kr).replace(/punctSpace/g,Gr).replace(/punct/g,Wr).getRegex(),ai=G(/\\(punct)/,`gu`).replace(/punct/g,Wr).getRegex(),oi=G(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),si=G(Nr).replace(`(?:-->|$)`,`-->`).getRegex(),ci=G(`^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^`).replace(`comment`,si).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),li=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ui=G(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,li).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),di=G(/^!?\[(label)\]\[(ref)\]/).replace(`label`,li).replace(`ref`,kr).getRegex(),fi=G(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,kr).getRegex(),pi={_backpedal:gr,anyPunctuation:ai,autolink:oi,blockSkip:Zr,br:Hr,code:Vr,del:gr,emStrongLDelim:$r,emStrongRDelimAst:ni,emStrongRDelimUnd:ii,escape:Br,link:ui,nolink:fi,punctuation:qr,reflink:di,reflinkSearch:G(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,di).replace(`nolink`,fi).getRegex(),tag:ci,text:Ur,url:gr},mi={...pi,link:G(/^!?\[(label)\]\((.*?)\)/).replace(`label`,li).getRegex(),reflink:G(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,li).getRegex()},hi={...pi,emStrongRDelimAst:ri,emStrongLDelim:ei,url:G(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,`i`).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":`>`,'"':`"`,"'":`'`},bi=e=>yi[e];function xi(e,t){if(t){if(_r.escapeTest.test(e))return e.replace(_r.escapeReplace,bi)}else if(_r.escapeTestNoEncode.test(e))return e.replace(_r.escapeReplaceNoEncode,bi);return e}function Si(e){try{e=encodeURI(e).replace(_r.percentDecode,`%`)}catch{return null}return e}function Ci(e,t){let n=e.replace(_r.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(_r.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}function Ei(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Di(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(` -`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(` -`)}var Oi=class{options;rules;lexer;constructor(e){this.options=e||mr}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:wi(e,` -`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Di(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=wi(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:wi(t[0],` -`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=wi(t[0],` -`).split(` -`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(` -`,1)[0].replace(this.rules.other.listReplaceTabs,e=>` `.repeat(3*e.length)),l=e.split(` -`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+` -`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){let f=e.split(` -`,1)[0],p;if(l=f,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),p=l):p=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||t.test(l)||n.test(l))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=` -`+p.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=` -`+l}!u&&!l.trim()&&(u=!0),r+=f+` -`,e=e.substring(f.length+1),c=p.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let f=null,p;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p=f[0]!==`[ ] `,s=s.replace(this.rules.other.listReplaceTask,``))),i.items.push({type:`list_item`,raw:r,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e=0;ee.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===` -`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=wi(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Ti(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Ei(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Ei(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(r&&!(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},ki=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||mr,this.options.tokenizer=this.options.tokenizer||new Oi,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:_r,block:_i.normal,inline:vi.normal};this.options.pedantic?(t.block=_i.pedantic,t.inline=vi.pedantic):this.options.gfm&&(t.block=_i.gfm,this.options.breaks?t.inline=vi.breaks:t.inline=vi.gfm),this.tokenizer.rules=t}static get rules(){return{block:_i,inline:vi}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(_r.carriageReturn,` -`),this.blockTokens(e,this.tokens);for(let e=0;e(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=` -`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=` -`+r.raw,n.text+=` -`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=` -`+r.raw,n.text+=` -`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=` -`+r.raw,a.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=` -`+r.raw,n.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,a=``;for(;e;){i||(a=``),i=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,a)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(o)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(a=r.raw.slice(-1)),i=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},Ai=class{options;parser;constructor(e){this.options=e||mr}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(_r.notSpaceStart)?.[0],i=e.replace(_r.endingNewline,``)+` -`;return r?`
    `+(n?i:xi(i,!0))+`
    -`:`
    `+(n?i:xi(i,!0))+`
    -`}blockquote({tokens:e}){return`
    -${this.parser.parse(e)}
    -`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} -`}hr(e){return`
    -`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t -`+r+` -`}listitem(e){let t=``;if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type===`paragraph`?(e.tokens[0].text=n+` `+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type===`text`&&(e.tokens[0].tokens[0].text=n+` `+xi(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:n+` `,text:n+` `,escaped:!0}):t+=n+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • -`}checkbox({checked:e}){return``}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    -`}table(e){let t=``,n=``;for(let t=0;t${r}`,` - -`+t+` -`+r+`
    -`}tablerow({text:e}){return` -${e} -`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` -`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${xi(e,!0)}`}br(e){return`
    `}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Si(e);if(i===null)return r;e=i;let a=`
    `+r+``,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Si(e);if(i===null)return xi(n);e=i;let a=`${n}`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:xi(e.text)}},ji=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}},Mi=class e{options;renderer;textRenderer;constructor(e){this.options=e||mr,this.options.renderer=this.options.renderer||new Ai,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ji}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n=``;for(let r=0;r{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Ai(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Oi(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Ni;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];Ni.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then(e=>a.call(t,e));let n=i.call(t,e);return a.call(t,n)}:t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ki.lex(e,t??this.defaults)}parser(e,t){return Mi.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(t==null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let o=i.hooks?i.hooks.provideLexer():e?ki.lex:ki.lexInline,s=i.hooks?i.hooks.provideParser():e?Mi.parse:Mi.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(e=>o(e,i)).then(e=>i.hooks?i.hooks.processAllTokens(e):e).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>s(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let e=o(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=s(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,e){let e=`

    An error occurred:

    `+xi(n.message+``,!0)+`
    `;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},Fi=new Pi;function K(e,t){return Fi.parse(e,t)}K.options=K.setOptions=function(e){return Fi.setOptions(e),K.defaults=Fi.defaults,hr(K.defaults),K},K.getDefaults=pr,K.defaults=mr,K.use=function(...e){return Fi.use(...e),K.defaults=Fi.defaults,hr(K.defaults),K},K.walkTokens=function(e,t){return Fi.walkTokens(e,t)},K.parseInline=Fi.parseInline,K.Parser=Mi,K.parser=Mi.parse,K.Renderer=Ai,K.TextRenderer=ji,K.Lexer=ki,K.lexer=ki.lex,K.Tokenizer=Oi,K.Hooks=Ni,K.parse=K,K.options,K.setOptions,K.use,K.walkTokens,K.parseInline,Mi.parse,ki.lex;var Ii={escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeTest:/[&<>"'/]/,notSpaceStart:/^\S*/,endingNewline:/\n$/,escapeReplace:/[&<>"'/]/g,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,completeFencedCode:/^ {0,3}(`{3,}|~{3,})([\s\S]*?)\n {0,3}\1[ \n\t]*$/},Li={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},Ri=e=>Li[e];function zi(e,t){if(t){if(Ii.escapeTest.test(e))return e.replace(Ii.escapeReplace,Ri)}else if(Ii.escapeTestNoEncode.test(e))return e.replace(Ii.escapeReplaceNoEncode,Ri);return e}var Bi=Symbol(`tailMarker`),Vi=`X_MD_NL_`,Hi=``,Ui=/\uE000X_MD_NL_\d+\uE001/g,Wi=class{options;markdownInstance;injectTail=!1;constructor(e={}){this.options=e,this.markdownInstance=new Pi,this.configureLinkRenderer(),this.configureParagraphRenderer(),this.configureCodeRenderer(),this.configureHtmlEscapeRenderer(),this.configureTailInjection(),this.markdownInstance.use(e.markedConfig||{})}configureHtmlEscapeRenderer(){this.options.escapeRawHtml&&this.markdownInstance.use({renderer:{html(e){let{raw:t=``,text:n=``}=e;return zi(t||n,!0)}}})}configureLinkRenderer(){this.options.openLinksInNewTab&&this.markdownInstance.use({renderer:{link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n);return`${r}`}}})}configureParagraphRenderer(){let{paragraphTag:e}=this.options;e&&this.markdownInstance.use({renderer:{paragraph({tokens:t}){return`<${e}>${this.parser.parseInline(t)}\n`}}})}configureCodeRenderer(){this.markdownInstance.use({renderer:{code({text:e,raw:t,lang:n,escaped:r,codeBlockStyle:i}){let a=(n||``).trim(),o=a.match(Ii.notSpaceStart)?.[0],s=`${e.replace(Ii.endingNewline,``)}\n`,c=i===`indented`||Ii.completeFencedCode.test(t)?`done`:`loading`,l=r?s:zi(s,!0),u=o?` class="language-${zi(o)}"`:``;return`
    ${l}
    \n`}}})}configureTailInjection(){let e=this;this.markdownInstance.use({hooks:{processAllTokens(t){if(!e.injectTail)return t;let n=e.findLastTextToken(t);return n&&(n[Bi]=!0),t}},renderer:{text(e){let t=`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`text`in e?e.text:``;return e[Bi]?`${t}`:t}}})}protectCustomTags(e,t){let n=new Map,r=Object.keys(this.options.components||{});if(r.length===0)return{protected:e,placeholders:n};let i=0,a=e=>e.replace(/\n/g,()=>{let e=`${Vi}${i++}${Hi}`;return n.set(e,` -`),e}),o=r.map(e=>e.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),s=RegExp(`<(${o})(?:\\s[^>]*)?>`,`gi`),c=RegExp(``,`gi`),l=[],u=s.exec(e);for(;u!==null;)l.push({index:u.index,type:`open`,tagName:u[1].toLowerCase(),match:u[0]}),u=s.exec(e);for(c.lastIndex=0,u=c.exec(e);u!==null;)l.push({index:u.index,type:`close`,tagName:u[1].toLowerCase(),match:u[0]}),u=c.exec(e);l.sort((e,t)=>e.index-t.index);let d=[],f=[],p=0;for(let n of l)if(n.type===`open`)n.match.endsWith(`/>`)||d.push({tagName:n.tagName,start:n.index,openTag:n.match});else if(n.type===`close`&&d.length>0&&d[d.length-1].tagName===n.tagName){let r=d.pop();if(d.length===0){let i=r.start,o=n.index+n.match.length,s=r.openTag,c=n.match,l=e.slice(i+s.length,n.index);if(pa(e));f.push(s+e+c)}else f.push(s+l+c);p=o}}return pt.get(e)??e)}findLastNonEmptyToken(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.type===`list`&&`items`in n&&Array.isArray(n.items))for(let e=n.items.length-1;e>=0;e--){let t=n.items[e];if(`tokens`in t&&t.tokens&&t.tokens.length>0){let e=this.findLastNonEmptyToken(t.tokens);if(e)return e}}if(`tokens`in n&&n.tokens&&n.tokens.length>0){let e=this.findLastNonEmptyToken(n.tokens);if(e)return e}if(n.type===`text`){if((`text`in n?n.text:``).trim())return n}else if(n.type===`html`||n.type===`tag`)return n}return null}findLastTextToken(e){let t=this.findLastNonEmptyToken(e);return t?.type===`text`?t:null}parse(e,t){if(this.injectTail=t?.injectTail??!1,this.options.protectCustomTagNewlines||this.options.disableCustomTagBlockMarkdown){let{protected:t,placeholders:n}=this.protectCustomTags(e,!!this.options.disableCustomTagBlockMarkdown),r=this.markdownInstance.parse(t);return this.restorePlaceholders(r,n)}return this.markdownInstance.parse(e)}};function Gi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n`u`?null:X(BigInt.prototype.toString),Sa=typeof Symbol>`u`?null:X(Symbol.prototype.toString),J=X(Object.prototype.hasOwnProperty),Ca=X(Object.prototype.toString),Y=X(RegExp.prototype.test),wa=Ta(TypeError);function X(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return aa(e,t,n)}}function Ta(e){return function(){return oa(e,[...arguments])}}function Z(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pa;if(Qi&&Qi(e,null),!fa(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&($i(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Ea(e){for(let t=0;t/g),Wa=na(/\${[\w\W]*/g),Ga=na(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ka=na(/^aria-[\-\w]+$/),qa=na(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ja=na(/^(?:\w+script|data):/i),Ya=na(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xa=na(/^html$/i),Za=na(/^[a-z][.\w]*(-[.\w]+)+$/i),Qa=na(/<[/\w!]/g),$a=na(/<[/\w]/g),eo=na(/<\/no(script|embed|frames)/i),to=na(/\/>/i),no={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ro=function(){return typeof window>`u`?null:window},io=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},ao=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},oo=function(e,t,n,r){return J(e,t)&&fa(e[t])?Z(r.base?Da(r.base):{},e[t],r.transform):n};function so(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ro(),t=e=>so(e);if(t.version=`3.4.11`,t.removed=[],!e||!e.document||e.document.nodeType!==no.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=ka(d,`cloneNode`),p=ka(d,`remove`),m=ka(d,`nextSibling`),h=ka(d,`childNodes`),g=ka(d,`parentNode`),_=ka(d,`shadowRoot`),v=ka(d,`attributes`),y=o&&o.prototype?ka(o.prototype,`nodeType`):null,b=o&&o.prototype?ka(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,C,w=!1,T=0,E=function(){if(T>0)throw wa(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},D=function(e){E(),T++;try{return x.createHTML(e)}finally{T--}},O=function(e){E(),T++;try{return x.createScriptURL(e)}finally{T--}},k=function(){return w||=(C=io(u,i),!0),C},A=n,ee=A.implementation,te=A.createNodeIterator,j=A.createDocumentFragment,M=A.getElementsByTagName,ne=r.importNode,N=ao();t.isSupported=typeof Zi==`function`&&typeof g==`function`&&ee&&ee.createHTMLDocument!==void 0;let re=Ha,ie=Ua,ae=Wa,P=Ga,oe=Ka,se=Ja,F=Ya,ce=Za,I=qa,L=null,le=Z({},[...ja,...Ma,...Na,...Fa,...La]),R=null,z=Z({},[...Ra,...za,...Ba,...Va]),B=Object.seal(ra(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ue=null,de=null,V=Object.seal(ra(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),fe=!0,pe=!0,me=!1,he=!0,ge=!1,_e=!0,ve=!1,ye=!1,be=null,xe=null,Se=!1,H=!1,Ce=!1,we=!1,Te=!0,Ee=!1,De=`user-content-`,Oe=!0,ke=!1,Ae={},je=null,Me=Z({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ne=null,Pe=Z({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Fe=null,Ie=Z({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Le=`http://www.w3.org/1998/Math/MathML`,Re=`http://www.w3.org/2000/svg`,ze=`http://www.w3.org/1999/xhtml`,Be=ze,Ve=!1,He=null,Ue=Z({},[Le,Re,ze],ma),We=q([`mi`,`mo`,`mn`,`ms`,`mtext`]),Ge=Z({},We),Ke=q([`annotation-xml`]),qe=Z({},Ke),Je=Z({},[`title`,`style`,`font`,`a`,`script`]),Ye=null,Xe=[`application/xhtml+xml`,`text/html`],U=null,Ze=null,Qe=n.createElement(`form`),$e=function(e){return e instanceof RegExp||e instanceof Function},et=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ze&&Ze===e)return;(!e||typeof e!=`object`)&&(e={}),e=Da(e),Ye=Xe.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,U=Ye===`application/xhtml+xml`?ma:pa,L=oo(e,`ALLOWED_TAGS`,le,{transform:U}),R=oo(e,`ALLOWED_ATTR`,z,{transform:U}),He=oo(e,`ALLOWED_NAMESPACES`,Ue,{transform:ma}),Fe=oo(e,`ADD_URI_SAFE_ATTR`,Ie,{transform:U,base:Ie}),Ne=oo(e,`ADD_DATA_URI_TAGS`,Pe,{transform:U,base:Pe}),je=oo(e,`FORBID_CONTENTS`,Me,{transform:U}),ue=oo(e,`FORBID_TAGS`,Da({}),{transform:U}),de=oo(e,`FORBID_ATTR`,Da({}),{transform:U}),Ae=J(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?Da(e.USE_PROFILES):e.USE_PROFILES:!1,fe=e.ALLOW_ARIA_ATTR!==!1,pe=e.ALLOW_DATA_ATTR!==!1,me=e.ALLOW_UNKNOWN_PROTOCOLS||!1,he=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ge=e.SAFE_FOR_TEMPLATES||!1,_e=e.SAFE_FOR_XML!==!1,ve=e.WHOLE_DOCUMENT||!1,H=e.RETURN_DOM||!1,Ce=e.RETURN_DOM_FRAGMENT||!1,we=e.RETURN_TRUSTED_TYPE||!1,Se=e.FORCE_BODY||!1,Te=e.SANITIZE_DOM!==!1,Ee=e.SANITIZE_NAMED_PROPS||!1,Oe=e.KEEP_CONTENT!==!1,ke=e.IN_PLACE||!1,I=Aa(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:qa,Be=typeof e.NAMESPACE==`string`?e.NAMESPACE:ze,Ge=J(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?Da(e.MATHML_TEXT_INTEGRATION_POINTS):Z({},We),qe=J(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?Da(e.HTML_INTEGRATION_POINTS):Z({},Ke);let t=J(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?Da(e.CUSTOM_ELEMENT_HANDLING):ra(null);if(B=ra(null),J(t,`tagNameCheck`)&&$e(t.tagNameCheck)&&(B.tagNameCheck=t.tagNameCheck),J(t,`attributeNameCheck`)&&$e(t.attributeNameCheck)&&(B.attributeNameCheck=t.attributeNameCheck),J(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(B.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),na(B),ge&&(pe=!1),Ce&&(H=!0),Ae&&(L=Z({},La),R=ra(null),Ae.html===!0&&(Z(L,ja),Z(R,Ra)),Ae.svg===!0&&(Z(L,Ma),Z(R,za),Z(R,Va)),Ae.svgFilters===!0&&(Z(L,Na),Z(R,za),Z(R,Va)),Ae.mathMl===!0&&(Z(L,Fa),Z(R,Ba),Z(R,Va))),V.tagCheck=null,V.attributeCheck=null,J(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?V.tagCheck=e.ADD_TAGS:fa(e.ADD_TAGS)&&(L===le&&(L=Da(L)),Z(L,e.ADD_TAGS,U))),J(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?V.attributeCheck=e.ADD_ATTR:fa(e.ADD_ATTR)&&(R===z&&(R=Da(R)),Z(R,e.ADD_ATTR,U))),J(e,`ADD_URI_SAFE_ATTR`)&&fa(e.ADD_URI_SAFE_ATTR)&&Z(Fe,e.ADD_URI_SAFE_ATTR,U),J(e,`FORBID_CONTENTS`)&&fa(e.FORBID_CONTENTS)&&(je===Me&&(je=Da(je)),Z(je,e.FORBID_CONTENTS,U)),J(e,`ADD_FORBID_CONTENTS`)&&fa(e.ADD_FORBID_CONTENTS)&&(je===Me&&(je=Da(je)),Z(je,e.ADD_FORBID_CONTENTS,U)),Oe&&(L[`#text`]=!0),ve&&Z(L,[`html`,`head`,`body`]),L.table&&(Z(L,[`tbody`]),delete ue.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw wa(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw wa(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=x;x=e.TRUSTED_TYPES_POLICY;try{S=D(``)}catch(e){throw x=t,e}}else e.TRUSTED_TYPES_POLICY===null?(x=void 0,S=``):(x===void 0&&(x=k()),x&&typeof S==`string`&&(S=D(``)));q&&q(e),Ze=e},tt=Z({},[...Ma,...Na,...Pa]),nt=Z({},[...Fa,...Ia]),rt=function(e,t,n){return t.namespaceURI===ze?e===`svg`:t.namespaceURI===Le?e===`svg`&&(n===`annotation-xml`||Ge[n]):!!tt[e]},it=function(e,t,n){return t.namespaceURI===ze?e===`math`:t.namespaceURI===Re?e===`math`&&qe[n]:!!nt[e]},at=function(e,t,n){return t.namespaceURI===Re&&!qe[n]||t.namespaceURI===Le&&!Ge[n]?!1:!nt[e]&&(Je[e]||!tt[e])},ot=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:Be,tagName:`template`});let n=pa(e.tagName),r=pa(t.tagName);return He[e.namespaceURI]?e.namespaceURI===Re?rt(n,t,r):e.namespaceURI===Le?it(n,t,r):e.namespaceURI===ze?at(n,t,r):!!(Ye===`application/xhtml+xml`&&He[e.namespaceURI]):!1},st=function(e){ua(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw wa(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},ct=function(e){let t=h(e);if(t){let e=[];sa(t,t=>{ua(e,t)}),sa(e,e=>{try{p(e)}catch{}})}let n=v(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},lt=function(e,n){try{ua(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{ua(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(H||Ce)try{st(n)}catch{}else try{n.setAttribute(e,``)}catch{}},ut=function(e){let t=v(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||R[U(i)]))try{e.removeAttribute(i)}catch{}}},dt=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(y?y(e):e.nodeType)===no.element&&ut(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},ft=function(e){let t=null,r=null;if(Se)e=``+e;else{let t=ha(e,/^[\r\n\t ]+/);r=t&&t[0]}Ye===`application/xhtml+xml`&&Be===ze&&(e=``+e+``);let i=x?D(e):e;if(Be===ze)try{t=new l().parseFromString(i,Ye)}catch{}if(!t||!t.documentElement){t=ee.createDocument(Be,`template`,null);try{t.documentElement.innerHTML=Ve?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Be===ze?M.call(t,ve?`html`:`body`)[0]:ve?t.documentElement:a},pt=function(e){return te.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},mt=function(e){return e=ga(e,re,` `),e=ga(e,ie,` `),e=ga(e,ae,` `),e},ht=function(e){e.normalize();let t=te.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;)n.data=mt(n.data),n=t.nextNode();let r=e.querySelectorAll?.call(e,`template`);r&&sa(r,e=>{_t(e.content)&&ht(e.content)})},gt=function(e){let t=b?b(e):null;return typeof t!=`string`||U(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},_t=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===no.documentFragment}catch{return!1}},vt=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function yt(e,n,r){e.length!==0&&sa(e,e=>{e.call(t,n,r,Ze)})}let bt=function(e,t){return!!(_e&&e.hasChildNodes()&&!vt(e.firstElementChild)&&Y(Qa,e.textContent)&&Y(Qa,e.innerHTML)||_e&&e.namespaceURI===ze&&t===`style`&&vt(e.firstElementChild)||e.nodeType===no.processingInstruction||_e&&e.nodeType===no.comment&&Y($a,e.data))},xt=function(e,t){if(!ue[t]&&Tt(t)&&(B.tagNameCheck instanceof RegExp&&Y(B.tagNameCheck,t)||B.tagNameCheck instanceof Function&&B.tagNameCheck(t)))return!1;if(Oe&&!je[t]){let t=g(e),n=h(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=ke?n[i]:f(n[i],!0);t.insertBefore(r,m(e))}}}return st(e),!0},St=function(e){if(yt(N.beforeSanitizeElements,e,null),gt(e))return st(e),!0;let n=U(b?b(e):e.nodeName);if(yt(N.uponSanitizeElement,e,{tagName:n,allowedTags:L}),bt(e,n))return st(e),!0;if(ue[n]||!(V.tagCheck instanceof Function&&V.tagCheck(n))&&!L[n])return xt(e,n);if((y?y(e):e.nodeType)===no.element&&!ot(e)||(n===`noscript`||n===`noembed`||n===`noframes`)&&Y(eo,e.innerHTML))return st(e),!0;if(ge&&e.nodeType===no.text){let n=mt(e.textContent);e.textContent!==n&&(ua(t.removed,{element:e.cloneNode()}),e.textContent=n)}return yt(N.afterSanitizeElements,e,null),!1},Ct=function(e,t,r){if(de[t]||Te&&(t===`id`||t===`name`)&&(r in n||r in Qe))return!1;let i=R[t]||V.attributeCheck instanceof Function&&V.attributeCheck(t,e);if(!(pe&&Y(P,t))&&!(fe&&Y(oe,t))){if(!i){if(!(Tt(e)&&(B.tagNameCheck instanceof RegExp&&Y(B.tagNameCheck,e)||B.tagNameCheck instanceof Function&&B.tagNameCheck(e))&&(B.attributeNameCheck instanceof RegExp&&Y(B.attributeNameCheck,t)||B.attributeNameCheck instanceof Function&&B.attributeNameCheck(t,e))||t===`is`&&B.allowCustomizedBuiltInElements&&(B.tagNameCheck instanceof RegExp&&Y(B.tagNameCheck,r)||B.tagNameCheck instanceof Function&&B.tagNameCheck(r))))return!1}else if(!Fe[t]&&!Y(I,ga(r,F,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&_a(r,`data:`)===0&&Ne[e])&&!(me&&!Y(se,ga(r,F,``)))&&r)return!1}return!0},wt=Z({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Tt=function(e){return!wt[pa(e)]&&Y(ce,e)},Et=function(e,t,n,r){if(x&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return D(r);case`TrustedScriptURL`:return O(r)}return r},Dt=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),gt(e)?st(e):la(t.removed)}catch{lt(n,e)}},W=function(e){yt(N.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||gt(e))return;let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0},r=t.length,i=U(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=U(o),u=c,d=o===`value`?u:va(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,yt(N.uponSanitizeAttribute,e,n),d=n.attrValue,Ee&&(l===`id`||l===`name`)&&_a(d,De)!==0&&(lt(o,e),d=De+d),_e&&Y(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){lt(o,e);continue}if(l===`attributename`&&ha(d,`href`)){lt(o,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr){lt(o,e);continue}if(!he&&Y(to,d)){lt(o,e);continue}if(ge&&(d=mt(d)),!Ct(i,l,d)){lt(o,e);continue}d=Et(i,l,s,d),d!==u&&Dt(e,o,s,d)}}yt(N.afterSanitizeAttributes,e,null)},Ot=function(e){let t=null,n=pt(e);for(yt(N.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(yt(N.uponSanitizeShadowNode,t,null),St(t),W(t),_t(t.content)&&Ot(t.content),(y?y(t):t.nodeType)===no.element){let e=_(t);_t(e)&&(kt(e),Ot(e))}yt(N.afterSanitizeShadowDOM,e,null)},kt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Ot(e.shadow);continue}let n=e.node,r=(y?y(n):n.nodeType)===no.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=b?b(n):null;if(typeof e==`string`&&U(e)===`template`){let e=n.content;_t(e)&&t.push({node:e,shadow:null})}}if(r){let e=_(n);_t(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Ve=!e,Ve&&(e=``),typeof e!=`string`&&!vt(e)&&(e=Oa(e),typeof e!=`string`))throw wa(`dirty is not a string, aborting`);if(!t.isSupported)return e;ye?(L=be,R=xe):et(n),(N.uponSanitizeElement.length>0||N.uponSanitizeAttribute.length>0)&&(L=Da(L)),N.uponSanitizeAttribute.length>0&&(R=Da(R)),t.removed=[];let c=ke&&typeof e!=`string`&&vt(e);if(c){let t=b?b(e):e.nodeName;if(typeof t==`string`){let e=U(t);if(!L[e]||ue[e])throw wa(`root node is forbidden and cannot be sanitized in-place`)}if(gt(e))throw wa(`root node is clobbered and cannot be sanitized in-place`);try{kt(e)}catch(t){throw ct(e),t}}else if(vt(e))i=ft(``),a=i.ownerDocument.importNode(e,!0),a.nodeType===no.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),kt(a);else{if(!H&&!ge&&!ve&&e.indexOf(`<`)===-1)return x&&we?D(e):e;if(i=ft(e),!i)return H?null:we?S:``}i&&Se&&st(i.firstChild);let l=pt(c?e:i);try{for(;o=l.nextNode();)St(o),W(o),_t(o.content)&&Ot(o.content)}catch(t){throw c&&ct(e),t}if(c)return sa(t.removed,e=>{e.element&&dt(e.element)}),ge&&ht(e),e;if(H){if(ge&&ht(i),Ce)for(s=j.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(R.shadowroot||R.shadowrootmode)&&(s=ne.call(r,s,!0)),s}let u=ve?i.outerHTML:i.innerHTML;return ve&&L[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Y(Xa,i.ownerDocument.doctype.name)&&(u=` -`+u),ge&&(u=mt(u)),x&&we?D(u):u},t.setConfig=function(){et(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),ye=!0,be=L,xe=R},t.clearConfig=function(){Ze=null,ye=!1,be=null,xe=null,x=C,S=``},t.isValidAttribute=function(e,t,n){return Ze||et({}),Ct(U(e),U(t),n)},t.addHook=function(e,t){typeof t==`function`&&J(N,e)&&ua(N[e],t)},t.removeHook=function(e,t){if(J(N,e)){if(t!==void 0){let n=ca(N[e],t);return n===-1?void 0:da(N[e],n,1)[0]}return la(N[e])}},t.removeHooks=function(e){J(N,e)&&(N[e]=[])},t.removeAllHooks=function(){N=ao()},t}var co=so(),lo=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(function(e){e.Root=`root`,e.Text=`text`,e.Directive=`directive`,e.Comment=`comment`,e.Script=`script`,e.Style=`style`,e.Tag=`tag`,e.CDATA=`cdata`,e.Doctype=`doctype`})(t=e.ElementType||={});function n(e){return e.type===t.Tag||e.type===t.Script||e.type===t.Style}e.isTag=n,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})),uo=t((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=e&&e.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),n}(i);e.NodeWithChildren=l;var u=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=r.ElementType.CDATA,t}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),n}(l);e.CDATA=u;var d=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=r.ElementType.Root,t}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),n}(l);e.Document=d;var f=function(e){t(n,e);function n(t,n,i,a){i===void 0&&(i=[]),a===void 0&&(a=t===`script`?r.ElementType.Script:t===`style`?r.ElementType.Style:r.ElementType.Tag);var o=e.call(this,i)||this;return o.name=t,o.attribs=n,o.type=a,o}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){return{name:t,value:e.attribs[t],namespace:e[`x-attribsNamespace`]?.[t],prefix:e[`x-attribsPrefix`]?.[t]}})},enumerable:!1,configurable:!0}),n}(l);e.Element=f;function p(e){return(0,r.isTag)(e)}e.isTag=p;function m(e){return e.type===r.ElementType.CDATA}e.isCDATA=m;function h(e){return e.type===r.ElementType.Text}e.isText=h;function g(e){return e.type===r.ElementType.Comment}e.isComment=g;function _(e){return e.type===r.ElementType.Directive}e.isDirective=_;function v(e){return e.type===r.ElementType.Root}e.isDocument=v;function y(e){return Object.prototype.hasOwnProperty.call(e,`children`)}e.hasChildren=y;function b(e,t){t===void 0&&(t=!1);var r;if(h(e))r=new o(e.data);else if(g(e))r=new s(e.data);else if(p(e)){var i=t?x(e.children):[],a=new f(e.name,n({},e.attribs),i);i.forEach(function(e){return e.parent=a}),e.namespace!=null&&(a.namespace=e.namespace),e[`x-attribsNamespace`]&&(a[`x-attribsNamespace`]=n({},e[`x-attribsNamespace`])),e[`x-attribsPrefix`]&&(a[`x-attribsPrefix`]=n({},e[`x-attribsPrefix`])),r=a}else if(m(e)){var i=t?x(e.children):[],l=new u(i);i.forEach(function(e){return e.parent=l}),r=l}else if(v(e)){var i=t?x(e.children):[],y=new d(i);i.forEach(function(e){return e.parent=y}),e[`x-mode`]&&(y[`x-mode`]=e[`x-mode`]),r=y}else if(_(e)){var b=new c(e.name,e.data);e[`x-name`]!=null&&(b[`x-name`]=e[`x-name`],b[`x-publicId`]=e[`x-publicId`],b[`x-systemId`]=e[`x-systemId`]),r=b}else throw Error(`Not implemented yet: ${e.type}`);return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}e.cloneNode=b;function x(e){for(var t=e.map(function(e){return b(e,!0)}),n=1;n{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var r=lo(),i=uo();n(uo(),e);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},o=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof t==`function`&&(n=t,t=a),typeof e==`object`&&(t=e,e=void 0),this.callback=e??null,this.options=t??a,this.elementCB=n??null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?r.ElementType.Tag:void 0,a=new i.Element(e,t,void 0,n);this.addNode(a),this.tagStack.push(a)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===r.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=e;return}var t=new i.Comment(e);this.addNode(t),this.lastNode=t},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(``),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if(typeof this.callback==`function`)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();e.DomHandler=o,e.default=o})),po=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=e.CARRIAGE_RETURN_PLACEHOLDER=e.CARRIAGE_RETURN_REGEX=e.CARRIAGE_RETURN=e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.CASE_SENSITIVE_TAG_NAMES=`animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.linearGradient.radialGradient.textPath`.split(`.`),e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,t){return e[t.toLowerCase()]=t,e},{}),e.CARRIAGE_RETURN=`\r`,e.CARRIAGE_RETURN_REGEX=new RegExp(e.CARRIAGE_RETURN,`g`),e.CARRIAGE_RETURN_PLACEHOLDER=`__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_${Date.now().toString()}__`,e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER,`g`)})),mo=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatAttributes=i,e.hasOpenTag=o,e.escapeSpecialCharacters=s,e.revertEscapedCharacters=c,e.formatDOM=l;var t=fo(),n=po();function r(e){return n.CASE_SENSITIVE_TAG_NAMES_MAP[e]}function i(e){for(var t={},n=0,r=e.length;n`||i===` `||i===` `||i===` -`||i===`\r`||i===`/`}function s(e){return e.replace(n.CARRIAGE_RETURN_REGEX,n.CARRIAGE_RETURN_PLACEHOLDER)}function c(e){return e.replace(n.CARRIAGE_RETURN_PLACEHOLDER_REGEX,n.CARRIAGE_RETURN)}function l(e,n,r){n===void 0&&(n=null);for(var o=[],s,u=0,d=e.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.default=h;var t=mo(),n=`html`,r=`head`,i=`body`,a=/<([a-zA-Z]+[0-9]?)/,o=function(e,t){throw Error("This browser does not support `document.implementation.createHTMLDocument`")},s=function(e,t){throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},c=typeof window==`object`&&window.DOMParser;if(typeof c==`function`){var l=new c,u=`text/html`;s=function(e,t){return t&&(e=`<${t}>${e}`),l.parseFromString(e,u)},o=s}if(typeof document==`object`&&document.implementation){var d=document.implementation.createHTMLDocument();o=function(e,t){if(t){var n=d.documentElement.querySelector(t);return n&&(n.innerHTML=e),d}return d.documentElement.innerHTML=e,d}}var f=typeof document==`object`&&document.createElement(`template`),p;f&&f.content&&(p=function(e){return f.innerHTML=e,f.content.childNodes});var m=function(){return document.createDocumentFragment().childNodes};function h(e){var c,l;e=(0,t.escapeSpecialCharacters)(e);var u=(a.exec(e)?.[1])?.toLowerCase();switch(u){case n:var d=s(e);if(!(0,t.hasOpenTag)(e,r)){var f=d.querySelector(r);(c=f?.parentNode)==null||c.removeChild(f)}if(!(0,t.hasOpenTag)(e,i)){var f=d.querySelector(i);(l=f?.parentNode)==null||l.removeChild(f)}return d.querySelectorAll(n);case r:case i:var h=o(e).querySelectorAll(u);return(0,t.hasOpenTag)(e,i)&&(0,t.hasOpenTag)(e,r)?h[0].parentNode?.childNodes??m():h;default:if(p)return p(e);var f=o(e,i).querySelector(i);return f?.childNodes??m()}}})),go=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=t(ho()),r=mo(),i=/<(![a-zA-Z\s]+)>/;function a(e){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];var t=i.exec(e),a=t?t[1]:void 0;return(0,r.formatDOM)((0,n.default)(e),null,a)}})),_o=t((e=>{e.SAME=0,e.CAMELCASE=1,e.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":`acceptCharset`,accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:`className`,classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:`htmlFor`,form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":`httpEquiv`,icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":`accentHeight`,accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":`alignmentBaseline`,allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":`arabicForm`,ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":`baselineShift`,baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":`capHeight`,clip:0,clipPath:1,"clip-path":`clipPath`,clipPathUnits:1,clipRule:1,"clip-rule":`clipRule`,color:0,colorInterpolation:1,"color-interpolation":`colorInterpolation`,colorInterpolationFilters:1,"color-interpolation-filters":`colorInterpolationFilters`,colorProfile:1,"color-profile":`colorProfile`,colorRendering:1,"color-rendering":`colorRendering`,contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":`dominantBaseline`,dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":`enableBackground`,end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":`fillOpacity`,fillRule:1,"fill-rule":`fillRule`,filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":`floodOpacity`,floodColor:1,"flood-color":`floodColor`,focusable:0,fontFamily:1,"font-family":`fontFamily`,fontSize:1,"font-size":`fontSize`,fontSizeAdjust:1,"font-size-adjust":`fontSizeAdjust`,fontStretch:1,"font-stretch":`fontStretch`,fontStyle:1,"font-style":`fontStyle`,fontVariant:1,"font-variant":`fontVariant`,fontWeight:1,"font-weight":`fontWeight`,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":`glyphName`,glyphOrientationHorizontal:1,"glyph-orientation-horizontal":`glyphOrientationHorizontal`,glyphOrientationVertical:1,"glyph-orientation-vertical":`glyphOrientationVertical`,glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":`horizAdvX`,horizOriginX:1,"horiz-origin-x":`horizOriginX`,ideographic:0,imageRendering:1,"image-rendering":`imageRendering`,in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":`letterSpacing`,lightingColor:1,"lighting-color":`lightingColor`,limitingConeAngle:1,local:0,markerEnd:1,"marker-end":`markerEnd`,markerHeight:1,markerMid:1,"marker-mid":`markerMid`,markerStart:1,"marker-start":`markerStart`,markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":`overlinePosition`,overlineThickness:1,"overline-thickness":`overlineThickness`,paintOrder:1,"paint-order":`paintOrder`,panose1:0,"panose-1":`panose1`,pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":`pointerEvents`,points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":`renderingIntent`,repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":`shapeRendering`,slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":`stopColor`,stopOpacity:1,"stop-opacity":`stopOpacity`,strikethroughPosition:1,"strikethrough-position":`strikethroughPosition`,strikethroughThickness:1,"strikethrough-thickness":`strikethroughThickness`,string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":`strokeDasharray`,strokeDashoffset:1,"stroke-dashoffset":`strokeDashoffset`,strokeLinecap:1,"stroke-linecap":`strokeLinecap`,strokeLinejoin:1,"stroke-linejoin":`strokeLinejoin`,strokeMiterlimit:1,"stroke-miterlimit":`strokeMiterlimit`,strokeWidth:1,"stroke-width":`strokeWidth`,strokeOpacity:1,"stroke-opacity":`strokeOpacity`,suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":`textAnchor`,textDecoration:1,"text-decoration":`textDecoration`,textLength:1,textRendering:1,"text-rendering":`textRendering`,to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":`underlinePosition`,underlineThickness:1,"underline-thickness":`underlineThickness`,unicode:0,unicodeBidi:1,"unicode-bidi":`unicodeBidi`,unicodeRange:1,"unicode-range":`unicodeRange`,unitsPerEm:1,"units-per-em":`unitsPerEm`,unselectable:0,vAlphabetic:1,"v-alphabetic":`vAlphabetic`,values:0,vectorEffect:1,"vector-effect":`vectorEffect`,version:0,vertAdvY:1,"vert-adv-y":`vertAdvY`,vertOriginX:1,"vert-origin-x":`vertOriginX`,vertOriginY:1,"vert-origin-y":`vertOriginY`,vHanging:1,"v-hanging":`vHanging`,vIdeographic:1,"v-ideographic":`vIdeographic`,viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":`vMathematical`,vocab:0,widths:0,wordSpacing:1,"word-spacing":`wordSpacing`,writingMode:1,"writing-mode":`writingMode`,x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":`xHeight`,xlinkActuate:1,"xlink:actuate":`xlinkActuate`,xlinkArcrole:1,"xlink:arcrole":`xlinkArcrole`,xlinkHref:1,"xlink:href":`xlinkHref`,xlinkRole:1,"xlink:role":`xlinkRole`,xlinkShow:1,"xlink:show":`xlinkShow`,xlinkTitle:1,"xlink:title":`xlinkTitle`,xlinkType:1,"xlink:type":`xlinkType`,xmlBase:1,"xml:base":`xmlBase`,xmlLang:1,"xml:lang":`xmlLang`,xmlns:0,"xml:space":`xmlSpace`,xmlnsXlink:1,"xmlns:xlink":`xmlnsXlink`,xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}})),vo=t((e=>{var t=0,n=1,r=2,i=3,a=4,o=5,s=6;function c(e){return u.hasOwnProperty(e)?u[e]:null}function l(e,t,n,o,s,c,l){this.acceptsBooleans=t===r||t===i||t===a,this.attributeName=o,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=l}var u={};[`children`,`dangerouslySetInnerHTML`,`defaultValue`,`defaultChecked`,`innerHTML`,`suppressContentEditableWarning`,`suppressHydrationWarning`,`style`].forEach(e=>{u[e]=new l(e,t,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(([e,t])=>{u[e]=new l(e,n,!1,t,null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(e=>{u[e]=new l(e,r,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(e=>{u[e]=new l(e,r,!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`].forEach(e=>{u[e]=new l(e,i,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(e=>{u[e]=new l(e,i,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(e=>{u[e]=new l(e,a,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(e=>{u[e]=new l(e,s,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(e=>{u[e]=new l(e,o,!1,e.toLowerCase(),null,!1,!1)});var d=/[\-\:]([a-z])/g,f=e=>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(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,null,!1,!1)}),[`xlink:actuate`,`xlink:arcrole`,`xlink:role`,`xlink:show`,`xlink:title`,`xlink:type`].forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(e=>{u[e]=new l(e,n,!1,e.toLowerCase(),null,!1,!1)});var p=`xlinkHref`;u[p]=new l(`xlinkHref`,n,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(e=>{u[e]=new l(e,n,!1,e.toLowerCase(),null,!0,!0)});var{CAMELCASE:m,SAME:h,possibleStandardNames:g}=_o(),_=RegExp.prototype.test.bind(RegExp(`^(data|aria)-[: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]*$`)),v=Object.keys(g).reduce((e,t)=>{let n=g[t];return n===h?e[t]=t:n===m?e[t.toLowerCase()]=t:e[t]=n,e},{});e.BOOLEAN=i,e.BOOLEANISH_STRING=r,e.NUMERIC=o,e.OVERLOADED_BOOLEAN=a,e.POSITIVE_NUMERIC=s,e.RESERVED=t,e.STRING=n,e.getPropertyInfo=c,e.isCustomAttribute=_,e.possibleStandardNames=v})),yo=t(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`/`,d=`*`,f=``;function p(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,p=1;function h(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(` -`);p=~n?e.length-n:p+e.length}function g(){var e={line:l,column:p};return function(t){return t.position=new _(e),b(),t}}function _(e){this.start=e,this.end={line:l,column:p},this.source=t.source}_.prototype.content=e;function v(n){var r=Error(t.source+`:`+l+`:`+p+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=p,r.source=e,!t.silent)throw r}function y(t){var n=t.exec(e);if(n){var r=n[0];return h(r),e=e.slice(r.length),n}}function b(){y(i)}function x(e){var t;for(e||=[];t=S();)t!==!1&&e.push(t);return e}function S(){var t=g();if(!(u!=e.charAt(0)||d!=e.charAt(1))){for(var n=2;f!=e.charAt(n)&&(d!=e.charAt(n)||u!=e.charAt(n+1));)++n;if(n+=2,f===e.charAt(n-1))return v(`End of comment missing`);var r=e.slice(2,n-2);return p+=2,h(r),e=e.slice(n),p+=2,t({type:`comment`,comment:r})}}function C(){var e=g(),t=y(a);if(t){if(S(),!y(o))return v(`property missing ':'`);var r=y(s),i=e({type:`declaration`,property:m(t[0].replace(n,f)),value:r?m(r[0].replace(n,f)):f});return y(c),i}}function w(){var e=[];x(e);for(var t;t=C();)t!==!1&&(e.push(t),x(e));return e}return b(),w()}function m(e){return e?e.replace(l,f):f}t.exports=p})),bo=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(yo());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),xo=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),So=t(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(bo()),r=xo();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Co=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=a,e.setStyleProp=c;var n=s(),r=t(So()),i=new Set([`annotation-xml`,`color-profile`,`font-face`,`font-face-src`,`font-face-uri`,`font-face-format`,`font-face-name`,`missing-glyph`]);function a(e,t){return e.includes(`-`)?!i.has(e):!!(t&&typeof t.is==`string`)}var o={reactCompat:!0};function c(e,t){if(typeof e==`string`){if(!e.trim()){t.style={};return}try{t.style=(0,r.default)(e,o)}catch{t.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(`.`)[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set([`tr`,`tbody`,`thead`,`tfoot`,`colgroup`,`table`,`head`,`html`,`frameset`]),e.canTextBeChildOfNode=function(t){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(t.name)},e.returnFirstArg=function(e){return e}})),wo=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var t=vo(),n=Co(),r=[`checked`,`value`],i=[`input`,`select`,`textarea`],a={reset:!0,submit:!0};function o(e,o){e===void 0&&(e={});var c={},l=!!(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,t.isCustomAttribute)(u)){c[u]=d;continue}var f=u.toLowerCase(),p=s(f);if(p){var m=(0,t.getPropertyInfo)(p);switch(r.includes(p)&&i.includes(o)&&!l&&(p=s(`default`+f)),c[p]=d,m?.type){case t.BOOLEAN:c[p]=!0;break;case t.OVERLOADED_BOOLEAN:d===``&&(c[p]=!0);break}continue}n.PRESERVE_CUSTOM_ATTRIBUTES&&(c[u]=d)}return(0,n.setStyleProp)(e.style,c),c}function s(e){return t.possibleStandardNames[e]}})),To=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=s(),r=t(wo()),i=Co(),a={cloneElement:n.cloneElement,createElement:n.createElement,isValidElement:n.isValidElement};function o(e,t){t===void 0&&(t={});for(var n=[],s=typeof t.replace==`function`,l=t.transform??i.returnFirstArg,u=t.library??a,d=u.cloneElement,f=u.createElement,p=u.isValidElement,m=e.length,h=0;h1&&(_=d(_,{key:_.key??h})),n.push(l(_,g,h));continue}}if(g.type===`text`){var v=!g.data.trim().length;if(v&&g.parent&&!(0,i.canTextBeChildOfNode)(g.parent)||t.trim&&v)continue;n.push(l(g.data,g,h));continue}var y=g,b={};c(y)?((0,i.setStyleProp)(y.attribs.style,y.attribs),b=y.attribs):y.attribs&&(b=(0,r.default)(y.attribs,y.name));var x=void 0;switch(g.type){case`script`:case`style`:g.children[0]&&(b.dangerouslySetInnerHTML={__html:g.children[0].data});break;case`tag`:g.name===`textarea`&&g.children[0]?b.defaultValue=g.children[0].data:g.children?.length&&(x=o(g.children,t));break;default:continue}m>1&&(b.key=h),n.push(l(f(g.name,b,x),g,h))}return n.length===1?n[0]:n}function c(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&e.type===`tag`&&(0,i.isCustomComponent)(e.name,e.attribs)}})),Eo=r(t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=o;var n=t(go());e.htmlToDOM=n.default,e.attributesToProps=t(wo()).default;var r=t(To());e.domToReact=r.default;var i=fo();Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return i.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return i.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return i.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return i.Text}});var a={lowerCaseAttributeNames:!1};function o(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);return e?(0,r.default)((0,n.default)(e,t?.htmlparser2??a),t):[]}}))(),1),Do=Eo.default.default||Eo.default,Oo=z.memo(e=>{let{text:t,animationConfig:n}=e,{fadeDuration:r=200,easing:i=`ease-in-out`}=n||{},[a,o]=(0,z.useState)([]),s=(0,z.useRef)(``);(0,z.useEffect)(()=>{if(t===s.current)return;if(!(s.current&&t.indexOf(s.current)===0)){o([t]),s.current=t;return}let e=t.slice(s.current.length);e&&(o(t=>[...t,e]),s.current=t)},[t]);let c=(0,z.useMemo)(()=>({animation:`x-markdown-fade-in ${r}ms ${i} forwards`,color:`inherit`}),[r,i]);return z.createElement(z.Fragment,null,a.map((e,t)=>z.createElement(`span`,{style:c,key:`animation-text-${t}`},e)))}),ko=/\s/,Ao=/[a-zA-Z0-9-]/,jo=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),Mo=``,Po=``,Io=(e,t)=>`${e}-${t}`,Lo=(e,t)=>{if(!e.startsWith(Mo,t))return t;let n=e.indexOf(No,t+4);return n===-1?e.length:n+3},Ro=(e,t)=>{if(!e.startsWith(Po,t))return t;let n=e.indexOf(Fo,t+9);return n===-1?e.length:n+3},zo=(e,t)=>{if(e[t+1]!==`/`)return null;let n=t+2,r=``;for(;n`?null:{tagName:r.toLowerCase(),endPos:n+1}},Bo=(e,t)=>{let n=t+1,r=``;for(;n`){i=!0,a=e[n-1]===`/`;break}if(e[n]===`"`||e[n]===`'`){let t=e[n];for(n++;ne.toLowerCase()));if(n.size===0||e.length===0)return new Set;let r=new Set,i={},a={},o=0;for(;o{r.add(Io(e,t))});return r}var Ho=null;function Uo(){if(Ho)return Ho;if(typeof window<`u`&&typeof Node<`u`)try{let e=document.createElement(`template`);e.innerHTML=``;let t=e.content.firstChild;if(t){let n=Object.getOwnPropertyDescriptor(Node.prototype,`nodeName`)?.get,r=Object.getOwnPropertyDescriptor(Node.prototype,`nodeValue`)?.get,i=n&&t.nodeName&&!n.call(t);if(i){let e=n;Object.defineProperty(Node.prototype,"nodeName",{get:function(){let t=e.call(this);if(t)return t;if(this.nodeType===1&&`tagName`in this)return this.tagName;switch(this.nodeType){case 3:return`#text`;case 4:return`#cdata-section`;case 7:return`#processing-instruction`;case 8:return`#comment`;case 9:return`#document`;case 11:return`#document-fragment`}return t},configurable:!0,enumerable:!0})}let a=r&&(()=>{e.innerHTML=`
    test
    `;let t=e.content.firstChild?.firstChild;if(!t)return!1;let n=r.call(t);return t.nodeValue!=null&&n==null})();if(a){let e=r;Object.defineProperty(Node.prototype,"nodeValue",{get:function(){let t=e.call(this);return t==null&&(this.nodeType===3||this.nodeType===4||this.nodeType===8)&&`data`in this?this.data:t},configurable:!0,enumerable:!0})}if(i||a)return Ho=co(window),Ho}}catch{}return Ho=co,Ho}var Wo=class e{options;static NON_WHITESPACE_REGEX=/[^\r\n\s]+/;constructor(e){this.options=e}detectUnclosedTags(e){return Vo(e,Object.keys(this.options.components??{}))}configureDOMPurify(){let e=Object.keys(this.options.components||{}),t=this.options.dompurifyConfig||{},n=Array.isArray(t.ADD_TAGS)?t.ADD_TAGS:[],r=Array.isArray(t.ADD_ATTR)?t.ADD_ATTR:[];return{...t,ADD_TAGS:Array.from(new Set([...e,...n])),ADD_ATTR:Array.from(new Set([`target`,`rel`,...r]))}}createReplaceElement(t,n){let{enableAnimation:r,animationConfig:i}=this.options.streaming||{};return a=>{let o=`x-markdown-component-${n.current++}`,s=a.type===`text`&&a.data&&e.NON_WHITESPACE_REGEX.test(a.data),c=a.parent?.name,l=c&&this.options.components?.[c];if(r&&s&&!l)return z.createElement(Oo,{text:a.data,key:o,animationConfig:i});if(!(`name`in a))return;let{name:u,attribs:d,children:f}=a,p=this.options.components?.[u];if(p){n.tagIndexes[u]=(n.tagIndexes[u]??0)+1;let e={domNode:a,streamStatus:t?.has(Io(u,n.tagIndexes[u]))?`loading`:`done`,key:o,...d,...d.disabled!==void 0&&{disabled:!0},...d.checked!==void 0&&{checked:!0}};if(e.className=[e.className,e.classname,e.class].filter(Boolean).join(` `).trim()||``,u===`code`){let{"data-block":t=`false`,"data-state":n=`done`}=d||{};e.block=t===`true`,e.streamStatus=n===`loading`?`loading`:`done`;let r=d?.[`data-lang`],i=d?.class?.match(/(?:^|\s)language-([^\s]+)/)?.[1]??d?.class?.match(/(?:^|\s)lang-([^\s]+)/)?.[1],a=r||i;a&&(e.lang=a)}return f&&(e.children=this.processChildren(f,t,n)),z.createElement(p,e)}}}processChildren(e,t,n){return(0,Eo.domToReact)(e,{replace:this.createReplaceElement(t,n)})}processHtml(e){if(typeof co.sanitize!=`function`)return null;let t=this.detectUnclosedTags(e),n={current:0,tagIndexes:{}},r=Uo(),i=this.configureDOMPurify();return Do(r.sanitize(e,i),{replace:this.createReplaceElement(t,n)})}render(e){return this.processHtml(e)}},Go={FPS_THRESHOLD:{GOOD:55,WARNING:40},COLORS:{GOOD:`#52c41a`,WARNING:`#faad14`,DANGER:`#ff4d4f`},CHART:{WIDTH:750,HEIGHT:400,PADDING:80}},Ko=()=>typeof window>`u`?{x:12,y:12}:{x:window.innerWidth-220,y:window.innerHeight/2-100},qo=()=>{let[e,t]=(0,z.useState)(0),[n,r]=(0,z.useState)(0),[i,a]=(0,z.useState)(!1),[o,s]=(0,z.useState)(!1),[c,l]=(0,z.useState)([]),[u,d]=(0,z.useState)(Ko()),[f,p]=(0,z.useState)(!1),m=(0,z.useRef)([]),h=(0,z.useRef)([]),g=(0,z.useRef)(0),_=(0,z.useRef)(0),v=(0,z.useRef)(void 0),y=(0,z.useRef)({isDragging:!1,startX:0,startY:0,initialX:0,initialY:0});(0,z.useEffect)(()=>{if(typeof window>`u`)return;f||(p(!0),g.current=performance.now());let e=()=>{let n=performance.now(),a=n-g.current;if(h.current.push(a),h.current.length>60&&h.current.shift(),_.current++,a>=1e3){let e=Math.round(_.current*1e3/a),o=b();t(e),r(o),i&&m.current.push({timestamp:Date.now(),fps:e,memory:o}),_.current=0,g.current=n}v.current=requestAnimationFrame(e)};return v.current=requestAnimationFrame(e),()=>{v.current!==void 0&&cancelAnimationFrame(v.current)}},[i,f]);let b=()=>{let e=performance;return e.memory?Math.round(e.memory.usedJSHeapSize/1024/1024):0},x=e=>e<1?`${Math.round(e*1024)} KB`:e>=1024?`${(e/1024).toFixed(2)} GB`:`${e.toFixed(2)} MB`,S=e=>e>=Go.FPS_THRESHOLD.GOOD?Go.COLORS.GOOD:e>=Go.FPS_THRESHOLD.WARNING?Go.COLORS.WARNING:Go.COLORS.DANGER,C=(0,z.useCallback)(()=>{i?(a(!1),l([...m.current]),s(!0)):(m.current=[],a(!0))},[i]),w=(0,z.useCallback)(e=>{e.target.closest(`.x-markdown-debug-action`)||(y.current={isDragging:!0,startX:e.clientX,startY:e.clientY,initialX:u.x,initialY:u.y})},[u]),T=(0,z.useCallback)(e=>{if(!y.current.isDragging)return;let t=e.clientX-y.current.startX,n=e.clientY-y.current.startY;d({x:y.current.initialX+t,y:y.current.initialY+n})},[]),E=(0,z.useCallback)(()=>{y.current.isDragging=!1},[]);return(0,z.useEffect)(()=>{if(!(typeof window>`u`))return document.addEventListener(`mousemove`,T),document.addEventListener(`mouseup`,E),()=>{document.removeEventListener(`mousemove`,T),document.removeEventListener(`mouseup`,E)}},[T,E]),z.createElement(z.Fragment,null,z.createElement(`div`,{className:`x-markdown-debug-panel`,style:{left:u.x,top:u.y,cursor:y.current.isDragging?`grabbing`:`grab`},onMouseDown:w},z.createElement(`div`,{className:`x-markdown-debug-row`},z.createElement(`span`,{className:`x-markdown-debug-label`},`FPS`),z.createElement(`span`,{className:`x-markdown-debug-value`,style:{color:S(e)}},e)),z.createElement(`div`,{className:`x-markdown-debug-row`},z.createElement(`span`,{className:`x-markdown-debug-label`},`Memory`),z.createElement(`span`,{className:`x-markdown-debug-value`},x(n))),z.createElement(`div`,{className:`x-markdown-debug-actions`},z.createElement(`button`,{type:`button`,className:`x-markdown-debug-action x-markdown-debug-record-btn ${i?`recording`:``}`,onClick:C},i?`⏹ Stop`:`⏺ Record`),c.length>0&&!i&&z.createElement(`button`,{type:`button`,className:`x-markdown-debug-action`,onClick:()=>s(!0)},`📊 View`))),o&&c.length>0?z.createElement(`div`,{className:`x-markdown-debug-modal-overlay`,onClick:()=>s(!1)},z.createElement(`div`,{className:`x-markdown-debug-modal`,onClick:e=>e.stopPropagation()},z.createElement(`div`,{className:`x-markdown-debug-modal-header`},z.createElement(`span`,{style:{color:`#fff`,fontSize:18,fontWeight:`600`}},`Performance Recording`),z.createElement(`button`,{type:`button`,className:`x-markdown-debug-close-btn`,onClick:()=>s(!1)},`✕`)),z.createElement(()=>{if(!c.length)return null;let{WIDTH:e,HEIGHT:t,PADDING:n}=Go.CHART,r=e-n*2,i=t-n*2,a=c[0]?.timestamp??0,o=(c[c.length-1]?.timestamp??0)-a||1,s=Math.max(...c.map(e=>e.fps),60),l=Math.max(...c.map(e=>e.memory),0)*1.1,u=c.length>0?c.reduce((e,t)=>e+t.fps,0)/c.length:0,d=c.length>0?c.reduce((e,t)=>e+t.memory,0)/c.length:0,f=c.length>0?Math.min(...c.map(e=>e.fps)):0,p=c.length>0?Math.max(...c.map(e=>e.fps)):0,m=(e,t)=>c.map(s=>`${n+(s.timestamp-a)/o*r},${n+i-s[e]/t*i}`).join(` `);return z.createElement(`div`,{className:`x-markdown-debug-modal-content`},z.createElement(`div`,{className:`x-markdown-debug-stats-summary`},z.createElement(`div`,{className:`x-markdown-debug-stat-item`},z.createElement(`div`,{className:`x-markdown-debug-stat-label`},`Duration`),z.createElement(`div`,{className:`x-markdown-debug-stat-value`},(o/1e3).toFixed(2),`s`)),z.createElement(`div`,{className:`x-markdown-debug-stat-item`},z.createElement(`div`,{className:`x-markdown-debug-stat-label`},`FPS Avg`),z.createElement(`div`,{className:`x-markdown-debug-stat-value`,style:{color:S(u)}},u.toFixed(1))),z.createElement(`div`,{className:`x-markdown-debug-stat-item`},z.createElement(`div`,{className:`x-markdown-debug-stat-label`},`FPS Range`),z.createElement(`div`,{className:`x-markdown-debug-stat-value`},f,` - `,p)),z.createElement(`div`,{className:`x-markdown-debug-stat-item`},z.createElement(`div`,{className:`x-markdown-debug-stat-label`},`Memory Avg`),z.createElement(`div`,{className:`x-markdown-debug-stat-value`},x(d)))),z.createElement(`svg`,{width:e,height:t,className:`x-markdown-debug-chart-full`,role:`img`,"aria-label":`Performance chart showing FPS and memory usage over time`},z.createElement(`title`,null,`Performance Chart`),[0,.25,.5,.75,1].map(a=>z.createElement(`g`,{key:a},z.createElement(`line`,{x1:n,y1:n+i*a,x2:e-n,y2:n+i*a,stroke:`rgba(255,255,255,0.1)`,strokeWidth:`1`}),z.createElement(`line`,{x1:n+r*a,y1:n,x2:n+r*a,y2:t-n,stroke:`rgba(255,255,255,0.1)`,strokeWidth:`1`}))),z.createElement(`polyline`,{points:m(`fps`,s),fill:`none`,stroke:Go.COLORS.GOOD,strokeWidth:`2`,className:`fps-line`}),z.createElement(`polyline`,{points:m(`memory`,l),fill:`none`,stroke:`#1890ff`,strokeWidth:`2`,className:`memory-line`}),z.createElement(`text`,{x:n-10,y:n,fill:Go.COLORS.GOOD,fontSize:`12`,textAnchor:`end`},s.toFixed(0)),z.createElement(`text`,{x:n-10,y:t-n,fill:Go.COLORS.GOOD,fontSize:`12`,textAnchor:`end`},`0`),z.createElement(`text`,{x:n-10,y:n-15,fill:Go.COLORS.GOOD,fontSize:`14`,fontWeight:`bold`,textAnchor:`end`},`FPS`),z.createElement(`text`,{x:e-n+10,y:n+20,fill:`#1890ff`,fontSize:`12`,textAnchor:`start`},x(l)),z.createElement(`text`,{x:e-n+10,y:t-n,fill:`#1890ff`,fontSize:`12`,textAnchor:`start`},x(0)),z.createElement(`text`,{x:e-n+10,y:n+5,fill:`#1890ff`,fontSize:`14`,fontWeight:`bold`,textAnchor:`start`},`Memory`),z.createElement(`text`,{x:n,y:t-n+20,fill:`rgba(255,255,255,0.6)`,fontSize:`12`,textAnchor:`middle`},`0s`),z.createElement(`text`,{x:e-n,y:t-n+20,fill:`rgba(255,255,255,0.6)`,fontSize:`12`,textAnchor:`middle`},(o/1e3).toFixed(1),`s`)),z.createElement(`div`,{className:`x-markdown-debug-legend`},z.createElement(`div`,{className:`x-markdown-debug-legend-item`},z.createElement(`span`,{className:`x-markdown-debug-legend-color`,style:{backgroundColor:Go.COLORS.GOOD}}),z.createElement(`span`,null,`FPS`)),z.createElement(`div`,{className:`x-markdown-debug-legend-item`},z.createElement(`span`,{className:`x-markdown-debug-legend-color`,style:{backgroundColor:`#1890ff`}}),z.createElement(`span`,null,`Memory`))))},null))):null)},Q=function(e){return e.Text=`text`,e.Link=`link`,e.Image=`image`,e.Html=`html`,e.Emphasis=`emphasis`,e.List=`list`,e.Table=`table`,e.InlineCode=`inline-code`,e}({}),Jo={image:[/^!\[[^\]\r\n]{0,1000}$/,/^!\[[^\r\n]{0,1000}\]\(*[^)\r\n]{0,1000}$/],link:[/^\[[^\]\r\n]{0,1000}$/,/^\[[^\r\n]{0,1000}\]\(*[^)\r\n]{0,1000}$/],html:[/^<\/$/,/^<\/?[a-zA-Z][a-zA-Z0-9-]{0,100}[^>\r\n]{0,1000}$/],commonEmphasis:[/^(\*{1,3}|_{1,3})(?!\s)(?!.*\1$)[^\r\n]{0,1000}$/],list:[/^[-+*]\s{0,3}$/,/^[-+*]\s{1,3}(\*{1,3}|_{1,3})(?!\s)(?!.*\1$)[^\r\n]{0,1000}$/],"inline-code":[/^`[^`\r\n]{0,300}$/]},Yo=e=>{if(e.includes(` - -`))return!1;let t=e.split(` -`);if(t.length<=1)return!0;let[n,r]=t,i=n.trim();if(!/^\|.*\|$/.test(i))return!1;let a=r.trim().split(`|`).map(e=>e.trim()).filter(Boolean),o=/^:?-+:?$/;return a.every((e,t)=>t===a.length-1&&e===`:`||o.test(e))},Xo={[Q.Link]:{tokenType:Q.Link,isStartOfToken:e=>e.startsWith(`[`),isStreamingValid:e=>Jo.link.some(t=>t.test(e))},[Q.Image]:{tokenType:Q.Image,isStartOfToken:e=>e.startsWith(`!`),isStreamingValid:e=>Jo.image.some(t=>t.test(e))},[Q.Html]:{tokenType:Q.Html,isStartOfToken:e=>e.startsWith(`<`),isStreamingValid:e=>Jo.html.some(t=>t.test(e))},[Q.Emphasis]:{tokenType:Q.Emphasis,isStartOfToken:e=>e.startsWith(`*`)||e.startsWith(`_`),isStreamingValid:e=>Jo.commonEmphasis.some(t=>t.test(e))},[Q.List]:{tokenType:Q.List,isStartOfToken:e=>/^[-+*]/.test(e),isStreamingValid:e=>Jo.list.some(t=>t.test(e)),getCommitPrefix:e=>{let t=e.match(/^([-+*]\s{0,3})/)?.[1],n=t?e.slice(t.length):``;return t&&n.startsWith("`")?t:null}},[Q.Table]:{tokenType:Q.Table,isStartOfToken:e=>e.startsWith(`|`),isStreamingValid:Yo},[Q.InlineCode]:{tokenType:Q.InlineCode,isStartOfToken:e=>e.startsWith("`"),isStreamingValid:e=>Jo[`inline-code`].some(t=>t.test(e))}},Zo=(e,t)=>{let n=Xo[t];if(!n)return;let{token:r,pending:i}=e;if(r===Q.Text&&n.isStartOfToken(i)){e.token=t;return}if(r===t&&!n.isStreamingValid(i)){let t=n.getCommitPrefix?.(i);if(t){e.completeMarkdown+=t,e.pending=i.slice(t.length),e.token=Q.Text;return}es(e)}},Qo=Object.values(Xo).map(e=>({tokenType:e.tokenType,recognize:t=>Zo(t,e.tokenType)})),$o=()=>({pending:``,token:Q.Text,processedLength:0,completeMarkdown:``}),es=e=>{e.pending&&=(e.completeMarkdown+=e.pending,``),e.token=Q.Text},ts=(e,t=!1)=>{let n=e.split(` -`),r=!1,i=``,a=0;for(let e=0;e=a&&/^\s*$/.test(c)&&(t||e{let t=``;for(let n=0;n=55296&&r<=56319?n+1=56320&&e.charCodeAt(n+1)<=57343&&(t+=e[n]+e[n+1],n++):(r<56320||r>57343)&&(t+=e[n])}return t},rs=e=>{try{return encodeURIComponent(e)}catch(t){return t instanceof URIError?encodeURIComponent(ns(e)):``}},is=(e,t)=>{let{streaming:n,components:r={}}=t||{},{hasNextChunk:i=!1,incompleteMarkdownComponentMap:a}=n||{},[o,s]=(0,z.useState)(``),c=i?o:typeof e==`string`?e:``,l=(0,z.useRef)($o()),u=(0,z.useCallback)(e=>{let{token:t,pending:n}=e;if(t===Q.Text||t===Q.Image&&n===`!`)return;if(t===Q.Table&&n.split(` -`).length>2)return n;let i=(a||{})[t]||`incomplete-${t}`,o=rs(n);return r?.[i]?`<${i} data-raw="${o}" />`:void 0},[a,r]),d=(0,z.useCallback)(e=>{if(!e){s(``),l.current=$o();return}let t=l.current.completeMarkdown+l.current.pending;e.startsWith(t)||(l.current=$o());let n=l.current,r=e.slice(n.processedLength);if(!r)return;n.processedLength+=r.length;for(let e of r){if(n.pending+=e,ts(n.completeMarkdown+n.pending)){es(n);continue}if(n.token===Q.Text)for(let e of Qo)e.recognize(n);else if(Qo.find(e=>e.tokenType===n.token)?.recognize(n),n.token===Q.Text)for(let e of Qo)e.recognize(n);n.token===Q.Text&&es(n)}let i=u(n);s(n.completeMarkdown+(i||``))},[u]);return(0,z.useEffect)(()=>{if(typeof e!=`string`){console.error(`X-Markdown: input must be string, not ${typeof e}.`),s(``);return}i&&d(e)},[e,i,d]),c},as=e=>e?typeof e==`boolean`?`▋`:e.content||`▋`:null,os=z.memo(e=>{let{streaming:t,config:n,components:r,paragraphTag:i,content:a,children:s,rootClassName:c,className:l,style:u,openLinksInNewTab:d,dompurifyConfig:f,protectCustomTagNewlines:p,disableCustomTagBlockMarkdown:m,escapeRawHtml:h,debug:g,disableDefaultStyles:_}=e,v=(0,z.useMemo)(()=>as(t?.tail),[t?.tail]),y=typeof t?.tail==`object`?t.tail.component:void 0,b=!!t?.hasNextChunk&&v,x=o(`x-markdown`,(0,z.useMemo)(()=>{if(_===!0)return`x-md-disable-all`;if(Array.isArray(_))return _.map(e=>`x-md-disable-${e}`)},[_]),c,l),S=is(a||s||``,{streaming:t,components:r}),C=(0,z.useMemo)(()=>{if(!b)return r;let e=y?z.createElement(y,{content:v}):z.createElement(`span`,{className:`xmd-tail`},v);return{...r,"xmd-tail":()=>e}},[b,r,y,v]),w=(0,z.useMemo)(()=>new Wi({markedConfig:n,paragraphTag:i,openLinksInNewTab:d,components:C,protectCustomTagNewlines:p,disableCustomTagBlockMarkdown:m,escapeRawHtml:h}),[n,i,d,C,p,m,h]),T=(0,z.useMemo)(()=>new Wo({components:C,dompurifyConfig:f,streaming:t}),[C,f,t]),E=(0,z.useMemo)(()=>S?w.parse(S,{injectTail:!!b}):``,[S,w,b]),D=(0,z.useMemo)(()=>E?T.render(E):null,[E,T]);return S?z.createElement(z.Fragment,null,z.createElement(`div`,{className:x,style:u},D),g?z.createElement(qo,null):null):null});async function ss(){return S({url:`/ai/chat/conversations`,method:`get`})}async function cs(e){return S({url:`/ai/chat/messages/${e}`,method:`get`})}async function ls(e){return S({url:`/ai/chat/conversations/${e}`,method:`delete`})}var $=h(),{Text:us}=F,ds=()=>{let{t:e}=L(),{message:t,modal:n}=N.useApp(),{token:r}=se.useToken(),i=I(e=>e.themeConfig),a=ce(),[o]=oe(),s=o.get(`agent_id`),[c,l]=(0,z.useState)(null),u=(0,z.useRef)(null),{conversations:d,setConversations:f,activeConversationKey:p,setActiveConversationKey:m}=Qn({}),[h,g]=(0,z.useState)([]),[_,v]=(0,z.useState)(!1),[y,b]=(0,z.useState)(``),[x,S]=(0,z.useState)(!1),w=async()=>{let{data:e}=await ss();e.success&&e.data&&f(e.data)},O=async e=>{let{data:t}=await cs(e);t.success&&t.data&&(g(t.data),setTimeout(()=>{u.current?.scrollTo({top:`bottom`})},100))};(0,z.useEffect)(()=>{w()},[]),(0,z.useEffect)(()=>{s&&le(Number(s)).then(({data:e})=>{e.success&&e.data&&l(e.data)})},[s]);let k=e=>{m(e),O(e)},A=()=>{m(``),g([])},ee=r=>{n.confirm({title:e(`ai.chat.delete.confirm`),okButtonProps:{danger:!0},onOk:async()=>{await ls(r),t.success(e(`ai.chat.delete.success`)),p===r&&(m(``),g([])),await w()}})},M=async e=>{if(!e.trim()||_)return;let t={key:`user-${Date.now()}`,role:`user`,content:e,status:`success`},n={key:`assistant-${Date.now()}`,role:`assistant`,content:``,loading:!0,extraInfo:{isStreaming:!0}};g(e=>[...e,t,n]),v(!0),S(!0);let r=localStorage.getItem(`token`),i=``;fr(`/index.php/ai/chat/send`,{headers:{"Content-Type":`application/json`,Authorization:`Bearer ${r}`,Accept:`text/event-stream`},method:`post`,params:{conversation_id:p,message:e,agent_id:s?Number(s):void 0},callbacks:{onSuccess:async()=>{if(v(!1),b(``),S(!1),!p){let{data:e}=await ss();if(e.success&&e.data&&e.data.length>0){f(e.data);let t=e.data[0].key;m(t)}}},onError:()=>{v(!1),S(!1)},onUpdate:e=>{console.log(`onUpdate`,e);let t=e.data;if(t!==`[DONE]`)try{let e=JSON.parse(t);e.type===`text_delta`&&e.delta&&(i+=e.delta,g(e=>e.map(e=>e.key===n.key?{...e,content:i,loading:!1}:e))),e.type===`text_end`&&g(t=>t.map(t=>t.key===n.key?{...t,key:e.message_id,loading:!1}:t))}catch{}}}})},ne={assistant:{placement:`start`,variant:`filled`,avatar:(0,$.jsx)(P,{src:c?.icon||`https://file.xinadmin.cn/file/favicons.ico`}),contentRender:(e,t)=>{if(!e)return null;let n=t?.extraInfo?.isStreaming===!0;return(0,$.jsx)(os,{content:e,streaming:{hasNextChunk:n,enableAnimation:!0,tail:n},openLinksInNewTab:!0,escapeRawHtml:!0})}},user:{placement:`end`,variant:`filled`,avatar:(0,$.jsx)(P,{icon:(0,$.jsx)(j,{}),style:{background:r.colorFillSecondary,color:r.colorTextSecondary},size:36})}},re=h.length>0;return(0,$.jsxs)(D,{styles:{body:{padding:0,overflow:`hidden`,display:`flex`,height:`calc(100vh - 180px)`}},title:(0,$.jsx)(E,{align:`center`,children:c?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(P,{src:c.icon,size:36}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:18,fontWeight:600,marginRight:10},children:c.name}),c.description&&(0,$.jsx)(us,{type:`secondary`,style:{fontSize:12,lineHeight:1},children:c.description})]})]}):(0,$.jsx)(`span`,{children:e(`ai.chat.defaultTitle`)})}),extra:(0,$.jsx)(T,{onClick:()=>a(`/ai/agent`),children:e(`ai.chat.switchAgent`)}),children:[(0,$.jsx)(`div`,{style:{width:280,borderRight:`1px solid ${r.colorBorderSecondary}`},children:(0,$.jsx)(Xt,{items:d,activeKey:p,onActiveChange:k,menu:e=>({items:[{label:`Rename`,key:`Rename`,icon:(0,$.jsx)(C,{})},{type:`divider`},{label:`Delete Chat`,key:`delete`,icon:(0,$.jsx)(te,{}),danger:!0,onClick:()=>ee(e.key)}]}),creation:{onClick:A},style:{flex:1,overflow:`auto`}})}),(0,$.jsxs)(`div`,{className:`flex-1 flex flex-col min-w-0 px-1`,children:[!re&&(0,$.jsx)(`div`,{className:`h-full flex items-center justify-center`,children:(0,$.jsx)(Jn,{icon:c?.icon||`https://file.xinadmin.cn/file/favicons.ico`,style:{backgroundImage:i.themeScheme===`dark`?`linear-gradient(97deg, rgba(90,196,255,0.12) 0%, rgba(174,136,255,0.12) 100%)`:`linear-gradient(97deg, #f2f9fe 0%, #f7f3ff 100%)`,borderRadius:20,width:`80%`,padding:`20px`},title:e(`ai.chat.welcome.title`),description:e(`ai.chat.welcome.description`),variant:`borderless`})}),re&&(0,$.jsx)(`div`,{style:{flex:1,overflow:`hidden`},children:(0,$.jsx)(yt.List,{ref:u,items:h,autoScroll:!0,style:{height:`100%`,padding:16},role:ne})}),(0,$.jsx)(`div`,{style:{padding:`0 16px 16px`},children:(0,$.jsx)(Wn,{loading:_,disabled:x,value:y,onChange:b,placeholder:e(`ai.chat.placeholder`),onSubmit:M,onCancel:()=>v(!1),autoSize:{minRows:1,maxRows:6}})})]})]})};export{ds as default}; \ No newline at end of file diff --git a/public/assets/checkbox-DV1_nuDN.js b/public/assets/checkbox-DV1_nuDN.js new file mode 100644 index 0000000..429f767 --- /dev/null +++ b/public/assets/checkbox-DV1_nuDN.js @@ -0,0 +1,4 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Bn as t,Dr as n,Ln as r,Ot as i,Pn as a,St as o,Tt as s,Vn as c,Wt as l,Zn as u,Zt as d,at as f,hr as p,p as m,qt as h,wr as g,xn as _,xt as v,yr as y,yt as b,zn as x}from"./jsx-runtime-ADHq9IcL.js";import{a as S,i as C}from"./ColorPresets-wH0crouI.js";import{r as w}from"./button-CcpWP-mq.js";import{n as T,t as E}from"./useBubbleLock-CoAwAGkH.js";var D=e(n()),O=e=>{let{checkboxCls:t,checkboxSize:n,lineWidth:r}=e,i=`${t}-wrapper`,o=`@media (hover: hover) and (pointer: fine)`;return[{[`${t}-group`]:{...d(e),display:`inline-flex`,flexWrap:`wrap`,columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[i]:{...d(e),display:`inline-flex`,alignItems:`baseline`,cursor:`pointer`,"&:after":{display:`inline-block`,width:0,overflow:`hidden`,content:`'\\a0'`},[`& + ${i}`]:{marginInlineStart:0}},[t]:{...d(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:n,height:n,direction:`ltr`,backgroundColor:e.colorBgContainer,border:`${a(r)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:`separate`,transition:`all ${e.motionDurationSlow}`,flex:`none`,...w(),"&:after":{boxSizing:`border-box`,position:`absolute`,top:`calc(${n} / 2 - ${r})`,insetInlineStart:`calc(${n} / 4 - ${r})`,display:`table`,width:e.calc(n).div(14).mul(5).equal(),height:e.calc(n).div(14).mul(8).equal(),border:`${a(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:`rotate(45deg) scale(0) translate(-50%,-50%)`,opacity:0,content:`""`,transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`,...w()},[`${t}-input`]:{position:`absolute`,inset:`calc(-1 * (${r}))`,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:h(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[o]:{[` + ${i}:not(${i}-disabled), + ${t}:not(${t}-disabled) + `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...w()},[o]:{[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`},[o]:{[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}}},{[`${i}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function k(e,t){return O(_(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var A=l(`Checkbox`,(e,{prefixCls:t})=>[k(t,e)]),j=D.createContext(null),M=D.forwardRef((e,t)=>{let{prefixCls:n,children:r,indeterminate:a=!1,onMouseEnter:s,onMouseLeave:l,skipGroup:u=!1,disabled:d,rootClassName:h,className:_,style:w,classNames:O,styles:k,name:M,value:N,checked:P,defaultChecked:F,onChange:I,...L}=e,{getPrefixCls:R,direction:z,className:B,style:V,classNames:ee,styles:te}=x(`checkbox`),H=D.useContext(j),{isFormItemInput:ne}=D.useContext(m),re=D.useContext(f),U=(H?.disabled||d)??re,[ie,ae]=y(F,P),W=ie,G=g(e=>{ae(e.target.checked),I?.(e),!u&&H?.toggleOption&&H.toggleOption({label:r,value:N})});H&&!u&&(W=H.value.includes(N));let K=D.useRef(null),q=p(t,K);D.useEffect(()=>{if(!(u||!H))return H.registerValue(N),()=>{H.cancelValue(N)}},[N,u]),D.useEffect(()=>{K.current?.input&&(K.current.input.indeterminate=a)},[a]);let J=R(`checkbox`,n),Y=b(J),[X,oe]=A(J,Y),Z={...L},se={...e,indeterminate:a,disabled:U,checked:W},ce=o(V),le=o(w),[Q,$]=v([ee,O],[te,ce,k,le],{props:se}),ue=c(`${J}-wrapper`,{[`${J}-rtl`]:z===`rtl`,[`${J}-wrapper-checked`]:W,[`${J}-wrapper-disabled`]:U,[`${J}-wrapper-in-form-item`]:ne},B,_,Q.root,h,oe,Y,X),de=c(Q.icon,{[`${J}-indeterminate`]:a},S,X),[fe,pe]=E(Z.onClick);return D.createElement(C,{component:`Checkbox`,disabled:U},D.createElement(`label`,{className:ue,style:$.root,onMouseEnter:s,onMouseLeave:l,onClick:fe},D.createElement(T,{...Z,name:!u&&H?H.name:M,checked:W,onClick:pe,onChange:G,prefixCls:J,className:de,style:$.icon,disabled:U,ref:q,value:N}),i(r)&&D.createElement(`span`,{className:c(`${J}-label`,Q.label),style:$.label},r)))}),N=D.forwardRef((e,n)=>{let{defaultValue:i,children:a,options:o=[],prefixCls:l,className:d,rootClassName:f,style:p,onChange:m,role:h=`group`,...g}=e,{getPrefixCls:_,direction:v}=D.useContext(r),[y,x]=D.useState(g.value||i||[]),[S,C]=D.useState([]);D.useEffect(()=>{`value`in g&&x(g.value||[])},[g.value]);let w=D.useMemo(()=>o.map(e=>typeof e==`string`||s(e)?{label:e,value:e}:e),[o]),T=e=>{C(t=>t.filter(t=>t!==e))},E=e=>{C(n=>[].concat(t(n),[e]))},O=e=>{let n=y.indexOf(e.value),r=t(y);n===-1?r.push(e.value):r.splice(n,1),`value`in g||x(r),m?.(r.filter(e=>S.includes(e)).sort((e,t)=>w.findIndex(t=>t.value===e)-w.findIndex(e=>e.value===t)))},k=_(`checkbox`,l),N=`${k}-group`,P=b(k),[F,I]=A(k,P),L=u(g,[`value`,`disabled`]),R=o.length?w.map(e=>D.createElement(M,{prefixCls:k,key:e.value.toString(),disabled:`disabled`in e?e.disabled:g.disabled,value:e.value,checked:y.includes(e.value),onChange:e.onChange,className:c(`${N}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):a,z=D.useMemo(()=>({toggleOption:O,value:y,disabled:g.disabled,name:g.name,registerValue:E,cancelValue:T}),[O,y,g.disabled,g.name,E,T]),B=c(N,{[`${N}-rtl`]:v===`rtl`},d,f,I,P,F);return D.createElement(`div`,{className:B,style:p,role:h,...L,ref:n},D.createElement(j.Provider,{value:z},R))}),P=M;P.Group=N,P.__ANT_CHECKBOX=!0;export{k as n,P as t}; \ No newline at end of file diff --git a/public/assets/chunk-KS7C4IRE-CN93VkYO.js b/public/assets/chunk-KS7C4IRE-CN93VkYO.js new file mode 100644 index 0000000..ea04e45 --- /dev/null +++ b/public/assets/chunk-KS7C4IRE-CN93VkYO.js @@ -0,0 +1,4 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t}from"./jsx-runtime-ADHq9IcL.js";var n=e(t(),1),r=`modulepreload`,i=function(e){return`/`+e},a={},o=function(e,t,n){let o=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),s=document.querySelector(`meta[property=csp-nonce]`),c=s?.nonce||s?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function u(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}o=l(t.map(t=>{if(t=i(t,n),t=u(t),t in a)return;a[t]=!0;let o=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.href===t&&(!o||r.rel===`stylesheet`))return}let s=document.createElement(`link`);if(s.rel=o?`stylesheet`:r,o||(s.as=`script`),s.crossOrigin=``,s.href=t,c&&s.setAttribute(`nonce`,c),document.head.appendChild(s),o)return new Promise((e,n)=>{s.addEventListener(`load`,e),s.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function s(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(t=>{for(let e of t||[])e.status===`rejected`&&s(e.reason);return e().catch(s)})},s=e=>{throw TypeError(e)},c=(e,t,n)=>t.has(e)||s(`Cannot `+n),l=(e,t,n)=>(c(e,t,`read from private field`),n?n.call(e):t.get(e)),u=(e,t,n)=>t.has(e)?s(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),d=(e,t,n,r)=>(c(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),f=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,p=/^[\\/]{2}/;function m(e,t){return t+e.replace(/\\/g,`/`)}var h=`popstate`;function g(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function _(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return S(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:C(t)}return T(t,n,null,e)}function v(e,t){if(e===!1||e==null)throw Error(t)}function y(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function b(){return Math.random().toString(36).substring(2,10)}function x(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function S(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?w(t):t,state:n,key:t&&t.key||r||b(),mask:i}}function C({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function w(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function T(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:_.location,delta:t})}function f(e,t){s=`PUSH`;let r=g(e)?e:S(_.location,e,t);n&&n(r,e),l=u()+1;let d=x(r,l),f=_.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:_.location,delta:1})}function p(e,t){s=`REPLACE`;let r=g(e)?e:S(_.location,e,t);n&&n(r,e),l=u();let i=x(r,l),d=_.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:_.location,delta:0})}function m(e){return E(i,e)}let _={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(h,d),c=e,()=>{i.removeEventListener(h,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return _}function E(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),v(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:C(t);return i=i.replace(/ $/,`%20`),!n&&p.test(i)&&(i=r+i),new URL(i,r)}var D,ee=class{constructor(e){if(u(this,D,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(l(this,D).has(e))return l(this,D).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){l(this,D).set(e,t)}};D=new WeakMap;var O=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function k(e){return O.has(e)}var A=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function j(e){return A.has(e)}function te(e){return e.index===!0}function ne(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(v(e.index!==!0||!e.children,`Cannot specify children on an index route`),v(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),te(e)){let n={...e,id:s};return r[s]=M(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=M(n,t(n)),e.children&&(n.children=ne(e.children,t,o,r,i)),n}})}function M(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function N(e,t,n=`/`){return P(e,t,n,!1)}function P(e,t,n,r,i){let a=B((typeof t==`string`?w(t):t).pathname||`/`,n);if(a==null)return null;let o=i??F(e),s=null,c=ge(a);for(let e=0;s==null&&e{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;v(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=U([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(v(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ie(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:L(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=he(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ae(e.path))a(e,t,!0,n)}),t}function ae(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ae(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function oe(e){e.sort((e,t)=>e.score===t.score?R(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var se=/^:[\w-]+$/,I=3,ce=2,le=1,ue=10,de=-2,fe=e=>e===`*`;function L(e,t){let n=e.split(`/`),r=n.length;return n.some(fe)&&(r+=de),t&&(r+=ce),n.filter(e=>!fe(e)).reduce((e,t)=>e+(se.test(t)?I:t===``?le:ue),r)}function R(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function z(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function he(e,t=!1,n=!0){y(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ge(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return y(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function B(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function _e({basename:e,pathname:t}){return t===`/`?e:U([e,t])}var ve=e=>f.test(e);function V(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?w(e):e,a;return n?(n=Ce(n),a=n.startsWith(`/`)?ye(n.substring(1),`/`):ye(n,t)):a=t,{pathname:a,search:Ee(r),hash:De(i)}}function ye(e,t){let n=we(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function be(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function xe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function H(e){let t=xe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Se(e,t,n,r=!1){let i;typeof e==`string`?i=w(e):(i={...e},v(!i.pathname||!i.pathname.includes(`?`),be(`?`,`pathname`,`search`,i)),v(!i.pathname||!i.pathname.includes(`#`),be(`#`,`pathname`,`hash`,i)),v(!i.search||!i.search.includes(`#`),be(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=V(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Ce=e=>e.replace(/[\\/]{2,}/g,`/`),U=e=>Ce(e.join(`/`)),we=e=>e.replace(/\/+$/,``),Te=e=>we(e).replace(/^\/*/,`/`),Ee=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,De=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Oe=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],ke=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ae(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function je(e){return U(e.map(e=>e.route.path).filter(Boolean))||`/`}var Me=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function W(e,t){let n=e;if(typeof n!=`string`||!f.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Me)try{let e=new URL(window.location.href),r=p.test(n)?new URL(m(n,e.protocol)):new URL(n),a=B(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{y(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var G=Symbol(`Uninstrumented`);function Ne(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=Fe(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=Fe(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[G]??i,a=Fe(n[e],t,(...e)=>Le(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[G]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[G]??e,r=Fe(n.middleware,t,(...e)=>Le(e[0]));return r?(r[G]=t,r):e})),r}function Pe(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[G]??e.navigate,r=Fe(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?C(n):`.`,...Re(e,r??{})}});r&&(r[G]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[G]??e.fetch,r=Fe(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...Re(e,i??{})}});r&&(r[G]=t,e.fetch=r)}return e}function Fe(e,t,n){return e.length===0?null:async(...r)=>{let i=await Ie(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function Ie(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=Ie(e,t,n,r-1),a=await o,v(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function Le(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:ze(t),params:{...r},pattern:i,context:Be(n)}}function Re(e,t){return{currentUrl:C(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function ze(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Be(e){if(He(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Ve=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function He(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===Ve}var Ue=[`POST`,`PUT`,`PATCH`,`DELETE`],We=new Set(Ue),Ge=[`GET`,...Ue],Ke=new Set(Ge),qe=new Set([301,302,303,307,308]),Je=new Set([307,308]),Ye={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Xe={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ze={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Qe=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),$e=`remix-router-transitions`,et=Symbol(`ResetLoaderData`),tt,nt,K,rt,it=class{constructor(e){u(this,tt),u(this,nt),u(this,K),u(this,rt),d(this,tt,e),d(this,nt,F(e))}get stableRoutes(){return l(this,tt)}get activeRoutes(){return l(this,K)??l(this,tt)}get branches(){return l(this,rt)??l(this,nt)}get hasHMRRoutes(){return l(this,K)!=null}setRoutes(e){d(this,tt,e),d(this,nt,F(e))}setHmrRoutes(e){d(this,K,e),d(this,rt,F(e))}commitHmrRoutes(){l(this,K)&&(d(this,tt,l(this,K)),d(this,nt,l(this,rt)),d(this,K,void 0),d(this,rt,void 0))}};tt=new WeakMap,nt=new WeakMap,K=new WeakMap,rt=new WeakMap;function at(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;v(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||Qe,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),...Ne(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new it(ne(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||St,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,b=P(s.activeRoutes,e.history.location,c,!1,s.branches),x=!1,C=null,T,D;if(b==null&&!e.patchRoutesOnNavigation){let t=q(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Kt(s.activeRoutes);T=!0,D=!T,b=n,C={[r.id]:t}}else if(b&&!e.hydrationData&&K(b,s.activeRoutes,e.history.location.pathname).active&&(b=null),!b){T=!1,D=!T,b=[];let t=K(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(x=!0,b=t.matches)}else if(b.some(e=>e.route.lazy))T=!1,D=!T;else if(!b.some(e=>ut(e.route)))T=!0,D=!T;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=b;if(n){let e=b.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}D=!1,T=!0,r.forEach(e=>{let r=dt(e.route,t,n);D||=r.renderFallback,T&&=!r.shouldLoad})}let O,k={historyAction:e.history.action,location:e.history.location,matches:b,initialized:T,renderFallback:D,navigation:Ye,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},A=`POP`,j=null,te=!1,M,N=!1,F=new Map,ie=null,ae=!1,oe=!1,se=new Set,I=new Map,ce=0,le=-1,ue=new Map,de=new Set,fe=new Map,L=new Map,R=new Set,z=new Map,pe,me=null;function he(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(pe){pe(),pe=void 0;return}y(z.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=Ke({currentLocation:k.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{pe=e});e.history.go(r*-1),Ge(i,{state:`blocked`,location:n,proceed(){Ge(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(k.blockers);e.set(i,Ze),V({blockers:e})}}),j?.resolve(),j=null;return}return H(t,n)}),n){mn(t,F);let e=()=>hn(t,F);t.addEventListener(`pagehide`,e),ie=()=>t.removeEventListener(`pagehide`,e)}return k.initialized||H(`POP`,k.location,{initialHydration:!0}),O}function ge(){d&&d(),ie&&ie(),f.clear(),M&&M.abort(),k.fetchers.forEach((e,t)=>Le(k.fetchers,t)),k.blockers.forEach((e,t)=>We(t))}function _e(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(k,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function V(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),k={...k,...e};let n=[],r=[];k.fetchers.forEach((e,t)=>{e.state===`idle`&&(R.has(t)?n.push(t):r.push(t))}),R.forEach(e=>{!k.fetchers.has(e)&&!I.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(k,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Le(k.fetchers,e)),r.forEach(e=>k.fetchers.delete(e))}function ye(t,n,{flushSync:r}={}){let i=k.actionData!=null&&k.navigation.formMethod!=null&&Y(k.navigation.formMethod)&&k.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?k.actionData:null;let o=n.loaderData?Ut(k.loaderData,n.loaderData,n.matches||[],n.errors):k.loaderData,c=k.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,Ze)));let l=!ae&&nt(t,n.matches||k.matches),u=te===!0||k.navigation.formMethod!=null&&Y(k.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),ae||A===`POP`||(A===`PUSH`?e.history.push(t,t.state):A===`REPLACE`&&e.history.replace(t,t.state));let d;if(A===`POP`){let e=F.get(k.location.pathname);e&&e.has(t.pathname)?d={currentLocation:k.location,nextLocation:t}:F.has(t.pathname)&&(d={currentLocation:t,nextLocation:k.location})}else if(N){let e=F.get(k.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),F.set(k.location.pathname,e)),d={currentLocation:k.location,nextLocation:t}}V({...n,actionData:a,loaderData:o,historyAction:A,location:t,initialized:!0,renderFallback:!1,navigation:Ye,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),A=`POP`,te=!1,N=!1,ae=!1,oe=!1,j?.resolve(),j=null,me?.resolve(),me=null}async function be(t,n){if(j?.resolve(),j=null,typeof t==`number`){j||=gn();let n=j.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=ct(!1,st(k.location,k.matches,c,t,n?.fromRouteId,n?.relative),n),o;n?.mask&&(o={pathname:``,search:``,hash:``,...typeof n.mask==`string`?w(n.mask):{...k.location.mask,...n.mask}});let s=k.location,l=S(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)};let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&Y(i.formMethod)&&i.formAction===k.location.pathname+k.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=Ke({currentLocation:s,nextLocation:l,historyAction:d});if(m){Ge(m,{state:`blocked`,location:l,proceed(){Ge(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),be(t,n)},reset(){let e=new Map(k.blockers);e.set(m,Ze),V({blockers:e})}});return}await H(d,l,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function xe(){me||=gn(),Me(),V({revalidation:`loading`});let e=me.promise;return k.navigation.state===`submitting`?e:k.navigation.state===`idle`?(H(k.historyAction,k.location,{startUninterruptedRevalidation:!0}),e):(H(A||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation,enableViewTransition:N===!0}),e)}async function H(t,n,r){M&&M.abort(),M=null,A=t,ae=(r&&r.startUninterruptedRevalidation)===!0,tt(k.location,k.matches),te=(r&&r.preventScrollReset)===!0,N=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&k.matches&&k.matches.length>0&&!x?k.matches:P(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&k.initialized&&!oe&&Yt(k.location,n)&&!(r&&r.submission&&Y(r.submission.formMethod))){ye(n,{matches:a},{flushSync:o});return}let l=K(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),!a){let{error:e,notFoundMatches:t,route:r}=qe(n.pathname);ye(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;M=new AbortController;let d=Lt(e.history,n,M.signal,r&&r.submission),f=e.getContext?await e.getContext():new ee,p;if(r&&r.pendingError)p=[Gt(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Y(r.submission.formMethod)){let i=await Se(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(J(t)&&Ae(t.error)&&t.error.status===404){M=null,ye(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=un(n,a,t,r.submission),o=!1,l.active=!1,d=Lt(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await Ce(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(M=null,ye(n,{matches:h||a,...Wt(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function Se(t,n,i,l,u,d,f,p,m={}){if(Me(),V({navigation:dn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await rt(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Kt(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Gt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=qe(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=cn(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:q(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await ke(t,n,Ot(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(en(h)){let n;return n=m&&m.replace!=null?m.replace:It(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===k.location.pathname+k.location.search,await Oe(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(J(h)){let e=Gt(l,g.route.id);return(m&&m.replace)!==!0&&(A=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function Ce(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||un(n,i,l,p),x=p||m||ln(b),S=!ae&&!g;if(d){if(S){let e=U(v);V({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await rt(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Kt(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Gt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=qe(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=lt(t,u,a,o,e.history,k,i,x,n,g?[]:r,g===!0,oe,se,R,fe,de,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(le=++ce,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=new Map(k.fetchers),t=Ve(e);return ye(n,{matches:i,loaderData:{},errors:v&&J(v[1])?{[v[0]]:v[1].error}:null,...Wt(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=U(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=we(T)),V(e,{flushSync:_})}T.forEach(e=>{ze(e.key),e.controller&&I.set(e.key,e.controller)});let E=()=>T.forEach(e=>ze(e.key));M&&M.signal.addEventListener(`abort`,E);let{loaderResults:D,fetcherResults:ee}=await je(w,T,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener(`abort`,E),T.forEach(e=>I.delete(e.key));let O=qt(D);if(O)return await Oe(t,O.result,!0,{replace:h}),{shortCircuited:!0};if(O=qt(ee),O)return de.add(O.key),await Oe(t,O.result,!0,{replace:h}),{shortCircuited:!0};let A=new Map(k.fetchers),{loaderData:j,errors:te}=Ht(k,i,D,v,T,ee,A);g&&k.errors&&(te={...k.errors,...te});let ne=Ve(A),N=He(le,A),P=ne||N||T.length>0;return{matches:i,loaderData:j,errors:te,...P?{workingFetchers:A}:{}}}function U(e){if(e&&!J(e[1]))return{[e[0]]:e[1].data};if(k.actionData)return Object.keys(k.actionData).length===0?null:k.actionData}function we(e){let t=new Map(k.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=fn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Te(t,n,r,i){ze(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=st(k.location,k.matches,c,r,n,i?.relative),u=P(o,l,c,!1,s.branches),d=K(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){G(t,n,q(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=ct(!0,l,i);if(m){G(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new ee,g=(i&&i.preventScrollReset)===!0;if(p&&Y(p.formMethod)){await Ee(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}fe.set(t,{routeId:n,path:f}),await De(t,n,f,u,h,d.active,a,g,p)}async function Ee(t,n,i,l,u,d,f,p,m,h){Me(),fe.delete(t),W(t,pn(m,k.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=Lt(e.history,i,g.signal,m);if(d){let e=await rt(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){G(t,n,e.error,{flushSync:f});return}else if(e.matches)l=e.matches;else{G(t,n,q(404,{pathname:i}),{flushSync:f});return}}let y=cn(l,i);if(!y.route.action&&!y.route.lazy){G(t,n,q(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}I.set(t,g);let b=ce,x=Ot(a,o,_,i,l,y,r,u),S=await ke(_,i,x,u,t),C=S[y.route.id];if(!C){for(let e of x)if(S[e.route.id]){C=S[e.route.id];break}}if(_.signal.aborted){I.get(t)===g&&I.delete(t);return}if(R.has(t)){if(en(C)||J(C)){W(t,X(void 0));return}}else{if(en(C))if(I.delete(t),le>b){W(t,X(void 0));return}else return de.add(t),W(t,fn(m)),Oe(_,C,!1,{fetcherSubmission:m,preventScrollReset:p});if(J(C)){G(t,n,C.error);return}}let w=k.navigation.location||k.location,T=Lt(e.history,w,g.signal),E=s.activeRoutes,D=k.navigation.state===`idle`?k.matches:P(E,k.navigation.location,c,!1,s.branches);v(D,`Didn't find any matches after fetcher action`);let ee=++ce;ue.set(t,ee);let{dsMatches:O,revalidatingFetchers:j}=lt(T,u,a,o,e.history,k,D,m,w,r,!1,oe,se,R,fe,de,E,c,e.patchRoutesOnNavigation!=null,s.branches,[y.route.id,C],h),te=fn(m,C.data),ne=new Map(k.fetchers);ne.set(t,te),j.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=ne.get(t),r=fn(void 0,n?n.data:void 0);ne.set(t,r),ze(t),e.controller&&I.set(t,e.controller)}),V({fetchers:ne});let N=()=>j.forEach(e=>ze(e.key));g.signal.addEventListener(`abort`,N);let{loaderResults:re,fetcherResults:F}=await je(O,j,T,w,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,N),ue.delete(t),I.delete(t),j.forEach(e=>I.delete(e.key));let ie=k.fetchers.has(t),ae=e=>{if(!ie)return e;let n=new Map(e.fetchers);return n.set(t,X(C.data)),{...e,fetchers:n}},L=qt(re);if(L)return k=ae(k),Oe(T,L.result,!1,{preventScrollReset:p});if(L=qt(F),L)return de.add(L.key),k=ae(k),Oe(T,L.result,!1,{preventScrollReset:p});let z=new Map(k.fetchers);ie&&z.set(t,X(C.data));let{loaderData:pe,errors:me}=Ht(k,D,re,void 0,j,F,z);He(ee,z),k.navigation.state===`loading`&&ee>le?(v(A,`Expected pending action`),M&&M.abort(),ye(k.navigation.location,{matches:D,loaderData:pe,errors:me,fetchers:z})):(V({errors:me,loaderData:Ut(k.loaderData,pe,D,me),fetchers:z}),oe=!1)}async function De(t,n,i,s,c,l,u,d,f){let p=k.fetchers.get(t);W(t,fn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Lt(e.history,i,m.signal);if(l){let e=await rt(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){G(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{G(t,n,q(404,{pathname:i}),{flushSync:u});return}}let g=cn(s,i);I.set(t,m);let _=ce,v=await ke(h,i,Ot(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(I.get(t)===m&&I.delete(t),!h.signal.aborted){if(R.has(t)){W(t,X(void 0));return}if(en(y))if(le>_){W(t,X(void 0));return}else{de.add(t),await Oe(h,y,!1,{preventScrollReset:d});return}if(J(y)){G(t,n,y.error);return}W(t,X(y.data))}}async function Oe(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(j?.resolve(),j=null),i.response.headers.has(`X-Remix-Revalidate`)&&(oe=!0);let d=i.response.headers.get(`Location`);v(d,`Expected a Location header on the redirect Response`),d=It(d,new URL(r.url),c,e.history);let f=S(k.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(ve(d)){let n=E(t,d,!0);e=n.origin!==t.location.origin||B(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}M=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=k.navigation;!o&&!s&&m&&h&&g&&(o=ln(k.navigation));let _=o||s;Je.has(i.response.status)&&_&&Y(_.formMethod)?await H(p,f,{submission:{..._,formAction:d},preventScrollReset:l||te,enableViewTransition:a?N:void 0}):await H(p,f,{overrideNavigation:un(f,[],p,o),fetcherSubmission:s,preventScrollReset:l||te,enableViewTransition:a?N:void 0})}async function ke(e,t,n,r,i){let a,o={};try{a=await kt(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!Y(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!k.loaderData.hasOwnProperty(e.route.id)&&(!k.errors||!k.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if($t(r)){let i=r.result;o[t]={type:`redirect`,response:Nt(i,e,t,n,c)}}else o[t]=await Mt(r);return o}async function je(e,t,n,r,i){let a=ke(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await ke(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}else return Promise.resolve({[e.key]:{type:`error`,error:q(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Me(){oe=!0,fe.forEach((e,t)=>{I.has(t)&&se.add(t),ze(t)})}function W(e,t,n={}){let r=new Map(k.fetchers);r.set(e,t),V({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function G(e,t,n,r={}){let i=Gt(k.matches,t),a=new Map(k.fetchers);Le(a,e),V({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Fe(e){return L.set(e,(L.get(e)||0)+1),R.has(e)&&R.delete(e),k.fetchers.get(e)||Xe}function Ie(e,t){ze(e,t?.reason),W(e,X(null))}function Le(e,t){let n=k.fetchers.get(t);I.has(t)&&!(n&&n.state===`loading`&&ue.has(t))&&ze(t),fe.delete(t),ue.delete(t),de.delete(t),R.delete(t),se.delete(t),e.delete(t)}function Re(e){let t=(L.get(e)||0)-1;t<=0?(L.delete(e),R.add(e)):L.set(e,t),V({fetchers:new Map(k.fetchers)})}function ze(e,t){let n=I.get(e);n&&(n.abort(t),I.delete(e))}function Be(e,t){for(let n of e){let e=t.get(n);v(e,`Expected fetcher: ${n}`);let r=X(e.data);t.set(n,r)}}function Ve(e){let t=[],n=!1;for(let r of de){let i=e.get(r);v(i,`Expected fetcher: ${r}`),i.state===`loading`&&(de.delete(r),t.push(r),n=!0)}return Be(t,e),n}function He(e,t){let n=[];for(let[r,i]of ue)if(i0}function Ue(e,t){let n=k.blockers.get(e)||Ze;return z.get(e)!==t&&z.set(e,t),n}function We(e){k.blockers.delete(e),z.delete(e)}function Ge(e,t){let n=k.blockers.get(e)||Ze;v(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(k.blockers);r.set(e,t),V({blockers:r})}function Ke({currentLocation:e,nextLocation:t,historyAction:n}){if(z.size===0)return;z.size>1&&y(!1,`A router only supports one blocker at a time`);let r=Array.from(z.entries()),[i,a]=r[r.length-1],o=k.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function qe(e){let t=q(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=Kt(n);return{notFoundMatches:r,route:i,error:t}}function $e(e,t,n){if(m=e,g=t,h=n||null,!_&&k.navigation===Ye){_=!0;let e=nt(k.location,k.matches);e!=null&&V({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function et(e,t){return h&&h(e,t.map(e=>re(e,k.loaderData)))||e.key}function tt(e,t){if(m&&g){let n=et(e,t);m[n]=g()}}function nt(e,t){if(m){let n=et(e,t),r=m[n];if(typeof r==`number`)return r}return null}function K(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:P(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:P(n,r,c,!0,e)}}return{active:!1,matches:null}}async function rt(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||ht(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=P(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=P(s.activeRoutes,n,c,!0,u),!(f&&l.lengthe.route.id===t[n].route.id)}function ot(e){o={},s.setHmrRoutes(ne(e,a,void 0,o))}function ft(e,t,n=!1){ht(e,t,s,o,a,n),s.hasHMRRoutes||V({})}return O={get basename(){return c},get future(){return u},get state(){return k},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:he,subscribe:_e,enableScrollRestoration:$e,navigate:be,fetch:Te,revalidate:xe,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Fe,resetFetcher:Ie,deleteFetcher:Re,dispose:ge,getBlocker:Ue,deleteBlocker:We,patchRoutes:ft,_internalFetchControllers:I,_internalSetRoutes:ot,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){V(e)}},e.instrumentations&&(O=Pe(O,e.instrumentations.map(e=>e.router).filter(Boolean))),O}function ot(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function st(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Se(r||`.`,H(o),B(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=sn(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=_e({basename:n,pathname:c.pathname})),C(c)}function ct(e,t,n){if(!n||!ot(n))return{path:t};if(n.formMethod&&!on(n.formMethod))return{path:t,error:q(405,{method:n.formMethod})};let r=()=>({path:t,error:q(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Jt(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Y(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n} +`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!Y(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}v(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=zt(n.formData),s=n.formData;else if(n.body instanceof FormData)o=zt(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Bt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Bt(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Y(c.formMethod))return{path:t,submission:c};let l=w(t);return e&&l.search&&sn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:C(l),submission:c}}function lt(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?J(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&J(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,ee={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},O=je(o),k=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!ut(s))f=!1;else if(u){let{shouldLoad:e}=dt(s,a.loaderData,a.errors);f=e}else ft(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Dt(n,r,e,c,O,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?pt(a.matches[o],i)&&(p=!0):p=!0;let m={...ee,defaultShouldRevalidate:p},h=mt(i,m);return Dt(n,r,e,c,O,i,l,t,h,m,x)}),A=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=P(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;A.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=cn(b,e.path),C=new AbortController,w=Lt(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=Ot(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=Ot(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...ee,defaultShouldRevalidate:i};mt(S,a)&&(T=Ot(n,r,w,e.path,b,S,l,t,a))}T&&A.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:k,revalidatingFetchers:A}}function ut(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function dt(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!ut(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function ft(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function pt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function mt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function ht(e,t,n,r,i,a){let o;if(e){let t=r[e];v(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>gt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=ne(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;et.children?.some(t=>gt(e,t)))??!1:!1}var _t=new WeakMap,vt=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(v(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=_t.get(i);o||(o={},_t.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=k(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)y(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)y(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},yt=new WeakMap;function bt(e,t,n,r,i){let a=n[e.id];if(v(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=yt.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{v(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=j(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?y(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?y(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return yt.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=vt({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function xt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function St(e){return e.matches.some(e=>e.route.middleware)?Ct(e,()=>xt(e)):xt(e)}function Ct(e,t){return wt(e,t,e=>{if(an(e))throw e;return e},Zt,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=Gt(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function wt(e,t,n,r,i){let{matches:a,...o}=e;return await Tt(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Tt(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await Tt(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function Et(e,t,n,r,i){let a=vt({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=bt(r.route,Y(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Dt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Et(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?mt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?mt(a,{...l,defaultShouldRevalidate:e}):mt(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Y(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Y(n.method)||!p)?At({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function Ot(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Dt(e,t,n,r,je(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Et(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function kt(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:Rt(t,n),pattern:je(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return Ct(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function At({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Y(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:Rt(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a)if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw q(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}else if(t)c=await f(t);else{let t=new URL(e.url);throw q(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function jt(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Mt(e){let{result:t,type:n}=e;if(nn(t)){let e;try{e=await jt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new ke(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?tn(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:Xt(t),statusCode:Ae(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Ae(t)?t.status:void 0}:tn(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function Nt(e,t,n,r,i){let a=e.headers.get(`Location`);if(v(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!ve(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=st(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Pt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Ft(e){try{return Pt.includes(new URL(e).protocol)}catch{return!1}}function It(e,t,n,r){if(ve(e)){let r=e,i=p.test(r)?new URL(m(r,t.protocol)):new URL(r);if(Ft(i.toString()))throw Error(`Invalid redirect location`);let a=B(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Ce(i.pathname)+i.search+i.hash}try{if(Ft(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function Lt(e,t,n,r){let i=e.createURL(Jt(t)).toString(),a={signal:n};if(r&&Y(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=zt(r.formData):a.body=r.formData}return new Request(i,a)}function Rt(e,t){let n=new URL(e.url),r=typeof t==`string`?w(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);n.search=e.size?`?${e.toString()}`:``}else n.search=``;return n.hash=r.hash||``,n}function zt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Bt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Vt(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&J(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(v(!en(f),`Cannot handle redirect results in processLoaderData`),J(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=Gt(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=et),c||(c=!0,s=Ae(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Ht(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Vt(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(v(s,`Did not find corresponding fetcher result`),J(s)){let t=Gt(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(en(s))v(!1,`Unhandled fetcher revalidation redirect`);else{let e=X(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function Ut(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==et).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function Wt(e){return e?J(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Gt(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function Kt(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function q(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new ke(e||500,o,Error(s),!0)}function qt(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(en(r))return{key:n,result:r}}}function Jt(e){return C({...typeof e==`string`?w(e):e,hash:``})}function Yt(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function Xt(e){return new ke(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Zt(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Qt(t))}function Qt(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function $t(e){return nn(e.result)&&qe.has(e.result.status)}function J(e){return e.type===`error`}function en(e){return(e&&e.type)===`redirect`}function tn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function nn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function rn(e){return qe.has(e)}function an(e){return nn(e)&&rn(e.status)&&e.headers.has(`Location`)}function on(e){return Ke.has(e.toUpperCase())}function Y(e){return We.has(e.toUpperCase())}function sn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function cn(e,t){let n=typeof t==`string`?w(t).search:t.search;if(e[e.length-1].route.index&&sn(n||``))return e[e.length-1];let r=xe(e);return r[r.length-1]}function ln(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function un(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function dn(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function fn(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function pn(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function X(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function mn(e,t){try{let n=e.sessionStorage.getItem($e);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function hn(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem($e,JSON.stringify(n))}catch(e){y(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function gn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var _n=n.createContext(null);_n.displayName=`DataRouter`;var vn=n.createContext(null);vn.displayName=`DataRouterState`;var yn=n.createContext(!1);function bn(){return n.useContext(yn)}var xn=n.createContext({isTransitioning:!1});xn.displayName=`ViewTransition`;var Sn=n.createContext(new Map);Sn.displayName=`Fetchers`;var Cn=n.createContext(null);Cn.displayName=`Await`;var Z=n.createContext(null);Z.displayName=`Navigation`;var wn=n.createContext(null);wn.displayName=`Location`;var Q=n.createContext({outlet:null,matches:[],isDataRoute:!1});Q.displayName=`Route`;var Tn=n.createContext(null);Tn.displayName=`RouteError`;var En=`REACT_ROUTER_ERROR`,Dn=`REDIRECT`,On=`ROUTE_ERROR_RESPONSE`;function kn(e){if(e.startsWith(`${En}:${Dn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function An(e){if(e.startsWith(`${En}:${On}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new ke(t.status,t.statusText,t.data)}catch{}}function jn(e,{relative:t}={}){v(Mn(),`useHref() may be used only in the context of a component.`);let{basename:r,navigator:i}=n.useContext(Z),{hash:a,pathname:o,search:s}=zn(e,{relative:t}),c=o;return r!==`/`&&(c=o===`/`?r:U([r,o])),i.createHref({pathname:c,search:s,hash:a})}function Mn(){return n.useContext(wn)!=null}function $(){return v(Mn(),`useLocation() may be used only in the context of a component.`),n.useContext(wn).location}var Nn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Pn(e){n.useContext(Z).static||n.useLayoutEffect(e)}function Fn(){let{isDataRoute:e}=n.useContext(Q);return e?rr():In()}function In(){v(Mn(),`useNavigate() may be used only in the context of a component.`);let e=n.useContext(_n),{basename:t,navigator:r}=n.useContext(Z),{matches:i}=n.useContext(Q),{pathname:a}=$(),o=JSON.stringify(H(i)),s=n.useRef(!1);return Pn(()=>{s.current=!0}),n.useCallback((n,i={})=>{if(y(s.current,Nn),!s.current)return;if(typeof n==`number`){r.go(n);return}let c=Se(n,JSON.parse(o),a,i.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:U([t,c.pathname])),(i.replace?r.replace:r.push)(c,i.state,i)},[t,r,o,a,e])}var Ln=n.createContext(null);function Rn(e){let t=n.useContext(Q).outlet;return n.useMemo(()=>t&&n.createElement(Ln.Provider,{value:e},t),[t,e])}function zn(e,{relative:t}={}){let{matches:r}=n.useContext(Q),{pathname:i}=$(),a=JSON.stringify(H(r));return n.useMemo(()=>Se(e,JSON.parse(a),i,t===`path`),[e,a,i,t])}function Bn(e,t,r){v(Mn(),`useRoutes() may be used only in the context of a component.`);let{navigator:i}=n.useContext(Z),{matches:a}=n.useContext(Q),o=a[a.length-1],s=o?o.params:{},c=o?o.pathname:`/`,l=o?o.pathnameBase:`/`,u=o&&o.route;{let e=u&&u.path||``;ar(c,!u||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant (or called \`useRoutes()\`) at "${c}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let d=$(),f;if(t){let e=typeof t==`string`?w(t):t;v(l===`/`||e.pathname?.startsWith(l),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=r&&r.state.matches.length?r.state.matches.map(e=>Object.assign(e,{route:r.manifest[e.route.id]||e.route})):N(e,{pathname:m});y(u||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),y(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let g=qn(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:U([l,i.encodeLocation?i.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:U([l,i.encodeLocation?i.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),a,r);return t&&g?n.createElement(wn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function Vn(){let e=nr(),t=Ae(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i=`rgba(200,200,200, 0.5)`,a={padding:`0.5rem`,backgroundColor:i},o={padding:`2px 4px`,backgroundColor:i},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=n.createElement(n.Fragment,null,n.createElement(`p`,null,`💿 Hey developer 👋`),n.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,n.createElement(`code`,{style:o},`ErrorBoundary`),` or`,` `,n.createElement(`code`,{style:o},`errorElement`),` prop on your route.`)),n.createElement(n.Fragment,null,n.createElement(`h2`,null,`Unexpected Application Error!`),n.createElement(`h3`,{style:{fontStyle:`italic`}},t),r?n.createElement(`pre`,{style:a},r):null,s)}var Hn=n.createElement(Vn,null),Un=class extends n.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=An(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:n.createElement(Q.Provider,{value:this.props.routeContext},n.createElement(Tn.Provider,{value:e,children:this.props.component}));return this.context?n.createElement(Gn,{error:e},t):t}};Un.contextType=yn;var Wn=new WeakMap;function Gn({children:e,error:t}){let{basename:r}=n.useContext(Z);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=kn(t.digest);if(e){let i=Wn.get(t);if(i)throw i;let a=W(e.location,r),o=a.absoluteURL||a.to;if(Ft(o))throw Error(`Invalid redirect location`);if(Me&&!Wn.get(t))if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Wn.set(t,n),n}return n.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Kn({routeContext:e,match:t,children:r}){let i=n.useContext(_n);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),n.createElement(Q.Provider,{value:e},r)}function qn(e,t=[],r){let i=r?.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let a=e,o=i?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);v(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(`,`)}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(r&&i){s=i.renderFallback;for(let e=0;e=0?a.slice(0,c+1):[a[0]];break}}}}let l=r?.onError,u=i&&l?(e,t)=>{l(e,{location:i.location,params:i.matches?.[0]?.params??{},pattern:je(i.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,l)=>{let d,f=!1,p=null,m=null;i&&(d=o&&r.route.id?o[r.route.id]:void 0,p=r.route.errorElement||Hn,s&&(c<0&&l===0?(ar(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):c===l&&(f=!0,m=r.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,l+1)),g=()=>{let t;return t=d?p:f?m:r.route.Component?n.createElement(r.route.Component,null):r.route.element?r.route.element:e,n.createElement(Kn,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:i!=null},children:t})};return i&&(r.route.ErrorBoundary||r.route.errorElement||l===0)?n.createElement(Un,{location:i.location,revalidation:i.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function Jn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Yn(e){let t=n.useContext(_n);return v(t,Jn(e)),t}function Xn(e){let t=n.useContext(vn);return v(t,Jn(e)),t}function Zn(e){let t=n.useContext(Q);return v(t,Jn(e)),t}function Qn(e){let t=Zn(e),n=t.matches[t.matches.length-1];return v(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function $n(){return Qn(`useRouteId`)}function er(){let e=Xn(`useNavigation`);return n.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function tr(){let{matches:e,loaderData:t}=Xn(`useMatches`);return n.useMemo(()=>e.map(e=>re(e,t)),[e,t])}function nr(){let e=n.useContext(Tn),t=Xn(`useRouteError`),r=Qn(`useRouteError`);return e===void 0?t.errors?.[r]:e}function rr(){let{router:e}=Yn(`useNavigate`),t=Qn(`useNavigate`),r=n.useRef(!1);return Pn(()=>{r.current=!0}),n.useCallback(async(n,i={})=>{y(r.current,Nn),r.current&&(typeof n==`number`?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...i}))},[e,t])}var ir={};function ar(e,t,n){!t&&!ir[e]&&(ir[e]=!0,y(!1,n))}var or={};function sr(e,t){!e&&!or[t]&&(or[t]=!0,console.warn(t))}var cr=n.useOptimistic,lr=()=>void 0;function ur(e){return cr?cr(e):[e,lr]}function dr(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&y(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:n.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&y(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:n.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&y(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:n.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var fr=[`HydrateFallback`,`hydrateFallbackElement`],pr=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function mr({router:e,flushSync:t,onError:r,useTransitions:i}){i=bn()||i;let[a,o]=n.useState(e.state),[s,c]=ur(a),[l,u]=n.useState(),[d,f]=n.useState({isTransitioning:!1}),[p,m]=n.useState(),[h,g]=n.useState(),[_,v]=n.useState(),y=n.useRef(new Map),b=n.useCallback((a,{deletedFetchers:s,newErrors:l,flushSync:d,viewTransitionOpts:_})=>{l&&r&&Object.values(l).forEach(e=>r(e,{location:a.location,params:a.matches[0]?.params??{},pattern:je(a.matches)})),a.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),s.forEach(e=>y.current.delete(e)),sr(d===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(sr(_==null||b,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!_||!b){t&&d?t(()=>o(a)):i===!1?o(a):n.startTransition(()=>{i===!0&&c(e=>hr(e,a)),o(a)});return}if(t&&d){t(()=>{h&&(p?.resolve(),h.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>o(a))});n.finished.finally(()=>{t(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})})}),t(()=>g(n));return}h?(p?.resolve(),h.skipTransition(),v({state:a,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(u(a),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,p,i,c,r]);n.useLayoutEffect(()=>e.subscribe(b),[e,b]),n.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new pr)},[d]),n.useEffect(()=>{if(p&&l&&e.window){let t=l,r=p.promise,a=e.window.document.startViewTransition(async()=>{i===!1?o(t):n.startTransition(()=>{i===!0&&c(e=>hr(e,t)),o(t)}),await r});a.finished.finally(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})}),g(a)}},[l,p,e.window,i,c]),n.useEffect(()=>{p&&l&&s.location.key===l.location.key&&p.resolve()},[p,h,s.location,l]),n.useEffect(()=>{!d.isTransitioning&&_&&(u(_.state),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[d.isTransitioning,_]);let x=n.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=n.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:r}),[e,x,S,r]);return n.createElement(n.Fragment,null,n.createElement(_n.Provider,{value:C},n.createElement(vn.Provider,{value:s},n.createElement(Sn.Provider,{value:y.current},n.createElement(xn.Provider,{value:d},n.createElement(br,{basename:S,location:s.location,navigationType:s.historyAction,navigator:x,useTransitions:i},n.createElement(gr,{routes:e.routes,manifest:e.manifest,future:e.future,state:s,isStatic:!1,onError:r})))))),null)}function hr(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var gr=n.memo(_r);function _r({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Bn(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function vr({to:e,replace:t,state:r,relative:i}){v(Mn(),` may be used only in the context of a component.`);let{static:a}=n.useContext(Z);y(!a,` must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.`);let{matches:o}=n.useContext(Q),{pathname:s}=$(),c=Fn(),l=Se(e,H(o),s,i===`path`),u=JSON.stringify(l);return n.useEffect(()=>{c(JSON.parse(u),{replace:t,state:r,relative:i})},[c,u,i,t,r]),null}function yr(e){return Rn(e.context)}function br({basename:e=`/`,children:t=null,location:r,navigationType:i=`POP`,navigator:a,static:o=!1,useTransitions:s}){v(!Mn(),`You cannot render a inside another . You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=n.useMemo(()=>({basename:c,navigator:a,static:o,useTransitions:s,future:{}}),[c,a,o,s]);typeof r==`string`&&(r=w(r));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=r,g=n.useMemo(()=>{let e=B(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,mask:h},navigationType:i}},[c,u,d,f,p,m,i,h]);return y(g!=null,` is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the won't render anything.`),g==null?null:n.createElement(Z.Provider,{value:l},n.createElement(wn.Provider,{children:t,value:g}))}n.Component;var xr=`get`,Sr=`application/x-www-form-urlencoded`;function Cr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function wr(e){return Cr(e)&&e.tagName.toLowerCase()===`button`}function Tr(e){return Cr(e)&&e.tagName.toLowerCase()===`form`}function Er(e){return Cr(e)&&e.tagName.toLowerCase()===`input`}function Dr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Or(e,t){return e.button===0&&(!t||t===`_self`)&&!Dr(e)}function kr(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Ar(e,t){let n=kr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var jr=null;function Mr(){if(jr===null)try{new FormData(document.createElement(`form`),0),jr=!1}catch{jr=!0}return jr}var Nr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Pr(e){return e!=null&&!Nr.has(e)?(y(!1,`"${e}" is not a valid \`encType\` for \`
    \`/\`\` and will default to "${Sr}"`),null):e}function Fr(e,t){let n,r,i,a,o;if(Tr(e)){let o=e.getAttribute(`action`);r=o?B(o,t):null,n=e.getAttribute(`method`)||xr,i=Pr(e.getAttribute(`enctype`))||Sr,a=new FormData(e)}else if(wr(e)||Er(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a