1import{a as E,u as he,j as d,F as we,b as je,c as Yr,d as ss}from"./client-B5-L9cg1.js";import"./honox-island-BGA-i26_.js";const Uh="admin_key";function Yh(){return localStorage.getItem(Uh)||""}function Cb(r){localStorage.setItem(Uh,r)}function Mb(){localStorage.removeItem(Uh)}function Db(){return window.__ADMIN_API_BASE__||"/admin/api"}function Pa(r){return`${Db()}${r}`}class En extends Error{constructor(e,t){super(e),this.response=t,this.name="ApiError",t&&(this.code=t.code,this.conflictTable=t.conflictTable)}code;conflictTable}function m0(r,e){const t=Yh();return fetch(r,{...e,headers:{...e?.headers,"X-Admin-Key":t}})}async function le(r,e){const t=Pa(r),n=Yh();let i;try{i=await fetch(t,{...e,headers:{...e?.headers,"X-Admin-Key":n}})}catch(o){throw new En(o.message||"ç½ç»è¯·æ±å¤±è´¥")}let a;try{a=await i.json()}catch{throw new En("ååºè§£æå¤±è´¥")}if(!a.ok)throw new En(a.message||"请æ±å¤±è´¥",a);return a}function De(r,e){return le(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function Ts(r,e){return le(r,{method:"DELETE",headers:e?{"Content-Type":"application/json"}:void 0,body:e?JSON.stringify(e):void 0})}async function y0(r){const e=Pa("/login");let t;try{t=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:r})})}catch(i){throw new En(i.message||"ç½ç»è¯·æ±å¤±è´¥")}let n;try{n=await t.json()}catch{throw new En("ååºè§£æå¤±è´¥")}if(!n.ok)throw new En(n.message||"å¯é¥é误");Cb(r)}const Ab=({children:r,fallback:e})=>{const[t,n]=E(!1);return he(()=>{n(!0)},[]),t?d(we,{children:r}):e??null},x0=[{key:"googlebot",name:"è°·æ",pattern:/googlebot|google-inspectiontool|googleother/i},{key:"bingbot",name:"å¿
åº",pattern:/bingbot|adidxbot|msnbot/i},{key:"yandex",name:"Yandex",pattern:/yandex/i},{key:"duckduckgo",name:"DuckDuckGo",pattern:/duckduckbot/i},{key:"apple",name:"Apple",pattern:/applebot/i},{key:"amazon",name:"Amazon",pattern:/amazonbot/i},{key:"baiduspider",name:"ç¾åº¦",pattern:/baiduspider/i},{key:"sogou",name:"æç",pattern:/sogou/i},{key:"so360",name:"360æç´¢",pattern:/360spider|haosouspider/i},{key:"shenma",name:"ç¥é©¬",pattern:/yisouspider/i},{key:"huawei",name:"å为",pattern:/petalbot/i},{key:"youdao",name:"æé",pattern:/youdaobot/i},{key:"jike",name:"å³å»",pattern:/jikespider/i},{key:"easou",name:"宿",pattern:/easouspider/i},{key:"chinaso",name:"ä¸å½æç´¢",pattern:/chinasoSpider/i},{key:"panguso",name:"çå¤æç´¢",pattern:/pangusospider/i},{key:"soso",name:"ææ",pattern:/sosospider/i},{key:"iask",name:"ç±é®",pattern:/iaskspider/i},{key:"bytespider",name:"åè",pattern:/bytespider|bytedance/i},{key:"toutiao",name:"头æ¡",pattern:/toutiaospider/i},{key:"baidu-ai",name:"ç¾åº¦AI",pattern:/baidu-ai|baidu-llm/i},{key:"alibot",name:"é¿éAI",pattern:/alispider|alibaba-security|qwen-bot|alibaba-llm/i},{key:"tencentbot",name:"è
¾è®¯AI",pattern:/tencentbot|qqbot|hunyuan-ai|wechat-llm/i},{key:"kimi",name:"Kimi",pattern:/moonshot-ai|kimi-bot/i},{key:"iflytek",name:"讯é£",pattern:/iflytekspider|spark-bot/i},{key:"sensetime",name:"åæ±¤",pattern:/sensebot/i},{key:"minimax",name:"MiniMax",pattern:/minimax-bot/i},{key:"gptbot",name:"GPTBot",pattern:/gptbot/i},{key:"claudebot",name:"Claude",pattern:/claude-web|claudebot/i},{key:"ccbot",name:"CCBot",pattern:/ccbot/i},{key:"facebook",name:"Facebook",pattern:/facebookexternalhit|facebookcatalog|meta-externalagent/i},{key:"twitter",name:"Twitter",pattern:/twitterbot/i},{key:"telegram",name:"Telegram",pattern:/telegrambot/i},{key:"linkedin",name:"LinkedIn",pattern:/linkedinbot/i},{key:"pinterest",name:"Pinterest",pattern:/pinterestbot/i},{key:"slack",name:"Slack",pattern:/slackbot/i}
1,{key:"discord",name:"Discord",pattern:/discordbot/i},{key:"semrush",name:"Semrush(SEO)",pattern:/semrush/i},{key:"ahrefs",name:"Ahrefs(SEO)",pattern:/ahrefs/i},{key:"majestic",name:"Majestic(SEO)",pattern:/mj12bot/i},{key:"screamingfrog",name:"ScreamingFrog(SEO)",pattern:/screaming frog/i},{key:"seranking",name:"SEranking(SEO)",pattern:/serankingbot/i},{key:"dataforseo",name:"DataForSEO(SEO)",pattern:/dataforseobot/i},{key:"other",name:"å ¶ä»",pattern:/bot|spider|crawler|scraper|agent.*\+http/i}],Lb=Object.fromEntries(x0.map(r=>[r.key,r.name]));Object.fromEntries(x0.map(r=>[r.key,r.pattern]));const kb={home:"é¦é¡µ",detail:"详æ 页",play:"ææ¾é¡µ",category:"å类页",search:"æç´¢é¡µ",sitemap:"Sitemap",rss:"RSS订é ",feed:"Feed订é ",other:"å ¶ä»"},Hr=Lb,Ib={white:"text-slate-100",green:"text-green-400",yellow:"text-yellow-400",blue:"text-blue-400",red:"text-red-400",purple:"text-purple-400",cyan:"text-cyan-400"},hf=({title:r,value:e,icon:t,color:n="blue",onClick:i})=>d("div",{class:`bg-slate-800 rounded-xl border border-slate-700 p-3 sm:p-5 transition-colors ${i?"cursor-pointer hover:border-blue-500/50 hover:bg-slate-700/50":"hover:border-slate-600"}`,onClick:i,children:[d("div",{class:"flex items-center justify-between mb-1 sm:mb-3",children:[d("span",{class:"text-slate-400 text-xs sm:text-sm",children:r}),d("span",{class:`${t} w-4 h-4 sm:w-5 sm:h-5 text-slate-500`})]}),d("div",{class:`text-xl sm:text-3xl font-bold ${Ib[n]||"text-blue-400"}`,children:e.toLocaleString()}),i&&d("div",{class:"text-slate-500 text-xs mt-1",children:"ç¹å»æ¥ç详æ "})]}),Cs=({text:r}={})=>d("div",{class:"flex flex-col items-center justify-center py-20 gap-4",children:[d("div",{class:"relative",children:[d("div",{class:"w-12 h-12 border-3 border-blue-500/20 rounded-full"}),d("div",{class:"absolute inset-0 w-12 h-12 border-3 border-blue-500 border-t-transparent rounded-full animate-spin"})]}),r&&d("div",{class:"text-slate-400 text-sm animate-pulse",children:r})]}),Br=({label:r,desc:e,checked:t,onChange:n})=>d("label",{class:"flex items-center justify-between p-3 bg-slate-700/30 rounded-lg cursor-pointer",children:[d("div",{children:[d("div",{class:"text-slate-200 text-sm",children:r}),e&&d("div",{class:"text-slate-500 text-xs mt-0.5",children:e})]}),d("input",{type:"checkbox",checked:t,onChange:i=>n(i.target.checked),class:"w-4 h-4 rounded bg-slate-600 border-slate-500 text-blue-500 focus:ring-blue-500"})]}),Zt=({label:r,value:e,onChange:t,placeholder:n})=>d("div",{children:[d("label",{class:"text-slate-400 text-xs mb-1 block",children:r}),d("input",{type:"text",value:e,onInput:i=>t(i.target.value),placeholder:n,class:"w-full px-3 py-1.5 bg-slate-700 border border-slate-600 rounded-lg text-slate-200 text-sm placeholder-slate-500 focus:border-blue-500 focus:outline-none"})]}),Nr=({icon:r,iconBg:e,title:t,desc:n,children:i})=>d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 p-5",children:[d("div",{class:"flex items-center gap-3 mb-5",children:[d("div",{class:`w-10 h-10 ${e} rounded-lg flex items-center justify-center`,children:d("span",{class:`${r} w-5 h-5`})}),d("div",{children:[d("h2",{class:"text-lg font-bold text-white",children:t}),n&&d("p",{class:"text-slate-400 text-sm",children:n})]})]}),i]}),Zh=({page:r,totalPages:e,total:t,onPageChange:n})=>{const[i,a]=E(""),o=()=>{const s=parseInt(i);s>=1&&s<=e&&(n(s),a(""))};return e<=1?null:d("div",{class:"flex flex-col sm:flex-row items-center justify-between gap-3",children:[d("span",{class:"text-slate-500 text-sm",children:["å ± ",t," æ¡"]}),d("div",{class:"flex sm:hidden items-center gap-2",children:[d("button",{onClick:()=>n(Math.max(1,r-1)),disabled:r===1,class:"w-9 h-9 flex items-center justify-center bg-slate-700 hover:bg-slate-600 disabled:opacity-50 text-white rounded transition-colors",children:d("span",{class:"i-heroicons-chevron-left w-5 h-5"})}),d("span",{class:"px-3 py-1.5 text-slate-300 text-sm min-w-[80px] text-center",children:[r," / ",e]}),d("button",{onClick:()=>n(Math.min(e,r+1)),disabled:r===e,class:"w-9 h-9 flex items-center justify-center bg-slate-700 hover:bg-slate-600 disabled:opacity-50 text-white rounded transition-colors",children:d("span",{class:"i-heroicons-chevron-right w-5 h-5"})})]}),d("div",{class:"hidden sm:flex items-center gap-2",children:[d("button",{onClick:()=>n(1),disabled:r===1,class:"px-2 py-1.5 bg-slate-700 hover:bg-slate-600 disabled:opacity-50 disabled:cursor-not-allowed text-white rounded text-sm transition-colors",children:"é¦é¡µ"}),d("button",{onClick:()=>n(Math.max(1,r-1)),disabled:r===1,class:"px-3 py-1.5 bg-slate-700 hover:bg-slate-600 disabled:opacity-50 disabled:cursor-not-allowed text-white rounded text-sm transition-colors",children:"ä¸ä¸é¡µ"}),d("span",{class:"px-2 py-1.5 text-slate-400 text-sm",children:[r," / ",e]}),d("button",{onClick:()=>n(Math.min(e,r+1)),disabled:r===e,class:"px-3 py-1.5 bg-slate-700 hover:bg-slate-600 disabled:opacity-50 disabled:cursor-not-allowed text-white rounded text-sm transition-colors",children:"ä¸ä¸é¡µ"}),d("button",{onClick:()=>n(e),disabled:r===e,class:"px-2 py-1.5 bg-slate-700 hover:bg-slate-600 disabled:opacity-50 disabled:cursor-not-allowed text-white rounded text-sm transition-colors",children:"æ«é¡µ"}),d("div",{class:"flex items-center gap-1 ml-2",children:[d("input",{type:"text",value:i,onInput:s=>a(s.target.value.replace(/\D/g,"")),onKeyDown:s=>s.key==="Enter"&&o(),placeholder:"页ç ",class:"w-16 px-2 py-1.5 bg-slate-700 border border-slate-600 rounded text-white text-sm text-center focus:outline-none focus:border-blue-500"}),d("button",{onClick:o,class:"px-2 py-1.5 bg-slate-700 hover:bg-slate-600 text-white rounded text-sm transition-colors",children:"跳转"})]})]})]})},Mc=({open:r,title:e,onClose:t,widthClass:n="max-w-4xl",maxHeight:i="max-h-[78vh]",showCloseButton:a=!0,closeOnMaskClick:o=!0,children:s})=>r?d("div",{class:"fixed inset-0 z-[2200] flex items-center justify-center p-4",children:[d("div",{class:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>{o&&t()}}),d("div",{class:`relative w-full ${n} bg-slate-800 border border-slate-700 rounded-xl shadow-2xl overflow-hidden`,children:[d("div",{class:"px-4 py-3 border-b border-slate-700 flex items-center justify-between",children:[d("h3",{class:"text-slate-100 text-base font-semibold",children:e}),a&&d("button",{type:"button",onClick:t,class:"w-8 h-8 inline-flex items-center justify-center text-slate-400 hover:text-white hover:bg-slate-700 rounded-lg transition-colors","aria-label":"å ³é",children:d("span",{class:"i-heroicons-x-mark w-5 h-5"})})]}),d("div",{class:`p-4 ${i} overflow-y-auto`,children:s})]})]}):null;let pi=[],dr=[],Pb=0;function ft(r){const e=++Pb,t=r.type||"info",n=r.duration??(t==="error"?8e3:4e3),i={id:e,type:t,title:r.title,message:r.message};dr=[...dr,i],pi.forEach(a=>a(dr)),n>0&&setTimeout(()=>{dr=dr.filter(a=>a.id!==e),pi.forEach(a=>a(dr))},n)}function Z(r){ft(typeof r=="string"?{message:r,type:"info"}:r)}Z.success=(r,e)=>{ft(typeof r=="string"&&typeof e=="string"?{title:r,message:e,type:"success"}:typeof r=="string"?{message:r,type:"success"}:{...r,type:"success"})};Z.error=(r,e)=>{ft(typeof r=="string"&&typeof e=="string"?{title:r,message:e,type:"error"}:typeof r=="string"?{message:r,type:"error"}:{...r,type:"error"})};Z.warning=(r,e)=>{ft(typeof r=="string"&&typeof e=="string"?{title:r,message:e,type:"warning"}:typeof r=="string"?{message:r,type:"warning"}:{...r,type:"warning"})};Z.info=(r,e)=>{ft(typeof r=="string"&&typeof e=="string"?{title:r,message:e,type:"info"}:typeof r=="string"?{message:r,type:"info"}:{...r,type:"info"})};const Rb=async r=>{try{return await navigator.clipboard.writeText(r),!0}catch{return!1}},Eb=()=>{const[r,e]=E([]),[t,n]=E(null),[i,a]=E(null);he(()=>(pi.push(e),()=>{pi=pi.filter(c=>c!==e)}),[]);const o=async c=>{const h=c.title?`${c.title} 2${c.message}`:c.message;await Rb(h)&&(n(c.id),setTimeout(()=>n(null),1500))},s=c=>{dr=dr.filter(h=>h.id!==c),pi.forEach(h=>h(dr))};if(r.length===0)return null;const l={success:{bg:"bg-green-600",border:"border-green-500",icon:"i-heroicons-check-circle"},error:{bg:"bg-red-600",border:"border-red-500",icon:"i-heroicons-x-circle"},warning:{bg:"bg-yellow-600",border:"border-yellow-500",icon:"i-heroicons-exclamation-triangle"},info:{bg:"bg-blue-600",border:"border-blue-500",icon:"i-heroicons-information-circle"}},u={success:"æå",error:"é误",warning:"è¦å",info:"æç¤º"};return d("div",{class:"fixed top-18 right-4 z-2000 space-y-2 w-80 max-w-[calc(100vw-2rem)]",children:r.map(c=>{const h=l[c.type],f=c.message.length>100,v=i===c.id;return d("div",{class:`${h.bg} ${h.border} border rounded-xl shadow-lg animate-slide-in overflow-hidden`,children:[d("div",{class:"flex items-center gap-2 px-4 py-2.5 border-b border-white/10",children:[d("span",{class:`${h.icon} w-5 h-5 text-white/90 flex-shrink-0`}),d("span",{class:"flex-1 font-medium text-white text-sm truncate",children:c.title||u[c.type]}),d("button",{onClick:()=>s(c.id),class:"text-white/60 hover:text-white p-0.5",children:d("span",{class:"i-heroicons-x-mark w-4 h-4"})})]}),d("div",{class:"px-4 py-3",children:[d("div",{onClick:()=>o(c),class:`text-white/90 text-sm cursor-pointer hover:bg-white/10 rounded px-1 -mx-1 transition-colors ${f&&!v?"line-clamp-3":""}`,title:"ç¹å»å¤å¶",children:t===c.id?d("span",{class:"flex items-center gap-1 text-white/70",children:[d("span",{class:"i-heroicons-clipboard-document-check w-4 h-4"}),"å·²å¤å¶å°åªè´´æ¿"]}):d("span",{class:"whitespace-pre-wrap break-all",children:c.message})}),f&&t!==c.id&&d("button",{onClick:()=>a(v?null:c.id),class:"mt-2 text-xs text-white/60 hover:text-white flex items-center gap-1",children:[d("span",{class:`i-heroicons-chevron-down w-3 h-3 transition-transform ${v?"rotate-180":""}`}),v?"æ¶èµ·":"å±å¼å ¨é¨"]})]})]},c.id)})})};let Dc=null;function Dt(r){return new Promise(e=>{const t=typeof r=="string"?{message:r}:r,n={title:t.title,message:t.message,confirmText:t.confirmText||"ç¡®å®",cancelText:t.cancelText||"åæ¶",type:t.type||"default",resolve:e};Dc?.(n)})}const Ob=()=>{const[r,e]=E(null),[t,n]=E(!1);he(()=>(Dc=e,()=>{Dc=null}),[]);const i=s=>{n(!0),setTimeout(()=>{r?.resolve(s),e(null),n(!1)},150)};if(!r)return null;const o={default:{icon:"i-heroicons-question-mark-circle",iconBg:"bg-blue-600/20",
2iconColor:"text-blue-400",confirmBtn:"bg-blue-600 hover:bg-blue-500"},danger:{icon:"i-heroicons-exclamation-triangle",iconBg:"bg-red-600/20",iconColor:"text-red-400",confirmBtn:"bg-red-600 hover:bg-red-500"},warning:{icon:"i-heroicons-exclamation-circle",iconBg:"bg-yellow-600/20",iconColor:"text-yellow-400",confirmBtn:"bg-yellow-600 hover:bg-yellow-500"}}[r.type||"default"];return d("div",{class:`fixed inset-0 z-50 flex items-center justify-center p-4 transition-opacity duration-150 ${t?"opacity-0":"opacity-100"}`,onClick:()=>i(!1),children:[d("div",{class:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),d("div",{class:`relative w-full max-w-sm bg-slate-800 rounded-2xl border border-slate-700 shadow-2xl transform transition-all duration-150 ${t?"scale-95":"scale-100"}`,onClick:s=>s.stopPropagation(),children:d("div",{class:"p-5 sm:p-6",children:[d("div",{class:"flex items-start gap-4",children:[d("div",{class:`w-11 h-11 ${o.iconBg} rounded-xl flex items-center justify-center flex-shrink-0`,children:d("span",{class:`${o.icon} w-6 h-6 ${o.iconColor}`})}),d("div",{class:"flex-1 min-w-0",children:[r.title&&d("h3",{class:"text-lg font-semibold text-white mb-1",children:r.title}),d("p",{class:"text-slate-300 text-sm leading-relaxed whitespace-pre-line",children:r.message})]})]}),d("div",{class:"mt-6 flex gap-3",children:[d("button",{onClick:()=>i(!1),class:"flex-1 px-4 py-2.5 bg-slate-700 hover:bg-slate-600 text-slate-200 rounded-xl text-sm font-medium transition-colors",children:r.cancelText}),d("button",{onClick:()=>i(!0),class:`flex-1 px-4 py-2.5 ${o.confirmBtn} text-white rounded-xl text-sm font-medium transition-colors`,children:r.confirmText})]})]})})]})},Bb="æç¥éäº",Nb=5e3,zb=0;let Ra=null,Fb=0,Ms=null;function Ac(r){const e=typeof r=="string"?{message:r}:r,t=e.type||"info";Ra={id:++Fb,type:t,title:e.title,message:e.message,confirmText:e.confirmText||Bb,duration:e.duration??(t==="error"?zb:Nb)},Ms?.(Ra)}function ca(){Ra=null,Ms?.(null)}function lo(r){return(e,t)=>{Ac(typeof e=="string"?{...t?{title:e,message:t}:{message:e},type:r}:{...e,type:r})}}const Lt=Object.assign(Ac,{close:ca,success:lo("success"),error:lo("error"),warning:lo("warning"),info:lo("info")}),Vb={success:{headerBg:"bg-emerald-600",icon:"i-heroicons-check-circle",defaultTitle:"æä½æå"},error:{headerBg:"bg-red-600",icon:"i-heroicons-x-circle",defaultTitle:"æä½å¤±è´¥"},warning:{headerBg:"bg-amber-600",icon:"i-heroicons-exclamation-triangle",defaultTitle:"注æ"},info:{headerBg:"bg-sky-600",icon:"i-heroicons-information-circle",defaultTitle:"æç¤º"}},Hb=()=>{const[r,e]=E(Ra);if(he(()=>(Ms=e,()=>{Ms=null}),[]),he(()=>{if(!r||r.duration<=0)return;const n=setTimeout(()=>{Ra?.id===r.id&&ca()},r.duration);return()=>clearTimeout(n)},[r]),!r)return null;const t=Vb[r.type];return d("div",{class:"fixed inset-0 z-[3000] flex items-center justify-center p-4",children:[d("div",{class:"absolute inset-0 bg-black/55 backdrop-blur-sm",onClick:ca}),d("div",{class:"relative w-full max-w-xl rounded-2xl overflow-hidden border border-slate-600 shadow-2xl",children:[d("div",{class:`px-5 py-4 ${t.headerBg} text-white flex items-center gap-3`,children:[d("span",{class:`${t.icon} w-6 h-6 flex-shrink-0`}),d("span",{class:"text-xl font-semibold flex-1",children:r.title||t.defaultTitle}),d("button",{class:"p-1.5 text-white/80 hover:text-white transition-colors",onClick:ca,"aria-label":"å
³é",children:d("span",{class:"i-heroicons-x-mark w-5 h-5"})})]}),d("div",{class:"bg-slate-800 text-slate-100 px-5 py-5",children:[d("div",{class:"text-base leading-relaxed whitespace-pre-wrap break-words",children:r.message}),d("div",{class:"mt-5 flex justify-end",children:d("button",{class:"px-4 py-2 rounded-lg bg-slate-700 hover:bg-slate-600 text-slate-100 text-sm transition-colors",onClick:ca,children:r.confirmText})})]})]})]})},Ds=[{id:"stats",icon:"i-heroicons-chart-bar-solid",label:"ç»è®¡",full:"æµéç»è®¡",desc:"æ¥çç«ç¹è®¿é®æ°æ®"},{id:"system-info",icon:"i-heroicons-server-stack-solid",label:"ç³»ç»",full:"ç³»ç»ä¿¡æ¯",desc:"ç¯å¢ãæ°æ®åºä¸ URL è·¯ç±é
ç½®"},{id:"sys-config",icon:"i-heroicons-cog-8-tooth-solid",label:"é
ç½®",full:"ç³»ç»é
ç½®",desc:"广åä¸ç³»ç»åæ°ç®¡ç"},{id:"content",icon:"i-heroicons-film-solid",label:"å
容",full:"å
容管ç",desc:"管çå½±çä¸ä¸æ¶ä¸åå䏿¶è§å"},{id:"keywords",icon:"i-heroicons-key-solid",label:"å
³é®è¯",full:"å
³é®è¯ SEO 管ç",desc:"管çå
³é®è¯ä¸ SEO é
ç½®"},{id:"dev-settings",icon:"i-heroicons-wrench-screwdriver-solid",label:"å¼å",full:"å¼å设置",desc:"ç¼åä¸ Sitemap 管ç"},{id:"logs",icon:"i-heroicons-document-text-solid",label:"æ¥å¿",full:"è¿è¡æ¥å¿",desc:"æ¥çåä»»å¡è¿è¡æ¥å¿"}],$b=({tab:r,onTabChange:e,onLogout:t})=>{const[n,i]=E(!1),a=o=>{e(o),i(!1)};return d("header",{class:"bg-slate-800 border-b border-slate-700 sticky top-0 z-50",children:[d("div",{class:"max-w-7xl mx-auto px-3 sm:px-6",children:d("div",{class:"flex items-center justify-between h-12 sm:h-14",children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"w-7 h-7 sm:w-8 sm:h-8 bg-blue-600 rounded-lg flex items-center justify-center",children:d("span",{class:"i-heroicons-cog-6-tooth-solid w-4 h-4 text-white"})}),d("span",{class:"text-white font-bold hidden sm:block",children:"管çåå°"})]}),d("nav",{class:"hidden md:flex items-center gap-1",children:Ds.map(o=>d("button",{onClick:()=>a(o.id),class:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm transition-colors ${r===o.id?"bg-blue-600 text-white":"text-slate-400 hover:text-white hover:bg-slate-700"}`,children:[d("span",{class:`${o.icon} w-4 h-4`}),d("span",{children:o.full})]}))}),d("div",{class:"flex items-center gap-2",children:[d("button",{onClick:()=>i(!n),class:"md:hidden w-8 h-8 flex items-center justify-center rounded-lg text-slate-400 hover:bg-slate-700",children:d("span",{class:`${n?"i-heroicons-x-mark":"i-heroicons-bars-3"} w-5 h-5`})}),d("button",{onClick:t,class:"text-slate-400 hover:text-white text-xs sm:text-sm flex items-center gap-1",children:[d("span",{class:"i-heroicons-arrow-right-on-rectangle w-3.5 h-3.5"}),d("span",{class:"hidden sm:inline",children:"éåº"})]}),d("a",{href:"/",class:"text-slate-400 hover:text-white text-xs sm:text-sm flex items-center gap-1",children:[d("span",{class:"i-heroicons-arrow-left w-3.5 h-3.5"}),d("span",{class:"hidden sm:inline",children:"è¿å"})]})]})]})}),n&&d("div",{class:"md:hidden border-t border-slate-700 bg-slate-800",children:Ds.map(o=>d("button",{onClick:()=>a(o.id),class:`w-full flex items-center gap-3 px-4 py-3 text-sm transition-colors ${r===o.id?"bg-blue-600/20 text-blue-400":"text-slate-300 hover:bg-slate-700"}`,children:[d("span",{class:`${o.icon} w-5 h-5`}),d("div",{class:"text-left",children:[d("div",{class:"font-medium",children:o.full}),d("div",{class:"text-xs text-slate-500",children:o.desc})]})]}))})]})},Gb=({tab:r})=>{const e=Ds.find(t=>
2t.id===r)||Ds[0];return d("div",{class:"hidden sm:block bg-slate-800/50 border-b border-slate-700",children:d("div",{class:"max-w-7xl mx-auto px-6 py-4",children:d("div",{class:"flex items-center gap-3",children:[d("div",{class:"w-10 h-10 bg-slate-700 rounded-xl flex items-center justify-center",children:d("span",{class:`${e.icon} w-5 h-5 text-blue-400`})}),d("div",{children:[d("h1",{class:"text-lg font-bold text-white",children:e.full}),d("p",{class:"text-slate-400 text-sm",children:e.desc})]})]})})})},Wb=({onSuccess:r})=>{const[e,t]=E(""),[n,i]=E(""),[a,o]=E(!1);return d("div",{class:"min-h-screen bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 flex items-center justify-center p-4",children:d("div",{class:"bg-slate-800/50 backdrop-blur border border-slate-700 rounded-2xl p-8 w-full max-w-sm",children:[d("div",{class:"text-center mb-8",children:[d("div",{class:"w-16 h-16 bg-blue-600 rounded-2xl flex items-center justify-center mx-auto mb-4",children:d("span",{class:"i-heroicons-lock-closed-solid w-8 h-8 text-white"})}),d("h1",{class:"text-xl font-bold text-white",children:"管çåå°"}),d("p",{class:"text-slate-400 text-sm mt-2",children:"请è¾å
¥è®¿é®å¯é¥"})]}),d("form",{onSubmit:async l=>{l.preventDefault(),o(!0),i("");try{await y0(e),r()}catch(u){i(u instanceof En?u.message:"ç½ç»é误")}o(!1)},class:"space-y-4",children:[d("input",{type:"password",value:e,onInput:l=>t(l.target.value),placeholder:"访é®å¯é¥",required:!0,class:"w-full px-4 py-3 bg-slate-900/50 border border-slate-600 rounded-xl text-white placeholder-slate-500 focus:outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500 transition-all"}),n&&d("p",{class:"text-red-400 text-sm text-center",children:n}),d("button",{type:"submit",disabled:a,class:"w-full py-3 bg-blue-600 hover:bg-blue-500 disabled:bg-blue-600/50 rounded-xl text-white font-medium transition-colors",children:a?"éªè¯ä¸...":"è¿å
¥åå°"})]})]})})};var Lc=function(r,e){return Lc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Lc(r,e)};function $(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Lc(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Ub=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),Yb=(function(){function r(){this.browser=new Ub,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 r})(),ie=new Yb;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(ie.wxa=!0,ie.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?ie.worker=!0:!ie.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(ie.node=!0,ie.svgSupported=!0):Zb(navigator.userAgent,ie);function Zb(r,e){var t=e.browser,n=r.match(/Firefox\/([\d.]+)/),i=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(t.firefox=!0,t.version=n[1]),i&&(t.ie=!0,t.version=i[1]),a&&(t.edge=!0,t.version=a[1],t.newEdge=+a[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in l||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}}var Xh=12,Xb="sans-serif",Zr=Xh+"px "+Xb,jb=20,qb=100,Kb="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Qb(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t<r.length;t++){var n=String.fromCharCode(t+32),i=(r.charCodeAt(t)-jb)/qb;e[n]=i}return e}var Jb=Qb(Kb),yr={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var r,e;return function(t,n){if(!r){var i=yr.createCanvas();r=i&&i.getContext("2d")}if(r)return e!==n&&(e=r.font=n||Zr),r.measureText(t);t=t||"",n=n||Zr;
2var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||Xh,s=0;if(n.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=Jb[t[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(r,e,t){var n=new Image;return n.onload=e,n.onerror=t,n.src=r,n}},b0=Ei(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),_0=Ei(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),to=Object.prototype.toString,fl=Array.prototype,e_=fl.forEach,t_=fl.filter,jh=fl.slice,r_=fl.map,df=(function(){}).constructor,uo=df?df.prototype:null,qh="__proto__",n_=2311;function w0(){return n_++}function Kh(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console<"u"&&console.error.apply(console,r)}function ue(r){if(r==null||typeof r!="object")return r;var e=r,t=to.call(r);if(t==="[object Array]"){if(!xa(r)){e=[];for(var n=0,i=r.length;n<i;n++)e[n]=ue(r[n])}}else if(_0[t]){if(!xa(r)){var a=r.constructor;if(a.from)e=a.from(r);else{e=new a(r.length);for(var n=0,i=r.length;n<i;n++)e[n]=r[n]}}}else if(!b0[t]&&!xa(r)&&!Ea(r)){e={};for(var o in r)r.hasOwnProperty(o)&&o!==qh&&(e[o]=ue(r[o]))}return e}function fe(r,e,t){if(!Q(e)||!Q(r))return t?ue(e):r;for(var n in e)if(e.hasOwnProperty(n)&&n!==qh){var i=r[n],a=e[n];Q(a)&&Q(i)&&!X(a)&&!X(i)&&!Ea(a)&&!Ea(i)&&!ff(a)&&!ff(i)&&!xa(a)&&!xa(i)?fe(i,a,t):(t||!(n in r))&&(r[n]=ue(e[n]))}return r}function H(r,e){if(Object.assign)Object.assign(r,e);else for(var t in e)e.hasOwnProperty(t)&&t!==qh&&(r[t]=e[t]);return r}function me(r,e,t){for(var n=Ae(e),i=0,a=n.length;i<a;i++){var o=n[i];r[o]==null&&(r[o]=e[o])}return r}function de(r,e){if(r){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t}return-1}function i_(r,e){var t=r.prototype;function n(){}n.prototype=e.prototype,r.prototype=new n;for(var i in t)t.hasOwnProperty(i)&&(r.prototype[i]=t[i]);r.prototype.constructor=r,r.superClass=e}function ar(r,e,t){if(r="prototype"in r?r.prototype:r,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&r[a]==null&&(r[a]=e[a])}else me(r,e)}function at(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function A(r,e,t){if(r&&e)if(r.forEach&&r.forEach===e_)r.forEach(e,t);else if(r.length===+r.length)for(var n=0,i=r.length;n<i;n++)e.call(t,r[n],n,r);else for(var a in r)r.hasOwnProperty(a)&&e.call(t,r[a],a,r)}function J(r,e,t){if(!r)return[];if(!e)return Qh(r);if(r.map&&r.map===r_)return r.map(e,t);for(var n=[],i=0,a=r.length;i<a;i++)n.push(e.call(t,r[i],i,r));return n}function Ei(r,e,t,n){if(r&&e){for(var i=0,a=r.length;i<a;i++)t=e.call(n,t,r[i],i,r);return t}}function ze(r,e,t){if(!r)return[];if(!e)return Qh(r);if(r.filter&&r.filter===t_)return r.filter(e,t);for(var n=[],i=0,a=r.length;i<a;i++)e.call(t,r[i],i,r)&&n.push(r[i]);return n}function a_(r,e,t){if(r&&e){for(var n=0,i=r.length;n<i;n++)if(e.call(t,r[n],n,r))return r[n]}}function Ae(r){if(!r)return[];if(Object.keys)return Object.keys(r);var e=[];for(var t in r)r.hasOwnProperty(t)&&e.push(t);return e}function o_(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return function(){return r.apply(e,t.concat(jh.call(arguments)))}}var ee=uo&&ne(uo.bind)?uo.call.bind(uo.bind):o_;function Pe(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return r.apply(this,e.concat(jh.call(arguments)))}}function X(r){return Array.isArray?Array.isArray(r):to.call(r)==="[object Array]"}function ne(r){return typeof r=="function"}function K(r){return typeof r=="string"}function kc(r){return to.call(r)==="[object String]"}function Se(r){return typeof r=="number"}function Q(r){var e=typeof r;return e==="function"||!!r&&e==="object"}function ff(r){return!!b0[to.call(r)]}function ot(r){return!!_0[to.call(r)]}function Ea(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function vl(r){return r.colorStops!=null}function s_(r){return r.image!=null}function Oa(r){return r!==r}function As(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0,n=r.length;t<n;t++)if(r[t]!=null)return r[t]}function te(r,e){return r??e}function wi(r,e,t){return r??e??t}function Qh(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return jh.apply(r,e)}function Jh(r){if(typeof r=="number")return[r,r,r,r];var e=r.length;return e===2?[r[0],r[1],r[0],r[1]]:e===3?[r[0],r[1],r[2],r[1]]:r}function xr(r,e){if(!r)throw new Error(e)}function jt(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var S0="__ec_primitive__";function Ic(r){r[S0]=!0}function xa(r){return r[S0]}var l_=(function(){function r(){this.data={}}return r.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},r.prototype.has=function(e){return this.data.hasOwnProperty(e)},r.prototype.get=function(e){return this.data[e]},r.prototype.set=function(e,t){return this.data[e]=t,this},r.prototype.keys=function(){return Ae(this.data)},r.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},r})(),T0=typeof Map=="function";
2function u_(){return T0?new Map:new l_}var c_=(function(){function r(e){var t=X(e);this.data=u_();var n=this;e instanceof r?e.each(i):e&&A(e,i);function i(a,o){t?n.set(a,o):n.set(o,a)}}return r.prototype.hasKey=function(e){return this.data.has(e)},r.prototype.get=function(e){return this.data.get(e)},r.prototype.set=function(e,t){return this.data.set(e,t),t},r.prototype.each=function(e,t){this.data.forEach(function(n,i){e.call(t,n,i)})},r.prototype.keys=function(){var e=this.data.keys();return T0?Array.from(e):e},r.prototype.removeKey=function(e){this.data.delete(e)},r})();function re(r){return new c_(r)}function h_(r,e){for(var t=new r.constructor(r.length+e.length),n=0;n<r.length;n++)t[n]=r[n];for(var i=r.length,n=0;n<e.length;n++)t[n+i]=e[n];return t}function pl(r,e){var t;if(Object.create)t=Object.create(r);else{var n=function(){};n.prototype=r,t=new n}return e&&H(t,e),t}function C0(r){var e=r.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function Et(r,e){return r.hasOwnProperty(e)}function Ke(){}var d_=180/Math.PI;function Oi(r,e){return r==null&&(r=0),e==null&&(e=0),[r,e]}function f_(r){return[r[0],r[1]]}function vf(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function v_(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function p_(r){return Math.sqrt(g_(r))}function g_(r){return r[0]*r[0]+r[1]*r[1]}function ql(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function m_(r,e){var t=p_(e);return t===0?(r[0]=0,r[1]=0):(r[0]=e[0]/t,r[1]=e[1]/t),r}function Pc(r,e){return Math.sqrt((r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1]))}var y_=Pc;function x_(r,e){return(r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1])}var Si=x_;function At(r,e,t){var n=e[0],i=e[1];return r[0]=t[0]*n+t[2]*i+t[4],r[1]=t[1]*n+t[3]*i+t[5],r}function gi(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function mi(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}var Xn=(function(){function r(e,t){this.target=e,this.topTarget=t&&t.topTarget}return r})(),b_=(function(){function r(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return r.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 Xn(t,e),"dragstart",e.event))},r.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,i=e.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,t.drift(a,o,e),this.handler.dispatchToElement(new Xn(t,e),"drag",e.event);var s=this.handler.findHover(n,i,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Xn(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new Xn(s,e),"dragenter",e.event))}},r.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Xn(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Xn(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},r})(),zt=(function(){function r(e){e&&(this._$eventProcessor=e)}return r.prototype.on=function(e,t,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof t=="function"&&(i=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;t!=null&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),a[e]||(a[e]=[]);for(var s=0;s<a[e].length;s++)if(a[e][s].h===n)return this;var l={h:n,query:t,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},u=a[e].length-1,c=a[e][u];return c&&c.callAtLast?a[e].splice(u,0,l):a[e].push(l),this},r.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},r.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var i=[],a=0,o=n[e].length;a<o;a++)n[e][a].h!==t&&i.push(n[e][a]);n[e]=i}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},r.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=t.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t);break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},r.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=t.length,s=t[o-1],l=i.length,u=0;u<l;u++){var c=i[u];if(!(a&&a.filter&&c.query!=null&&!a.filter(e,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,t[0]);break;case 2:c.h.call(s,t[0],t[1]);break;default:c.h.apply(s,t.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},r})(),__=Math.log(2);function Rc(r,e,t,n,i,a){var o=n+"-"+i,s=r.length;if(a.hasOwnProperty(o))return a[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~i)/__);return r[t][l]}for(var u=n|1<<t,c=t+1;n&1<<c;)c++;for(var h=0,f=0,v=0;f<s;f++){var p=1<<f;p&i||(h+=(v%2?-1:1)*r[t][f]*Rc(r,e-1,c,u,i|p,a),v++)}return a[o]=h,h}function pf(r,e){var t=[[r[0],r[1],1,0,0,0,-e[0]*r[0],-e[0]*r[1]],[0,0,0,r[0],r[1],1,-e[1]*r[0],-e[1]*r[1]],[r[2],r[3],1,0,0,0,-e[2]*r[2],-e[2]*r[3]],[0,0,0,r[2],r[3],1,-e[3]*r[2],-e[3]*r[3]],[r[4],r[5],1,0,0,0,-e[4]*r[4],-e[4]*r[5]],[0,0,0,r[4],r[5],1,-e[5]*r[4],-e[5]*r[5]],[r[6],r[7],1,0,0,0,-e[6]*r[6],-e[6]*r[7]],[0,0,0,r[6],r[7],1,-e[7]*r[6],-e[7]*r[7]]],n={},i=Rc(t,8,0,0,0,n);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*Rc(t,7,o===0?1:0,1<<o,1<<s,n)/i*e[o];return function(l,u,c){var h=u*a[6]+c*a[7]+1;l[0]=(u*a[0]+c*a[1]+a[2])/h,l[1]=(u*a[3]+c*a[4]+a[5])/h}}}var Ls="___zrEVENTSAVED",Kl=[];function w_(r,e,t,n,i){return Ec(Kl,e,n,i,!0)&&Ec(r,t,Kl[0],Kl[1])}function S_(r,e){r&&t(r),e&&t(e);function t(n){var i=n[Ls];i&&(i.clearMarkers&&i.clearMarkers(),delete n[Ls])}}function Ec(r,e,t,n,i){if(e.getBoundingClientRect&&ie.domSupported&&!M0(e)){var a=e[Ls]||(e[Ls]={}),o=T_(e,a),s=C_(o,a,i);if(s)return s(r,t,n),!0}return!1}function T_(r,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var n=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return e.clearMarkers=function(){A(t,function(c){c.parentNode&&c.parentNode.removeChild(c)})},t}function C_(r,e,t){for(var n=t?"invTrans":"trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),h=2*u,f=c.left,v=c.top;o.push(f,v),l=l&&a&&f===a[h]&&v===a[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=t?pf(s,o):pf(o,s))}function M0(r){return r.nodeName.toUpperCase()==="CANVAS"}var M_=/([&<>"'])/g,D_={"&":"&","<":"<",">":">",'"':""","'":"'"};function tt(r){return r==null?"":(r+"").replace(M_,function(e,t){return D_[t]})}var A_=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ql=[],L_=ie.browser.firefox&&+ie.browser.version.split(".")[0]<39;function Oc(r,e,t,n){return t=t||{},n?gf(r,e,t):L_&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):gf(r,e,t),t}function gf(r,e,t){if(ie.domSupported&&r.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(M0(r)){var a=r.getBoundingClientRect();t.zrX=n-a.left,t.zrY=i-a.top;return}
2else if(Ec(Ql,r,n,i)){t.zrX=Ql[0],t.zrY=Ql[1];return}}t.zrX=t.zrY=0}function ed(r){return r||window.event}function bt(r,e,t){if(e=ed(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Oc(r,o,e,t)}else{Oc(r,e,e,t);var a=k_(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&A_.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function k_(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,n=r.deltaY;if(t==null||n==null)return e;var i=Math.abs(n!==0?n:t),a=n>0?-1:n<0?1:t>0?-1:1;return 3*i*a}function I_(r,e,t,n){r.addEventListener(e,t,n)}function P_(r,e,t,n){r.removeEventListener(e,t,n)}var Mi=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function mf(r){return r.which===2||r.which===3}var R_=(function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:t,event:e},o=0,s=i.length;o<s;o++){var l=i[o],u=Oc(n,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},r.prototype._recognize=function(e){for(var t in Jl)if(Jl.hasOwnProperty(t)){var n=Jl[t](this._track,e);if(n)return n}},r})();function yf(r){var e=r[1][0]-r[0][0],t=r[1][1]-r[0][1];return Math.sqrt(e*e+t*t)}function E_(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var Jl={pinch:function(r,e){var t=r.length;if(t){var n=(r[t-1]||{}).points,i=(r[t-2]||{}).points||n;if(i&&i.length>1&&n&&n.length>1){var a=yf(n)/yf(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=E_(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function mr(){return[1,0,0,1,0,0]}function td(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function D0(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function ba(r,e,t){var n=e[0]*t[0]+e[2]*t[1],i=e[1]*t[0]+e[3]*t[1],a=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function Bc(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function rd(r,e,t,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(t),h=Math.cos(t);return r[0]=i*h+s*c,r[1]=-i*c+s*h,r[2]=a*h+l*c,r[3]=-a*c+h*l,r[4]=h*(o-n[0])+c*(u-n[1])+n[0],r[5]=h*(u-n[1])-c*(o-n[0])+n[1],r}function O_(r,e,t){var n=t[0],i=t[1];return r[0]=e[0]*n,r[1]=e[1]*i,r[2]=e[2]*n,r[3]=e[3]*i,r[4]=e[4]*n,r[5]=e[5]*i,r}function ro(r,e){var t=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=t*o-a*n;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-n*l,r[3]=t*l,r[4]=(n*s-o*i)*l,r[5]=(a*i-t*s)*l,r):null}var be=(function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.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}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,n){e.x=t,e.y=n},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},r.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},r.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},r.scaleAndAdd=function(e,t,n,i){e.x=t.x+n.x*i,e.y=t.y+n.y*i},r.lerp=function(e,t,n,i){var a=1-i;e.x=a*t.x+i*n.x,e.y=a*t.y+i*n.y},r})(),kn=Math.min,yi=Math.max,Nc=Math.abs,xf=["x","y"],B_=["width","height"],rn=new be,nn=new be,an=new be,on=new be,ct=A0(),ha=ct.minTv,zc=ct.maxTv,_a=[0,0],se=(function(){function r(e,t,n,i){r.set(this,e,t,n,i)}return r.set=function(e,t,n,i,a){return i<0&&(t=t+i,i=-i),a<0&&(n=n+a,a=-a),e.x=t,e.y=n,e.width=i,e.height=a,e},r.prototype.union=function(e){var t=kn(e.x,this.x),n=kn(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=yi(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=yi(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,i=e.he
2ight/t.height,a=mr();return Bc(a,a,[-t.x,-t.y]),O_(a,a,[n,i]),Bc(a,a,[e.x,e.y]),a},r.prototype.intersect=function(e,t,n){return r.intersect(this,e,t,n)},r.intersect=function(e,t,n,i){n&&be.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!e||!t)return!1;e instanceof r||(e=r.set(N_,e.x,e.y,e.width,e.height)),t instanceof r||(t=r.set(z_,t.x,t.y,t.width,t.height));var s=!!n;ct.reset(i,s);var l=ct.touchThreshold,u=e.x+l,c=e.x+e.width-l,h=e.y+l,f=e.y+e.height-l,v=t.x+l,p=t.x+t.width-l,m=t.y+l,y=t.y+t.height-l;if(u>c||h>f||v>p||m>y)return!1;var g=!(c<v||p<u||f<m||y<h);return(s||a)&&(_a[0]=1/0,_a[1]=0,bf(u,c,v,p,0,s,a,o),bf(h,f,m,y,1,s,a,o),s&&be.copy(n,g?ct.useDir?ct.dirMinTv:ha:zc)),g},r.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},r.prototype.contain=function(e,t){return r.contain(this,e,t)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},r.applyTransform=function(e,t,n){if(!n){e!==t&&r.copy(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=t.x*i+o,e.y=t.y*a+s,e.width=t.width*i,e.height=t.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}rn.x=an.x=t.x,rn.y=on.y=t.y,nn.x=on.x=t.x+t.width,nn.y=an.y=t.y+t.height,rn.transform(n),on.transform(n),nn.transform(n),an.transform(n),e.x=kn(rn.x,nn.x,an.x,on.x),e.y=kn(rn.y,nn.y,an.y,on.y);var l=yi(rn.x,nn.x,an.x,on.x),u=yi(rn.y,nn.y,an.y,on.y);e.width=l-e.x,e.height=u-e.y},r})(),N_=new se(0,0,0,0),z_=new se(0,0,0,0);function bf(r,e,t,n,i,a,o,s){var l=Nc(e-t),u=Nc(n-r),c=kn(l,u),h=xf[i],f=xf[1-i],v=B_[i];e<t||n<r?l<u?(a&&(zc[h]=-l),s&&(o[h]=e,o[v]=0)):(a&&(zc[h]=u),s&&(o[h]=r,o[v]=0)):(o&&(o[h]=yi(r,t),o[v]=kn(e,n)-o[h]),a&&(c<_a[0]||ct.useDir)&&(_a[0]=kn(c,_a[0]),(l<u||!ct.bidirectional)&&(ha[h]=l,ha[f]=0,ct.useDir&&ct.calcDirMTV()),(l>=u||!ct.bidirectional)&&(ha[h]=-u,ha[f]=0,ct.useDir&&ct.calcDirMTV())))}function A0(){var r=0,e=new be,t=new be,n={minTv:new be,maxTv:new be,useDir:!1,dirMinTv:new be,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=yi(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),t.copy(n.minTv),r=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||e.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(r),u=Math.cos(r),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(t.x=s*u/c,t.y=s*l/c,i(t.x)&&i(t.y)){o.set(0,0);return}(n.bidirectional||e.dot(t)>0)&&t.len()<o.len()&&o.copy(t)}};function i(a){return Nc(a)<1e-10}return n}var L0="silent";function F_(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:V_}}function V_(){Mi(this.event)}var H_=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e})(zt),Fi=(function(){function r(e,t){this.x=e,this.y=t}return r})(),$_=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],eu=new se(0,0,0,0),k0=(function(r){$(e,r);function e(t,n,i,a,o){var s=r.call(this)||this;return s._hovered=new Fi(0,0),s.storage=t,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new H_,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr
2=new b_(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(A($_,function(n){t.on&&t.on(n,this[n],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var n=t.zrX,i=t.zrY,a=I0(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new Fi(n,i):this.findHover(n,i),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var n=t.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Fi(0,0)},e.prototype.dispatch=function(t,n){var i=this[t];i&&i.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var n=this.proxy;n.setCursor&&n.setCursor(t)},e.prototype.dispatchToElement=function(t,n,i){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var o="on"+n,s=F_(n,t,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},e.prototype.findHover=function(t,n,i){var a=this.storage.getDisplayList(),o=new Fi(t,n);if(_f(a,o,t,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new se(t-u,n-u,l,l),h=a.length-1;h>=0;h--){var f=a[h];f!==i&&!f.ignore&&!f.ignoreCoarsePointer&&(!f.parent||!f.parent.ignoreCoarsePointer)&&(eu.copy(f.getBoundingRect()),f.transform&&eu.applyTransform(f.transform),eu.intersect(c)&&s.push(f))}if(s.length)for(var v=4,p=Math.PI/12,m=Math.PI*2,y=0;y<u;y+=v)for(var g=0;g<m;g+=p){var x=t+y*Math.cos(g),b=n+y*Math.sin(g);if(_f(s,o,x,b,i),o.target)return o}}return o},e.prototype.processGesture=function(t,n){this._gestureMgr||(this._gestureMgr=new R_);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);
2if(n==="end"&&i.clear(),a){var o=a.type;t.gestureEvent=o;var s=new Fi;s.target=a.target,this.dispatchToElement(s,o,a.event)}},e})(zt);A(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){k0.prototype[r]=function(e){var t=e.zrX,n=e.zrY,i=I0(this,t,n),a,o;if((r!=="mouseup"||!i)&&(a=this.findHover(t,n),o=a.target),r==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||y_(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,e)}});function G_(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var n=r,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,t))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?L0:!0}return!1}function _f(r,e,t,n,i){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==i&&!o.ignore&&(s=G_(o,t,n))&&(!e.topTarget&&(e.topTarget=o),s!==L0)){e.target=o;break}}}function I0(r,e,t){var n=r.painter;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var P0=32,Vi=7;function W_(r){for(var e=0;r>=P0;)e|=r&1,r>>=1;return r+e}function wf(r,e,t,n){var i=e+1;if(i===t)return 1;if(n(r[i++],r[e])<0){for(;i<t&&n(r[i],r[i-1])<0;)i++;U_(r,e,i)}else for(;i<t&&n(r[i],r[i-1])>=0;)i++;return i-e}function U_(r,e,t){for(t--;e<t;){var n=r[e];r[e++]=r[t],r[t--]=n}}function Sf(r,e,t,n,i){for(n===e&&n++;n<t;n++){for(var a=r[n],o=e,s=n,l;o<s;)l=o+s>>>1,i(a,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function tu(r,e,t,n,i,a){var o=0,s=0,l=1;if(a(r,e[t+i])>0){for(s=n-i;l<s&&a(r,e[t+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&a(r,e[t+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var c=o+(l-o>>>1);a(r,e[t+c])>0?o=c+1:l=c}return l}function ru(r,e,t,n,i,a){var o=0,s=0,l=1;if(a(r,e[t+i])<0){for(s=i+1;l<s&&a(r,e[t+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l<s&&a(r,e[t+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var c=o+(l-o>>>1);a(r,e[t+c])<0?l=c:o=c+1}return l}function Y_(r,e){var t=Vi,n,i,a=0,o=[];n=[],i=[];function s(v,p){n[a]=v,i[a]=p,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]<i[v+1]&&v--;else if(i[v]>i[v+1])break;c(v)}}function u(){for(;a>1;){var v=a-2;v>0&&i[v-1]<i[v+1]&&v--,c(v)}}function c(v){var p=n[v],m=i[v],y=n[v+1],g=i[v+1];i[v]=m+g,v===a-3&&(n[v+1]=n[v+2],i[v+1]=i[v+2]),a--;var x=ru(r[y],r,p,m,0,e);p+=x,m-=x,m!==0&&(g=tu(r[p+m-1],r,y,g,g-1,e),g!==0&&(m<=g?h(p,m,y,g):f(p,m,y,g)))}function h(v,p,m,y){var g=0;for(g=0;g<p;g++)o[g]=r[v+g];var x=0,b=m,_=v;if(r[_++]=r[b++],--y===0){for(g=0;g<p;g++)r[_+g]=o[x+g];return}if(p===1){for(g=0;g<y;g++)r[_+g]=r[b+g];r[_+y]=o[x];return}for(var S=t,w,T,D;;){w=0,T=0,D=!1;do if(e(r[b],o[x])<0){if(r[_++]=r[b++],T++,w=0,--y===0){D=!0;break}}else if(r[_++]=o[x++],w++,T=0,--p===1){D=!0;break}while((w|T)<S);if(D)break;do{if(w=ru(r[b],o,x,p,0,e),w!==0){for(g=0;g<w;g++)r[_+g]=o[x+g];if(_+=w,x+=w,p-=w,p<=1){D=!0;break}}if(r[_++]=r[b++],--y===0){D=!0;break}if(T=tu(o[x],r,b,y,0,e),T!==0){for(g=0;g<T;g++)r[_+g]=r[b+g];if(_+=T,b+=T,y-=T,y===0){D=!0;break}}if(r[_++]=o[x++],--p===1){D=!0;break}S--}while(w>=Vi||T>=Vi);if(D)break;S<0&&(S=0),S+=2}if(t=S,t<1&&(t=1),p===1){for(g=0;g<y;g++)r[_+g]=r[b+g];r[_+y]=o[x]}else{if(p===0)throw new Error;for(g=0;g<p;g++)r[_+g]=o[x+g]}}function f(v,p,m,y){var g=0;for(g=0;g<y;g++)o[g]=r[m+g];var x=v+p-1,b=y-1,_=m+y-1,S=0,w=0;if(r[_--]=r[x--],--p===0){for(S=_-(y-1),g=0;g<y;g++)r[S+g]=o[g];return}if(y===1){for(_-=p,x-=p,w=_+1,S=x+1,g=p-1;g>=0;g--)r[w+g]=r[S+g];r[_]=o[b];return}for(var T=t;;){var D=0,L=0,M=!1;do if(e(o[b],r[x])<0){if(r[_--]=r[x--],D++,L=0,--p===0){M=!0;break}}else if(r[_--]=o[b--],L++,D=0,--y===1){M=!0;break}while((D|L)<T);if(M)break;do{if(D=p-ru(o[b],r,v,p,p-1,e),D!==0){for(_-=D,x-=D,p-=D,w=_+1,S=x+1,g=D-1;g>=0;g--)r[w+g]=r[S+g];if(p===0){M=!0;break}}if(r[_--]=o[b--],--y===1){M=!0;break}if(L=y-tu(r[x],o,0,y,y-1,e),L!==0){for(_-=L,b-=L,y-=L,w=_+1,S=b+1,g=0;g<L;g++)r[w+g]=o[S+g];if(y<=1){M=!0;break}}if(r[_--]=r[x--],--p===0){M=!0;break}T--}while(D>=Vi||L>=Vi);if(M)break;T<0&&(T=0),T+=2}if(t=T,t<1&&(t=1),y===1){for(_-=p,x-=p,w=_+1,S=x+1,g=p-1;g>=0;g--)r[w+g]=r[S+g];r[_]=o[b]}else{if(y===0)throw new Error;for(S=_-(y-1),g=0;g<y;g++)r[S+g]=o[g]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function ls(r,e,t,n){t||(t=0),n||(n=r.length);var i=n-t;if(!(i<2)){var a=0;if(i<P0){a=wf(r,t,n,e),Sf(r,t,n,t+a,e);return}var o=Y_(r,e),s=W_(i);do{if(a=wf(r,t,n,e),a<s){var l=i;l>s&&(l=s),Sf(r,t,t+l,t+a,e),a=l}o.pushRun(t,a),o.mergeRuns(),i-=a,t+=a}while(i!==0);o.forceMergeRuns()}}var ht=1,da=2,fi=4,Tf=!1;function nu(){Tf||(Tf=!0,console.warn("z / z2 / zlevel of displayable is invali
2d, which may cause unexpected errors"))}function Cf(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var Z_=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Cf}return r.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},r.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},r.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,i=0,a=t.length;i<a;i++)this._updateAndAddDisplayable(t[i],null,e);n.length=this._displayListLen,ls(n,Cf)},r.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var i=e.getClipPath(),a=t&&t.length,o=0,s=e.__clipPaths;if(!e.ignoreClip&&(a||i)){if(s||(s=e.__clipPaths=[]),a)for(var l=0;l<t.length;l++)s[o++]=t[l];for(var u=i,c=e;u;)u.parent=c,u.updateTransform(),s[o++]=u,c=u,u=u.getClipPath()}if(s&&(s.length=o),e.childrenRef){for(var h=e.childrenRef(),f=0;f<h.length;f++){var v=h[f];e.__dirty&&(v.__dirty|=ht),this._updateAndAddDisplayable(v,s,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(nu(),p.z=0),isNaN(p.z2)&&(nu(),p.z2=0),isNaN(p.zlevel)&&(nu(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,s,n);var y=e.getTextGuideLine();y&&this._updateAndAddDisplayable(y,s,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,s,n)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var i=de(this._roots,e);i>=0&&this._roots.splice(i,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),ks;ks=ie.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var wa={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)))},elasticOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-wa.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?wa.bounceIn(r*2)*.5:wa.bounceOut(r*2-1)*.5+.5}},co=Math.pow,$r=Math.sqrt,Is=1e-8,R0=1e-4,Mf=$r(3),ho=1/3,Xt=Oi(),St=Oi(),Ti=Oi();function zr(r){return r>-Is&&r<Is}function E0(r){return r>Is||r<-Is}function Ve(r,e,t,n,i){var a=1-i;return a*a*(a*r+3*i*e)+i*i*(i*n+3*a*t)}function Df(r,e,t,n,i){var a=1-i;return 3*(((e-r)*a+2*(t-e)*i)*a+(n-t)*i*i)}function Ps(r,e,t,n,i,a){var o=n+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-i,c=s*s-3*o*l,h=s*l-9*o*u,f=l*l-3*s*u,v=0;
2if(zr(c)&&zr(h))if(zr(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[v++]=p)}else{var m=h*h-4*c*f;if(zr(m)){var y=h/c,p=-s/o+y,g=-y/2;p>=0&&p<=1&&(a[v++]=p),g>=0&&g<=1&&(a[v++]=g)}else if(m>0){var x=$r(m),b=c*s+1.5*o*(-h+x),_=c*s+1.5*o*(-h-x);b<0?b=-co(-b,ho):b=co(b,ho),_<0?_=-co(-_,ho):_=co(_,ho);var p=(-s-(b+_))/(3*o);p>=0&&p<=1&&(a[v++]=p)}else{var S=(2*c*s-3*o*h)/(2*$r(c*c*c)),w=Math.acos(S)/3,T=$r(c),D=Math.cos(w),p=(-s-2*T*D)/(3*o),g=(-s+T*(D+Mf*Math.sin(w)))/(3*o),L=(-s+T*(D-Mf*Math.sin(w)))/(3*o);p>=0&&p<=1&&(a[v++]=p),g>=0&&g<=1&&(a[v++]=g),L>=0&&L<=1&&(a[v++]=L)}}return v}function O0(r,e,t,n,i){var a=6*t-12*e+6*r,o=9*e+3*n-3*r-9*t,s=3*e-3*r,l=0;if(zr(o)){if(E0(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(zr(c))i[0]=-a/(2*o);else if(c>0){var h=$r(c),u=(-a+h)/(2*o),f=(-a-h)/(2*o);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function Rs(r,e,t,n,i,a){var o=(e-r)*i+r,s=(t-e)*i+e,l=(n-t)*i+t,u=(s-o)*i+o,c=(l-s)*i+s,h=(c-u)*i+u;a[0]=r,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=c,a[6]=l,a[7]=n}function X_(r,e,t,n,i,a,o,s,l,u,c){var h,f=.005,v=1/0,p,m,y,g;Xt[0]=l,Xt[1]=u;for(var x=0;x<1;x+=.05)St[0]=Ve(r,t,i,o,x),St[1]=Ve(e,n,a,s,x),y=Si(Xt,St),y<v&&(h=x,v=y);v=1/0;for(var b=0;b<32&&!(f<R0);b++)p=h-f,m=h+f,St[0]=Ve(r,t,i,o,p),St[1]=Ve(e,n,a,s,p),y=Si(St,Xt),p>=0&&y<v?(h=p,v=y):(Ti[0]=Ve(r,t,i,o,m),Ti[1]=Ve(e,n,a,s,m),g=Si(Ti,Xt),m<=1&&g<v?(h=m,v=g):f*=.5);return $r(v)}function j_(r,e,t,n,i,a,o,s,l){for(var u=r,c=e,h=0,f=1/l,v=1;v<=l;v++){var p=v*f,m=Ve(r,t,i,o,p),y=Ve(e,n,a,s,p),g=m-u,x=y-c;h+=Math.sqrt(g*g+x*x),u=m,c=y}return h}function rt(r,e,t,n){var i=1-n;return i*(i*r+2*n*e)+n*n*t}function Af(r,e,t,n){return 2*((1-n)*(e-r)+n*(t-e))}function q_(r,e,t,n,i){var a=r-2*e+t,o=2*(e-r),s=r-n,l=0;if(zr(a)){if(E0(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(zr(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var h=$r(c),u=(-o+h)/(2*a),f=(-o-h)/(2*a);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function B0(r,e,t){var n=r+t-2*e;return n===0?.5:(r-e)/n}function Es(r,e,t,n,i){var a=(e-r)*n+r,o=(t-e)*n+e,s=(o-a)*n+a;i[0]=r,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=t}function K_(r,e,t,n,i,a,o,s,l){var u,c=.005,h=1/0;Xt[0]=o,Xt[1]=s;for(var f=0;f<1;f+=.05){St[0]=rt(r,t,i,f),St[1]=rt(e,n,a,f);var v=Si(Xt,St);v<h&&(u=f,h=v)}h=1/0;for(var p=0;p<32&&!(c<R0);p++){var m=u-c,y=u+c;St[0]=rt(r,t,i,m),St[1]=rt(e,n,a,m);var v=Si(St,Xt);if(m>=0&&v<h)u=m,h=v;else{Ti[0]=rt(r,t,i,y),Ti[1]=rt(e,n,a,y);var g=Si(Ti,Xt);y<=1&&g<h?(u=y,h=g):c*=.5}}return $r(h)}function Q_(r,e,t,n,i,a,o){for(var s=r,l=e,u=0,c=1/o,h=1;h<=o;h++){var f=h*c,v=rt(r,t,i,f),p=rt(e,n,a,f),m=v-s,y=p-l;u+=Math.sqrt(m*m+y*y),s=v,l=p}return u}var J_=/cubic-bezier\(([0-9,\.e ]+)\)/;function N0(r){var e=r&&J_.exec(r);if(e){var t=e[1].split(","),n=+jt(t[0]),i=+jt(t[1]),a=+jt(t[2]),o=+jt(t[3]);if(isNaN(n+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Ps(0,n,a,1,l,s)&&Ve(0,i,o,1,s[0])}}}var ew=(function(){function r(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||Ke,this.ondestroy=e.ondestroy||Ke,this.onrestart=e.onrestart||Ke,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=ne(e)?e:wa[e]||N0(e)},r})(),z0=(function(){function r(e){this.value=e}return r})(),tw=(function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new z0(e);return this.insertEntry(t),t},r.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++},r.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--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})(),Di=(function(){function r(e){this._list=new tw,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new z0(t),s.key=e,n.insertEntry(s),i[e]=s}return a},r.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},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),Lf={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 Gr(r){return r=Math.round(r),r<0?0:r>255?255:r}function Fc(r){return r<0?0:r>1?1:r}function iu(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Gr(parseFloat(e)/100*255):Gr(parseInt(e,10))}function On(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Fc(parseFloat(e)/100):Fc(parseFloat(e))}function au(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function fo(r,e,t){return r+(e-r)*t}function xt(r,e,t,n,i){return r[0]=e,r[1]=t,r[2]=n,r[3]=i,r}function Vc(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var F0=new Di(20),vo=null;function jn(r,e){vo&&Vc(vo,e),vo=F0.put(r,vo||e.slice())}function Qt(r,e){if(r){e=e||[];var t=F0.get(r);if(t)return Vc(e,t);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in Lf)return Vc(e,Lf[n]),jn(r,e),e;var i=n.length;
2if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){xt(e,0,0,0,1);return}return xt(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),jn(r,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){xt(e,0,0,0,1);return}return xt(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),jn(r,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?xt(e,+u[0],+u[1],+u[2],1):xt(e,0,0,0,1);c=On(u.pop());case"rgb":if(u.length>=3)return xt(e,iu(u[0]),iu(u[1]),iu(u[2]),u.length===3?c:On(u[3])),jn(r,e),e;xt(e,0,0,0,1);return;case"hsla":if(u.length!==4){xt(e,0,0,0,1);return}return u[3]=On(u[3]),Hc(u,e),jn(r,e),e;case"hsl":if(u.length!==3){xt(e,0,0,0,1);return}return Hc(u,e),jn(r,e),e;default:return}}xt(e,0,0,0,1)}}function Hc(r,e){var t=(parseFloat(r[0])%360+360)%360/360,n=On(r[1]),i=On(r[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],xt(e,Gr(au(o,a,t+1/3)*255),Gr(au(o,a,t)*255),Gr(au(o,a,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function rw(r){if(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.min(e,t,n),a=Math.max(e,t,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-e)/6+o/2)/o,h=((a-t)/6+o/2)/o,f=((a-n)/6+o/2)/o;e===a?l=f-h:t===a?l=1/3+c-f:n===a&&(l=2/3+h-c),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return r[3]!=null&&v.push(r[3]),v}}function kf(r,e){var t=Qt(r);if(t){for(var n=0;n<3;n++)t[n]=t[n]*(1-e)|0,t[n]>255?t[n]=255:t[n]<0&&(t[n]=0);return no(t,t.length===4?"rgba":"rgb")}}function nw(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var n=r*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=Qt(e[i]),s=Qt(e[a]),l=n-i,u=no([Gr(fo(o[0],s[0],l)),Gr(fo(o[1],s[1],l)),Gr(fo(o[2],s[2],l)),Fc(fo(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function $c(r,e,t,n){var i=Qt(r);if(r)return i=rw(i),t!=null&&(i[1]=On(ne(t)?t(i[1]):t)),n!=null&&(i[2]=On(ne(n)?n(i[2]):n)),no(Hc(i),"rgba")}function no(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function Os(r,e){var t=Qt(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var If=new Di(100);function Pf(r){if(K(r)){var e=If.get(r);return e||(e=kf(r,-.1),If.put(r,e)),e}else if(vl(r)){var t=H({},r);return t.colorStops=J(r.colorStops,function(n){return{offset:n.offset,color:kf(n.color,-.1)}}),t}return r}function iw(r){return r.type==="linear"}function aw(r){return r.type==="radial"}(function(){return ie.hasGlobalWindow&&ne(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})();var Gc=Array.prototype.slice;function hr(r,e,t){return(e-r)*t+r}function ou(r,e,t,n){for(var i=e.length,a=0;a<i;a++)r[a]=hr(e[a],t[a],n);return r}function ow(r,e,t,n){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=hr(e[o][s],t[o][s],n)}return r}function po(r,e,t,n){for(var i=e.length,a=0;a<i;a++)r[a]=e[a]+t[a]*n;return r}function Rf(r,e,t,n){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=e[o][s]+t[o][s]*n}return r}function sw(r,e){for(var t=r.length,n=e.length,i=t>n?e:r,a=Math.min(t,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(t,n);s++)i.push({offset:o.offset,color:o.color.slice()})}function lw(r,e,t){var n=r,i=e;if(!(!n.push||!i.push)){var a=n.length,o=i.length;if(a!==o){var s=a>o;if(s)n.length=o;else for(var l=a;l<o;l++)n.push(t===1?i[l]:Gc.call(i[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(t===1)isNaN(n[l])&&(n[l]=i[l]);else for(var c=0;c<u;c++)isNaN(n[l][c])&&(n[l][c]=i[l][c])}}function us(r){if(at(r)){var e=r.length;if(at(r[0])){for(var t=[],n=0;n<e;n++)t.push(Gc.call(r[n]));return t}return Gc.call(r)}return r}function cs(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function uw(r){return at(r&&r[0])?2:1}var go=0,hs=1,V0=2,fa=3,Wc=4,Uc=5,Ef=6;function Of(r){return r===Wc||r===Uc}function mo(r){return r===hs||r===V0}var Hi=[0,0,0,0],cw=(function(){function r(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=Ef,l=t;if(at(t)){var u=uw(t);s=u,(u===1&&!Se(t[0])||u===2&&!Se(t[0][0]))&&(o=!0)}else if(Se(t)&&!Oa(t))s=go;else if(K(t))if(!isNaN(+t))s=go;else{var c=Qt(t);c&&(l=c,s=fa)}else if(vl(t)){var h=H({},l);h.colorStops=J(t.colorStops,function(v){return{offset:v.offset,color:Qt(v.color)}}),iw(t)?s=Wc:aw(t)&&(s=Uc),l=h}a===0?this.valType=s:(s!==this.valType||s===Ef)&&(o=!0),this.discrete=this.discrete||o;var f={time:e,value:l,rawValue:t,percent:0};return n&&(f.easing=n,f.easingFunc=ne(n)?n:wa[n]||N0(n)),i.push(f),f},r.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(m,y){return m.time-y.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=mo(i),u=Of(i),c=0;c<a;c++){var h=n[c],f=h.value,v=o.value;h.percent=h.time/e,s||(l&&c!==a-1?lw(f,v,i):u&&sw(f.colorStops,v.colorStops))}if(!s&&i!==Uc&&t&&this.needsAnimate()&&t.needsAnimate()&&i===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,c=0;c<a;c++)i===go?n[c].additiveValue=n[c].value-p:i===fa?n[c].additiveValue=po([],n[c].value,p,-1):mo(i)&&(n[c].additiveValue=i===hs?po([],n[c].value,p,-1):Rf([],n[c].value,p,-1))}},r.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,i=n?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===fa,c,h=this._lastFr,f=Math.min,v,p;if(s===1)v=p=o[0];
2else{if(t<0)c=0;else if(t<this._lastFrP){var m=f(h+1,s-1);for(c=m;c>=0&&!(o[c].percent<=t);c--);c=f(c,s-2)}else{for(c=h;c<s&&!(o[c].percent>t);c++);c=f(c-1,s-2)}p=o[c+1],v=o[c]}if(v&&p){this._lastFr=c,this._lastFrP=t;var y=p.percent-v.percent,g=y===0?1:f((t-v.percent)/y,1);p.easingFunc&&(g=p.easingFunc(g));var x=n?this._additiveValue:u?Hi:e[l];if((mo(a)||u)&&!x&&(x=this._additiveValue=[]),this.discrete)e[l]=g<1?v.rawValue:p.rawValue;else if(mo(a))a===hs?ou(x,v[i],p[i],g):ow(x,v[i],p[i],g);else if(Of(a)){var b=v[i],_=p[i],S=a===Wc;e[l]={type:S?"linear":"radial",x:hr(b.x,_.x,g),y:hr(b.y,_.y,g),colorStops:J(b.colorStops,function(T,D){var L=_.colorStops[D];return{offset:hr(T.offset,L.offset,g),color:cs(ou([],T.color,L.color,g))}}),global:_.global},S?(e[l].x2=hr(b.x2,_.x2,g),e[l].y2=hr(b.y2,_.y2,g)):e[l].r=hr(b.r,_.r,g)}else if(u)ou(x,v[i],p[i],g),n||(e[l]=cs(x));else{var w=hr(v[i],p[i],g);n?this._additiveValue=w:e[l]=w}n&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,i=this._additiveValue;t===go?e[n]=e[n]+i:t===fa?(Qt(e[n],Hi),po(Hi,Hi,i,1),e[n]=cs(Hi)):t===hs?po(e[n],e[n],i,1):t===V0&&Rf(e[n],e[n],i,1)},r})(),nd=(function(){function r(e,t,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&i){Kh("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Ae(t),n)},r.prototype.whenWithKeys=function(e,t,n,i){for(var a=this._tracks,o=0;o<n.length;o++){var s=n[o],l=a[s];if(!l){l=a[s]=new cw(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var h=c.keyframes,f=h[h.length-1];u=f&&f.value,c.valType===fa&&u&&(u=cs(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,us(u),i),this._trackKeys.push(s)}l.addKeyframe(e,us(t[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},r.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},r.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var a=n[i].getTrack(e);a&&(t=a)}return t},r.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],i=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var h=u[c-1];h&&(t._target[s.propName]=h.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var f=new ew({life:i,loop:this._loop,delay:this._delay||0,onframe:function(v){t._started=2;var p=t._additiveAnimators;if(p){for(var m=!1,y=0;y<p.length;y++)if(p[y]._clip){m=!0;break}m||(t._additiveAnimators=null)}for(var y=0;y<n.length;y++)n[y].step(t._target,v);var g=t._onframeCbs;if(g)for(var y=0;y<g.length;y++)g[y](t._target,v)},ondestroy:function(){t._doneCallback()}});this._clip=f,this.animation&&this.animation.addClip(f),e&&f.setEasing(e)}else this._doneCallback();return this}},r.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},r.prototype.delay=function(e){return this._delay=e,this},r.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},r.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},r.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(e){return this._tracks[e]},r.prototype.getTracks=function(){var e=this;return J(this._trackKeys,function(t){return e._tracks[t]})},r.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,a=0;a<e.length;a++){var o=n[e[a]];o&&!o.isFinished()&&(t?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<i.length;a++)if(!n[i[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var i=0;i<t.length;i++){var a=t[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(e[a]=us(l.rawValue))}}}},r.prototype.__changeFinalValue=function(e,t){t=t||Ae(e);for(var n=0;n<t.length;n++){var i=t[n],a=this._tracks[i];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r})();function xi(){return new Date().getTime()}var hw=(function(r){$(e,r);function e(t){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var n=t.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(t){if(t.animation){var n=t.prev,i=t.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var n=t.getClip();n&&this.removeClip(n),t.animation=null},e.prototype.update=function(t){for(var n=xi()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,t||(this.trigger("frame",i),this.stage.update&&this.stage.update(
2))},e.prototype._startLoop=function(){var t=this;this._running=!0;function n(){t._running&&(ks(n),!t._paused&&t.update())}ks(n)},e.prototype.start=function(){this._running||(this._time=xi(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=xi(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=xi()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var n=t.next;t.prev=t.next=t.animation=null,t=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,n){n=n||{},this.start();var i=new nd(t,n.loop);return this.addAnimator(i),i},e})(zt),dw=300,su=ie.domSupported,lu=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=J(r,function(i){var a=i.replace("mouse","pointer");return t.hasOwnProperty(a)?a:i});return{mouse:r,touch:e,pointer:n}})(),Bf={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Nf=!1;function Yc(r){var e=r.pointerType;return e==="pen"||e==="touch"}function fw(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function uu(r){r&&(r.zrByTouch=!0)}function vw(r,e){return bt(r.dom,new pw(r,e),!0)}function H0(r,e){for(var t=e,n=!1;t&&t.nodeType!==9&&!(n=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return n}var pw=(function(){function r(e,t){this.stopPropagation=Ke,this.stopImmediatePropagation=Ke,this.preventDefault=Ke,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r})(),Pt={mousedown:function(r){r=bt(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=bt(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=bt(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=bt(this.dom,r);var e=r.toElement||r.relatedTarget;H0(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){Nf=!0,r=bt(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){Nf||(r=bt(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=bt(this.dom,r),uu(r),this.__lastTouchMoment=ne
2w Date,this.handler.processGesture(r,"start"),Pt.mousemove.call(this,r),Pt.mousedown.call(this,r)},touchmove:function(r){r=bt(this.dom,r),uu(r),this.handler.processGesture(r,"change"),Pt.mousemove.call(this,r)},touchend:function(r){r=bt(this.dom,r),uu(r),this.handler.processGesture(r,"end"),Pt.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<dw&&Pt.click.call(this,r)},pointerdown:function(r){Pt.mousedown.call(this,r)},pointermove:function(r){Yc(r)||Pt.mousemove.call(this,r)},pointerup:function(r){Pt.mouseup.call(this,r)},pointerout:function(r){Yc(r)||Pt.mouseout.call(this,r)}};A(["click","dblclick","contextmenu"],function(r){Pt[r]=function(e){e=bt(this.dom,e),this.trigger(r,e)}});var Zc={pointermove:function(r){Yc(r)||Zc.mousemove.call(this,r)},pointerup:function(r){Zc.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),e&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function gw(r,e){var t=e.domHandlers;ie.pointerEventsSupported?A(lu.pointer,function(n){ds(e,n,function(i){t[n].call(r,i)})}):(ie.touchEventsSupported&&A(lu.touch,function(n){ds(e,n,function(i){t[n].call(r,i),fw(e)})}),A(lu.mouse,function(n){ds(e,n,function(i){i=ed(i),e.touching||t[n].call(r,i)})}))}function mw(r,e){ie.pointerEventsSupported?A(Bf.pointer,t):ie.touchEventsSupported||A(Bf.mouse,t);function t(n){function i(a){a=ed(a),H0(r,a.target)||(a=vw(r,a),e.domHandlers[n].call(r,a))}ds(e,n,i,{capture:!0})}}function ds(r,e,t,n){r.mounted[e]=t,r.listenerOpts[e]=n,I_(r.domTarget,e,t,n)}function cu(r){var e=r.mounted;for(var t in e)e.hasOwnProperty(t)&&P_(r.domTarget,t,e[t],r.listenerOpts[t]);r.mounted={}}var zf=(function(){function r(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return r})(),yw=(function(r){$(e,r);function e(t,n){var i=r.call(this)||this;return i.__pointerCapturing=!1,i.dom=t,i.painterRoot=n,i._localHandlerScope=new zf(t,Pt),su&&(i._globalHandlerScope=new zf(document,Zc)),gw(i,i._localHandlerScope),i}return e.prototype.dispose=function(){cu(this._localHandlerScope),su&&cu(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,su&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var n=this._globalHandlerScope;t?mw(this,n):cu(n)}},e})(zt),$0=1;ie.hasGlobalWindow&&($0=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Bs=$0,Xc=.4,jc="#333",qc="#ccc",xw="#eee",Ff=td,Vf=5e-5;function sn(r){return r>Vf||r<-Vf}var ln=[],qn=[],hu=mr(),du=Math.abs,id=(function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return sn(this.rotation)||sn(this.x)||sn(this.y)||sn(this.scaleX-1)||sn(this.scaleY-1)||sn(this.skewX)||sn(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(Ff(n),this.invTransform=null);return}n=n||mr(),t?this.getLocalTransform(n):Ff(n),e&&(t?ba(n,e,n):D0(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(ln);var n=ln[0]<0?-1:1,i=ln[1]<0?-1:1,a=((ln[0]-n)*t+n)/ln[0]||0,o=((ln[1]-i)*t+i)/ln[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||mr(),ro(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.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],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);
2n=Math.sqrt(n)*Math.cos(a),t=Math.sqrt(t),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||mr(),ba(qn,e.invTransform,t),t=qn);var n=this.originX,i=this.originY;(n||i)&&(hu[4]=n,hu[5]=i,ba(qn,t,hu),qn[4]-=n,qn[5]-=i,t=qn),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=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)},r.prototype.transformCoordToLocal=function(e,t){var n=[e,t],i=this.invTransform;return i&&At(n,n,i),n},r.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&At(n,n,i),n},r.prototype.getLineScale=function(){var e=this.transform;return e&&du(e[0]-1)>1e-10&&du(e[3]-1)>1e-10?Math.sqrt(du(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){Kc(this,e)},r.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,h=e.y,f=e.skewX?Math.tan(e.skewX):0,v=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var p=n+s,m=i+l;t[4]=-p*a-f*m*o,t[5]=-m*o-v*p*a}else t[4]=t[5]=0;return t[0]=a,t[3]=o,t[1]=v*a,t[2]=f*o,u&&rd(t,t,u),t[4]+=n+c,t[5]+=i+h,t},r.initDefaultProps=(function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0})(),r})(),Ba=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Kc(r,e){for(var t=0;t<Ba.length;t++){var n=Ba[t];r[n]=e[n]}}function Jt(r){yo||(yo=new Di(100)),r=r||Zr;var e=yo.get(r);return e||(e={font:r,strWidthCache:new Di(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:yr.measureText("å½",r).width,asciiCharWidth:yr.measureText("a",r).width},yo.put(r,e)),e}var yo;function bw(r){if(!(fu>=Hf)){r=r||Zr;for(var e=[],t=+new Date,n=0;n<=127;n++)e[n]=yr.measureText(String.fromCharCode(n),r).width;var i=+new Date-t;return i>16?fu=Hf:i>2&&fu++,e}}var fu=0,Hf=5;function G0(r,e){return r.asciiWidthMapTried||(r.asciiWidthMap=bw(r.font),r.asciiWidthMapTried=!0),0<=e&&e<=127?r.asciiWidthMap!=null?r.asciiWidthMap[e]:r.asciiCharWidth:r.stWideCharWidth}function er(r,e){var t=r.strWidthCache,n=t.get(e);return n==null&&(n=yr.measureText(e,r.font).width,t.put(e,n)),n}function $f(r,e,t,n){var i=er(Jt(e),r),a=gl(e),o=Ai(0,i,t),s=Bn(0,a,n),l=new se(o,s,i,a);return l}function W0(r,e,t,n){var i=((r||"")+"").split(` 3`),a=i.length;if(a===1)return $f(i[0],e,t,n);for(var o=new se(0,0,0,0),s=0;s<i.length;s++){var l=$f(i[s],e,t,n);s===0?o.copy(l):o.union(l)}return o}function Ai(r,e,t,n){return t==="right"?n?r+=e:r-=e:t==="center"&&(n?r+=e/2:r-=e/2),r}function Bn(r,e,t,n){return t==="middle"?n?r+=e/2:r-=e/2:t==="bottom"&&(n?r+=e:r-=e),r}function gl(r){return Jt(r).stWideCharWidth}function Xr(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function Ns(r,e,t){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=t.height,o=t.width,s=a/2,l=t.x,u=t.y,c="left",h="top";if(n instanceof Array)l+=Xr(n[0],t.width),u+=Xr(n[1],t.height),c=null,h=null;else switch(n){case"left":l-=i,u+=s,c="right",h="middle";break;case"right":l+=i+o,u+=s,h="middle";break;case"top":l+=o/2,u-=i,c="center",h="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=o-i,u+=s,c="right",h="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,h="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=h,r}var vu="__zr_normal__",pu=Ba.concat(["ignore"]),_w=Ei(Ba,function(r,e){return r[e]=!0,r},{ignore:!1}),Kn={},ww=new se(0,0,0,0),xo=[],ml=(function(){function r(e){this.id=w0(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=t.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(t);var c=n.position!=null,h=n.autoOverflowArea,f=void 0;if((h||c)&&(f=ww,n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect
3()),i||f.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(Kn,n,f):Ns(Kn,n,f),a.x=Kn.x,a.y=Kn.y,o=Kn.align,s=Kn.verticalAlign;var v=n.origin;if(v&&n.rotation!=null){var p=void 0,m=void 0;v==="center"?(p=f.width*.5,m=f.height*.5):(p=Xr(v[0],f.width),m=Xr(v[1],f.height)),u=!0,a.originX=-a.x+p+(i?0:f.x),a.originY=-a.y+m+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var y=n.offset;y&&(a.x+=y[0],a.y+=y[1],u||(a.originX=-y[0],a.originY=-y[1]));var g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(h){var x=g.overflowRect=g.overflowRect||new se(0,0,0,0);a.getLocalTransform(xo),ro(xo,xo),se.copy(x,f),x.applyTransform(xo)}else g.overflowRect=null;var b=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,_=void 0,S=void 0,w=void 0;b&&this.canBeInsideText()?(_=n.insideFill,S=n.insideStroke,(_==null||_==="auto")&&(_=this.getInsideTextFill()),(S==null||S==="auto")&&(S=this.getInsideTextStroke(_),w=!0)):(_=n.outsideFill,S=n.outsideStroke,(_==null||_==="auto")&&(_=this.getOutsideFill()),(S==null||S==="auto")&&(S=this.getOutsideStroke(_),w=!0)),_=_||"#000",(_!==g.fill||S!==g.stroke||w!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=_,g.stroke=S,g.autoStroke=w,g.align=o,g.verticalAlign=s,t.setDefaultTextStyle(g)),t.__dirty|=ht,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?qc:jc},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t=="string"&&Qt(t);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,no(n,"rgba")},r.prototype.traverse=function(e,t){},r.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||{},H(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(Q(e))for(var n=e,i=Ae(n),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,e[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==vu)){var o=i.targetName,s=o?t[o]:t;i.saveTo(s)}}},r.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,pu)},r.prototype._savePrimaryToNormal=function(e,t,n){for(var i=0;i<n.length;i++){var a=n[i];e[a]!=null&&!(a in t)&&(t[a]=this[a])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(vu,!1,e)},r.prototype.useState=function(e,t,n,i){var a=e===vu,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(de(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){Kh("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!n&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,f=this._textGuide;return h&&h.useState(e,t,n,c),f&&f.useState(e,t,n,c),a?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ht),u}}},r.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(e[l]!==a[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=e[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,e)),c||(c=this.states[u]),c&&i.push(c)}var h=i[o-1],f=!!(h&&h.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0);var v=this._mergeStates(i),p=this.stateTransition;this.saveCurrentToNormalState(v),this._applyStateObj(e.join(","),v,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var m=this._textContent,y=this._textGuide;m&&m.useStates(e,t,f),y&&y.useStates(e,t,f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ht)}},r.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},r.prototype.removeState=function(e){var t=de(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},r.prototype.replaceState=function(e,t,n){var i=this.currentStates.slice(),a=de(i,e),o=de(i,t)>=0;a>=0?o?i.splice(a,1):i[a]=t:n&&!o&&i.push(t),this.useStates(i)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},n,i=0;i<e.length;i++){var a=e[i];H(t,a),a.textConfig&&(n=n||{},H(n,a.textConfig))}return n&&(t.textConfig=n),t},r.prototype._applyStateObj=function(e,t,n,i,a,o){var s=!(t&&i);t&&t.textConfig?(this.textConfig=H({},i?this.textConfig:n.textConfig),H(this.textConfig,t.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={}
3,u=!1,c=0;c<pu.length;c++){var h=pu[c],f=a&&_w[h];t&&t[h]!=null?f?(u=!0,l[h]=t[h]):this[h]=t[h]:s&&n[h]!=null&&(f?(u=!0,l[h]=n[h]):this[h]=n[h])}if(!a)for(var c=0;c<this.animators.length;c++){var v=this.animators[c],p=v.targetName;v.getLoop()||v.__changeFinalValue(p?(t||n)[p]:t||n)}u&&this._transitionState(e,l,o)},r.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},r.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},r.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new id,this._attachComponent(e),this._textContent=e,this.markRedraw())},r.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),H(this.textConfig,e),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=ht;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},r.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},r.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},r.prototype.animate=function(e,t,n){var i=e?this[e]:this,a=new nd(i,t,n);return e&&(a.targetName=e),this.addAnimator(a,e),a},r.prototype.addAnimator=function(e,t){var n=this.__zr,i=this;e.during(function(){i.updateDuringAnimation(t)}).done(function(){var a=i.animators,o=de(a,e);o>=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var n=this.animators,i=n.length,a=[],o=0;o<i;o++){var s=n[o];!e||e===s.scope?s.stop(t):a.push(s)}return this.animators=a,this},r.prototype.animateTo=function(e,t,n){gu(this,e,t,n)},r.prototype.animateFrom=function(e,t,n){gu(this,e,t,n,!0)},r.prototype._transitionState=function(e,t,n,i){for(var a=gu(this,t,n,i),o=0;o<a.length;o++)a[o].__fromStateTransition=e},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=(function(){var e=r.prototype;e.type="element",e.name="",e.ignore=e.silent=e.ignoreHostSilent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=ht;function t(n,i,a,o){Object.defineProperty(e,n,{get:function(){if(!this[i]){var l=this[i]=[];s(this,l)}return this[i]},set:function(l){this[a]=l[0],this[o]=l[1],this[i]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[a]},set:function(c){l[a]=c}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(c){l[o]=c}})}}Object.defineProperty&&(t("position","_legacyPos","x","y"),t("scale","_legacyScale","scaleX","scaleY"),t("origin","_legacyOrigin","originX","originY"))})(),r})();ar(ml,zt);ar(ml,id);function gu(r,e,t,n,i){t=t||{};var a=[];U0(r,"",r,e,t,n,a,i);var o=a.length,s=!1,l=t.done,u=t.aborted,c=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},h=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&t.during&&a[0].during(function(p,m){t.during(m)});for(var f=0;f<a.length;f++){var v=a[f];c&&v.done(c),h&&v.aborted(h),t.force&&v.duration(t.duration),v.start(t.easing)}return a}function mu(r,e,t){for(var n=0;n<t;n++)r[n]=e[n]}function Sw(r){return at(r[0])}function Tw(r,e,t){if(at(e[t]))if(at(r[t])||(r[t]=[]),ot(e[t])){var n=e[t].length;r[t].length!==n&&(r[t]=new e[t].constructor(n),mu(r[t],e[t],n))}else{var i=e[t],a=r[t],o=i.length;if(Sw(i))for(var s=i[0].length,l=0;l<o;l++)a[l]?mu(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else mu(a,i,o);a.length=i.length}else r[t]=e[t]}function Cw(r,e){return r===e||at(r)&&at(e)&&Mw(r,e)}function Mw(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++)if(r[n]!==e[n])return!1;return!0}function U0(r,e,t,n,i,a,o,s){for(var l=Ae(n),u=i.duration,c=i.delay,h=i.additive,f=i.setToFinal,v=!Q(a),p=r.animators,m=[],y=0;y<l.length;y++){var g=l[y],x=n[g];if(x!=null&&t[g]!=null&&(v||a[g]))if(Q(x)&&!at(x)&&!vl(x)){if(e){s||
3(t[g]=x,r.updateDuringAnimation(e));continue}U0(r,g,t[g],x,i,a&&a[g],o,s)}else m.push(g);else s||(t[g]=x,r.updateDuringAnimation(e),m.push(g))}var b=m.length;if(!h&&b)for(var _=0;_<p.length;_++){var S=p[_];if(S.targetName===e){var w=S.stopTracks(m);if(w){var T=de(p,S);p.splice(T,1)}}}if(i.force||(m=ze(m,function(C){return!Cw(n[C],t[C])}),b=m.length),b>0||i.force&&!o.length){var D=void 0,L=void 0,M=void 0;if(s){L={},f&&(D={});for(var _=0;_<b;_++){var g=m[_];L[g]=t[g],f?D[g]=n[g]:t[g]=n[g]}}else if(f){M={};for(var _=0;_<b;_++){var g=m[_];M[g]=us(t[g]),Tw(t,n,g)}}var S=new nd(t,!1,!1,h?ze(p,function(I){return I.targetName===e}):null);S.targetName=e,i.scope&&(S.scope=i.scope),f&&D&&S.whenWithKeys(0,D,m),M&&S.whenWithKeys(0,M,m),S.whenWithKeys(u??500,s?L:n,m).delay(c||0),r.addAnimator(S,e),o.push(S)}}var Ee=(function(r){$(e,r);function e(t){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var n=this._children,i=0;i<n.length;i++)if(n[i].name===t)return n[i]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},e.prototype.addBefore=function(t,n){if(t&&t!==this&&t.parent!==this&&n&&n.parent===this){var i=this._children,a=i.indexOf(n);a>=0&&(i.splice(a,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,n){var i=de(this._children,t);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(t,n){var i=this._children,a=i[n];if(t&&t!==this&&t.parent!==this&&t!==a){i[n]=t,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var n=this.__zr;n&&n!==t.__zr&&t.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(t){var n=this.__zr,i=this._children,a=de(i,t);return a<0?this:(i.splice(a,1),t.parent=null,n&&t.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,n=this.__zr,i=0;i<t.length;i++){var a=t[i];n&&a.removeSelfFromZr(n),a.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,n){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];t.call(n,o,a)}return this},e.prototype.traverse=function(t,n){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=t.call(n,a);a.isGroup&&!o&&a.traverse(t,n)}return this},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.removeSelfFromZr(t)}},e.prototype.getBoundingRect=function(t){for(var n=new se(0,0,0,0),i=t||this._children,a=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(a);c?(se.applyTransform(n,u,c),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},e})(ml);Ee.prototype.type="group";var fs={},Y0={};function Dw(r){delete Y0[r]}function Aw(r){if(!r)return!1;if(typeof r=="string")return Os(r,1)<Xc;if(r.colorStops){for(var e=r.colorStops,t=0,n=e.length,i=0;i<n;i++)t+=Os(e[i].color,1);return t/=n,t<Xc}return!1}var Lw=(function(){function r(e,t,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var a=new Z_,o=n.renderer||"canvas";fs[o]||(o=Ae(fs)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new fs[o](t,a,n,e),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!ie.node&&!ie.worker&&!l?new yw(s.getViewportRoot(),s.root):null,c=n.useCoarsePointer,h=c==null||c==="auto"?ie.touchEventsSupported:!!c,f=44,v;h&&(v=te(n.pointerSize,f)),this.handler=new k0(a,s,u,s.root,v),this.animation=new hw({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},r.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())}
3,r.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=Aw(e))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(e){this._darkMode=e},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(e){var t,n=xi();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var i=xi();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Ee&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,Dw(this.id))},r})();function Gf(r,e){var t=new Lw(w0(),r,e);return Y0[t.id]=t,t}function kw(r,e){fs[r]=e}var Wf=1e-4,Z0=20;function Iw(r){return r.replace(/^\s+|\s+$/g,"")}var Na=Math.min,dt=Math.max,qt=Math.abs;function Ne(r,e,t,n){var i=e[0],a=e[1],o=t[0],s=t[1],l=a-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(r<=i)return o;if(r>=a)return s}else{if(r>=i)return o;if(r<=a)return s}else{if(r===i)return o;if(r===a)return s}return(r-i)/l*u+o}var He=Pw;function Pw(r,e,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Qc(r,e,t)}function Qc(r,e,t){return K(r)?Iw(r).match(/%$/)?parseFloat(r)/100*e+(t||0):parseFloat(r):r==null?NaN:+r}function $e(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),Z0),r=(+r).toFixed(e),t?r:+r}function va(r){return r.sort(function(e,t){return e-t}),r}function vr(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return Rw(r)}function Rw(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),n=t>0?+e.slice(t+1):0,i=t>0?t:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function X0(r,e){var t=Math.log,n=Math.LN10,i=Math.floor(t(r[1]-r[0])/n),a=Math.round(t(qt(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function Ew(r,e){var t=Math.max(vr(r),vr(e)),n=r+e;return t>Z0?n:$e(n,t)}function j0(r){var e=Math.PI*2;return(r%e+e)%e}function zs(r){return r>-Wf&&r<Wf}var Ow=/^(?:(\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 Bi(r){if(r instanceof Date)return r;if(K(r)){var e=Ow.exec(r);if(!e)return new Date(NaN);if(e[8]){var t=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function Bw(r){return Math.pow(10,ad(r))}function ad(r){if(r===0)return 0;var e=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,e)>=10&&e++,e}function q0(r,e){var t=ad(r),n=Math.pow(10,t),i=r/n,a;return i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10,r=a*n,t>=-20?+r.toFixed(t<0?-t:0):r}function Fs(r){var e=parseFloat(r);return e==r&&(e!==0||!K(r)||r.indexOf("x")<=0)?e:NaN}function Nw(r){return!isNaN(Fs(r))}function K0(){return Math.round(Math.random()*9)}function Q0(r,e){return e===0?r:Q0(e,r%e)}function Uf(r,e){return r==null?e:e==null?r:r*e/Q0(r,e)}var zw="[ECharts] ",Fw=typeof console<"u"&&console.warn&&console.log;function Vw(r,e,t){Fw&&console[r](zw+e)}function J0(r,e){Vw("error",r)}function nt(r){throw new Error(r)}function Yf(r,e,t){return(e-r)*t+r}var em="series\0",Hw="\0_ec_\0";function Qe(r){return r instanceof Array?r:r==null?[]:[r]}function Zf(r,e,t){if(r){r[e]=r[e]||{},r.emphasis=r.emphasis||{},r.emphasis[e]=r.emphasis[e]||{};for(var n=0,i=t.length;n<i;n++){var a=t[n];!r.emphasis[e].hasOwnProperty(a)&&r[e].hasOwnProperty(a)&&(r.emphasis[e][a]=r[e][a])}}}var Xf=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function io(r){return Q(r)&&!X(r)&&!(r instanceof Date)?r.value:r}function $w(r){return Q(r)&&!(r instanceof Array)}function Gw(r,e,t){var n=t==="normalMerge",i=t==="replaceMerge",a=t==="replaceAll";r=r||[],e=(e||[]).slice();var o=re();A(e,function(l,u){if(!Q(l)){e[u]=null;return}});var s=Ww(r,o,t);return(n||i)&&Uw(s,r,o,e),n&&Yw(s,e),n||i?Zw(s,e,i):a&&Xw(s,e),jw(s),s}function Ww(r,e,t){var n=[];if(t==="replaceAll")return n;for(var i=0;i<r.length;i++){var a=r[i];a&&a.id!=null&&e.set(a.id,i),n.push({existing:t==="replaceMerge"||za(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function Uw(r,e,t,n){A(n,function(i,a){if(!(!i||i.id==null)){var o=Sa(i.id
3),s=t.get(o);if(s!=null){var l=r[s];xr(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=e[s],n[a]=null}}})}function Yw(r,e){A(e,function(t,n){if(!(!t||t.name==null))for(var i=0;i<r.length;i++){var a=r[i].existing;if(!r[i].newOption&&a&&(a.id==null||t.id==null)&&!za(t)&&!za(a)&&tm("name",a,t)){r[i].newOption=t,e[n]=null;return}}})}function Zw(r,e,t){A(e,function(n){if(n){for(var i,a=0;(i=r[a])&&(i.newOption||za(i.existing)||i.existing&&n.id!=null&&!tm("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=t):r.push({newOption:n,brandNew:t,existing:null,keyInfo:null}),a++}})}function Xw(r,e){A(e,function(t){r.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function jw(r){var e=re();A(r,function(t){var n=t.existing;n&&e.set(n.id,t)}),A(r,function(t){var n=t.newOption;xr(!n||n.id==null||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),A(r,function(t,n){var i=t.existing,a=t.newOption,o=t.keyInfo;if(Q(a)){if(o.name=a.name!=null?Sa(a.name):i?i.name:em+n,i)o.id=Sa(i.id);else if(a.id!=null)o.id=Sa(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,t)}})}function tm(r,e,t){var n=tr(e[r],null),i=tr(t[r],null);return n!=null&&i!=null&&n===i}function Sa(r){return tr(r,"")}function tr(r,e){return r==null?e:K(r)?r:Se(r)||kc(r)?r+"":e}function od(r){var e=r.name;return!!(e&&e.indexOf(em))}function za(r){return r&&r.id!=null&&Sa(r.id).indexOf(Hw)===0}function qw(r,e,t){A(r,function(n){var i=n.newOption;Q(i)&&(n.keyInfo.mainType=e,n.keyInfo.subType=Kw(e,i,n.existing,t))})}function Kw(r,e,t,n){var i=e.type?e.type:t?t.subType:n.determineSubType(r,e);return i}function Hn(r,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return X(e.dataIndex)?J(e.dataIndex,function(t){return r.indexOfRawIndex(t)}):r.indexOfRawIndex(e.dataIndex);if(e.name!=null)return X(e.name)?J(e.name,function(t){return r.indexOfName(t)}):r.indexOfName(e.name)}function Me(){var r="__ec_inner_"+Qw++;return function(e){return e[r]||(e[r]={})}}var Qw=K0();function yu(r,e,t){var n=sd(e,t),i=n.mainTypeSpecified,a=n.queryOptionMap,o=n.others,s=o,l=t?t.defaultMainType:null;return!i&&l&&a.set(l,{}),a.each(function(u,c){var h=ao(r,c,u,{useDefault:l===c,enableAll:t&&t.enableAll!=null?t.enableAll:!0,enableNone:t&&t.enableNone!=null?t.enableNone:!0});s[c+"Models"]=h.models,s[c+"Model"]=h.models[0]}),s}function sd(r,e){var t;if(K(r)){var n={};n[r+"Index"]=0,t=n}else t=r;var i=re(),a={},o=!1;return A(t,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],h=(u[2]||"").toLowerCase();if(!(!c||!h||e&&e.includeMainTypes&&de(e.includeMainTypes,c)<0)){o=o||!!c;var f=i.get(c)||i.set(c,{});f[h]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var qe={useDefault:!0,enableAll:!1,enableNone:!1},Jw={useDefault:!1,enableAll:!0,enableNone:!0};function ao(r,e,t,n){n=n||qe;var i=t.index,a=t.id,o=t.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=r.getComponent(e))?[l]:[],s}if(i==="none"||i===!1){if(n.enableNone)return s.models=[],s;i=-1}return i==="all"&&(n.enableAll?i=a=o=null:i=-1),s.models=r.queryComponents({mainType:e,index:i,id:a,name:o}),s}function rm(r,e,t){r.setAttribute?r.setAttribute(e,t):r[e]=t}function e1(r,e){return r.getAttribute?r.getAttribute(e):r[e]}function t1(r){return r==="auto"?ie.domSupported?"html":"richText":r||"html"}function r1(r,e,t,n,i){var a=e==null||e==="auto";if(n==null)return n;if(Se(n)){var o=Yf(t||0,n,i);return $e(o,a?Math.max(vr(t||0),vr(n)):e)}else{if(K(n))return i<1?t:n;for(var s=[],l=t,u=n,c=Math.max(l?l.length:0,u.length),h=0;h<c;++h){var f=r.getDimensionInfo(h);if(f&&f.type==="ordinal")s[h]=(i<1&&l?l:u)[h];else{var v=l&&l[h]?l[h]:0,p=u[h],o=Yf(v,p,i);s[h]=$e(o,a?Math.max(vr(v),vr(p)):e)}}return s}}var n1=".",un="___EC__COMPONENT__CONTAINER___",nm="___EC__EXTENDED_CLASS___";function Kt(r){var e={main:"",sub:""};if(r){var t=r.split(n1);e.main=t[0]||"",e.sub=t[1]||""}return e}function i1(r){xr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function a1(r){return!!(r&&r[nm])}function ld(r,e){r.$constructor=r,r.extend=function(t){var n=this,i;return o1(n)?i=(function(a){$(o,a);function o(){return a.apply(this,arguments)||this}return o}
3)(n):(i=function(){(t.$constructor||n).apply(this,arguments)},i_(i,this)),H(i.prototype,t),i[nm]=!0,i.extend=this.extend,i.superCall=u1,i.superApply=c1,i.superClass=n,i}}function o1(r){return ne(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function im(r,e){r.extend=e.extend}var s1=Math.round(Math.random()*10);function l1(r){var e=["__\0is_clz",s1++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function u1(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return this.superClass.prototype[e].apply(r,t)}function c1(r,e,t){return this.superClass.prototype[e].apply(r,t)}function yl(r){var e={};r.registerClass=function(n){var i=n.type||n.prototype.type;if(i){i1(i),n.prototype.type=i;var a=Kt(i);if(!a.sub)e[a.main]=n;else if(a.sub!==un){var o=t(a);o[a.sub]=n}}return n},r.getClass=function(n,i,a){var o=e[n];if(o&&o[un]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+n+"."+(i||"")+" is used but not imported.":n+".type should be specified.");return o},r.getClassesByMainType=function(n){var i=Kt(n),a=[],o=e[i.main];return o&&o[un]?A(o,function(s,l){l!==un&&a.push(s)}):a.push(o),a},r.hasClass=function(n){var i=Kt(n);return!!e[i.main]},r.getAllClassMainTypes=function(){var n=[];return A(e,function(i,a){n.push(a)}),n},r.hasSubTypes=function(n){var i=Kt(n),a=e[i.main];return a&&a[un]};function t(n){var i=e[n.main];return(!i||!i[un])&&(i=e[n.main]={},i[un]=!0),i}}function Fa(r,e){for(var t=0;t<r.length;t++)r[t][1]||(r[t][1]=r[t][0]);return e=e||!1,function(n,i,a){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(i&&de(i,l)>=0||a&&de(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var h1=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],d1=Fa(h1),f1=(function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return d1(this,e,t)},r})(),Jc=new Di(50);function v1(r){if(typeof r=="string"){var e=Jc.get(r);return e&&e.image}else return r}function am(r,e,t,n,i){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var a=Jc.get(r),o={hostEl:t,cb:n,cbPayload:i};return a?(e=a.image,!xl(e)&&a.pending.push(o)):(e=yr.loadImage(r,jf,jf),e.__zrImageSrc=r,Jc.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function jf(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<r.pending.length;e++){var t=r.pending[e],n=t.cb;n&&n(this,t.cbPayload),t.hostEl.dirty()}r.pending.length=0}function xl(r){return r&&r.width&&r.height}var xu=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function p1(r,e,t,n,i,a){if(!t){r.text="",r.isTruncated=!1;return}var o=(e+"").split(` 4`);a=om(t,n,i,a);for(var s=!1,l={},u=0,c=o.length;u<c;u++)sm(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(` 5`),r.isTruncated=s}function om(r,e,t,n){n=n||{};var i=H({},n);t=te(t,"..."),i.maxIterations=te(n.maxIterations,2);var a=i.minChar=te(n.minChar,0),o=i.fontMeasureInfo=Jt(e),s=o.asciiCharWidth;i.placeholder=te(n.placeholder,"");for(var l=r=Math.max(0,r-1),u=0;u<a&&l>=s;u++)l-=s;var c=er(o,t);return c>l&&(t="",c=0),l=r-c,i.ellipsis=t,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=r,i}function sm(r,e,t){var n=t.containerWidth,i=t.contentWidth,a=t.fontMeasureInfo;if(!n){r.textLine="",r.isTruncated=!1;return}var o=er(a,e);if(o<=n){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?g1(e,i,a):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=er(a,e)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function g1(r,e,t){for(var n=0,i=0,a=r.length;i<a&&n<e;i++)n+=G0(t,r.charCodeAt(i));return i}function m1(r,e,t,n){var i=ud(r),a=e.overflow,o=e.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=e.font,c=a==="truncate",h=gl(u),f=te(e.lineHeight,h),v=e.lineOverflow==="truncate",p=!1,m=e.width;m==null&&t!=null&&(m=t-s);var y=e.height;y==null&&n!=null&&(y=n-l);var g;m!=null&&(a==="break"||a==="breakAll")?g=i?lm(i,e.font,m,a==="breakAll",0).lines:[]:g=i?i.split(` 6`):[];var x=g.length*f;if(y==null&&(y=x),x>y&&v){var b=Math.floor(y/f);p=p||g.length>b,g=g.slice(0,b),x=g.length*f}if(i&&c&&m!=null)for(var _=om(m,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),S={},w=0;w<g.length;w++)sm(S,g[w],_),g[w]=S.textLine,p=p||S.isTruncated;for(var T=y,D=0,L=Jt(u),w=0;w<g.length;
6w++)D=Math.max(er(L,g[w]),D);m==null&&(m=D);var M=m;return T+=l,M+=s,{lines:g,height:y,outerWidth:M,outerHeight:T,lineHeight:f,calculatedLineHeight:h,contentWidth:D,contentHeight:x,width:m,isTruncated:p}}var y1=(function(){function r(){}return r})(),qf=(function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r})(),x1=(function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r})();function b1(r,e,t,n,i){var a=new x1,o=ud(r);if(!o)return a;var s=e.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,c=e.width;c==null&&t!=null&&(c=t-l);var h=e.height;h==null&&n!=null&&(h=n-u);for(var f=e.overflow,v=(f==="break"||f==="breakAll")&&c!=null?{width:c,accumWidth:0,breakAll:f==="breakAll"}:null,p=xu.lastIndex=0,m;(m=xu.exec(o))!=null;){var y=m.index;y>p&&bu(a,o.substring(p,y),e,v),bu(a,m[2],e,v,m[1]),p=xu.lastIndex}p<o.length&&bu(a,o.substring(p,o.length),e,v);var g=[],x=0,b=0,_=f==="truncate",S=e.lineOverflow==="truncate",w={};function T(F,_e,st){F.width=_e,F.lineHeight=st,x+=st,b=Math.max(b,_e)}e:for(var D=0;D<a.lines.length;D++){for(var L=a.lines[D],M=0,C=0,I=0;I<L.tokens.length;I++){var k=L.tokens[I],R=k.styleName&&e.rich[k.styleName]||{},O=k.textPadding=R.padding,z=O?O[1]+O[3]:0,P=k.font=R.font||e.font;k.contentHeight=gl(P);var B=te(R.height,k.contentHeight);if(k.innerHeight=B,O&&(B+=O[0]+O[2]),k.height=B,k.lineHeight=wi(R.lineHeight,e.lineHeight,B),k.align=R&&R.align||i,k.verticalAlign=R&&R.verticalAlign||"middle",S&&h!=null&&x+k.lineHeight>h){var V=a.lines.length;I>0?(L.tokens=L.tokens.slice(0,I),T(L,C,M),a.lines=a.lines.slice(0,D+1)):a.lines=a.lines.slice(0,D),a.isTruncated=a.isTruncated||a.lines.length<V;break e}var U=R.width,Y=U==null||U==="auto";if(typeof U=="string"&&U.charAt(U.length-1)==="%")k.percentWidth=U,g.push(k),k.contentWidth=er(Jt(P),k.text);else{if(Y){var N=R.backgroundColor,G=N&&N.image;G&&(G=v1(G),xl(G)&&(k.width=Math.max(k.width,G.width*B/G.height)))}var oe=_&&c!=null?c-C:null;oe!=null&&oe<k.width?!Y||oe<z?(k.text="",k.width=k.contentWidth=0):(p1(w,k.text,oe-z,P,e.ellipsis,{minChar:e.truncateMinChar}),k.text=w.text,a.isTruncated=a.isTruncated||w.isTruncated,k.width=k.contentWidth=er(Jt(P),k.text)):k.contentWidth=er(Jt(P),k.text)}k.width+=z,C+=k.width,R&&(M=Math.max(M,k.lineHeight))}T(L,C,M)}a.outerWidth=a.width=te(c,b),a.outerHeight=a.height=te(h,x),a.contentHeight=x,a.contentWidth=b,a.outerWidth+=l,a.outerHeight+=u;for(var D=0;D<g.length;D++){var k=g[D],xe=k.percentWidth;k.width=parseInt(xe,10)/100*a.width}return a}function bu(r,e,t,n,i){var a=e==="",o=i&&t.rich[i]||{},s=r.lines,l=o.font||t.font,u=!1,c,h;if(n){var f=o.padding,v=f?f[1]+f[3]:0;if(o.width!=null&&o.width!=="auto"){var p=Xr(o.width,n.width)+v;s.length>0&&p+n.accumWidth>n.width&&(c=e.split(` 7`),u=!0),n.accumWidth=p}else{var m=lm(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=m.accumWidth+v,h=m.linesWidths,c=m.lines}}c||(c=e.split(` 8`));for(var y=Jt(l),g=0;g<c.length;g++){var x=c[g],b=new y1;if(b.styleName=i,b.text=x,b.isLineHolder=!x&&!a,typeof o.width=="number"?b.width=o.width:b.width=h?h[g]:er(y,x),!g&&!u){var _=(s[s.length-1]||(s[0]=new qf)).tokens,S=_.length;S===1&&_[0].isLineHolder?_[0]=b:(x||!S||a)&&_.push(b)}else s.push(new qf([b]))}}function _1(r){var e=r.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var w1=Ei(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function S1(r){return _1(r)?!!w1[r]:!0}function lm(r,e,t,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,h=Jt(e),f=0;f<r.length;f++){var v=r.charAt(f);if(v===` 9`){l&&(s+=l,c+=u),a.push(s),o.push(c),s="",l="",u=0,c=0;continue}var p=G0(h,v.charCodeAt(0)),m=n?!1:!S1(v);if(a.length?c+p>t:i+c+p>t){c?(s||l)&&(m?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=v,u+=p,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=v,c=p)):m?(a.push(l),o.push(u),l=v,u=p):(a.push(v),o.push(p));continue}c+=p,m?(l+=v,u+=p):(l&&(s+=l,l="",u=0),s+=v)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}function Kf(r,e,t,n,i,a){if(r.baseX=t,r.baseY=n,r.outerWidth=r.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;se.set(Qf,Ai(t,o,i),Bn(n,s,a),o,s),se.intersect(e,Qf,null,Jf);var l=Jf.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=Ai(l.x,l.width,i,!0),r.baseY=Bn(l.y,l.height,a,!0)}}var Qf=new se(0,0,0,0),Jf={outIntersectRect:{},clamp:!0};function ud(r){return r!=null?r+="":r=""}function T1(r){var e=ud(r.text),t=r.font,n=er(Jt(t),e),i=gl(t);return eh(r,n,i,null)}function eh(r,e,t,n){var i=new se(Ai(r.x||0,e,r.textAlign),Bn(r.y||0,t,r.textBaseline),e,t),a=n??(um(r)?r.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function um(r){var e=r.stroke;return e!=null&&e!=="none"&&r.lineWidth>0}var th="__zr_style_"+Math.round(Math.random()*10),Nn={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},bl={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Nn[th]=!0;var ev=["z","z2","invisible"],C1=["invisible"],oo=(function(r){$(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var n=Ae(t),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(t[a]):r.prototype.attrKV.call(this,a,t[a])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&M1(this,t,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(t,n){return this.rectContain(t,n)},e.prototype.traverse=function(t,n){t.call(n,this)},e.prototype.rectContain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect
9();return a.contain(i[0],i[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new se(0,0,0,0)),n?se.applyTransform(t,i,n):t.copy(i),(o||s||l)&&(t.width+=o*2+Math.abs(s),t.height+=o*2+Math.abs(l),t.x=Math.min(t.x,t.x+s-o),t.y=Math.min(t.y,t.y+l-o));var u=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-u),t.y=Math.floor(t.y-u),t.width=Math.ceil(t.width+1+u*2),t.height=Math.ceil(t.height+1+u*2))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new se(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(t,n){t!=="style"?r.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(t,n){return typeof t=="string"?this.style[t]=n:H(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=da,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&da)},e.prototype.styleUpdated=function(){this.__dirty&=~da},e.prototype.createStyle=function(t){return pl(Nn,t)},e.prototype.useStyle=function(t){t[th]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[th]},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,ev)},e.prototype._applyStateObj=function(t,n,i,a,o,s){r.prototype._applyStateObj.call(this,t,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.style?o?a?u=n.style:(u=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(u,n.style)):l&&(u=i.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var h=Ae(c),f=0;f<h.length;f++){var v=h[f];v in u&&(u[v]=u[v],this.style[v]=c[v])}for(var p=Ae(u),f=0;f<p.length;f++){var v=p[f];this.style[v]=this.style[v]}this._transitionState(t,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var m=this.__inHover?C1:ev,f=0;f<m.length;f++){var v=m[f];n&&n[v]!=null?this[v]=n[v]:l&&i[v]!=null&&(this[v]=i[v])}},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),i,a=0;a<t.length;a++){var o=t[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},e.prototype._mergeStyle=function(t,n){return H(t,n),t},e.prototype.getAnimationStyleProps=function(){return bl},e.initDefaultProps=(function(){var t=e.prototype;t.type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=ht|da})(),e})(ml),_u=new se(0,0,0,0),wu=new se(0,0,0,0);function M1(r,e,t){return _u.copy(r.getBoundingRect()),r.transform&&_u.applyTransform(r.transform),wu.width=e,wu.height=t,!_u.intersect(wu)}var Tt=Math.min,Ct=Math.max,Su=Math.sin,Tu=Math.cos,cn=Math.PI*2,bo=Oi(),_o=Oi(),wo=Oi();function tv(r,e,t,n,i,a){i[0]=Tt(r,t),i[1]=Tt(e,n),a[0]=Ct(r,t),a[1]=Ct(e,n)}var rv=[],nv=[];function D1(r,e,t,n,i,a,o,s,l,u){var c=O0,h=Ve,f=c(r,t,i,o,rv);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var v=0;v<f;v++){var p=h(r,t,i,o,rv[v]);l[0]=Tt(p,l[0]),u[0]=Ct(p,u[0])}f=c(e,n,a,s,nv);for(var v=0;v<f;v++){var m=h(e,n,a,s,nv[v]);l[1]=Tt(m,l[1]),u[1]=Ct(m,u[1])}l[0]=Tt(r,l[0]),u[0]=Ct(r,u[0]),l[0]=Tt(o,l[0]),u[0]=Ct(o,u[0]),l[1]=Tt(e,l[1]),u[1]=Ct(e,u[1]),l[1]=Tt(s,l[1]),u[1]=Ct(s,u[1])}function A1(r,e,t,n,i,a,o,s){var l=B0,u=rt,c=Ct(Tt(l(r,t,i),1),0),h=Ct(Tt(l(e,n,a),1),0),f=u(r,t,i,c),v=u(e,n,a,h);o[0]=Tt(r,i,f),o[1]=Tt(e,a,v),s[0]=Ct(r,i,f),s[1]=Ct(e,a,v)}function L1(r,e,t,n,i,a,o,s,l){var u=gi,c=mi,h=Math.abs(i-a);if(h%cn<1e-4&&h>1e-4){s[0]=r-t,s[1]=e-n,l[0]=r+t,l[1]=e+n;return}if(bo[0]=Tu(i)*t+r,bo[1]=Su(i)*n+e,_o[0]=Tu(a)*t+r,_o[1]=Su(a)*n+e,u(s,bo,_o),c(l,bo,_o),i=i%cn,i<0&&(i=i+cn),a=a%cn,a<0&&(a=a+cn),i>a&&!o?a+=cn:i<a&&o&&(i+=cn),o){var f=a;a=i,i=f}for(var v=0;v<a;v+=Math.PI/2)v>i&&(wo[0]=Tu(v)*t+r,wo[1]=Su(v)*n+e,u(s,wo,s),c(l,wo,l))}var pe={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},hn=[],dn=[],Ht=[],wr=[],$t=[],Gt=[],Cu=Math.min,Mu=Math.max,fn=Math.cos,vn=Math.sin,sr=Math.abs,rh=Math.PI,Er=rh*2,Du=typeof Float32Array<"u",$i=[];function Au(r){var e=Math.round(r/rh*1e8)/1e8;return e%2*rh}function k1(r,e){var t=Au(r[0]);t<0&&(t+=Er);var n=t-r[0],i=r[1];i+=n,!e&&i-t>=Er?i=t+Er:e&&t-i>=Er?i=t-Er:!e&&t>i?i=t+(Er-Au(t-i)):e&&t<i&&(i=t-(Er-Au(i-t))),r[0]=t,r[1]=i}var $n=(function(){function r(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(e,t,n){n=n||0,n>0&&(this._ux=sr(n/Bs/e)||0,this._uy=sr(n/Bs/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(pe.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var n=sr(e-this._xi),i=sr(t-this._yi),a=n>this._ux||i>this._uy;if(this.addData(pe.L,e,t),this._ctx&&a&&this._ctx.lineTo(e,t),a)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+i*i;o>
9this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,n,i,a,o){return this._drawPendingPt(),this.addData(pe.C,e,t,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,i,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,n,i){return this._drawPendingPt(),this.addData(pe.Q,e,t,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,i),this._xi=n,this._yi=i,this},r.prototype.arc=function(e,t,n,i,a,o){this._drawPendingPt(),$i[0]=i,$i[1]=a,k1($i,o),i=$i[0],a=$i[1];var s=a-i;return this.addData(pe.A,e,t,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,i,a,o),this._xi=fn(a)*n+e,this._yi=vn(a)*n+t,this},r.prototype.arcTo=function(e,t,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,i,a),this},r.prototype.rect=function(e,t,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,i),this.addData(pe.R,e,t,n,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(pe.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Du&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},r.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,n=0,i=this._len,a=0;a<t;a++)n+=e[a].len();var o=this.data;if(Du&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(i+n),i>0&&o))for(var s=0;s<i;s++)this.data[s]=o[s];for(var a=0;a<t;a++)for(var l=e[a].data,s=0;s<l.length;s++)this.data[i++]=l[s];this._len=i}},r.prototype.addData=function(e,t,n,i,a,o,s,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var h=0;h<arguments.length;h++)c[this._len++]=arguments[h]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,Du&&this._len>11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Ht[0]=Ht[1]=$t[0]=$t[1]=Number.MAX_VALUE,wr[0]=wr[1]=Gt[0]=Gt[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=e[o++],l=o===1;switch(l&&(t=e[o],n=e[o+1],i=t,a=n),s){case pe.M:t=i=e[o++],n=a=e[o++],$t[0]=i,$t[1]=a,Gt[0]=i,Gt[1]=a;break;case pe.L:tv(t,n,e[o],e[o+1],$t,Gt),t=e[o++],n=e[o++];break;case pe.C:D1(t,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],$t,Gt),t=e[o++],n=e[o++];break;case pe.Q:A1(t,n,e[o++],e[o++],e[o],e[o+1],$t,Gt),t=e[o++],n=e[o++];break;case pe.A:var u=e[o++],c=e[o++],h=e[o++],f=e[o++],v=e[o++],p=e[o++]+v;o+=1;var m=!e[o++];l&&(i=fn(v)*h+u,a=vn(v)*f+c),L1(u,c,h,f,v,p,m,$t,Gt),t=fn(p)*h+u,n=vn(p)*f+c;break;case pe.R:i=t=e[o++],a=n=e[o++];var y=e[o++],g=e[o++];tv(i,a,i+y,a+g,$t,Gt);break;case pe.Z:t=i,n=a;break}gi(Ht,Ht,$t),mi(wr,wr,Gt)}return o===0&&(Ht[0]=Ht[1]=wr[0]=wr[1]=0),new se(Ht[0],Ht[1],wr[0]-Ht[0],wr[1]-Ht[1])},r.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,i=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,h=0,f=0;f<t;){var v=e[f++],p=f===1;p&&(a=e[f],o=e[f+1],s=a,l=o);var m=-1;switch(v){case pe.M:a=s=e[f++],o=l=e[f++];break;case pe.L:{var y=e[f++],g=e[f++],x=y-a,b=g-o;(sr(x)>n||sr(b)>i||f===t-1)&&(m=Math.sqrt(x*x+b*b),a=y,o=g);break}case pe.C:{var _=e[f++],S=e[f++],y=e[f++],g=e[f++],w=e[f++],T=e[f++];m=j_(a,o,_,S,y,g,w,T,10),a=w,o=T;break}case pe.Q:{var _=e[f++],S=e[f++],y=e[f++],g=e[f++];m=Q_(a,o,_,S,y,g,10),a=y,o=g;break}case pe.A:var D=e[f++],L=e[f++],M=e[f++],C=e[f++],I=e[f++],k=e[f++],R=k+I;
9f+=1,p&&(s=fn(I)*M+D,l=vn(I)*C+L),m=Mu(M,C)*Cu(Er,Math.abs(k)),a=fn(R)*M+D,o=vn(R)*C+L;break;case pe.R:{s=a=e[f++],l=o=e[f++];var O=e[f++],z=e[f++];m=O*2+z*2;break}case pe.Z:{var x=s-a,b=l-o;m=Math.sqrt(x*x+b*b),a=s,o=l;break}}m>=0&&(u[h++]=m,c+=m)}return this._pathLen=c,c},r.prototype.rebuildPath=function(e,t){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,h,f,v=t<1,p,m,y=0,g=0,x,b=0,_,S;if(!(v&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,x=t*m,!x)))e:for(var w=0;w<o;){var T=n[w++],D=w===1;switch(D&&(u=n[w],c=n[w+1],s=u,l=c),T!==pe.L&&b>0&&(e.lineTo(_,S),b=0),T){case pe.M:s=u=n[w++],l=c=n[w++],e.moveTo(u,c);break;case pe.L:{h=n[w++],f=n[w++];var L=sr(h-u),M=sr(f-c);if(L>i||M>a){if(v){var C=p[g++];if(y+C>x){var I=(x-y)/C;e.lineTo(u*(1-I)+h*I,c*(1-I)+f*I);break e}y+=C}e.lineTo(h,f),u=h,c=f,b=0}else{var k=L*L+M*M;k>b&&(_=h,S=f,b=k)}break}case pe.C:{var R=n[w++],O=n[w++],z=n[w++],P=n[w++],B=n[w++],V=n[w++];if(v){var C=p[g++];if(y+C>x){var I=(x-y)/C;Rs(u,R,z,B,I,hn),Rs(c,O,P,V,I,dn),e.bezierCurveTo(hn[1],dn[1],hn[2],dn[2],hn[3],dn[3]);break e}y+=C}e.bezierCurveTo(R,O,z,P,B,V),u=B,c=V;break}case pe.Q:{var R=n[w++],O=n[w++],z=n[w++],P=n[w++];if(v){var C=p[g++];if(y+C>x){var I=(x-y)/C;Es(u,R,z,I,hn),Es(c,O,P,I,dn),e.quadraticCurveTo(hn[1],dn[1],hn[2],dn[2]);break e}y+=C}e.quadraticCurveTo(R,O,z,P),u=z,c=P;break}case pe.A:var U=n[w++],Y=n[w++],N=n[w++],G=n[w++],oe=n[w++],xe=n[w++],F=n[w++],_e=!n[w++],st=N>G?N:G,lt=sr(N-G)>.001,Fe=oe+xe,ae=!1;if(v){var C=p[g++];y+C>x&&(Fe=oe+xe*(x-y)/C,ae=!0),y+=C}if(lt&&e.ellipse?e.ellipse(U,Y,N,G,F,oe,Fe,_e):e.arc(U,Y,st,oe,Fe,_e),ae)break e;D&&(s=fn(oe)*N+U,l=vn(oe)*G+Y),u=fn(Fe)*N+U,c=vn(Fe)*G+Y;break;case pe.R:s=u=n[w],l=c=n[w+1],h=n[w++],f=n[w++];var ce=n[w++],tn=n[w++];if(v){var C=p[g++];if(y+C>x){var Ye=x-y;e.moveTo(h,f),e.lineTo(h+Cu(Ye,ce),f),Ye-=ce,Ye>0&&e.lineTo(h+ce,f+Cu(Ye,tn)),Ye-=tn,Ye>0&&e.lineTo(h+Mu(ce-Ye,0),f+tn),Ye-=ce,Ye>0&&e.lineTo(h,f+Mu(tn-Ye,0));break e}y+=C}e.rect(h,f,ce,tn);break;case pe.Z:if(v){var C=p[g++];if(y+C>x){var I=(x-y)/C;e.lineTo(u*(1-I)+s*I,c*(1-I)+l*I);break e}y+=C}e.closePath(),u=s,c=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.prototype.canSave=function(){return!!this._saveData},r.CMD=pe,r.initDefaultProps=(function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0})(),r})();function Qn(r,e,t,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=r;if(o>e+s&&o>n+s||o<e-s&&o<n-s||a>r+s&&a>t+s||a<r-s&&a<t-s)return!1;if(r!==t)l=(e-n)/(r-t),u=(r*n-t*e)/(r-t);else return Math.abs(a-r)<=s/2;var c=l*a-o+u,h=c*c/(l*l+1);return h<=s/2*s/2}function I1(r,e,t,n,i,a,o,s,l,u,c){if(l===0)return!1;var h=l;if(c>e+h&&c>n+h&&c>a+h&&c>s+h||c<e-h&&c<n-h&&c<a-h&&c<s-h||u>r+h&&u>t+h&&u>i+h&&u>
9o+h||u<r-h&&u<t-h&&u<i-h&&u<o-h)return!1;var f=X_(r,e,t,n,i,a,o,s,u,c);return f<=h/2}function P1(r,e,t,n,i,a,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>n+u&&l>a+u||l<e-u&&l<n-u&&l<a-u||s>r+u&&s>t+u&&s>i+u||s<r-u&&s<t-u&&s<i-u)return!1;var c=K_(r,e,t,n,i,a,s,l);return c<=u/2}var iv=Math.PI*2;function So(r){return r%=iv,r<0&&(r+=iv),r}var Gi=Math.PI*2;function R1(r,e,t,n,i,a,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>t||c+u<t)return!1;if(Math.abs(n-i)%Gi<1e-4)return!0;if(a){var h=n;n=So(i),i=So(h)}else n=So(n),i=So(i);n>i&&(i+=Gi);var f=Math.atan2(l,s);return f<0&&(f+=Gi),f>=n&&f<=i||f+Gi>=n&&f+Gi<=i}function pn(r,e,t,n,i,a){if(a>e&&a>n||a<e&&a<n||n===e)return 0;var o=(a-e)/(n-e),s=n<e?1:-1;(o===1||o===0)&&(s=n<e?.5:-.5);var l=o*(t-r)+r;return l===i?1/0:l>i?s:0}var Sr=$n.CMD,gn=Math.PI*2,E1=1e-4;function O1(r,e){return Math.abs(r-e)<E1}var Xe=[-1,-1,-1],wt=[-1,-1];function B1(){var r=wt[0];wt[0]=wt[1],wt[1]=r}function N1(r,e,t,n,i,a,o,s,l,u){if(u>e&&u>n&&u>a&&u>s||u<e&&u<n&&u<a&&u<s)return 0;var c=Ps(e,n,a,s,u,Xe);if(c===0)return 0;for(var h=0,f=-1,v=void 0,p=void 0,m=0;m<c;m++){var y=Xe[m],g=y===0||y===1?.5:1,x=Ve(r,t,i,o,y);x<l||(f<0&&(f=O0(e,n,a,s,wt),wt[1]<wt[0]&&f>1&&B1(),v=Ve(e,n,a,s,wt[0]),f>1&&(p=Ve(e,n,a,s,wt[1]))),f===2?y<wt[0]?h+=v<e?g:-g:y<wt[1]?h+=p<v?g:-g:h+=s<p?g:-g:y<wt[0]?h+=v<e?g:-g:h+=s<v?g:-g)}return h}function z1(r,e,t,n,i,a,o,s){if(s>e&&s>n&&s>a||s<e&&s<n&&s<a)return 0;var l=q_(e,n,a,s,Xe);if(l===0)return 0;var u=B0(e,n,a);if(u>=0&&u<=1){for(var c=0,h=rt(e,n,a,u),f=0;f<l;f++){var v=Xe[f]===0||Xe[f]===1?.5:1,p=rt(r,t,i,Xe[f]);p<o||(Xe[f]<u?c+=h<e?v:-v:c+=a<h?v:-v)}return c}else{var v=Xe[0]===0||Xe[0]===1?.5:1,p=rt(r,t,i,Xe[0]);return p<o?0:a<e?v:-v}}function F1(r,e,t,n,i,a,o,s){if(s-=e,s>t||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Xe[0]=-l,Xe[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=gn-1e-4){n=0,i=gn;var c=a?1:-1;return o>=Xe[0]+r&&o<=Xe[1]+r?c:0}if(n>i){var h=n;n=i,i=h}n<0&&(n+=gn,i+=gn);for(var f=0,v=0;v<2;v++){var p=Xe[v];if(p+r>o){var m=Math.atan2(s,p),c=a?1:-1;m<0&&(m=gn+m),(m>=n&&m<=i||m+gn>=n&&m+gn<=i)&&(m>Math.PI/2&&m<Math.PI*1.5&&(c=-c),f+=c)}}return f}function cm(r,e,t,n,i){for(var a=r.data,o=r.len(),s=0,l=0,u=0,c=0,h=0,f,v,p=0;p<o;){var m=a[p++],y=p===1;switch(m===Sr.M&&p>1&&(t||(s+=pn(l,u,c,h,n,i))),y&&(l=a[p],u=a[p+1],c=l,h=u),m){case Sr.M:c=a[p++],h=a[p++],l=c,u=h;break;case Sr.L:if(t){if(Qn(l,u,a[p],a[p+1],e,n,i))return!0}else s+=pn(l,u,a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Sr.C:if(t){if(I1(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=N1(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Sr.Q:if(t){if(P1(l,u,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=z1(l,u,a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Sr.A:var g=a[p++],x=a[p++],b=a[p++],_=a[p++],S=a[p++],w=a[p++];p+=1;var T=!!(1-a[p++]);f=Math.cos(S)*b+g,v=Math.sin(S)*_+x,y?(c=f,h=v):s+=pn(l,u,f,v,n,i);var D=(n-g)*_/b+g;if(t){if(R1(g,x,_,S,S+w,T,e,D,i))return!0}else s+=F1(g,x,_,S,S+w,T,D,i);l=Math.cos(S+w)*b+g,u=Math.sin(S+w)*_+x;break;case Sr.R:c=l=a[p++],h=u=a[p++];var L=a[p++],M=a[p++];if(f=c+L,v=h+M,t){if(Qn(c,h,f,h,e,n,i)||Qn(f,h,f,v,e,n,i)||Qn(f,v,c,v,e,n,i)||Qn(c,v,c,h,e,n,i))return!0}else s+=pn(f,h,f,v,n,i),s+=pn(c,v,c,h,n,i);break;case Sr.Z:if(t){if(Qn(l,u,c,h,e,n,i))return!0}else s+=pn(l,u,c,h,n,i);l=c,u=h;break}}return!t&&!O1(u,h)&&(s+=pn(l,u,c,h,n,i)||0),s!==0}function V1(r,e,t){return cm(r,0,!1,e,t)}function H1(r,e,t,n){return cm(r,e,!0,t,n)}var hm=me({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Nn),$1={style:me({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},bl.style)},Lu=Ba.concat(["invisible","culling","z","z2","zlevel","parent"]),ye=(function(r){$(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){t.buildPath(l,t.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s<Lu.length;++s)i[Lu[s]]=this[Lu[s]];i.__dirty|=ht}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(t){var n=Ae(t);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a<n.length;a++){var o=n[a],s=t[o];o==="style"?this.style?H(this.style,s):this.useStyle(s):o==="shape"?H(this.shape,s):r.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var t=this.style.fill;if(t!=="none"){if(K(t)){var n=Os(t,0);return n>.5?jc:n>.2?xw:qc}else if(t)return qc}return jc},e.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(K(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Os(t,0)<Xc;if(a===o)return n}},e.prototype.buildPath=function(t,n,i){},e.prototype.pathUpdated=function(){this.__dirty&=~fi},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new $n(!1)},e.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return!(n==null||n==="none"||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,i=!t;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;
9(a||this.__dirty&fi)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||i){s.copy(t);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect(),o=this.style;if(t=i[0],n=i[1],a.contain(t,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),H1(s,l/u,t,n)))return!0}if(this.hasFill())return V1(s,t,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=fi,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,n){t==="shape"?this.setShape(n):r.prototype.attrKV.call(this,t,n)},e.prototype.setShape=function(t,n){var i=this.shape;return i||(i=this.shape={}),typeof t=="string"?i[t]=n:H(i,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&fi)},e.prototype.createStyle=function(t){return pl(hm,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=H({},this.shape))},e.prototype._applyStateObj=function(t,n,i,a,o,s){r.prototype._applyStateObj.call(this,t,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=H({},i.shape),H(u,n.shape)):(u=H({},a?this.shape:i.shape),H(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=H({},this.shape);for(var c={},h=Ae(u),f=0;f<h.length;f++){var v=h[f];typeof u[v]=="object"?this.shape[v]=u[v]:c[v]=u[v]}this._transitionState(t,{shape:c},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),i,a=0;a<t.length;a++){var o=t[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},e.prototype.getAnimationStyleProps=function(){return $1},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var n=(function(a){$(o,a);function o(s){var l=a.call(this,s)||this;return t.init&&t.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return ue(t.style)},o.prototype.getDefaultShape=function(){return ue(t.shape)},o})(e);for(var i in t)typeof t[i]=="function"&&(n.prototype[i]=t[i]);return n},e.initDefaultProps=(function(){var t=e.prototype;t.type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=ht|da|fi})(),e})(oo),G1=me({strokeFirst:!0,font:Zr,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},hm),Vs=(function(r){$(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.hasStroke=function(){return um(this.style)},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(t){return pl(G1,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){return this._rect||(this._rect=T1(this.style)),this._rect},e.initDefaultProps=(function(){var t=e.prototype;t.dirtyRectTolerance=10})(),e})(oo);Vs.prototype.type="tspan";var W1=me({x:0,y:0},Nn),U1={style:me({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},bl.style)};function Y1(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var Jr=(function(r){$(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return pl(W1,t)},e.prototype._getSize=function(t){var n=this.style,i=n[t];if(i!=null)return i;var a=Y1(n.image)?n.image:this.__image;if(!a)return 0;var o=t==="width"?"height":"width",s=n[o];return s==null?a[t]:a[t]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return U1},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new se(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e})(oo);Jr.prototype.type="image";function Z1(r,e){var t=e.x,n=e.y,i=e.width,a=e.height,o=e.r,s,l,u,c;i<0&&(t=t+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l
9=u=c=0;var h;s+l>i&&(h=s+l,s*=i/h,l*=i/h),u+c>i&&(h=u+c,u*=i/h,c*=i/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),s+c>a&&(h=s+c,s*=a/h,c*=a/h),r.moveTo(t+s,n),r.lineTo(t+i-l,n),l!==0&&r.arc(t+i-l,n+l,l,-Math.PI/2,0),r.lineTo(t+i,n+a-u),u!==0&&r.arc(t+i-u,n+a-u,u,0,Math.PI/2),r.lineTo(t+c,n+a),c!==0&&r.arc(t+c,n+a-c,c,Math.PI/2,Math.PI),r.lineTo(t,n+s),s!==0&&r.arc(t+s,n+s,s,Math.PI,Math.PI*1.5)}var bi=Math.round;function dm(r,e,t){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;r.x1=n,r.x2=i,r.y1=a,r.y2=o;var s=t&&t.lineWidth;return s&&(bi(n*2)===bi(i*2)&&(r.x1=r.x2=In(n,s,!0)),bi(a*2)===bi(o*2)&&(r.y1=r.y2=In(a,s,!0))),r}}function fm(r,e,t){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;r.x=n,r.y=i,r.width=a,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=In(n,s,!0),r.y=In(i,s,!0),r.width=Math.max(In(n+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(In(i+o,s,!1)-r.y,o===0?0:1)),r}}function In(r,e,t){if(!e)return r;var n=bi(r*2);return(n+bi(e))%2===0?n/2:(n+(t?1:-1))/2}var X1=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})(),j1={},Ce=(function(r){$(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new X1},e.prototype.buildPath=function(t,n){var i,a,o,s;if(this.subPixelOptimize){var l=fm(j1,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?Z1(t,n):t.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e})(ye);Ce.prototype.type="rect";var av={fill:"#000"},ov=2,Wt={},q1={style:me({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},bl.style)},Je=(function(r){$(e,r);function e(t){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=av,n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},e.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):r.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):r.prototype.getLocalTransform.call(this,t)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,tS(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new se(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(t.copy(l),t.applyTransform(u),a=a||t.clone(),a.union(t)):(a=a||l.clone(),a.union(l))}this._rect=a||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||av},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,n){if(!n)return t;var i=n.rich,a=t.rich||i&&{};return H(t,n),i&&a?(this._mergeRich(a,i),t.rich=a):a&&(t.rich=a),t},e.prototype._mergeRich=function(t,n){for(var i=Ae(n),a=0;a<i.length;a++){var o=i[a];t[o]=t[o]||{},H(t[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return q1},e.prototype._getOrCreateChild=function(t){var n=this._children[this._childCursor];return(!n||!(n instanceof t))&&(n=new t),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},e.prototype._updatePlainTexts=function(){var t=this.style,n=t.font||Zr,i=t.padding,a=this._defaultStyle,o=t.x||0,s=t.y||0,l=t.align||a.align||"left",u=t.verticalAlign||a.verticalAlign||"top";Kf(Wt,a.overflowRect,o,s,l,u),o=Wt.baseX,s=Wt.baseY;var c=fv(t),h=m1(c,t,Wt.outerWidth,Wt.outerHeight),f=ku(t),v=!!t.backgroundColor,p=h.outerHeight,m=h.outerWidth,y=h.lines,g=h.lineHeight;this.isTruncated=!!h.isTruncated;var x=o,b=Bn(s,h.contentHeight,u);if(f||i){var _=Ai(o,m,l),S=Bn(s,p,u);
9f&&this._renderBackground(t,t,_,S,m,p)}b+=g/2,i&&(x=dv(o,l,i),u==="top"?b+=i[0]:u==="bottom"&&(b-=i[2]));for(var w=0,T=!1,D=!1,L=hv("fill"in t?t.fill:(D=!0,a.fill)),M=cv("stroke"in t?t.stroke:!v&&(!a.autoStroke||D)?(w=ov,T=!0,a.stroke):null),C=t.textShadowBlur>0,I=0;I<y.length;I++){var k=this._getOrCreateChild(Vs),R=k.createStyle();k.useStyle(R),R.text=y[I],R.x=x,R.y=b,R.textAlign=l,R.textBaseline="middle",R.opacity=t.opacity,R.strokeFirst=!0,C&&(R.shadowBlur=t.textShadowBlur||0,R.shadowColor=t.textShadowColor||"transparent",R.shadowOffsetX=t.textShadowOffsetX||0,R.shadowOffsetY=t.textShadowOffsetY||0),R.stroke=M,R.fill=L,M&&(R.lineWidth=t.lineWidth||w,R.lineDash=t.lineDash,R.lineDashOffset=t.lineDashOffset||0),R.font=n,lv(R,t),b+=g,k.setBoundingRect(eh(R,h.contentWidth,h.calculatedLineHeight,T?0:null))}},e.prototype._updateRichTexts=function(){var t=this.style,n=this._defaultStyle,i=t.align||n.align,a=t.verticalAlign||n.verticalAlign,o=t.x||0,s=t.y||0;Kf(Wt,n.overflowRect,o,s,i,a),o=Wt.baseX,s=Wt.baseY;var l=fv(t),u=b1(l,t,Wt.outerWidth,Wt.outerHeight,i),c=u.width,h=u.outerWidth,f=u.outerHeight,v=t.padding;this.isTruncated=!!u.isTruncated;var p=Ai(o,h,i),m=Bn(s,f,a),y=p,g=m;v&&(y+=v[3],g+=v[0]);var x=y+c;ku(t)&&this._renderBackground(t,t,p,m,h,f);for(var b=!!t.backgroundColor,_=0;_<u.lines.length;_++){for(var S=u.lines[_],w=S.tokens,T=w.length,D=S.lineHeight,L=S.width,M=0,C=y,I=x,k=T-1,R=void 0;M<T&&(R=w[M],!R.align||R.align==="left");)this._placeToken(R,t,D,g,C,"left",b),L-=R.width,C+=R.width,M++;for(;k>=0&&(R=w[k],R.align==="right");)this._placeToken(R,t,D,g,I,"right",b),L-=R.width,I-=R.width,k--;for(C+=(c-(C-y)-(x-I)-L)/2;M<=k;)R=w[M],this._placeToken(R,t,D,g,C+R.width/2,"center",b),C+=R.width,M++;g+=D}},e.prototype._placeToken=function(t,n,i,a,o,s,l){var u=n.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,h=a+i/2;c==="top"?h=a+t.height/2:c==="bottom"&&(h=a+i-t.height/2);var f=!t.isLineHolder&&ku(u);f&&this._renderBackground(u,n,s==="right"?o-t.width:s==="center"?o-t.width/2:o,h-t.height/2,t.width,t.height);var v=!!u.backgroundColor,p=t.textPadding;
9p&&(o=dv(o,s,p),h-=t.height/2-p[0]-t.innerHeight/2);var m=this._getOrCreateChild(Vs),y=m.createStyle();m.useStyle(y);var g=this._defaultStyle,x=!1,b=0,_=!1,S=hv("fill"in u?u.fill:"fill"in n?n.fill:(x=!0,g.fill)),w=cv("stroke"in u?u.stroke:"stroke"in n?n.stroke:!v&&!l&&(!g.autoStroke||x)?(b=ov,_=!0,g.stroke):null),T=u.textShadowBlur>0||n.textShadowBlur>0;y.text=t.text,y.x=o,y.y=h,T&&(y.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,y.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",y.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,y.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),y.textAlign=s,y.textBaseline="middle",y.font=t.font||Zr,y.opacity=wi(u.opacity,n.opacity,1),lv(y,u),w&&(y.lineWidth=wi(u.lineWidth,n.lineWidth,b),y.lineDash=te(u.lineDash,n.lineDash),y.lineDashOffset=n.lineDashOffset||0,y.stroke=w),S&&(y.fill=S),m.setBoundingRect(eh(y,t.contentWidth,t.contentHeight,_?0:null))},e.prototype._renderBackground=function(t,n,i,a,o,s){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,h=l&&l.image,f=l&&!h,v=t.borderRadius,p=this,m,y;if(f||t.lineHeight||u&&c){m=this._getOrCreateChild(Ce),m.useStyle(m.createStyle()),m.style.fill=null;var g=m.shape;g.x=i,g.y=a,g.width=o,g.height=s,g.r=v,m.dirtyShape()}if(f){var x=m.style;x.fill=l||null,x.fillOpacity=te(t.fillOpacity,1)}else if(h){y=this._getOrCreateChild(Jr),y.onload=function(){p.dirtyStyle()};var b=y.style;b.image=l.image,b.x=i,b.y=a,b.width=o,b.height=s}if(u&&c){var x=m.style;x.lineWidth=u,x.stroke=c,x.strokeOpacity=te(t.strokeOpacity,1),x.lineDash=t.borderDash,x.lineDashOffset=t.borderDashOffset||0,m.strokeContainThreshold=0,m.hasFill()&&m.hasStroke()&&(x.strokeFirst=!0,x.lineWidth*=2)}var _=(m||y).style;_.shadowBlur=t.shadowBlur||0,_.shadowColor=t.shadowColor||"transparent",_.shadowOffsetX=t.shadowOffsetX||0,_.shadowOffsetY=t.shadowOffsetY||0,_.opacity=wi(t.opacity,n.opacity,1)},e.makeFont=function(t){var n="";return eS(t)&&(n=[t.fontStyle,t.fontWeight,J1(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),n&&jt(n)||t.textFont||t.font},e})(oo),K1={left:!0,right:1,center:1},Q1={top:1,bottom:1,middle:1},sv=["fontStyle","fontWeight","fontSize","fontFamily"];function J1(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Xh+"px":r+"px"}function lv(r,e){for(var t=0;t<sv.length;t++){var n=sv[t],i=e[n];i!=null&&(r[n]=i)}}function eS(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function tS(r){return uv(r),A(r.rich,uv),r}function uv(r){if(r){r.font=Je.makeFont(r);var e=r.align;e==="middle"&&(e="center"),r.align=e==null||K1[e]?e:"left";var t=r.verticalAlign;t==="center"&&(t="middle"),r.verticalAlign=t==null||Q1[t]?t:"top";var n=r.padding;n&&(r.padding=Jh(r.padding))}}function cv(r,e){return r==null||e<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function hv(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function dv(r,e,t){return e==="right"?r-t[1]:e==="center"?r+t[3]/2-t[1]/2:r+t[3]}function fv(r){var e=r.text;return e!=null&&(e+=""),e}function ku(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var ve=Me(),rS=function(r,e,t,n){if(n){var i=ve(n);i.dataIndex=t,i.dataType=e,i.seriesIndex=r,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=ve(a);o.seriesIndex=r,o.dataIndex=t,o.dataType=e,o.ssrType="chart"})}},vv=1,pv={},vm=Me(),cd=Me(),hd=0,_l=1,wl=2,nr=["emphasis","blur","select"],gv=["normal","emphasis","blur","select"],nS=10,iS=9,zn="highlight",vs="downplay",Hs="select",nh="unselect",$s="toggleSelect",dd="selectchanged";function Jn(r){return r!=null&&r!=="none"}function Sl(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function pm(r){Sl(r,"emphasis",wl)}function gm(r){r.hoverState===wl&&Sl(r,"normal",hd)}function fd(r){Sl(r,"blur",_l)}function mm(r){r.hoverState===_l&&Sl(r,"normal",hd)}function aS(r){r.selected=!0}function oS(r){r.selected=!1}function mv(r,e,t){e(r,t)}function _r(r,e,t){mv(r,e,t),r.isGroup&&r.traverse(function(n){mv(n,e,t)})}function yv(r,e){switch(e){case"emphasis":r.hoverState=wl;break;case"normal":r.hoverState=hd;break;case"blur":r.hoverState=_l;break;case"select":r.selected=!0}}function sS(r,e,t,n){for(var i=r.style,a={},o=0;o<e.length;o++){var s=e[o],l=i[s];a[s]=l??(n&&n[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(t)<0&&u.targetName==="style"&&u.saveTo(a,e)}return a}function lS(r,e,t,n){var i=t&&de(t,"select")>=0,a=!1;if(r instanceof ye){var o=vm(r),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Jn(s)||Jn(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=H({},n),u=H({}
9,u),u.fill=s):!Jn(u.fill)&&Jn(s)?(a=!0,n=H({},n),u=H({},u),u.fill=Pf(s)):!Jn(u.stroke)&&Jn(l)&&(a||(n=H({},n),u=H({},u)),u.stroke=Pf(l)),n.style=u}}if(n&&n.z2==null){a||(n=H({},n));var c=r.z2EmphasisLift;n.z2=r.z2+(c??nS)}return n}function uS(r,e,t){if(t&&t.z2==null){t=H({},t);var n=r.z2SelectLift;t.z2=r.z2+(n??iS)}return t}function cS(r,e,t){var n=de(r.currentStates,e)>=0,i=r.style.opacity,a=n?null:sS(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=H({},t),o=H({opacity:n?i:a.opacity*.1},o),t.style=o),t}function Iu(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return lS(this,r,e,t);if(r==="blur")return cS(this,r,t);if(r==="select")return uS(this,r,t)}return t}function hS(r){r.stateProxy=Iu;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=Iu),t&&(t.stateProxy=Iu)}function xv(r,e){!_m(r,e)&&!r.__highByOuter&&_r(r,pm)}function bv(r,e){!_m(r,e)&&!r.__highByOuter&&_r(r,gm)}function Gs(r,e){r.__highByOuter|=1<<(e||0),_r(r,pm)}function Ws(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&_r(r,gm)}function dS(r){_r(r,fd)}function ym(r){_r(r,mm)}function xm(r){_r(r,aS)}function bm(r){_r(r,oS)}function _m(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function wm(r){var e=r.getModel(),t=[],n=[];e.eachComponent(function(i,a){var o=cd(a),s=i==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){mm(u)}),s&&t.push(a)),o.isBlured=!1}),A(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(t,!1,e)})}function ih(r,e,t,n){var i=n.getModel();t=t||"coordinateSystem";function a(u,c){for(var h=0;h<c.length;h++){var f=u.getItemGraphicEl(c[h]);f&&ym(f)}}if(r!=null&&!(!e||e==="none")){var o=i.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(u){var c=o===u,h=u.coordinateSystem;h&&h.master&&(h=h.master);var f=h&&s?h===s:c;if(!(t==="series"&&!c||t==="coordinateSystem"&&!f||e==="series"&&c)){var v=n.getViewOfSeriesModel(u);if(v.group.traverse(function(y){y.__highByOuter&&c&&e==="self"||fd(y)}),at(e))a(u.getData(),e);else if(Q(e))for(var p=Ae(e),m=0;m<p.length;m++)a(u.getData(p[m]),e[p[m]]);l.push(u),cd(u).isBlured=!0}}),i.eachComponent(function(u,c){if(u!=="series"){var h=n.getViewOfComponentModel(c);h&&h.toggleBlurSeries&&h.toggleBlurSeries(l,!0,i)}})}}function ah(r,e,t){if(!(r==null||e==null)){var n=t.getModel().getComponent(r,e);if(n){cd(n).isBlured=!0;var i=t.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){fd(a)})}}}function fS(r,e,t){var n=r.seriesIndex,i=r.getData(e.dataType);if(i){var a=Hn(i,e);a=(X(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=ve(o);ih(n,u.focus,u.blurScope,t)}else{var c=r.get(["emphasis","focus"]),h=r.get(["emphasis","blurScope"]);c!=null&&ih(n,c,h,t)}}}function vd(r,e,t,n){var i={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||e==null||t==null)return i;var a=n.getModel().getComponent(r,e);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(t),l,u=0;u<s.length;u++)if(ve(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function vS(r,e,t){var n=ve(r),i=vd(n.componentMainType,n.componentIndex,n.componentHighDownName,t),a=i.dispatchers,o=i.focusSelf;a?(o&&ah(n.componentMainType,n.componentIndex,t),A(a,function(s){return xv(s,e)})):(ih(n.seriesIndex,n.focus,n.blurScope,t),n.focus==="self"&&ah(n.componentMainType,n.componentIndex,t),xv(r,e))}function pS(r,e,t){wm(t);var n=ve(r),i=vd(n.componentMainType,n.componentIndex,n.componentHighDownName,t).dispatchers;i?A(i,function(a){return bv(a,e)}):bv(r,e)}function gS(r,e,t){if(lh(e)){var n=e.dataType,i=r.getData(n),a=Hn(i,e);X(a)||(a=[a]),r[e.type===$s?"toggleSelect":e.type===Hs?"select":"unselect"](a,n)}}function _v(r){var e=r.getAllData();A(e,function(t){var n=t.data,i=t.type;n.eachItemGraphicEl(function(a,o){r.isSelected(o,i)?xm(a):bm(a)})})}function mS(r){var e=[];return r.eachSeries(function(t){var n=t.getAllData();A(n,function(i){i.data;
9var a=i.type,o=t.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:t.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function Us(r,e,t){Sm(r,!0),_r(r,hS),xS(r,e,t)}function yS(r){Sm(r,!1)}function Ys(r,e,t,n){n?yS(r):Us(r,e,t)}function xS(r,e,t){var n=ve(r);e!=null?(n.focus=e,n.blurScope=t):n.focus&&(n.focus=null)}var wv=["emphasis","blur","select"],bS={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function oh(r,e,t,n){t=t||"itemStyle";for(var i=0;i<wv.length;i++){var a=wv[i],o=e.getModel([a,t]),s=r.ensureState(a);s.style=o[bS[t]]()}}function Sm(r,e){var t=e===!1,n=r;r.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!t||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!t)}function sh(r){return!!(r&&r.__highDownDispatcher)}function _S(r){var e=pv[r];return e==null&&vv<=32&&(e=pv[r]=vv++),e}function lh(r){var e=r.type;return e===Hs||e===nh||e===$s}function Sv(r){var e=r.type;return e===zn||e===vs}function wS(r){var e=vm(r);e.normalFill=r.style.fill,e.normalStroke=r.style.stroke;var t=r.states.select||{};e.selectFill=t.style&&t.style.fill||null,e.selectStroke=t.style&&t.style.stroke||null}var ei=$n.CMD,SS=[[],[],[]],Tv=Math.sqrt,TS=Math.atan2;function CS(r,e){if(e){var t=r.data,n=r.len(),i,a,o,s,l,u,c=ei.M,h=ei.C,f=ei.L,v=ei.R,p=ei.A,m=ei.Q;for(o=0,s=0;o<n;){switch(i=t[o++],s=o,a=0,i){case c:a=1;break;case f:a=1;break;case h:a=3;break;case m:a=2;break;case p:var y=e[4],g=e[5],x=Tv(e[0]*e[0]+e[1]*e[1]),b=Tv(e[2]*e[2]+e[3]*e[3]),_=TS(-e[1]/b,e[0]/x);t[o]*=x,t[o++]+=y,t[o]*=b,t[o++]+=g,t[o++]*=x,t[o++]*=b,t[o++]+=_,t[o++]+=_,o+=2,s=o;break;case v:u[0]=t[o++],u[1]=t[o++],At(u,u,e),t[s++]=u[0],t[s++]=u[1],u[0]+=t[o++],u[1]+=t[o++],At(u,u,e),t[s++]=u[0],t[s++]=u[1]}for(l=0;l<a;l++){var S=SS[l];S[0]=t[o++],S[1]=t[o++],At(S,S,e),t[s++]=S[0],t[s++]=S[1]}}r.increaseVersion()}}var Pu=Math.sqrt,To=Math.sin,Co=Math.cos,Wi=Math.PI;function Cv(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function uh(r,e){return(r[0]*e[0]+r[1]*e[1])/(Cv(r)*Cv(e))}function Mv(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(uh(r,e))}function Dv(r,e,t,n,i,a,o,s,l,u,c){var h=l*(Wi/180),f=Co(h)*(r-t)/2+To(h)*(e-n)/2,v=-1*To(h)*(r-t)/2+Co(h)*(e-n)/2,p=f*f/(o*o)+v*v/(s*s);p>1&&(o*=Pu(p),s*=Pu(p));var m=(i===a?-1:1)*Pu((o*o*(s*s)-o*o*(v*v)-s*s*(f*f))/(o*o*(v*v)+s*s*(f*f)))||0,y=m*o*v/s,g=m*-s*f/o,x=(r+t)/2+Co(h)*y-To(h)*g,b=(e+n)/2+To(h)*y+Co(h)*g,_=Mv([1,0],[(f-y)/o,(v-g)/s]),S=[(f-y)/o,(v-g)/s],w=[(-1*f-y)/o,(-1*v-g)/s],T=Mv(S,w);if(uh(S,w)<=-1&&(T=Wi),uh(S,w)>=1&&(T=0),T<0){var D=Math.round(T/Wi*1e6)/1e6;T=Wi*2+D%2*Wi}c.addData(u,x,b,o,s,_,T,h,a)}var MS=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,DS=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function AS(r){var e=new $n;if(!r)return e;var t=0,n=0,i=t,a=n,o,s=$n.CMD,l=r.match(MS);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],h=c.charAt(0),f=void 0,v=c.match(DS)||[],p=v.length,m=0;m<p;m++)v[m]=parseFloat(v[m]);for(var y=0;y<p;){var g=void 0,x=void 0,b=void 0,_=void 0,S=void 0,w=void 0,T=void 0,D=t,L=n,M=void 0,C=void 0;switch(h){case"l":t+=v[y++],n+=v[y++],f=s.L,e.addData(f,t,n);break;case"L":t=v[y++],n=v[y++],f=s.L,e.addData(f,t,n);break;case"m":t+=v[y++],n+=v[y++],f=s.M,e.addData(f,t,n),i=t,a=n,h="l";break;case"M":t=v[y++],n=v[y++],f=s.M,e.addData(f,t,n),i=t,a=n,h="L";break;case"h":t+=v[y++],f=s.L,e.addData(f,t,n);break;case"H":t=v[y++],f=s.L,e.addData(f,t,n);break;case"v":n+=v[y++],f=s.L,e.addData(f,t,n);break;case"V":n=v[y++],f=s.L,e.addData(f,t,n);break;case"C":f=s.C,e.addData(f,v[y++],v[y++],v[y++],v[y++],v[y++],v[y++]),t=v[y-2],n=v[y-1];break;case"c":f=s.C,e.addData(f,v[y++]+t,v[y++]+n,v[y++]+t,v[y++]+n,v[y++]+t,v[y++]+n),t+=v[y-2],n+=v[y-1];break;case"S":g=t,x=n,M=e.len(),C=e.data,o===s.C&&(g+=t-C[M-4],x+=n-C[M-3]),f=s.C,D=v[y++],L=v[y++],t=v[y++],n=v[y++],e.addData(f,g,x,D,L,t,n);break;case"s":g=t,x=n,M=e.len(),C=e.data,o===s.C&&(g+=t-C[M-4],x+=n-C[M-3]),f=s.C,D=t+v[y++],L=n+v[y++],t+=v[y++],n+=v[y++],e.addData(f,g,x,D,L,t,n);break;case"Q":D=v[y++],L=v[y++],t=v[y++],n=v[y++],f=s.Q,e.addData(f,D,L,t,n);break;case"q":D=v[y++]+t,L=v[y++]+n,t+=v[y++],n+=v[y++],f=s.Q,e.addData(f,D,L,t,n);break;case"T":g=t,x=n,M=e.len(),C=e.data,o===s.Q&&(g+=t-C[M-4],x+=n-C[M-3]),t=v[y++],n=v[y++],f=s.Q,e.addData(f,g,x,t,n);break;case"t":g=t,x=n,M=e.len(),C=e.data,o===s.Q&&(g+=t-C[M-4],x+=n-C[M-3]),t+=v[y++],n+=v[y++],f=s.Q,e.addData(f,g,x,t,n);break;case"A":b=v[y++],_=v[y++],S=v[y++],w=v[y++],T=v[y++],D=t,L=n,t=v[y++],n=v[y++],f=s.A,Dv(D,L,t,n,w,T,b,_,S,f,e);break;case"a":b=v[y++],_=v[y++],S=v[y++],w=v[y++],T=v[y++],D=t,L=n,t+=v[y++],n+=v[y++],f=s.A,Dv(D,L,t,n,w,T,b,_,S,f,e);break}}(h==="z"||h==="Z")&&(f=s.Z,e.addData(f),t=i,n=a),o=f}return e.toStatic(),e}var Tm=(function(r){$(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.applyTransform=function(t){},e})(ye);function Cm(r){return r.setData!=null}function Mm(r,e){var t=AS(r),n=H({},e);return n.buildPath=function(i){var a=Cm(i);if(a&&i.canSave()){i.appendPath(t);var o=i.getContext();
9o&&i.rebuildPath(o,1)}else{var o=a?i.getContext():i;o&&t.rebuildPath(o,1)}},n.applyTransform=function(i){CS(t,i),this.dirtyShape()},n}function LS(r,e){return new Tm(Mm(r,e))}function kS(r,e){var t=Mm(r,e),n=(function(i){$(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=t.applyTransform,s.buildPath=t.buildPath,s}return a})(Tm);return n}function IS(r,e){for(var t=[],n=r.length,i=0;i<n;i++){var a=r[i];t.push(a.getUpdatedPathProxy(!0))}var o=new ye(e);return o.createPathProxy(),o.buildPath=function(s){if(Cm(s)){s.appendPath(t);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}var PS=(function(){function r(){this.cx=0,this.cy=0,this.r=0}return r})(),Tl=(function(r){$(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new PS},e.prototype.buildPath=function(t,n){t.moveTo(n.cx+n.r,n.cy),t.arc(n.cx,n.cy,n.r,0,Math.PI*2)},e})(ye);Tl.prototype.type="circle";var RS=(function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r})(),pd=(function(r){$(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new RS},e.prototype.buildPath=function(t,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*i,c=l*i;t.moveTo(a-s,o),t.bezierCurveTo(a-s,o-c,a-u,o-l,a,o-l),t.bezierCurveTo(a+u,o-l,a+s,o-c,a+s,o),t.bezierCurveTo(a+s,o+c,a+u,o+l,a,o+l),t.bezierCurveTo(a-u,o+l,a-s,o+c,a-s,o),t.closePath()},e})(ye);pd.prototype.type="ellipse";var Dm=Math.PI,Ru=Dm*2,mn=Math.sin,ti=Math.cos,ES=Math.acos,Ge=Math.atan2,Av=Math.abs,Ta=Math.sqrt,pa=Math.max,Ut=Math.min,It=1e-4;function OS(r,e,t,n,i,a,o,s){var l=t-r,u=n-e,c=o-i,h=s-a,f=h*l-c*u;if(!(f*f<It))return f=(c*(e-a)-h*(r-i))/f,[r+f*l,e+f*u]}function Mo(r,e,t,n,i,a,o){var s=r-t,l=e-n,u=(o?a:-a)/Ta(s*s+l*l),c=u*l,h=-u*s,f=r+c,v=e+h,p=t+c,m=n+h,y=(f+p)/2,g=(v+m)/2,x=p-f,b=m-v,_=x*x+b*b,S=i-a,w=f*m-p*v,T=(b<0?-1:1)*Ta(pa(0,S*S*_-w*w)),D=(w*b-x*T)/_,L=(-w*x-b*T)/_,M=(w*b+x*T)/_,C=(-w*x+b*T)/_,I=D-y,k=L-g,R=M-y,O=C-g;return I*I+k*k>R*R+O*O&&(D=M,L=C),{cx:D,cy:L,x0:-c,y0:-h,x1:D*(i/S-1),y1:L*(i/S-1)}}function BS(r){var e;if(X(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function NS(r,e){var t,n=pa(e.r,0),i=pa(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,h=e.cy,f=!!e.clockwise,v=Av(u-l),p=v>Ru&&v%Ru;if(p>It&&(v=p),!(n>It))r.moveTo(c,h);else if(v>Ru-It)r.moveTo(c+n*ti(l),h+n*mn(l)),r.arc(c,h,n,l,u,!f),i>It&&(r.moveTo(c+i*ti(u),h+i*mn(u)),r.arc(c,h,i,u,l,f));else{var m=void 0,y=void 0,g=void 0,x=void 0,b=void 0,_=void 0,S=void 0,w=void 0,T=void 0,D=void 0,L=void 0,M=void 0,C=void 0,I=void 0,k=void 0,R=void 0,O=n*ti(l),z=n*mn(l),P=i*ti(u),B=i*mn(u),V=v>It;if(V){var U=e.cornerRadius;U&&(t=BS(U),m=t[0],y=t[1],g=t[2],x=t[3]);var Y=Av(n-i)/2;if(b=Ut(Y,g),_=Ut(Y,x),S=Ut(Y,m),w=Ut(Y,y),L=T=pa(b,_),M=D=pa(S,w),(T>It||D>It)&&(C=n*ti(u),I=n*mn(u),k=i*ti(l),R=i*mn(l),v<Dm)){var N=OS(O,z,k,R,C,I,P,B);if(N){var G=O-N[0],oe=z-N[1],xe=C-N[0],F=I-N[1],_e=1/mn(ES((G*xe+oe*F)/(Ta(G*G+oe*oe)*Ta(xe*xe+F*F)))/2),st=Ta(N[0]*N[0]+N[1]*N[1]);L=Ut(T,(n-st)/(_e+1)),M=Ut(D,(i-st)/(_e-1))}}}if(!V)r.moveTo(c+O,h+z);else if(L>It){var lt=Ut(g,L),Fe=Ut(x,L),ae=Mo(k,R,O,z,n,lt,f),ce=Mo(C,I,P,B,n,Fe,f);r.moveTo(c+ae.cx+ae.x0,h+ae.cy+ae.y0),L<T&<===Fe?r.arc(c+ae.cx,h+ae.cy,L,Ge(ae.y0,ae.x0),Ge(ce.y0,ce.x0),!f):(lt>0&&r.arc(c+ae.cx,h+ae.cy,lt,Ge(ae.y0,ae.x0),Ge(ae.y1,ae.x1),!f),r.arc(c,h,n,Ge(ae.cy+ae.y1,ae.cx+ae.x1),Ge(ce.cy+ce.y1,ce.cx+ce.x1),!f),Fe>0&&r.arc(c+ce.cx,h+ce.cy,Fe,Ge(ce.y1,ce.x1),Ge(ce.y0,ce.x0),!f))}else r.moveTo(c+O,h+z),r.arc(c,h,n,l,u,!f);if(!(i>It)||!V)r.lineTo(c+P,h+B);else if(M>It){var lt=Ut(m,M),Fe=Ut(y,M),ae=Mo(P,B,C,I,i,-Fe,f),ce=Mo(O,z,k,R,i,-lt,f);r.lineTo(c+ae.cx+ae.x0,h+ae.cy+ae.y0),M<D&<===Fe?r.arc(c+ae.cx,h+ae.cy,M,Ge(ae.y0,ae.x0),Ge(ce.y0,ce.x0),!f):(Fe>0&&r.arc(c+ae.cx,h+ae.cy,Fe,Ge(ae.y0,ae.x0),Ge(ae.y1,ae.x1),!f),r.arc(c,h,i,Ge(ae.cy+ae.y1,ae.cx+ae.x1),Ge(ce.cy+ce.y1,ce.cx+ce.x1),f),lt>0&&r.arc(c+ce.cx,h+ce.cy,lt,Ge(ce.y1,ce.x1),Ge(ce.y0,ce.x0),!f))}else r.lineTo(c+P,h+B),r.arc(c,h,i,u,l,f)}r.closePath()}}}var zS=(function(){function r(){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 r})(),Ni=(function(r){$(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new zS},e.prototype.buildPath=function(t,n){NS(t,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e})(ye);Ni.prototype.type="sector";var FS=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})(),gd=(function(r){$(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new FS},e.prototype.buildPath=function(t,n){var i=n.cx,a=n.cy,o=Math.PI*2;t.moveTo(i+n.r,a),t.arc(i,a,n.r,0,o,!1),t.moveTo(i+n.r0,a),t.arc(i,a,n.r0,0,o,!0)},e})(ye);gd.prototype.type="ring";function VS(r,e,t,n){var i=[],a=[],o=[],s=[],l,u,c,h;if(n){c=[1/0,1/0],h=[-1/0,-1/0];for(var f=0,v=r.length;f<v;f++)gi(c,c,r[f]),mi(h,h,r[f]);gi(c,c,n[0]),mi(h,h,n[1])}for(var f=0,v=r.length;f<v;f++){var p=r[f];if(t)l=r[f?f-1:v-1],u=r[(f+1)%v];else if(f===0||f===v-1){i.push(f_(r[f]));continue}else l=r[f-1],u=r[f+1];v_(a,u,l),ql(a,a,e);var m=Pc(p,l),y=Pc(p,u),g=m+y;g!==0&&(m/=g,y/=g),ql(o,a,-m),ql(s,a,y);var x=vf([],p,o),b=vf([],p,s);n&&(mi(x,x,c),gi(x,x,h),mi(b,b,c),gi(b,b,h)),i.push(x),i.push(b)}return t&&i.push(i.shift()),i}function Am(r,e,t){var n=e.smooth,i=e.points;if(i&&i.length>=2){if(n){var a=VS(i,n,t,e.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(t?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];
9r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;s<h;s++)r.lineTo(i[s][0],i[s][1])}t&&r.closePath()}}var HS=(function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r})(),Cl=(function(r){$(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new HS},e.prototype.buildPath=function(t,n){Am(t,n,!0)},e})(ye);Cl.prototype.type="polygon";var $S=(function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r})(),Ml=(function(r){$(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new $S},e.prototype.buildPath=function(t,n){Am(t,n,!1)},e})(ye);Ml.prototype.type="polyline";var GS={},WS=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})(),jr=(function(r){$(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new WS},e.prototype.buildPath=function(t,n){var i,a,o,s;if(this.subPixelOptimize){var l=dm(GS,n,this.style);i=l.x1,a=l.y1,o=l.x2,s=l.y2}else i=n.x1,a=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(t.moveTo(i,a),u<1&&(o=i*(1-u)+o*u,s=a*(1-u)+s*u),t.lineTo(o,s))},e.prototype.pointAt=function(t){var n=this.shape;return[n.x1*(1-t)+n.x2*t,n.y1*(1-t)+n.y2*t]},e})(ye);jr.prototype.type="line";var et=[],US=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r})();function Lv(r,e,t){var n=r.cpx2,i=r.cpy2;return n!=null||i!=null?[(t?Df:Ve)(r.x1,r.cpx1,r.cpx2,r.x2,e),(t?Df:Ve)(r.y1,r.cpy1,r.cpy2,r.y2,e)]:[(t?Af:rt)(r.x1,r.cpx1,r.x2,e),(t?Af:rt)(r.y1,r.cpy1,r.y2,e)]}var md=(function(r){$(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new US},e.prototype.buildPath=function(t,n){var i=n.x1,a=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,c=n.cpx2,h=n.cpy2,f=n.percent;f!==0&&(t.moveTo(i,a),c==null||h==null?(f<1&&(Es(i,l,o,f,et),l=et[1],o=et[2],Es(a,u,s,f,et),u=et[1],s=et[2]),t.quadraticCurveTo(l,u,o,s)):(f<1&&(Rs(i,l,c,o,f,et),l=et[1],c=et[2],o=et[3],Rs(a,u,h,s,f,et),u=et[1],h=et[2],s=et[3]),t.bezierCurveTo(l,u,c,h,o,s)))},e.prototype.pointAt=function(t){return Lv(this.shape,t,!1)},e.prototype.tangentAt=function(t){var n=Lv(this.shape,t,!0);return m_(n,n)},e})(ye);md.prototype.type="bezier-curve";var YS=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),Dl=(function(r){$(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new YS},e.prototype.buildPath=function(t,n){var i=n.cx,a=n.cy,o=Math.max(n.r,0),s=n.startAngle,l=n.endAngle,u=n.clockwise,c=Math.cos(s),h=Math.sin(s);t.moveTo(c*o+i,h*o+a),t.arc(i,a,o,s,l,!u)},e})(ye);Dl.prototype.type="arc";var ZS=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="compound",t}return e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,n=this.shapeChanged(),i=0;i<t.length;i++)n=n||t[i].shapeChanged();n&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(n[0],n[1],t[i].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(t,i[a].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],n=0;n<t.length;n++)t[n].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),ye.prototype.getBoundingRect.call(this)},e})(ye),Lm=(function(){function r(e){this.colorStops=e||[]}return r.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},r})(),km=(function(r){$(e,r);function e(t,n,i,a,o,s){var l=r.call(this,o)||this;return l.x=t??0,l.y=n??0,l.x2=i??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return e})(Lm),XS=(function(r){$(e,r);function e(t,n,i,a,o){var s=r.call(this,a)||this;return s.x=t??.5,s.y=n??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return e})(Lm),Eu=Math.min,jS=Math.max,Do=Math.abs,yn=[0,0],xn=[0,0],Be=A0(),Ao=Be.minTv,Lo=Be.maxTv,Im=(function(){function r(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new be;for(var n=0;n<2;n++)this._axes[n]=new be;
9e&&this.fromBoundingRect(e,t)}return r.prototype.fromBoundingRect=function(e,t){var n=this._corners,i=this._axes,a=e.x,o=e.y,s=a+e.width,l=o+e.height;if(n[0].set(a,o),n[1].set(s,o),n[2].set(s,l),n[3].set(a,l),t)for(var u=0;u<4;u++)n[u].transform(t);be.sub(i[0],n[1],n[0]),be.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var u=0;u<2;u++)this._origin[u]=i[u].dot(n[0])},r.prototype.intersect=function(e,t,n){var i=!0,a=!t;return t&&be.set(t,0,0),Be.reset(n,!a),!this._intersectCheckOneSide(this,e,a,1)&&(i=!1,a)||!this._intersectCheckOneSide(e,this,a,-1)&&(i=!1,a)||!a&&!Be.negativeSize&&be.copy(t,i?Be.useDir?Be.dirMinTv:Ao:Lo),i},r.prototype._intersectCheckOneSide=function(e,t,n,i){for(var a=!0,o=0;o<2;o++){var s=e._axes[o];if(e._getProjMinMaxOnAxis(o,e._corners,yn),e._getProjMinMaxOnAxis(o,t._corners,xn),Be.negativeSize||yn[1]<xn[0]||yn[0]>xn[1]){if(a=!1,Be.negativeSize||n)return a;var l=Do(xn[0]-yn[1]),u=Do(yn[0]-xn[1]);Eu(l,u)>Lo.len()&&(l<u?be.scale(Lo,s,-l*i):be.scale(Lo,s,u*i))}else if(!n){var l=Do(xn[0]-yn[1]),u=Do(yn[0]-xn[1]);(Be.useDir||Eu(l,u)<Ao.len())&&((l<u||!Be.bidirectional)&&(be.scale(Ao,s,l*i),Be.useDir&&Be.calcDirMTV()),(l>=u||!Be.bidirectional)&&(be.scale(Ao,s,-u*i),Be.useDir&&Be.calcDirMTV()))}}return a},r.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var i=this._axes[e],a=this._origin,o=t[0].dot(i)+a[e],s=o,l=o,u=1;u<t.length;u++){var c=t[u].dot(i)+a[e];s=Eu(c,s),l=jS(c,l)}n[0]=s+Be.touchThreshold,n[1]=l-Be.touchThreshold,Be.negativeSize=n[1]<n[0]},r})(),qS=[],KS=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return e.prototype.traverse=function(t,n){t.call(n,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,n){n?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,n){n=n||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],n)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var n=this._cursor;n<this._displayables.length;n++)t&&t(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)t&&t(this._temporaryDisplayables[n])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var n=this._displayables[t];n.parent=this,n.update(),n.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var n=this._temporaryDisplayables[t];n.parent=this,n.update(),n.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new se(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],a=i.getBoundingRect().clone();i.needLocalTransform()&&a.applyTransform(i.getLocalTransform(qS)),t.union(a)}this._rect=t}return this._rect},e.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect();if(a.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(t,n))return!0}return!1},e})(oo),QS=Me();function JS(r,e,t,n,i){var a;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();a=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,c=void 0,h=void 0;n?(u=te(n.duration,200),c=te(n.easing,"cubicOut"),h=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),h=e.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(c=a.easing),a.delay!=null&&(h=a.delay)),ne(h)&&(h=h(t,i)),ne(u)&&(u=u(t));
9var f={duration:u||0,delay:h,easing:c};return f}else return null}function yd(r,e,t,n,i,a,o){var s=!1,l;ne(i)?(o=a,a=i,i=null):Q(i)&&(a=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=r==="leave";u||e.stopAnimation("leave");var c=JS(r,n,i,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,i):null);if(c&&c.duration>0){var h=c.duration,f=c.delay,v=c.easing,p={duration:h,delay:f||0,easing:v,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),a&&a()}function vt(r,e,t,n,i,a){yd("update",r,e,t,n,i,a)}function br(r,e,t,n,i,a){yd("enter",r,e,t,n,i,a)}function Ca(r){if(!r.__zr)return!0;for(var e=0;e<r.animators.length;e++){var t=r.animators[e];if(t.scope==="leave")return!0}return!1}function Zs(r,e,t,n,i,a){Ca(r)||yd("leave",r,e,t,n,i,a)}function kv(r,e,t,n){r.removeTextContent(),r.removeTextGuideLine(),Zs(r,{style:{opacity:0}},e,t,n)}function ps(r,e,t){function n(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(i){i.isGroup||kv(i,e,t,n)}):kv(r,e,t,n)}function Pm(r){QS(r).oldStyle=r.style}var ch={},An=["x","y"],Va=["width","height"];function eT(r){return ye.extend(r)}var tT=kS;function rT(r,e){return tT(r,e)}function Ft(r,e){ch[r]=e}function nT(r){if(ch.hasOwnProperty(r))return ch[r]}function xd(r,e,t,n){var i=LS(r,e);return t&&(n==="center"&&(t=Em(t,i.getBoundingRect())),Om(i,t)),i}function Rm(r,e,t){var n=new Jr({style:{image:r,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(i){if(t==="center"){var a={width:i.width,height:i.height};n.setStyle(Em(e,a))}}});return n}function Em(r,e){var t=e.width/e.height,n=r.height*t,i;n<=r.width?i=r.height:(n=r.width,i=n/t);var a=r.x+r.width/2,o=r.y+r.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var iT=IS;function Om(r,e){if(r.applyTransform){var t=r.getBoundingRect(),n=t.calculateTransform(e);r.applyTransform(n)}}function Ha(r,e){return dm(r,r,{lineWidth:e}),r}function aT(r,e){return fm(r,r,e),r}var oT=In;function Bm(r,e){for(var t=td([]);r&&r!==e;)ba(t,r.getLocalTransform(),t),r=r.parent;return t}function $a(r,e,t){return e&&!at(e)&&(e=id.getLocalTransform(e)),t&&(e=ro([],e)),At([],r,e)}function Nm(r,e,t){var n=e[4]===0||e[5]===0||e[0]===0?1:qt(2*e[4]/e[0]),i=e[4]===0||e[5]===0||e[2]===0?1:qt(2*e[4]/e[2]),a=[r==="left"?-n:r==="right"?n:0,r==="top"?-i:r==="bottom"?i:0];return a=$a(a,e,t),qt(a[0])>qt(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Iv(r){return!r.isGroup}function sT(r){return r.shape!=null}function zm(r,e,t){if(!r||!e)return;function n(o){var s={};return o.traverse(function(l){Iv(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return sT(o)&&(s.shape=ue(o.shape)),s}var a=n(r);e.traverse(function(o){if(Iv(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),vt(o,l,t,ve(o).dataIndex)}}})}function lT(r,e){return J(r,function(t){var n=t[0];n=dt(n,e.x),n=Na(n,e.x+e.width);var i=t[1];return i=dt(i,e.y),i=Na(i,e.y+e.height),[n,i]})}function uT(r,e){var t=dt(r.x,e.x),n=Na(r.x+r.width,e.x+e.width),i=dt(r.y,e.y),a=Na(r.y+r.height,e.y+e.height);if(n>=t&&a>=i)return{x:t,y:i,width:n-t,height:a-i}}function bd(r,e,t){var n=H({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),me(i,t),new Jr(n)):xd(r.replace("path://",""),n,t,"center")}function cT(r,e,t,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Fm(r,e,t,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function Fm(r,e,t,n,i,a,o,s){var l=t-r,u=n-e,c=o-i,h=s-a,f=Ou(c,h,l,u);if(hT(f))return!1;var v=r-i,p=e-a,m=Ou(v,p,l,u)/f;if(m<0||m>1)return!1;var y=Ou(v,p,c,h)/f;return!(y<0||y>1)}function Ou(r,e,t,n){return r*n-t*e}function hT(r){return r<=1e-6&&r>=-1e-6}function Xs(r,e,t,n,i){return e==null||(Se(e)?Te[0]=Te[1]=Te[2]=Te[3]=e:(Te[0]=e[0],Te[1]=e[1],Te[2]=e[2],Te[3]=e[3]),n&&(Te[0]=dt(0,Te[0]),Te[1]=dt(0,Te[1]),Te[2]=dt(0,Te[2]),Te[3]=dt(0,Te[3])),t&&(Te[0]=-Te[0],Te[1]=-Te[1],Te[2]=-Te[2],Te[3]=-Te[3]),Pv(r,Te,"x","width",3,1,i&&i[0]||0),Pv(r,Te,"y","height",0,2,i&&i[1]||0)),r}var Te=[0,0,0,0];function Pv(r,e,t,n,i,a,o){var s=e[a]+e[i],l=r[n];r[n]+=s,o=dt(0,Na(o,l)),r[n]<o?(r[n]=o,r[t]+=e[i]>=0?-e[i]:e[a]>=0?l+e[a]:qt(s)>
91e-8?(l-o)*e[i]/s:0):r[t]-=e[i]}function Al(r){var e=r.itemTooltipOption,t=r.componentModel,n=r.itemName,i=K(e)?{formatter:e}:e,a=t.mainType,o=t.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&A(Ae(l),function(c){Et(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=ve(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:me({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function hh(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function Ll(r,e){if(r)if(X(r))for(var t=0;t<r.length;t++)hh(r[t],e);else hh(r,e)}function _d(r){return!r||qt(r[1])<ko&&qt(r[2])<ko||qt(r[0])<ko&&qt(r[3])<ko}var ko=1e-5;function Ga(r,e){return r?se.copy(r,e):e.clone()}function wd(r,e){return e?D0(r||mr(),e):void 0}function Wa(r){return{z:r.get("z")||0,zlevel:r.get("zlevel")||0}}function dT(r){var e=-1/0,t=1/0;hh(r,function(a){n(a),n(a.getTextContent()),n(a.getTextGuideLine())});function n(a){if(!(!a||a.isGroup)){var o=a.currentStates;if(o.length)for(var s=0;s<o.length;s++)i(a.states[o[s]]);i(a)}}function i(a){if(a){var o=a.z2;o>e&&(e=o),o<t&&(t=o)}}return t>e&&(t=e=0),{min:t,max:e}}function Vm(r,e,t){Hm(r,e,t,-1/0)}function Hm(r,e,t,n){if(r.ignoreModelZ)return n;var i=r.getTextContent(),a=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l<s.length;l++)n=dt(Hm(s[l],e,t,n),n);else r.z=e,r.zlevel=t,n=dt(r.z2||0,n);if(i&&(i.z=e,i.zlevel=t,isFinite(n)&&(i.z2=n+2)),a){var u=r.textGuideLineConfig;a.z=e,a.zlevel=t,isFinite(n)&&(a.z2=n+(u&&u.showAbove?1:-1))}return n}Ft("circle",Tl);Ft("ellipse",pd);Ft("sector",Ni);Ft("ring",gd);Ft("polygon",Cl);Ft("polyline",Ml);Ft("rect",Ce);Ft("line",jr);Ft("bezierCurve",md);Ft("arc",Dl);const fT=Object.freeze(Object.defineProperty({__proto__:null,Arc:Dl,BezierCurve:md,BoundingRect:se,Circle:Tl,CompoundPath:ZS,Ellipse:pd,Group:Ee,Image:Jr,IncrementalDisplayable:KS,Line:jr,LinearGradient:km,OrientedBoundingRect:Im,Path:ye,Point:be,Polygon:Cl,Polyline:Ml,RadialGradient:XS,Rect:Ce,Ring:gd,Sector:Ni,Text:Je,WH:Va,XY:An,applyTransform:$a,calcZ2Range:dT,clipPointsByRect:lT,clipRectByRect:uT,createIcon:bd,ensureCopyRect:Ga,ensureCopyTransform:wd,expandOrShrinkRect:Xs,extendPath:rT,extendShape:eT,getShapeClass:nT,getTransform:Bm,groupTransition:zm,initProps:br,isBoundingRectAxisAligned:_d,isElementRemoved:Ca,lineLineIntersect:Fm,linePolygonIntersect:cT,makeImage:Rm,makePath:xd,mergePath:iT,registerShape:Ft,removeElement:Zs,removeElementWithFadeOut:ps,resizePath:Om,retrieveZInfo:Wa,setTooltipConfig:Al,subPixelOptimize:oT,subPixelOptimizeLine:Ha,subPixelOptimizeRect:aT,transformDirection:Nm,traverseElements:Ll,traverseUpdateZ:Vm,updateProps:vt},Symbol.toStringTag,{value:"Module"}));var kl={};function vT(r,e){for(var t=0;t<nr.length;t++){var n=nr[t],i=e[n],a=r.ensureState(n);a.style=a.style||{},a.style.text=i}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:e.normal}),r.useStates(o,!0)}function Rv(r,e,t){var n=r.labelFetcher,i=r.labelDataIndex,a=r.labelDimIndex,o=e.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),t!=null?{interpolatedValue:t}:null)),s==null&&(s=ne(r.defaultText)?r.defaultText(i,r,t):r.defaultText);for(var l={normal:s},u=0;u<nr.length;u++){var c=nr[u],h=e[c];l[c]=te(n?n.getFormattedLabel(i,c,null,a,h&&h.get("formatter")):null,s)}return l}function Il(r,e,t,n){t=t||kl;for(var i=r instanceof Je,a=!1,o=0;o<gv.length;o++){var s=e[gv[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=i?r:r.getTextContent();if(a){i||(l||(l=new Je,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=Rv(t,e),c=e.normal,h=!!c.getShallow("show"),f=Gn(c,n&&n.normal,t,!1,!i);f.text=u.normal,i||r.setTextConfig(Ev(c,t,!1));for(var o=0;o<nr.length;o++){var v=nr[o],s=e[v];if(s){var p=l.ensureState(v),m=!!te(s.getShallow("show"),h);if(m!==h&&(p.ignore=!m),p.style=Gn(s,n&&n[v],t,!0,!i),p.style.text=u[v],!i){var y=r.ensureState(v);y.textConfig=Ev(s,t,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(f.x=l.style.x),l.style.y!=null&&(f.y=l.style.y),l.ignore=!h,l.useStyle(f),l.dirty(),t.enableTextSetter&&(Rl(l).setLabelText=function(g){var x=Rv(t,e,g);vT(l,x)})}else l&&(l.ignore=!0);r.dirty()}function Pl(r,e){e=e||"label";for(var t={normal:r.getModel(e)},n=0;n<nr.length;n++){var i=nr[n];t[i]=r.getModel([i,e])}return t}function Gn(r,e,t,n,i){var a={};return pT(a,r,t,n,i),e&&H(a,e),a}function Ev(r,e,t){e=e||{};var n={},i,a=r.getShallow("rotate"),o=te(r.getShallow("distance"),t?null:5),s=r.getShallow("offset");return i=r.getShallow("position")||(t?null:"inside"),i==="outside"&&(i=e.defaultOutsidePosition||"top"),i!=null&&(n.position=i),s!=null&&(n.offset=s),a!=null&&(a*=Math.PI/180,n.rotation=a),o!=null&&(n.distance=o),n.outsideFill=r.get("color")==="inherit"?e.inheritColor||null:"auto",e.autoOverflowArea!=null&&(n.autoOverflowArea=e.autoOverflowArea),e.layoutRect!=null&&(n.layoutRect=e.layoutRect),n}function pT(r,e,t,n,i){t=t||kl;var a=e.ecModel,o=a&&a.option.textStyle,s=gT(e),l;if(s){l={};var u="richInheritPlainLabel",c=te(e.get(u),a?a.get(u):void 0);for(var h in s)if(s.hasOwnProperty(h)){var f=e.getModel(["rich",h]);zv(l[h]={},f,o,e,c,t,n,i,!1,!0)}}
9l&&(r.rich=l);var v=e.get("overflow");v&&(r.overflow=v);var p=e.get("lineOverflow");p&&(r.lineOverflow=p);var m=r,y=e.get("minMargin");if(y!=null)y=Se(y)?y/2:0,m.margin=[y,y,y,y],m.__marginType=_i.minMargin;else{var g=e.get("textMargin");g!=null&&(m.margin=Jh(g),m.__marginType=_i.textMargin)}zv(r,e,o,null,null,t,n,i,!0,!1)}function gT(r){for(var e;r&&r!==r.ecModel;){var t=(r.option||kl).rich;if(t){e=e||{};for(var n=Ae(t),i=0;i<n.length;i++){var a=n[i];e[a]=1}}r=r.parentModel}return e}var Ov=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Bv=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Nv=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function zv(r,e,t,n,i,a,o,s,l,u){t=!o&&t||kl;var c=a&&a.inheritColor,h=e.getShallow("color"),f=e.getShallow("textBorderColor"),v=te(e.getShallow("opacity"),t.opacity);(h==="inherit"||h==="auto")&&(c?h=c:h=null),(f==="inherit"||f==="auto")&&(c?f=c:f=null),s||(h=h||t.color,f=f||t.textBorderColor),h!=null&&(r.fill=h),f!=null&&(r.stroke=f);var p=te(e.getShallow("textBorderWidth"),t.textBorderWidth);p!=null&&(r.lineWidth=p);var m=te(e.getShallow("textBorderType"),t.textBorderType);m!=null&&(r.lineDash=m);var y=te(e.getShallow("textBorderDashOffset"),t.textBorderDashOffset);y!=null&&(r.lineDashOffset=y),!o&&v==null&&!u&&(v=a&&a.defaultOpacity),v!=null&&(r.opacity=v),!o&&!s&&r.fill==null&&a.inheritColor&&(r.fill=a.inheritColor);for(var g=0;g<Ov.length;g++){var x=Ov[g],b=i!==!1&&n?wi(e.getShallow(x),n.getShallow(x),t[x]):te(e.getShallow(x),t[x]);b!=null&&(r[x]=b)}for(var g=0;g<Bv.length;g++){var x=Bv[g],b=e.getShallow(x);b!=null&&(r[x]=b)}if(r.verticalAlign==null){var _=e.getShallow("baseline");_!=null&&(r.verticalAlign=_)}if(!l||!a.disableBox){for(var g=0;g<Nv.length;g++){var x=Nv[g],b=e.getShallow(x);b!=null&&(r[x]=b)}var S=e.getShallow("borderType");S!=null&&(r.borderDash=S),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&c&&(r.backgroundColor=c),(r.borderColor==="auto"||r.borderColor==="inherit")&&c&&(r.borderColor=c)}}function mT(r,e){var t=e&&e.getModel("textStyle");return jt([r.fontStyle||t&&t.getShallow("fontStyle")||"",r.fontWeight||t&&t.getShallow("fontWeight")||"",(r.fontSize||t&&t.getShallow("fontSize")||12)+"px",r.fontFamily||t&&t.getShallow("fontFamily")||"sans-serif"].join(" "))}var Rl=Me();function yT(r,e,t,n){if(r){var i=Rl(r);i.prevValue=i.value,i.value=t;var a=e.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=e)}}var _i={minMargin:1,textMargin:2},xT=["textStyle","color"],Bu=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Nu=new Je,bT=(function(){function r(){}return r.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(xT):null)},r.prototype.getFont=function(){return mT({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<Bu.length;n++)t[Bu[n]]=this.getShallow(Bu[n]);return Nu.useStyle(t),Nu.update(),Nu.getBoundingRect()},r})(),$m=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],_T=Fa($m),wT=(function(){function r(){}return r.prototype.getLineStyle=function(e){return _T(this,e)},r})(),Gm=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],ST=Fa(Gm),TT=(function(){function r(){}return r.prototype.getItemStyle=function(e,t){return ST(this,e,t)},r})(),Le=(function(){function r(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return r.prototype.init=function(e,t,n){},r.prototype.mergeOption=function(e,t){fe(this.option,e,!0)},r.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},r.prototype.getShallow=function(e,t){var n=this.option,i=n==null?n:n[e];if(i==null&&!t){var a=this.parentModel;a&&(i=a.getShallow(e))}return i},r.prototype.getModel=function(e,t){var n=e!=null,i=n?this.parsePath(e):null,a=n?this._doGet(i):this.option;return t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new r(a,t,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var e=this.constructor;return new e(ue(this.option))},r.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},r.prototype.resolveParentPath=function(e){return e},r.prototype.isAnimationEnabled=function(){if(!ie.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var i=0;i<e.length&&!(e[i]&&(n=n&&typeof n=="object"?n[e[i]]:null,n==null));i++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},r})();ld(Le);l1(Le);ar(Le,wT);ar(Le,TT);ar(Le,f1);ar(Le,bT);var CT=Math.round(Math.random()*10);function El(r){return[r||"",CT++].join("_")}function MT(r){var e={};r.registerSubTypeDefaulter=function(t,n){var i=Kt(t);e[i.main]=n},r.determineSubType=function(t,n){var i=n.type;if(!i){var a=Kt(t).main;r.hasSubTypes(t)&&e[a]&&(i=e[a](n))}return i}}function DT(r,e){r.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=t(o),c=u.graph,h=u.noEntryList,f={};for(A(a,function(x){f[x]=!0});h.length;){var v=h.pop(),p=c[v],m=!!f[v];m&&(s.call(l,v,p.originalDeps.slice()),delete f[v]),A(p.successor,m?g:y)}A(f,function(){var x="";throw new Error(x)});function y(x){c[x].entryCount--,c[x].entryCount===0&&h.push(x)}function g(x){f[x]=!0,y(x)}};function t(a){var o={},s=[];return A(a,function(l){var u=n(o,l),c=u.originalDeps=e(l),h=i(c,a);u.entryCount=h.length,u.entryCount===0&&s.push(l),A(h,function(f){de(u.predecessor,f)<0&&u.predecessor.push(f);var v=n(o,f);de(v.successor,f)<0&&v.successor.push(l)})}),{graph:o,noEntryList:s}}function n(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function i(a,o){var s=[];return A(a,function(l){de(o,l)>=0&&s.push(l)}),s}}function Ol(r,e){return fe(fe({},r,!0),e,!0)}const AT={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","Frid
9ay","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:". "}}}},LT={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}
9ï¼",withoutName:"第{seriesId}ä¸ªç³»åæ¯ä¸ä¸ª{seriesType}ï¼",separator:{middle:"ï¼",end:"ã"}}},data:{allData:"å
¶æ°æ®æ¯ââ",partialData:"å
¶ä¸ï¼å{displayCnt}项æ¯ââ",withName:"{name}çæ°æ®æ¯{value}",withoutName:"{value}",separator:{middle:"ï¼",end:""}}}};var js="ZH",Sd="EN",Ci=Sd,gs={},Td={},Wm=ie.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Ci).toUpperCase();return r.indexOf(js)>-1?js:Ci})():Ci;function Um(r,e){r=r.toUpperCase(),Td[r]=new Le(e),gs[r]=e}function kT(r){if(K(r)){var e=gs[r.toUpperCase()]||{};return r===js||r===Sd?ue(e):fe(ue(e),ue(gs[Ci]),!1)}else return fe(ue(r),ue(gs[Ci]),!1)}function IT(r){return Td[r]}function PT(){return Td[Ci]}Um(Sd,AT);Um(js,LT);var RT=null;function qs(){return RT}var Cd=1e3,Md=Cd*60,Ma=Md*60,Mt=Ma*24,Fv=Mt*365,ET={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})/},ms={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},OT="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Io="{yyyy}-{MM}-{dd}",Vv={year:"{yyyy}",month:"{yyyy}-{MM}",day:Io,hour:Io+" "+ms.hour,minute:Io+" "+ms.minute,second:Io+" "+ms.second,millisecond:OT},Fn=["year","month","day","hour","minute","second","millisecond"],BT=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function NT(r){return!K(r)&&!ne(r)?zT(r):r}function zT(r){r=r||{};var e={},t=!0;return A(Fn,function(n){t&&(t=r[n]==null)}),A(Fn,function(n,i){var a=r[n];e[n]={};for(var o=null,s=i;s>=0;s--){var l=Fn[s],u=Q(a)&&!X(a)?a[l]:a,c=void 0;X(u)?(c=u.slice(),o=c[0]||""):K(u)?(o=u,c=[o]):(o==null?o=ms[n]:ET[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],t&&(c[1]="{primary|"+o+"}")),e[n][l]=c}}),e}function Tr(r,e){return r+="","0000".substr(0,e-r.length)+r}function Da(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function FT(r){return r===Da(r)}function VT(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Bl(r,e,t,n){var i=Bi(r),a=i[Ym(t)](),o=i[Dd(t)]()+1,s=Math.floor((o-1)/3)+1,l=i[Ad(t)](),u=i["get"+(t?"UTC":"")+"Day"](),c=i[Ld(t)](),h=(c-1)%12+1,f=i[kd(t)](),v=i[Id(t)](),p=i[Pd(t)](),m=c>=12?"pm":"am",y=m.toUpperCase(),g=n instanceof Le?n:IT(n||Wm)||PT(),x=g.getModel("time"),b=x.get("month"),_=x.get("monthAbbr"),S=x.get("dayOfWeek"),w=x.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,m+"").replace(/{A}/g,y+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Tr(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,b[o-1]).replace(/{MMM}/g,_[o-1]).replace(/{MM}/g,Tr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Tr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,S[u]).replace(/{ee}/g,w[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Tr(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Tr(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Tr(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,Tr(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Tr(p,3)).replace(/{S}/g,p+"")}function HT(r,e,t,n,i){var a=null;if(K(t))a=t;else if(ne(t)){var o={time:r.time,level:r.time.level},s=qs();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),a=t(r.value,e,o)}else{var l=r.time;if(l){var u=t[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=Ks(r.value,i);a=t[c][c][0]}}return Bl(new Date(r.value),a,i,n)}function Ks(r,e){var t=Bi(r),n=t[Dd(e)]()+1,i=t[Ad(e)](),a=t[Ld(e)](),o=t[kd(e)](),s=t[Id(e)](),l=t[Pd(e)](),u=l===0,c=u&&s===0,h=c&&o===0,f=h&&a===0,v=f&&i===1,p=v&&n===1;return p?"year":v?"month":f?"day":h?"hour":c?"minute":u?"second":"millisecond"}function dh(r,e,t){switch(e){case"year":r[Zm(t)](0);case"month":r[Xm(t)](1);case"day":r[jm(t)](0);case"hour":r[qm(t)](0);case"minute":r[Km(t)](0);case"second":r[Qm(t)](0)}return r}function Ym(r){return r?"getUTCFullYear":"getFullYear"}function Dd(r){return r?"getUTCMonth":"getMonth"}function Ad(r){return r?"getUTCDate":"getDate"}function Ld(r){return r?"getUTCHours":"getHours"}function kd(r){return r?"getUTCMinutes":"getMinutes"}function Id(r){return r?"getUTCSeconds":"getSeconds"}function Pd(r){return r?"getUTCMilliseconds":"getMilliseconds"}function $T(r){return r?"setUTCFullYear":"setFullYear"}function Zm(r){return r?"setUTCMonth":"setMonth"}function Xm(r){return r?"setUTCDate":"setDate"}function jm(r){return r?"setUTCHours":"setHours"}function qm(r){return r?"setUTCMinutes":"setMinutes"}function Km(r){return r?"setUTCSeconds":"setSeconds"}function Qm(r){return r?"setUTCMilliseconds":"setMilliseconds"}function Jm(r){if(!Nw(r))return K(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function ey(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,n){return n.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Nl=Jh;function fh(r,e,t){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&jt(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?Bi(r):r;if(isNaN(+l)){if(s)return"-"}else return Bl(l,n,t)}if(e==="ordinal")return kc(r)?i(r):Se(r)&&a(r)?r+"":"-";var u=Fs(r);return a(u)?Jm(u):kc(r)?i(r):typeof r=="boolean"?r+"":"-"}var Hv=["a","b","c","d","e","f","g"],zu=function(r,e){return"{"+r+(e??"")+"}"};function ty(r,e,t){X(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a<i.length;a++){var o=Hv[a];
9r=r.replace(zu(o),zu(o,0))}for(var s=0;s<n;s++)for(var l=0;l<i.length;l++){var u=e[s][i[l]];r=r.replace(zu(Hv[l],s),t?tt(u):u)}return r}function GT(r,e){var t=K(r)?{color:r,extraCssText:e}:r||{},n=t.color,i=t.type;e=t.extraCssText;var a=t.renderMode||"html";if(!n)return"";if(a==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+tt(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+tt(n)+";"+(e||"")+'"></span>';var o=t.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function Wn(r,e){return e=e||"transparent",K(r)?r:Q(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}var ys={},Fu={},Rd=(function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(ys),this._normalMasterList=n(Fu);function n(i,a){var o=[];return A(i,function(s,l){var u=s.create(e,t);o=o.concat(u||[])}),o}},r.prototype.update=function(e,t){A(this._normalMasterList,function(n){n.update&&n.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(e,t){if(e==="matrix"||e==="calendar"){ys[e]=t;return}Fu[e]=t},r.get=function(e){return Fu[e]||ys[e]},r})();function WT(r){return!!ys[r]}var $v={coord:1,coord2:2},UT=re();function YT(r){var e=r.getShallow("coord",!0),t=$v.coord;if(e==null){var n=UT.get(r.type);n&&n.getCoord2&&(t=$v.coord2,e=n.getCoord2(r))}return{coord:e,from:t}}var fr={none:0,dataCoordSys:1,boxCoordSys:2};function ZT(r,e){var t=r.getShallow("coordinateSystem"),n=r.getShallow("coordinateSystemUsage",!0),i=fr.none;if(t){var a=r.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=fr.dataCoordSys,a||(i=fr.none)):n==="box"&&(i=fr.boxCoordSys,!a&&!WT(t)&&(i=fr.none))}return{coordSysType:t,kind:i}}function XT(r){var e=r.targetModel,t=r.coordSysType,n=r.coordSysProvider,i=r.isDefaultDataCoordSys,a=ZT(e),o=a.kind,s=a.coordSysType;if(i&&o!==fr.dataCoordSys&&(o=fr.dataCoordSys,s=t),o===fr.none||s!==t)return!1;var l=n(t,e);return l?(o===fr.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var xs=A,jT=["left","right","top","bottom","width","height"],Po=[["width","left","right"],["height","top","bottom"]];function Ed(r,e,t,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),h=e.childAt(u+1),f=h&&h.getBoundingRect(),v,p;if(r==="horizontal"){var m=c.width+(f?-f.x+c.x:0);v=a+m,v>n||l.newline?(a=0,v=m,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var y=c.height+(f?-f.y+c.y:0);p=o+y,p>i||l.newline?(a+=s+t,o=0,p=y,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=v+t:o=p+t)})}var Aa=Ed;Pe(Ed,"vertical");Pe(Ed,"horizontal");function qT(r,e){return{left:r.getShallow("left",e),top:r.getShallow("top",e),right:r.getShallow("right",e),bottom:r.getShallow("bottom",e),width:r.getShallow("width",e),height:r.getShallow("height",e)}}function Li(r,e,t){t=Nl(t||0);var n=e.width,i=e.height,a=He(r.left,n),o=He(r.top,i),s=He(r.right,n),l=He(r.bottom,i),u=He(r.width,n),c=He(r.height,i),h=t[2]+t[0],f=t[1]+t[3],v=r.aspect;switch(isNaN(u)&&(u=n-s-f-a),isNaN(c)&&(c=i-l-h-o),v!=null&&(isNaN(u)&&isNaN(c)&&(v>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=v*c),isNaN(c)&&(c=u/v)),isNaN(a)&&(a=n-s-u-f),isNaN(o)&&(o=i-l-c-h),r.left||r.right){case"center":a=n/2-u/2-t[3];break;case"right":a=n-u-f;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-c/2-t[0];break;case"bottom":o=i-c-h;break}a=a||0,o=o||0,isNaN(u)&&(u=n-f-a-(s||0)),isNaN(c)&&(c=i-h-o-(l||0));var p=new se((e.x||0)+a+t[3],(e.y||0)+o+t[0],u,c);return p.margin=t,p}var Vu={rect:1};function Od(r,e,t){var n,i,a,o=r.boxCoordinateSystem,s;if(o){var l=YT(r),u=l.coord,c=l.from;if(o.dataToLayout){a=Vu.rect,s=c;var h=o.dataToLayout(u);n=h.contentRect||h.rect}}return a==null&&(a=Vu.rect),a===Vu.rect&&(n||(n={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),i=[n.x+n.width/2,n.y+n.height/2]),{type:a,refContainer:n,refPoint:i,boxCoordFrom:s}}function Ua(r){var e=r.layoutMode||r.constructor.layoutMode;return Q(e)?e:e?{type:e}:null}function qr(r,e,t){var n=t&&t.ignoreSize;!X(n)&&(n=[n,n]);var i=o(Po[0],0),a=o(Po[1],1);l(Po[0],r,i),l(Po[1],r,a);function o(u,c){var h={},f=0,v={},p=0,m=2;if(xs(u,function(x){v[x]=r[x]}),xs(u,function(x){Et(e,x)&&(h[x]=v[x]=e[x]),s(h,x)&&f++,s(v,x)&&p++}),n[c])return s(e,u[1])?v[u[2]]=null:s(e,u[2])&&(v[u[1]]=null),v;if(p===m||!f)return v;if(f>=m)return h;for(var y=0;y<u.length;y++){var g=u[y];if(!Et(h,g)&&Et(r,g)){h[g]=r[g];break}}return h}function s(u,c){return u[c]!=null&&u[c]!=="auto"}function l(u,c,h){xs(u,function(f){c[f]=h[f]})}}function zi(r){return KT({},r)}function KT(r,e){return e&&r&&xs(jT,function(t){Et(e,t)&&(r[t]=e[t])}),r}var QT=Me(),ge=(function(r){$(e,r);function e(t,n,i){var a=r.call(this,t,n,i)||this;return a.uid=El("ec_cpt_model"),a}return e.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i)},e.prototype.mergeDefaultAndTheme=function(t,n){var i=Ua(this),a=i?zi(t):{},o=n.getTheme();fe(t,o.get(this.mainType)),fe(t,this.getDefaultOption()),i&&qr(t,a,i)},e.prototype.mergeOption=function(t,n){fe(this.option,t,!0);var i=Ua(this);i&&qr(this.option,t,i)},e.prototype.optionUpdated=function(t,n){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!a1(t))return t.defaultOption;var n=QT(this);if(!n.defaultOption){for(var i=[],a=t;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},l=i.length-1;l>=0;l--)s=fe(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(t,n){var i=t+"Index",a=t+"Id";return ao(this.ecModel,t,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){return qT(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=(function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0})(),e})(Le);im(ge,Le);yl(ge);MT(ge);DT(ge,JT);function JT(r){var e=[];return A(ge.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.depen
9dencies||[])}),e=J(e,function(t){return Kt(t).main}),r!=="dataset"&&de(e,"dataset")<=0&&e.unshift("dataset"),e}var j={color:{},darkColor:{},size:{}},ke=j.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)"};H(ke,{primary:ke.neutral80,secondary:ke.neutral70,tertiary:ke.neutral60,quaternary:ke.neutral50,disabled:ke.neutral20,border:ke.neutral30,borderTint:ke.neutral20,borderShade:ke.neutral40,background:ke.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:ke.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:ke.neutral70,axisLineTint:ke.neutral40,axisTick:ke.neutral70,axisTickMinor:ke.neutral60,axisLabel:ke.neutral70,axisSplitLine:ke.neutral15,axisMinorSplitLine:ke.neutral05});for(var bn in ke)if(ke.hasOwnProperty(bn)){var Gv=ke[bn];bn==="theme"?j.darkColor.theme=ke.theme.slice():bn==="highlight"?j.darkColor.highlight="rgba(255,231,130,0.4)":bn.indexOf("accent")===0?j.darkColor[bn]=$c(Gv,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):j.darkColor[bn]=$c(Gv,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}j.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var ry="";typeof navigator<"u"&&(ry=navigator.platform||"");var ri="rgba(0, 0, 0, 0.2)",ny=j.color.theme[0],eC=$c(ny,null,null,.9);const tC={darkMode:"auto",colorBy:"series",color:j.color.theme,gradientColor:[eC,ny],aria:{decal:{decals:[{color:ri,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ri,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ri,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ri,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ri,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ri,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:ry.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};var iy=re(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),gt="original",Ue="arrayRows",Vt="objectRows",or="keyedColumns",Wr="typedArray",ay="unknown",rr="column",Un="row",ut={Must:1,Might:2,Not:3},oy=Me();function rC(r){oy(r).datasetMap=re()}function nC(r,e,t){var n={},i=sy(e);if(!i||!r)return n;var a=[],o=[],s=e.ecModel,l=oy(s).datasetMap,u=i.uid+"_"+t.seriesLayoutBy,c,h;r=r.slice(),A(r,function(m,y){var g=Q(m)?m:r[y]={name:m};g.type==="ordinal"&&c==null&&(c=y,h=p(g)),n[g.name]=[]});var f=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});A(r,function(m,y){var g=m.name,x=p(m);if(c==null){var b=f.valueWayDim;v(n[g],b,x),v(o,b,x),f.valueWayDim+=x}else if(c===y)v(n[g],0,x),v(a,0,x);else{var b=f.categoryWayDim;v(n[g],b,x),v(o,b,x),f.categoryWayDim+=x}});function v(m,y,g){for(var x=0;x<g;x++)m.push(y+x)}function p(m){var y=m.dimsDef;return y?y.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function sy(r){var e=r.get("data",!0);if(!e)return ao(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},qe).models[0]}function iC(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:ao(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},qe).models}function ly(r,e){return aC(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,e)}function aC(r,e,t,n,i,a){var o,s=5;if(ot(r))return ut.Not;var l,u;if(n){var c=n[a];Q(c)?(l=c.name,u=c.type):K(c)&&(l=c)}if(u!=null)return u==="ordinal"?ut.Must:ut.Not;if(e===Ue){var h=r;if(t===Un){for(var f=h[a],v=0;v<(f||[]).length&&v<s;v++)if((o=_(f[i+v]))!=null)return o}else for(var v=0;v<h.length&&v<s;v++){var p=h[i+v];if(p&&(o=_(p[a]))!=null)return o}}else if(e===Vt){var m=r;if(!l)return ut.Not;for(var v=0;v<m.length&&v<s;v++){var y=m[v];
9if(y&&(o=_(y[l]))!=null)return o}}else if(e===or){var g=r;if(!l)return ut.Not;var f=g[l];if(!f||ot(f))return ut.Not;for(var v=0;v<f.length&&v<s;v++)if((o=_(f[v]))!=null)return o}else if(e===gt)for(var x=r,v=0;v<x.length&&v<s;v++){var y=x[v],b=io(y);if(!X(b))return ut.Not;if((o=_(b[a]))!=null)return o}function _(S){var w=K(S);if(S!=null&&Number.isFinite(Number(S))&&S!=="")return w?ut.Might:ut.Not;if(w&&S!=="-")return ut.Must}return ut.Not}var oC=re();function sC(r,e,t){var n=oC.get(e);if(!n)return t;var i=n(r);return i?t.concat(i):t}var Wv=Me();Me();var Bd=(function(){function r(){}return r.prototype.getColorFromPalette=function(e,t,n){var i=Qe(this.get("color",!0)),a=this.get("colorLayer",!0);return uC(this,Wv,i,a,e,t,n)},r.prototype.clearColorPalette=function(){cC(this,Wv)},r})();function lC(r,e){for(var t=r.length,n=0;n<t;n++)if(r[n].length>e)return r[n];return r[t-1]}function uC(r,e,t,n,i,a,o){a=a||r;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?t:lC(n,o);if(c=c||t,!(!c||!c.length)){var h=c[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%c.length,h}}function cC(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Ro,Ui,Uv,Yv="\0_ec_inner",hC=1,Nd=(function(r){$(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,n,i,a,o,s){a=a||{},this.option=null,this._theme=new Le(a),this._locale=new Le(o),this._optionManager=s},e.prototype.setOption=function(t,n,i){var a=jv(n);this._optionManager.setOption(t,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(t,n){return this._resetOption(t,jv(n))},e.prototype._resetOption=function(t,n){var i=!1,a=this._optionManager;if(!t||t==="recreate"){var o=a.mountOption(t==="recreate");!this.option||t==="recreate"?Uv(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!t||t==="recreate"||t==="media"){var l=a.getMediaOption(this);l.length&&A(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=re(),u=n&&n.replaceMergeMainTypeMap;rC(this),A(t,function(h,f){h!=null&&(ge.hasClass(f)?f&&(s.push(f),l.set(f,!0)):i[f]=i[f]==null?ue(h):fe(i[f],h,!0))}),u&&u.each(function(h,f){ge.hasClass(f)&&!l.get(f)&&(s.push(f),l.set(f,!0))}),ge.topologicalTravel(s,ge.getAllClassMainTypes(),c,this);function c(h){var f=sC(this,h,Qe(t[h])),v=a.get(h),p=v?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",m=Gw(v,f,p);qw(m,h,ge),i[h]=null,a.set(h,null),o.set(h,0);var y=[],g=[],x=0,b;A(m,function(_,S){var w=_.existing,T=_.newOption;if(!T)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var D=h==="series",L=ge.getClass(h,_.keyInfo.subType,!D);if(!L)return;if(h==="tooltip"){if(b)return;b=!0}if(w&&w.constructor===L)w.name=_.keyInfo.name,w.mergeOption(T,this),w.optionUpdated(T,!1);else{var M=H({componentIndex:S},_.keyInfo);w=new L(T,this,this,M),H(w,M),_.brandNew&&(w.__requireNewView=!0),w.init(T,this,this),w.optionUpdated(null,!0)}}w?(y.push(w.option),g.push(w),x++):(y.push(void 0),g.push(void 0))},this),i[h]=y,a.set(h,g),o.set(h,x),h==="series"&&Ro(this)}this._seriesIndices||Ro(this)},e.prototype.getOption=function(){var t=ue(this.option);return A(t,function(n,i){if(ge.hasClass(i)){for(var a=Qe(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!za(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,t[i]=a}}),delete t[Yv],t},e.prototype.setTheme=function(t){this._theme=new Le(t),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,n){var i=this._componentsMap.get(t);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},e.prototype.queryComponents=function(t){var n=t.mainType;if(!n)return[];var i=t.index,a=t.id,o=t.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return i!=null?(l=[],A(Qe(i),function(u){s[u]&&l.push(s[u])})):a!=null?l=Zv("id",a,s):o!=null?l=Zv("name",o,s):l=ze(s,function(u){return!!u}),Xv(l,t)},e.prototype.findComponents=function(t){var n=t.query,i=t.mainType,a=s(n),o=a?this.queryComponents(a):ze(this._componentsMap.get(i),function(u){return!!u});return l(Xv(o,t));function s(u){var c=i+"Index",h=i+"Id",f=i+"Name";return u&&(u[c]!=null||u[h]!=null||u[f]!=null)?{mainType:i,index:u[c],id:u[h],name:u[f]}:null}function l(u){return t.filter?ze(u,t.filter):u}},e.prototype.eachComponent=function(t,n,i){var a=this._componentsMap;if(ne(t)){var o=n,s=t;a.each(function(h,f){for(var v=0;h&&v<h.length;v++){var p=h[v];p&&s.call(o,f,p,p.componentIndex)}})}else for(var l=K(t)?a.get(t):Q(t)?this.findComponents(t):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(i,c,c.componentIndex)}},e.prototype.getSeriesByName=function(t){var n=tr(t,null);return ze(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return ze(this._componentsMap.get("series"),function(n){return!!n&&n.subType===t})},e.prototype.getSeries=function(){return ze(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,n){Ui(this),A(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];t.call(n,a,i)},this)},e.prototype.eachRawSeries=function(t,n){A(this._componentsMap.get("series"),function(i){i&&t.call(n,i,i.componentIndex)})},e.prototype.eachSeriesByType=function(t,n,i){Ui(this),A(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===t&&n.call(i,o,a)},this)},e.prototype.eachRawSeriesByType=function(t,n,i){return A(this.getSeriesByType(t),n,i)},e.prototype.isSeriesFiltered=function(t){return Ui(this),this._seriesIndicesMap.get(t.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,n){Ui(this);var i=[];A(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];t.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=re(i)},e.prototype.restoreData=function(t){Ro(this);var n=this._componentsMap,i=[];n.each(function(a,o){ge.hasClass(o)&&i.push(o)}),ge.topologicalTravel(i,ge.getAllClassMainTypes(),function(a){A(n.get(a),function(o){o&&(a!=="series"||!dC(o,t))&&o.restoreData()})})},e.internalField=(function(){Ro=function(t){var n=t._seriesIndices=[];A(t._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),t._seriesIndicesMap=re(n)},Ui=function(t){},Uv=function(t,n){t.option={},t.option[Yv]=hC,t._componentsMap=re({series:[]}),t._componentsCount=re();var i=n.aria;Q(i)&&i.enabled==null&&(i.enabled=!0),fC(n,t._theme.option),fe(n,tC,!1),t._mergeOption(n,null)}})(),e})(Le);function dC(r,e){if(e){var t=e.seriesIndex,n=e.seriesId,i=e.seriesName;return t!=null&&r.componentIndex!==t||n!=null&&r.id!==n||i!=null&&r.name!==i}}function fC(r,e){var t=r.color&&!r.colorLayer;A(e,function(n,i){i==="colorLayer"&&t||i==="color"&&r.color||ge.hasClass(i)||(typeof n=="object"?r[i]=r[i]?fe(r[i],n,!1):ue(n):r[i]==null&&(r[i]=n))})}function Zv(r,e,t){if(X(e)){var n=re();
9return A(e,function(a){if(a!=null){var o=tr(a,null);o!=null&&n.set(a,!0)}}),ze(t,function(a){return a&&n.get(a[r])})}else{var i=tr(e,null);return ze(t,function(a){return a&&i!=null&&a[r]===i})}}function Xv(r,e){return e.hasOwnProperty("subType")?ze(r,function(t){return t&&t.subType===e.subType}):r}function jv(r){var e=re();return r&&A(Qe(r.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}ar(Nd,Bd);var vC=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],uy=(function(){function r(e){A(vC,function(t){this[t]=ee(e[t],e)},this)}return r})(),pC=/^(min|max)?(.+)$/,gC=(function(){function r(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return r.prototype.setOption=function(e,t,n){e&&(A(Qe(e.series),function(o){o&&o.data&&ot(o.data)&&Ic(o.data)}),A(Qe(e.dataset),function(o){o&&o.source&&ot(o.source)&&Ic(o.source)})),e=ue(e);var i=this._optionBackup,a=mC(e,t,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},r.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],ue(e?t.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(t=ue(n[i.getCurrentIndex()]))}return t},r.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var l=0,u=i.length;l<u;l++)yC(i[l].query,t,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!bC(o,this._currentMediaIndices)&&(s=J(o,function(c){return ue(c===-1?a.option:i[c].option)})),this._currentMediaIndices=o,s},r})();function mC(r,e,t){var n=[],i,a,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,c=!!r.media,h=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((h||c)&&(r.options=r.media=null),a=r),c&&X(u)&&A(u,function(v){v&&v.option&&(v.query?n.push(v):i||(i=v))}),f(a),A(l,function(v){return f(v)}),A(n,function(v){return f(v.option)});function f(v){A(e,function(p){p(v,t)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function yC(r,e,t){var n={width:e,height:t,aspectratio:e/t},i=!0;return A(r,function(a,o){var s=o.match(pC);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();xC(n[u],a,l)||(i=!1)}}),i}function xC(r,e,t){return t==="min"?r>=e:t==="max"?r<=e:r===e}function bC(r,e){return r.join(",")===e.join(",")}var kt=A,Ya=Q,qv=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Hu(r){var e=r&&r.itemStyle;if(e)for(var t=0,n=qv.length;t<n;t++){var i=qv[t],a=e.normal,o=e.emphasis;a&&a[i]&&(r[i]=r[i]||{},r[i].normal?fe(r[i].normal,a[i]):r[i].normal=a[i],a[i]=null),o&&o[i]&&(r[i]=r[i]||{},r[i].emphasis?fe(r[i].emphasis,o[i]):r[i].emphasis=o[i],o[i]=null)}}function We(r,e,t){if(r&&r[e]&&(r[e].normal||r[e].emphasis)){var n=r[e].normal,i=r[e].emphasis;n&&(t?(r[e].normal=r[e].emphasis=null,me(r[e],n)):r[e]=n),i&&(r.emphasis=r.emphasis||{},r.emphasis[e]=i,i.focus&&(r.emphasis.focus=i.focus),i.blurScope&&(r.emphasis.blurScope=i.blurScope))}}function ga(r){We(r,"itemStyle"),We(r,"lineStyle"),We(r,"areaStyle"),We(r,"label"),We(r,"labelLine"),We(r,"upperLabel"),We(r,"edgeLabel")}function Ie(r,e){var t=Ya(r)&&r[e],n=Ya(t)&&t.textStyle;if(n)for(var i=0,a=Xf.length;i<a;i++){var o=Xf[i];n.hasOwnProperty(o)&&(t[o]=n[o])}}function _t(r){r&&(ga(r),Ie(r,"label"),r.emphasis&&Ie(r.emphasis,"label"))}function _C(r){if(Ya(r)){Hu(r),ga(r),Ie(r,"label"),Ie(r,"upperLabel"),Ie(r,"edgeLabel"),r.emphasis&&(Ie(r.emphasis,"label"),Ie(r.emphasis,"upperLabel"),Ie(r.emphasis,"edgeLabel"));var e=r.markPoint;e&&(Hu(e),_t(e));var t=r.markLine;t&&(Hu(t),_t(t));var n=r.markArea;n&&_t(n);var i=r.data;if(r.type==="graph"){i=i||r.nodes;var a=r.links||r.edges;if(a&&!ot(a))for(var o=0;o<a.length;o++)_t(a[o]);A(r.categories,function(u){ga(u)})}if(i&&!ot(i))for(var o=0;o<i.length;o++)_t(i[o]);if(e=r.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)_t(s[o]);if(t=r.markLine,t&&t.data)for(var l=t.data,o=0;o<l.length;o++)X(l[o])?(_t(l[o][0]),_t(l[o][1])):_t(l[o]);r.type==="gauge"?(Ie(r,"axisLabel"),Ie(r,"title"),Ie(r,"detail")):r.type==="treemap"?(We(r.breadcrumb,"itemStyle"),A(r.levels,function(u){ga(u)})):r.type==="tree"&&ga(r.leaves)}}function lr(r){return X(r)?r:r?[r]:[]}function Kv(r){return(X(r)?r[0]:r)||{}}function wC(r,e){kt(lr(r.series),function(n){Ya(n)&&_C(n)});var t=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&t.push("valueAxis","categoryAxis","logAxis","timeAxis"),kt(t,function(n){kt(lr(r[n]),function(i){i&&(Ie(i,"axisLabel"),Ie(i.axisPointer,"label"))})}),kt(lr(r.parallel),function(n){var i=n&&n.parallelAxisDefault;Ie(i,"axisLabel"),Ie(i&&i.axisPointer,"label")}),kt(lr(r.calendar),function(n){We(n,"itemStyle"),Ie(n,"dayLabel"),Ie(n,"monthLabel"),Ie(n,"yearLabel")}),kt(lr(r.radar),function(n){Ie(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap)}),kt(lr(r.geo),function(n){Ya(n)&&(_t(n),kt(lr(n.regions),function(i){_t(i)}))}
9),kt(lr(r.timeline),function(n){_t(n),We(n,"label"),We(n,"itemStyle"),We(n,"controlStyle",!0);var i=n.data;X(i)&&A(i,function(a){Q(a)&&(We(a,"label"),We(a,"itemStyle"))})}),kt(lr(r.toolbox),function(n){We(n,"iconStyle"),kt(n.feature,function(i){We(i,"iconStyle")})}),Ie(Kv(r.axisPointer),"label"),Ie(Kv(r.tooltip).axisPointer,"label")}function SC(r,e){for(var t=e.split(","),n=r,i=0;i<t.length&&(n=n&&n[t[i]],n!=null);i++);return n}function TC(r,e,t,n){for(var i=e.split(","),a=r,o,s=0;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];a[i[s]]==null&&(a[i[s]]=t)}function Qv(r){r&&A(CC,function(e){e[0]in r&&!(e[1]in r)&&(r[e[1]]=r[e[0]])})}var CC=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],MC=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],$u=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Yi(r){var e=r&&r.itemStyle;if(e)for(var t=0;t<$u.length;t++){var n=$u[t][1],i=$u[t][0];e[n]!=null&&(e[i]=e[n])}}function Jv(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function ep(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function DC(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function cy(r,e){if(r)for(var t=0;t<r.length;t++)e(r[t]),r[t]&&cy(r[t].children,e)}function hy(r,e){wC(r,e),r.series=Qe(r.series),A(r.series,function(t){if(Q(t)){var n=t.type;if(n==="line")t.clipOverflow!=null&&(t.clip=t.clipOverflow);else if(n==="pie"||n==="gauge"){t.clockWise!=null&&(t.clockwise=t.clockWise),Jv(t.label);var i=t.data;if(i&&!ot(i))for(var a=0;a<i.length;a++)Jv(i[a]);t.hoverOffset!=null&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if(n==="gauge"){var o=SC(t,"pointer.color");o!=null&&TC(t,"itemStyle.color",o)}else if(n==="bar"){Yi(t),Yi(t.backgroundStyle),Yi(t.emphasis);var i=t.data;if(i&&!ot(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(Yi(i[a]),Yi(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=t.highlightPolicy;s&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=s)),ep(t),cy(t.data,ep)}else n==="graph"||n==="sankey"?DC(t):n==="map"&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&me(t,t.mapLocation));t.hoverAnimation!=null&&(t.emphasis=t.emphasis||{},t.emphasis&&t.emphasis.scale==null&&(t.emphasis.scale=t.hoverAnimation)),Qv(t)}}),r.dataRange&&(r.visualMap=r.dataRange),A(MC,function(t){var n=r[t];n&&(X(n)||(n=[n]),A(n,function(i){Qv(i)}))})}function AC(r){var e=re();r.eachSeries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),a=t.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:t};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.push(o)}}),e.each(function(t){if(t.length!==0){var n=t[0].seriesModel,i=n.get("stackOrder")||"seriesAsc";i==="seriesDesc"&&t.reverse(),A(t,function(a,o){a.data.setCalculationInfo("stackedOnSeries",o>0?t[o-1].seriesModel:null)}),LC(t)}})}function LC(r){A(r,function(e,t){var n=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,h){var f=o.get(e.stackedDimension,h);if(isNaN(f))return i;var v,p;s?p=o.getRawIndex(h):v=o.get(e.stackedByDimension,h);for(var m=NaN,y=t-1;y>=0;y--){var g=r[y];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,v)),p>=0){var x=g.data.getByRawIndex(g.stackResultDimension,p);if(l==="all"||l==="positive"&&x>0||l==="negative"&&x<0||l==="samesign"&&f>=0&&x>0||l==="samesign"&&f<=0&&x<0){f=Ew(f,x),m=x;break}}}return n[0]=f,n[1]=m,n})})}var zl=(function(){function r(e){this.data=e.data||(e.sourceFormat===or?{}:[]),this.sourceFormat=e.sourceFormat||ay,this.seriesLayoutBy=e.seriesLayoutBy||rr,this.startIndex=e.startIndex||
90,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var i=t[n];i.type==null&&ly(this,n)===ut.Must&&(i.type="ordinal")}}return r})();function zd(r){return r instanceof zl}function vh(r,e,t){t=t||fy(r);var n=e.seriesLayoutBy,i=IC(r,t,n,e.sourceHeader,e.dimensions),a=new zl({data:r,sourceFormat:t,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:ue(e)});return a}function dy(r){return new zl({data:r,sourceFormat:ot(r)?Wr:gt})}function kC(r){return new zl({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:ue(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function fy(r){var e=ay;if(ot(r))e=Wr;else if(X(r)){r.length===0&&(e=Ue);for(var t=0,n=r.length;t<n;t++){var i=r[t];if(i!=null){if(X(i)||ot(i)){e=Ue;break}else if(Q(i)){e=Vt;break}}}}else if(Q(r)){for(var a in r)if(Et(r,a)&&at(r[a])){e=or;break}}return e}function IC(r,e,t,n,i){var a,o;if(!r)return{dimensionsDefine:tp(i),startIndex:o,dimensionsDetectedCount:a};if(e===Ue){var s=r;n==="auto"||n==null?rp(function(u){u!=null&&u!=="-"&&(K(u)?o==null&&(o=1):o=0)},t,s,10):o=Se(n)?n:n?1:0,!i&&o===1&&(i=[],rp(function(u,c){i[c]=u!=null?u+"":""},t,s,1/0)),a=i?i.length:t===Un?s.length:s[0]?s[0].length:null}else if(e===Vt)i||(i=PC(r));else if(e===or)i||(i=[],A(r,function(u,c){i.push(c)}));else if(e===gt){var l=io(r[0]);a=X(l)&&l.length||1}return{startIndex:o,dimensionsDefine:tp(i),dimensionsDetectedCount:a}}function PC(r){for(var e=0,t;e<r.length&&!(t=r[e++]););if(t)return Ae(t)}function tp(r){if(r){var e=re();return J(r,function(t,n){t=Q(t)?t:{name:t};var i={name:t.name,displayName:t.displayName,type:t.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=e.get(i.name);return a?i.name+="-"+a.count++:e.set(i.name,{count:1}),i})}}function rp(r,e,t,n){if(e===Un)for(var i=0;i<t.length&&i<n;i++)r(t[i]?t[i][0]:null,i);else for(var a=t[0]||[],i=0;i<a.length&&i<n;i++)r(a[i],i)}function vy(r){var e=r.sourceFormat;return e===Vt||e===or}var _n,wn,Sn,Tn,np,ip,py=(function(){function r(e,t){var n=zd(e)?e:dy(e);this._source=n;var i=this._data=n.data,a=n.sourceFormat;n.seriesLayoutBy,a===Wr&&(this._offset=0,this._dimSize=t,this._data=i),ip(this,i,n)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(e,t){},r.prototype.appendData=function(e){},r.prototype.clean=function(){},r.protoInitialize=(function(){var e=r.prototype;e.pure=!1,e.persistent=!0})(),r.internalField=(function(){var e;ip=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,h=l.startIndex,f=l.dimensionsDefine,v=np[Fd(u,c)];if(H(o,v),u===Wr)o.getItem=t,o.count=i,o.fillStorage=n;else{var p=gy(u,c);o.getItem=ee(p,null,s,h,f);var m=my(u,c);o.count=ee(m,null,s,h,f)}};var t=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,h=0;h<u;h++)s[h]=l[c+h];return s},n=function(o,s,l,u){for(var c=this._data,h=this._dimSize,f=0;f<h;f++){for(var v=u[f],p=v[0]==null?1/0:v[0],m=v[1]==null?-1/0:v[1],y=s-o,g=l[f],x=0;x<y;x++){var b=c[x*h+f];g[o+x]=b,b<p&&(p=b),b>m&&(m=b)}v[0]=p,v[1]=m}},i=function(){return this._data?this._data.length/this._dimSize:0};np=(e={},e[Ue+"_"+rr]={pure:!0,appendData:a},e[Ue+"_"+Un]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Vt]={pure:!0,appendData:a},e[or]={pure:!0,appendData:function(o){var s=this._data;A(o,function(l,u){for(var c=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)c.push(l[h])})}},e[gt]={appendData:a},e[Wr]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}})(),r})(),Eo=function(r){X(r)||J0("series.data or dataset.source must be an array.")};_n={},_n[Ue+"_"+rr]=Eo,_n[Ue+"_"+Un]=Eo,_n[Vt]=Eo,_n[or]=function(r,e){for(var t=0;t<e.length;t++){var n=e[t].name;n==null&&J0("dimension name must not be null/undefined.")}},_n[gt]=Eo;var ap=function(r,e,t,n){return r[n]},RC=(wn={},wn[Ue+"_"+rr]=function(r,e,t,n){return r[n+e]},wn[Ue+"_"+Un]=function(r,e,t,n,i){n+=e;for(var a=i||[],o=r,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[n]:null}return a},wn[Vt]=ap,wn[or]=function(r,e,t,n,i){for(var a=i||[],o=0;o<t.length;o++){var s=t[o].name,l=s!=null?r[s]:null;a[o]=l?l[n]:null}return a},wn[gt]=ap,wn);function gy(r,e){var t=RC[Fd(r,e)];return t}var op=function(r,e,t){return r.length},EC=(Sn={},Sn[Ue+"_"+rr]=function(r,e,t){return Math.max(0,r.length-e)},Sn[Ue+"_"+Un]=function(r,e,t){var n=r[0];return n?Math.max(0,n.length-e):0},Sn[Vt]=op,Sn[or]=function(r,e,t){var n=t[0].name,i=n!=null?r[n]:null;return i?i.length:0},Sn[gt]=op,Sn);function my(r,e){var t=EC[Fd(r,e)];return t}var Gu=function(r,e,t){return r[e]},OC=(Tn={},Tn[Ue]=Gu,Tn[Vt]=function(r,e,t){return r[t]},Tn[or]=Gu,Tn[gt]=function(r,e,t){var n=io(r);return n instanceof Array?n[e]:n},Tn[Wr]=Gu,Tn);function yy(r){var e=OC[r];return e}function Fd(r,e){return r===Ue?r+"_"+e:r}function ki(r,e,t){if(r){var n=r.getRawDataItem(e);if(n!=null){var i=r.getStore(),a=i.getSource().sourceFormat;if(t!=null){var o=r.getDimensionIndex(t),s=i.getDimensionProperty(o);return yy(a)(n,o,s)}else{var l=n;return a===gt&&(l=io(n)),l}}}}var BC=/\{@(.+?)\}/g,NC=(function(){function r(){}return r.prototype.getDataParams=function(e,t){var n=this.getData(t),i=this.getRawValue(e,t),a=n.getRawIndex(e),o=n.getName(e),s=n.getRawDataItem(e),l=n.getItemVisual(e,"style"),u=l&&l[n.getItemVisual(e,"drawType")||"fill"],c=l&&l.stroke,h=this.mainType,f=h==="series",v=n.userOutput&&n.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,
9seriesName:f?this.name:null,name:o,dataIndex:a,data:s,dataType:t,value:i,color:u,borderColor:c,dimensionNames:v?v.fullDimensions:null,encode:v?v.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(e,t,n,i,a,o){t=t||"normal";var s=this.getData(n),l=this.getDataParams(e,n);if(o&&(l.value=o.interpolatedValue),i!=null&&X(l.value)&&(l.value=l.value[i]),!a){var u=s.getItemModel(e);a=u.get(t==="normal"?["label","formatter"]:[t,"label","formatter"])}if(ne(a))return l.status=t,l.dimensionIndex=i,a(l);if(K(a)){var c=ty(a,l);return c.replace(BC,function(h,f){var v=f.length,p=f;p.charAt(0)==="["&&p.charAt(v-1)==="]"&&(p=+p.slice(1,v-1));var m=ki(s,e,p);if(o&&X(o.interpolatedValue)){var y=s.getDimensionIndex(p);y>=0&&(m=o.interpolatedValue[y])}return m!=null?m+"":""})}},r.prototype.getRawValue=function(e,t){return ki(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,n){},r})();function sp(r){var e,t;return Q(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function La(r){return new zC(r)}var zC=(function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var i=this.context;i.data=i.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(x){return!(x>=1)&&(x=1),x}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=l,this._modDataCount=u;var f=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,p=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!n&&(h||v<p)){var m=this._progress;if(X(m))for(var y=0;y<m.length;y++)this._doProgress(m[y],v,p,l,u);else this._doProgress(m,v,p,l,u)}this._dueIndex=p;var g=this._settedOutputEnd!=null?this._settedOutputEnd:p;this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(e,t,n,i,a){lp.reset(t,n,i,a),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:lp.next},this.context)},r.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),X(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},r})(),lp=(function(){var r,e,t,n,i,a={reset:function(l,u,c,h){e=l,r=u,t=c,n=h,i=Math.ceil(n/t),a.next=t>1&&n>0?s:o}};return a;function o(){return e<r?e++:null}function s(){var l=e%i*t+Math.ceil(e/i),u=e>=r?null:l<n?l:e;return e++,u}})();function bs(r,e){var t=e&&e.type;return t==="ordinal"?r:(t==="time"&&!Se(r)&&r!=null&&r!=="-"&&(r=+Bi(r)),r==null||r===""?NaN:Number(r))}re({number:function(r){return parseFloat(r)},time:function(r){return+Bi(r)},trim:function(r){return K(r)?jt(r):r}});var FC=(function(){function r(e,t){var n=e==="desc";this._resultLT=n?1:-1,t==null&&(t=n?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var n=Se(e)?e:Fs(e),i=Se(t)?t:Fs(t),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=K(e),l=K(t);s&&(n=l?e:0),l&&(i=s?t:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},r})(),VC=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return bs(e,t)},r})();function HC(r,e){var t=new VC,n=r.data,i=t.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==rr&&nt(o);var s=[],l={},u=r.dimensionsDefine;if(u)A(u,function(m,y){var g=m.name,x={index:y,name:g,displayName:m.displayName};if(s.push(x),g!=null){var b="";Et(l,g)&&nt(b),l[g]=x}});else for(var c=0;c<r.dimensionsDetectedCount;c++)s.push({index:c});var h=gy(i,rr);e.__isBuiltIn&&(t.getRawDataItem=function(m){return h(n,a,s,m)},t.getRawData=ee($C,null,r)),t.cloneRawData=ee(GC,null,r);var f=my(i,rr);t.count=ee(f,null,n,a,s);var v=yy(i);t.retrieveValue=function(m,y){var g=h(n,a,s,m);return p(g,y)};var p=t.retrieveValueFromItem=function(m,y){if(m!=null){var g=s[y];
9if(g)return v(m,y,g.name)}};return t.getDimensionInfo=ee(WC,null,s,l),t.cloneAllDimensionInfo=ee(UC,null,s),t}function $C(r){var e=r.sourceFormat;if(!Vd(e)){var t="";nt(t)}return r.data}function GC(r){var e=r.sourceFormat,t=r.data;if(!Vd(e)){var n="";nt(n)}if(e===Ue){for(var i=[],a=0,o=t.length;a<o;a++)i.push(t[a].slice());return i}else if(e===Vt){for(var i=[],a=0,o=t.length;a<o;a++)i.push(H({},t[a]));return i}}function WC(r,e,t){if(t!=null){if(Se(t)||!isNaN(t)&&!Et(e,t))return r[t];if(Et(e,t))return e[t]}}function UC(r){return ue(r)}var xy=re();function YC(r){r=ue(r);var e=r.type,t="";e||nt(t);var n=e.split(":");n.length!==2&&nt(t);var i=!1;n[0]==="echarts"&&(e=n[1],i=!0),r.__isBuiltIn=i,xy.set(e,r)}function ZC(r,e,t){var n=Qe(r),i=n.length,a="";i||nt(a);for(var o=0,s=i;o<s;o++){var l=n[o];e=XC(l,e),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function XC(r,e,t,n){var i="";e.length||nt(i),Q(r)||nt(i);var a=r.type,o=xy.get(a);o||nt(i);var s=J(e,function(u){return HC(u,o)}),l=Qe(o.transform({upstream:s[0],upstreamList:s,config:ue(r.config)}));return J(l,function(u,c){var h="";Q(u)||nt(h),u.data||nt(h);var f=fy(u.data);Vd(f)||nt(h);var v,p=e[0];if(p&&c===0&&!u.dimensions){var m=p.startIndex;m&&(u.data=p.data.slice(0,m).concat(u.data)),v={seriesLayoutBy:rr,sourceHeader:m,dimensions:p.metaRawOption.dimensions}}else v={seriesLayoutBy:rr,sourceHeader:0,dimensions:u.dimensions};return vh(u.data,v,null)})}function Vd(r){return r===Ue||r===Vt}var Fl="undefined",jC=typeof Uint32Array===Fl?Array:Uint32Array,qC=typeof Uint16Array===Fl?Array:Uint16Array,by=typeof Int32Array===Fl?Array:Int32Array,up=typeof Float64Array===Fl?Array:Float64Array,_y={float:up,int:by,ordinal:Array,number:Array,time:up},Wu;function ni(r){return r>65535?jC:qC}function ii(){return[1/0,-1/0]}function KC(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function cp(r,e,t,n,i){var a=_y[t||"float"];if(i){var o=r[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;u<s;u++)l[u]=o[u];r[e]=l}}else r[e]=new a(n)}var ph=(function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=re()}return r.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),a=this.defaultDimValueGetter=Wu[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[],vy(i),this._dimensions=J(t,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,e.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(e);if(a!=null){if(i[a].type===t)return a}else a=i.length;return i[a]={type:t},n.set(e,a),this._chunks[a]=new _y[t||"float"](this._rawCount),this._rawExtent[a]=ii(),a},r.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],i=this._dimensions[e],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[e]=ii());for(var l=a[e],u=o;u<s;u++){var c=n[u]=t.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}i.ordinalMeta=t,i.ordinalOffset=s,i.type="ordinal"},r.prototype.getOrdinalMeta=function(e){var t=this._dimensions[e],n=t.ordinalMeta;return n},r.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},r.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var i=t.count();return t.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},r.prototype.appendValues=function(e,t){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t||0),u=0;u<a;u++){var c=i[u];cp(n,u,c.type,l,!0)}for(var h=[],f=s;f<l;f++)for(var v=f-s,p=0;p<a;p++){var c=i[p],m=Wu.arrayRows.call(this,e[v]||h,c.property,v,p);n[p][f]=m;var y=o[p];m<y[0]&&(y[0]=m),m>y[1]&&(y[1]=m)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=J(o,function(x){return x.property}),c=0;c<s;c++){var h=o[c];l[c]||(l[c]=ii()),cp(a,c,h.type,t,n)}if(i.fillStorage)i.fillStorage(e,t,a,l);else for(var f=[],v=e;v<t;v++){f=i.getItem(v,f);for(var p=0;p<s;p++){var m=a[p],y=this._dimValueGetter(f,u[p],v,p);m[v]=y;var g=l[p];y<g[0]&&(g[0]=y),y>g[1]&&(g[1]=y)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},r.prototype.getValues=function(e,t){var n=[],i=[];if(t==null){t=e,e=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=e;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],t));return n},r.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},r.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var i=0,a=this.count();i<a;i++){var o=this.get(e,i);isNaN(o)||(n+=o)}return n},r.prototype.getMedian=function(e){var t=[];
9this.each([e],function(a){isNaN(a)||t.push(a)});var n=t.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},r.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&n<this._count&&n===e)return e;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(t[o]<e)i=o+1;else if(t[o]>e)a=o-1;else return o}return-1},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a<i;a++)e[a]=t[a]}else e=new n(t.buffer,0,i)}else{var n=ni(this._rawCount);e=new n(this.count());for(var a=0;a<e.length;a++)e[a]=a}return e},r.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=ni(n._rawCount),o=new a(i),s=[],l=e.length,u=0,c=e[0],h=n._chunks,f=0;f<i;f++){var v=void 0,p=n.getRawIndex(f);if(l===0)v=t(f);else if(l===1){var m=h[c][p];v=t(m,f)}else{for(var y=0;y<l;y++)s[y]=h[e[y]][p];s[y]=f,v=t.apply(null,s)}v&&(o[u++]=p)}return u<i&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},r.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var i=Ae(e),a=i.length;if(!a)return this;var o=t.count(),s=ni(t._rawCount),l=new s(o),u=0,c=i[0],h=e[c][0],f=e[c][1],v=t._chunks,p=!1;if(!t._indices){var m=0;if(a===1){for(var y=v[i[0]],g=0;g<n;g++){var x=y[g];(x>=h&&x<=f||isNaN(x))&&(l[u++]=m),m++}p=!0}else if(a===2){for(var y=v[i[0]],b=v[i[1]],_=e[i[1]][0],S=e[i[1]][1],g=0;g<n;g++){var x=y[g],w=b[g];(x>=h&&x<=f||isNaN(x))&&(w>=_&&w<=S||isNaN(w))&&(l[u++]=m),m++}p=!0}}if(!p)if(a===1)for(var g=0;g<o;g++){var T=t.getRawIndex(g),x=v[i[0]][T];(x>=h&&x<=f||isNaN(x))&&(l[u++]=T)}else for(var g=0;g<o;g++){for(var D=!0,T=t.getRawIndex(g),L=0;L<a;L++){var M=i[L],x=v[M][T];(x<e[M][0]||x>e[M][1])&&(D=!1)}D&&(l[u++]=t.getRawIndex(g))}return u<o&&(t._indices=l),t._count=u,t._extent=[],t._updateGetRawIdx(),t},r.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},r.prototype.modify=function(e,t){this._updateDims(this,e,t)},r.prototype._updateDims=function(e,t,n){for(var i=e._chunks,a=[],o=t.length,s=e.count(),l=[],u=e._rawExtent,c=0;c<t.length;c++)u[t[c]]=ii();for(var h=0;h<s;h++){for(var f=e.getRawIndex(h),v=0;v<o;v++)l[v]=i[t[v]][f];l[o]=h;var p=n&&n.apply(null,l);if(p!=null){typeof p!="object"&&(a[0]=p,p=a);for(var c=0;c<p.length;c++){var m=t[c],y=p[c],g=u[m],x=i[m];x&&(x[f]=y),y<g[0]&&(g[0]=y),y>g[1]&&(g[1]=y)}}}},r.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,h,f,v=new(ni(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var p=1;p<o-1;p+=l){for(var m=Math.min(p+l,o-1),y=Math.min(p+l*2,o),g=(y+m)/2,x=0,b=m;b<y;b++){var _=this.getRawIndex(b),S=a[_];isNaN(S)||(x+=S)}x/=y-m;var w=p,T=Math.min(p+l,o),D=p-1,L=a[u];c=-1,f=w;for(var M=-1,C=0,b=w;b<T;b++){var _=this.getRawIndex(b),S=a[_];if(isNaN(S)){C++,M<0&&(M=_);continue}h=Math.abs((D-g)*(S-L)-(D-b)*(x-L)),h>c&&(c=h,f=_)}C>0&&C<T-w&&(v[s++]=Math.min(M,f),f=Math.max(M,f)),v[s++]=f,u=f}return v[s++]=this.getRawIndex(o-1),n._count=s,n._indices=v,n.getRawIndex=this._getRawIdx,n},r.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),i=n._chunks,a=Math.floor(1/t),o=i[e],s=this.count(),l=new(ni(this._rawCount))(Math.ceil(s/a)*2),u=0,c=0;c<s;c+=a){var h=c,f=o[this.getRawIndex(h)],v=c,p=o[this.getRawIndex(v)],m=a;c+a>s&&(m=s-c);for(var y=0;y<m;y++){var g=this.getRawIndex(c+y),x=o[g];x<f&&(f=x,h=c+y),x>p&&(p=x,v=c+y)}var b=this.getRawIndex(h),_=this.getRawIndex(v);h<v?(l[u++]=b,l[u++]=_):(l[u++]=_,l[u++]=b)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},r.prototype.downSample=function(e,t,n,i){for(var a=this.clone([e],!0),o=a._chunks,s=[],l=Math.floor(1/t),u=o[e],c=this.count(),h=a._rawExtent[e]=ii(),f=new(ni(this._rawCount))(Math.ceil(c/l)),v=0,p=0;p<c;p+=l){l>c-p&&(l=c-p,s.length=l);for(var m=0;m<l;m++){var y=this.getRawIndex(p+m);s[m]=u[y]}var g=n(s),x=this.getRawIndex(Math.min(p+i(s,g)||0,c-1));u[x]=g,g<h[0]&&(h[0]=g),g>h[1]&&(h[1]=g),f[v++]=x}return a._count=v,a._indices=f,a._updateGetRawIdx(),a},r.prototype.each=function(e,t){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:t(a);break;case 1:t(i[e[0]][s],a);break;case 2:t(i[e[0]][s],i[e[1]][s],a);break;default:for(var l=0,u=[];l<n;l++)u[l]=i[e[l]][s];u[l]=a,t.apply(null,u)}}},r.prototype.getDataExtent=function(e){var t=this._chunks[e],n=ii();if(!t)return n;var i=this.count(),a=!this._indices,o;if(a)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<i;u++){var c=this.getRawIndex(u),h=t[c];h<s&&(s=h),h>l&&(l=h)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][t]);return n},r.prototype.clone=function(e,t){var n=new r,i=this._chunks,a=e&&Ei(e,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?KC(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),t||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},r.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=ue(this._extent),e._rawExtent=ue(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var i=0;i<n;i++)t[i]=this._indices[i]}else t=new e(this._indices);return t}return null},r.prototype._getRawIdxIdentity=function(e){return e},r.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function e(t,n,i,a){return bs(t[a],this._dimensions[a])}Wu={arrayRows:e,objectRows:function(t,n,i,a){return bs(t[n],this._dimensions[a])},keyedColumns:e,original:function(t,n,i,a){var o=t&&(t.value==null?t:t.value);return bs(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(t,n,i,a){return t[a]}}})(),r})(),QC=(function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,i,a;if(Oo(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=ot(s)?Wr:gt,a=[];var h=this._getSourceMetaRawOption()||{},f=u&&u.metaRawOption||{},v=te(h.seriesLayoutBy,f.seriesLayoutBy)||null,p=te(h.sourceHeader,f.sourceHeader),m=te(h.dimensions,f.dimensions),y=v!==f.seriesLayoutBy||!!p!=!!f.sourceHeader||m;i=y?[vh(s,{seriesLayoutBy:v,sourceHeader:p,dimensions:m},l)]:[]}else{var g=e;if(n){var x=this._applyTransform(t);i=x.sourceList,a=x.upstreamSignList}else{var b=g.get("source",!0);i=[vh(b,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},r.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get("transform",!0),i=t.get("fromTransformResult",!0);if(i!=null){var a="";e.length!==1&&hp(a)}var o,s=[],l=[];return A(e,function(u){u.prepareSource();var c=u.getSource(i||0),h="";i!=null&&!c&&hp(h),s.push(c),l.push(u._getVersionSign())}),n?o=ZC(n,s,{datasetIndex:t.componentIndex}):i!=null&&(o=[kC(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},r.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},r.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},r.prototype._innerGetDataStore=function(e,t,n){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];Oo(this._sourceHost)&&l?s=l._innerGetDataStore(e,t,n):(s=new ph,s.initData(new py(t,e.length),e)),o[n]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Oo(e)){var t=sy(e);return t?[t.getSourceManager()]:[]}else return J(iC(e),function(n){return n.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,i;if(Oo(e))t=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),i=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=e;t=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:i}},r})();function Oo(r){return r.mainType==="series"}function hp(r){throw new Error(r)}var JC="line-height:1";function wy(r){var e=r.lineHeight;return e==null?JC:"line-height:"+tt(e+"")+"px"}
9function Sy(r,e){var t=r.color||j.color.tertiary,n=r.fontSize||12,i=r.fontWeight||"400",a=r.color||j.color.secondary,o=r.fontSize||14,s=r.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+tt(n+"")+"px;color:"+tt(t)+";font-weight:"+tt(i+""),valueStyle:"font-size:"+tt(o+"")+"px;color:"+tt(a)+";font-weight:"+tt(s+"")}:{nameStyle:{fontSize:n,fill:t,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var e2=[0,10,20,30],t2=["",` 10`,` 11 12`,` 13 14 15`];function Za(r,e){return e.type=r,e}function gh(r){return r.type==="section"}function Ty(r){return gh(r)?r2:n2}function Cy(r){if(gh(r)){var e=0,t=r.blocks.length,n=t>1||t>0&&!r.noHeader;return A(r.blocks,function(i){var a=Cy(i);a>=e&&(e=a+ +(n&&(!a||gh(i)&&!i.noHeader)))}),e}return 0}function r2(r,e,t,n){var i=e.noHeader,a=i2(Cy(e)),o=[],s=e.blocks||[];xr(!s||X(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Et(u,l)){var c=new FC(u[l],null);s.sort(function(m,y){return c.evaluate(m.sortParam,y.sortParam)})}else l==="seriesDesc"&&s.reverse()}A(s,function(m,y){var g=e.valueFormatter,x=Ty(m)(g?H(H({},r),{valueFormatter:g}):r,m,y>0?a.html:0,n);x!=null&&o.push(x)});var h=r.renderMode==="richText"?o.join(a.richText):mh(n,o.join(""),i?t:a.html);if(i)return h;var f=fh(e.header,"ordinal",r.useUTC),v=Sy(n,r.renderMode).nameStyle,p=wy(n);return r.renderMode==="richText"?My(r,f,v)+a.richText+h:mh(n,'<div style="'+v+";"+p+';">'+tt(f)+"</div>"+h,t)}function n2(r,e,t,n){var i=r.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(_){return _=X(_)?_:[_],J(_,function(S,w){return fh(S,X(v)?v[w]:v,u)})};if(!(a&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||j.color.secondary,i),f=a?"":fh(l,"ordinal",u),v=e.valueType,p=o?[]:c(e.value,e.dataIndex),m=!s||!a,y=!s&&a,g=Sy(n,i),x=g.nameStyle,b=g.valueStyle;return i==="richText"?(s?"":h)+(a?"":My(r,f,x))+(o?"":s2(r,p,m,y,b)):mh(n,(s?"":h)+(a?"":a2(f,!s,x))+(o?"":o2(p,m,y,b)),t)}}function dp(r,e,t,n,i,a){if(r){var o=Ty(r),s={useUTC:i,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function i2(r){return{html:e2[r],richText:t2[r]}}function mh(r,e,t){var n='<div style="clear:both"></div>',i="margin: "+t+"px 0 0",a=wy(r);return'<div style="'+i+";"+a+';">'+e+n+"</div>"}function a2(r,e,t){var n=e?"margin-left:2px":"";return'<span style="'+t+";"+n+'">'+tt(r)+"</span>"}function o2(r,e,t,n){var i=t?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return r=X(r)?r:[r],'<span style="'+a+";"+n+'">'+J(r,function(o){return tt(o)}).join(" ")+"</span>"}function My(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function s2(r,e,t,n,i){var a=[i],o=n?10:20;return t&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(X(e)?e.join(" "):e,a)}function l2(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return Wn(n)}function Dy(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var Uu=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=K0()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,n){var i=n==="richText"?this._generateStyleName():null,a=GT({color:t,type:e,renderMode:n,markerId:i});return K(a)?a:(this.richTextStyles[i]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(e,t){var n={};X(t)?A(t,function(a){return H(n,a)}):H(n,t);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},r})();function u2(r){var e=r.series,t=r.dataIndex,n=r.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(t),l=X(s),u=l2(e,t),c,h,f,v;if(o>1||l&&!o){var p=c2(s,e,t,a,u);c=p.inlineValues,h=p.inlineValueTypes,f=p.blocks,v=p.inlineValues[0]}else if(o){var m=i.getDimensionInfo(a[0]);v=c=ki(i,t,a[0]),h=m.type}else v=c=l?s[0]:s;var y=od(e),g=y&&e.name||"",x=i.getName(t),b=n?g:x;
15return Za("section",{header:g,noHeader:n||!y,sortParam:v,blocks:[Za("nameValue",{markerType:"item",markerColor:u,name:b,noName:!jt(b),value:c,valueType:h,dataIndex:t})].concat(f||[])})}function c2(r,e,t,n,i){var a=e.getData(),o=Ei(r,function(h,f,v){var p=a.getDimensionInfo(v);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?A(n,function(h){c(ki(a,t,h),h)}):A(r,c);function c(h,f){var v=a.getDimensionInfo(f);!v||v.otherDims.tooltip===!1||(o?u.push(Za("nameValue",{markerType:"subItem",markerColor:i,name:v.displayName,value:h,valueType:v.type})):(s.push(h),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Cr=Me();function Bo(r,e){return r.getName(e)||r.getId(e)}var h2="__universalTransitionEnabled",ir=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,n,i){this.seriesIndex=this.componentIndex,this.dataTask=La({count:f2,reset:v2}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i);var a=Cr(this).sourceManager=new QC(this);a.prepareSource();var o=this.getInitialData(t,i);vp(o,this),this.dataTask.context.data=o,Cr(this).dataBeforeProcessed=o,fp(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var i=Ua(this),a=i?zi(t):{},o=this.subType;ge.hasClass(o)&&(o+="Series"),fe(t,n.getTheme().get(this.subType)),fe(t,this.getDefaultOption()),Zf(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&qr(t,a,i)},e.prototype.mergeOption=function(t,n){t=fe(this.option,t,!0),this.fillDataTextStyle(t.data);var i=Ua(this);i&&qr(this.option,t,i);var a=Cr(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(t,n);vp(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Cr(this).dataBeforeProcessed=o,fp(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!ot(t))for(var n=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&Zf(t[i],"label",n)},e.prototype.getInitialData=function(t,n){},e.prototype.appendData=function(t){var n=this.getRawData();n.appendData(t.data)},e.prototype.getData=function(t){var n=yh(this);if(n){var i=n.context.data;return t==null||!i.getLinkedData?i:i.getLinkedData(t)}else return Cr(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var n=yh(this);if(n){var i=n.context;i.outputData=t,n!==this.dataTask&&(i.data=t)}Cr(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return re(t)},e.prototype.getSourceManager=function(){return Cr(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Cr(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var t=this.get("colorBy");return t||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.indicesOfNearest=function(t,n,i,a){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(t);if(!s||!l)return[];var u=l.dataToCoord(i);a==null&&(a=1/0);var c=[],h=1/0,f=-1,v=0;return o.each(n,function(p,m){var y=l.dataToCoord(p),g=u-y,x=Math.abs(g);x<=a&&((x<h||x===h&&g>=0&&f<0)&&(h=x,f=g,v=0),g===f&&(c[v++]=m))}),c.length=v,c},e.prototype.formatTooltip=function(t,n,i){return u2({series:this,dataIndex:t,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(ie.node&&!(t&&t.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,n,i){var a=this.ecModel,o=Bd.prototype.getColorFromPalette.call(this,t,n,i);return o||(o=a.getColorFromPalette(t,n,i)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},e.prototype.unselect=function(t,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<t.length;s++){var l=t[s],u=Bo(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(t,n){for(var i=[],a=0;a<t.length;a++)i[0]=t[a],this.isSelected(t[a],n)?this.unselect(i,n):this.select(i,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());
15for(var t=this._selectedDataIndicesMap,n=Ae(t),i=[],a=0;a<n.length;a++){var o=t[n[a]];o>=0&&i.push(o)}return i},e.prototype.isSelected=function(t,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Bo(a,t)])&&!a.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[h2])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Q(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var h=n[c],f=Bo(t,h);u[f]=!0,this._selectedDataIndicesMap[f]=t.getRawIndex(h)}}else if(s==="single"||s===!0){var v=n[l-1],f=Bo(t,v);o.selectedMap=(i={},i[f]=!0,i),this._selectedDataIndicesMap=(a={},a[f]=t.getRawIndex(v),a)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var n=[];t.hasItemOption&&t.each(function(i){var a=t.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(t,n)}},e.registerClass=function(t){return ge.registerClass(t)},e.protoInitialize=(function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"})(),e})(ge);ar(ir,NC);ar(ir,Bd);im(ir,ge);function fp(r){var e=r.name;od(r)||(r.name=d2(r)||e)}function d2(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),n=[];return A(t,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function f2(r){return r.model.getRawData().count()}function v2(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),p2}function p2(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function vp(r,e){A(h_(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,Pe(g2,e))})}function g2(r,e){var t=yh(r);return t&&t.setOutputEnd((e||this).count()),e}function yh(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var n=t.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(r.uid))}return n}}var Bt=(function(){function r(){this.group=new Ee,this.uid=El("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,i){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,i){},r.prototype.updateLayout=function(e,t,n,i){},r.prototype.updateVisual=function(e,t,n,i){},r.prototype.toggleBlurSeries=function(e,t,n){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r})();ld(Bt);yl(Bt);function Hd(){var r=Me();return function(e){var t=r(e),n=e.pipelineContext,i=!!t.large,a=!!t.progressiveRender,o=t.large=!!(n&&n.large),s=t.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var Ay=Me(),m2=Hd(),Ot=(function(){function r(){this.group=new Ee,this.uid=El("viewChart"),this.renderTask=La({plan:y2,reset:x2}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,i){},r.prototype.highlight=function(e,t,n,i){var a=e.getData(i&&i.dataType);a&&gp(a,i,"emphasis")},r.prototype.downplay=function(e,t,n,i){var a=e.getData(i&&i.dataType);a&&gp(a,i,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,i){this.render(e,t,n,i)},r.prototype.updateLayout=function(e,t,n,i){this.render(e,t,n,i)},r.prototype.updateVisual=function(e,t,n,i){this.render(e,t,n,i)},r.prototype.eachRendered=function(e){Ll(this.group,e)},r.markUpdateMethod=function(e,t){Ay(e).updateMethod=t},r.protoInitialize=(function(){var e=r.prototype;e.type="chart"})(),r})();function pp(r,e,t){r&&sh(r)&&(e==="emphasis"?Gs:Ws)(r,t)}function gp(r,e,t){var n=Hn(r,e),i=e&&e.highlightKey!=null?_S(e.highlightKey):null;n!=null?A(Qe(n),function(a){pp(r.getItemGraphicEl(a),t,i)}):r.eachItemGraphicEl(function(a){pp(a,t,i)})}ld(Ot);yl(Ot);function y2(r){return m2(r.model)}function x2(r){var e=r.model,t=r.ecModel,n=r.api,i=r.payload,a=e.pipelineContext.progressiveRen
15der,o=r.view,s=i&&Ay(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,n,i),b2[l]}var b2={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Qs="\0__throttleOriginMethod",mp="\0__throttleRate",yp="\0__throttleType";function $d(r,e,t){var n,i=0,a=0,o=null,s,l,u,c;e=e||0;function h(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var f=function(){for(var v=[],p=0;p<arguments.length;p++)v[p]=arguments[p];n=new Date().getTime(),l=this,u=v;var m=c||e,y=c||t;c=null,s=n-(y?i:a)-m,clearTimeout(o),y?o=setTimeout(h,m):s>=0?h():o=setTimeout(h,-s),i=n};return f.clear=function(){o&&(clearTimeout(o),o=null)},f.debounceNextCall=function(v){c=v},f}function Vl(r,e,t,n){var i=r[e];if(i){var a=i[Qs]||i,o=i[yp],s=i[mp];if(s!==t||o!==n){if(t==null||!n)return r[e]=a;i=r[e]=$d(a,t,n==="debounce"),i[Qs]=a,i[yp]=n,i[mp]=t}return i}}function Js(r,e){var t=r[e];t&&t[Qs]&&(t.clear&&t.clear(),r[e]=t[Qs])}var xp=Me(),bp={itemStyle:Fa(Gm,!0),lineStyle:Fa($m,!0)},_2={lineStyle:"stroke",itemStyle:"fill"};function Ly(r,e){var t=r.visualStyleMapper||bp[e];return t||(console.warn("Unknown style type '"+e+"'."),bp.itemStyle)}function ky(r,e){var t=r.visualDrawType||_2[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var w2={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=r.getModel(n),a=Ly(r,n),o=a(i),s=i.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=ky(r,n),u=o[l],c=ne(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||h){var f=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=f,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||ne(o.fill)?f:o.fill,o.stroke=o.stroke==="auto"||ne(o.stroke)?f:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(v,p){var m=r.getDataParams(p),y=H({},o);y[l]=c(m),v.setItemVisual(p,"style",y)}}}},Zi=new Le,S2={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=Ly(r,n),a=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Zi.option=l[n];var u=i(Zi),c=o.ensureUniqueItemVisual(s,"style");H(c,u),Zi.option.decal&&(o.setItemVisual(s,"decal",Zi.option.decal),Zi.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},T2={performRawSeries:!0,overallReset:function(r){var e=re();r.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),xp(t).scope=a}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),i={},a=t.getData(),o=xp(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=ky(t,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],h=a.getItemVisual(c,"colorFromPalette");if(h){var f=a.ensureUniqueItemVisual(c,"style"),v=n.getName(u)||u+"",p=n.count();f[l]=t.getColorFromPalette(v,o,p)}})}})}},No=Math.PI;function C2(r,e){e=e||{},me(e,{text:"loading",textColor:j.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:j.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var t=new Ee,n=new Ce({style:{fill:e.maskColor}
15,zlevel:e.zlevel,z:1e4});t.add(n);var i=new Je({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Ce({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(a);var o;return e.showSpinner&&(o=new Dl({shape:{startAngle:-No/2,endAngle:-No/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:No*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:No*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var Iy=(function(){function r(e,t,n,i){this._stageTaskMap=re(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=re();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),t._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;A(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";xr(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,t,n),i.overallReset&&this._createOverallStageTask(i,a,t,n)},this)},r.prototype.prepareView=function(e,t,n,i){var a=e.renderTask,o=a.context;o.model=t,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(t,a)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},r.prototype._performStageTasks=function(e,t,n,i){i=i||{};var a=!1,o=this;A(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),h=c.seriesTaskMap,f=c.overallTask;if(f){var v,p=f.agentStubMap;p.each(function(y){s(i,y)&&(y.dirty(),v=!0)}),v&&f.dirty(),o.updatePayload(f,n);var m=o.getPerformArgs(f,i.block);p.each(function(y){y.perform(m)}),f.perform(m)&&(a=!0)}else h&&h.each(function(y,g){s(i,y)&&y.dirty();var x=o.getPerformArgs(y,i.block);x.skip=!l.performRawSeries&&t.isSeriesFiltered(y.context.model),o.updatePayload(y,n),y.perform(x)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(n){t=n.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.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)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,n,i){var a=this,o=t.seriesTaskMap,s=t.seriesTaskMap=re(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(h){var f=h.uid,v=s.set(f,o&&o.get(f)||La({plan:k2,reset:I2,count:R2}));
15v.context={model:h,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(h,v)}},r.prototype._createOverallStageTask=function(e,t,n,i){var a=this,o=t.overallTask=t.overallTask||La({reset:M2});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=re(),u=e.seriesType,c=e.getTargetSeries,h=!0,f=!1,v="";xr(!e.createOnAllSeries,v),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(h=!1,A(n.getSeries(),p));function p(m){var y=m.uid,g=l.set(y,s&&s.get(y)||(f=!0,La({reset:D2,onDirty:L2})));g.context={model:m,overallProgress:h},g.agent=o,g.__block=h,a._pipe(m,g)}f&&o.dirty()},r.prototype._pipe=function(e,t){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=t),i.tail&&i.tail.pipe(t),i.tail=t,t.__idxInPipeline=i.count++,t.__pipeline=i},r.wrapStageHandler=function(e,t){return ne(e)&&(e={overallReset:e,seriesType:E2(e)}),e.uid=El("stageHandler"),t&&(e.visualType=t),e},r})();function M2(r){r.overallReset(r.ecModel,r.api,r.payload)}function D2(r){return r.overallProgress&&A2}function A2(){this.agent.dirty(),this.getDownstream().dirty()}function L2(){this.agent&&this.agent.dirty()}function k2(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function I2(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Qe(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?J(e,function(t,n){return Py(n)}):P2}var P2=Py(0);function Py(r){return function(e,t){var n=t.data,i=t.resetDefines[r];if(i&&i.dataEach)for(var a=e.start;a<e.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(e,n)}}function R2(r){return r.data.count()}function E2(r){el=null;try{r(Xa,Ry)}catch{}return el}var Xa={},Ry={},el;Ey(Xa,Nd);Ey(Ry,uy);Xa.eachSeriesByType=Xa.eachRawSeriesByType=function(r){el=r};Xa.eachComponent=function(r){r.mainType==="series"&&r.subType&&(el=r.subType)};function Ey(r,e){for(var t in e.prototype)r[t]=Ke}
15var W=j.darkColor,O2=W.background,Xi=function(){return{axisLine:{lineStyle:{color:W.axisLine}},splitLine:{lineStyle:{color:W.axisSplitLine}},splitArea:{areaStyle:{color:[W.backgroundTint,W.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:W.axisMinorSplitLine}},axisLabel:{color:W.axisLabel},axisName:{}}},_p={label:{color:W.secondary},itemStyle:{borderColor:W.borderTint},dividerLineStyle:{color:W.border}},Oy={darkMode:!0,color:W.theme,backgroundColor:O2,axisPointer:{lineStyle:{color:W.border},crossStyle:{color:W.borderShade},label:{color:W.tertiary}},legend:{textStyle:{color:W.secondary},pageTextStyle:{color:W.tertiary}},textStyle:{color:W.secondary},title:{textStyle:{color:W.primary},subtextStyle:{color:W.quaternary}},toolbox:{iconStyle:{borderColor:W.accent50}},tooltip:{backgroundColor:W.neutral20,defaultBorderColor:W.border,textStyle:{color:W.tertiary}},dataZoom:{borderColor:W.accent10,textStyle:{color:W.tertiary},brushStyle:{color:W.backgroundTint},handleStyle:{color:W.neutral00,borderColor:W.accent20},moveHandleStyle:{color:W.accent40},emphasis:{handleStyle:{borderColor:W.accent50}},dataBackground:{lineStyle:{color:W.accent30},areaStyle:{color:W.accent20}},selectedDataBackground:{lineStyle:{color:W.accent50},areaStyle:{color:W.accent30}}},visualMap:{textStyle:{color:W.secondary},handleStyle:{borderColor:W.neutral30}},timeline:{lineStyle:{color:W.accent10},label:{color:W.tertiary},controlStyle:{color:W.accent30,borderColor:W.accent30}},calendar:{itemStyle:{color:W.neutral00,borderColor:W.neutral20},dayLabel:{color:W.tertiary},monthLabel:{color:W.secondary},yearLabel:{color:W.secondary}},matrix:{x:_p,y:_p,backgroundColor:{borderColor:W.axisLine},body:{itemStyle:{borderColor:W.borderTint}}},timeAxis:Xi(),logAxis:Xi(),valueAxis:Xi(),categoryAxis:Xi(),line:{symbol:"circle"},graph:{color:W.theme},gauge:{title:{color:W.secondary},axisLine:{lineStyle:{color:[[1,W.neutral05]]}},axisLabel:{color:W.axisLabel},detail:{color:W.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:W.background}},radar:(function(){var r=Xi();return r.axisName={color:W.axisLabel},r.axisLine.lineStyle.color=W.neutral20,r})(),treemap:{breadcrumb:{itemStyle:{color:W.neutral20,textStyle:{color:W.secondary}},emphasis:{itemStyle:{color:W.neutral30}}}},sunburst:{itemStyle:{borderColor:W.background}},map:{itemStyle:{borderColor:W.border,areaColor:W.neutral10},label:{color:W.tertiary},emphasis:{label:{color:W.primary},itemStyle:{areaColor:W.highlight}},select:{label:{color:W.primary},itemStyle:{areaColor:W.highlight}}},geo:{itemStyle:{borderColor:W.border,areaColor:W.neutral10},emphasis:{label:{color:W.primary},itemStyle:{areaColor:W.highlight}},select:{label:{color:W.primary},itemStyle:{color:W.highlight}}}};Oy.categoryAxis.splitLine.show=!1;var B2=(function(){function r(){}return r.prototype.normalizeQuery=function(e){var t={},n={},i={};if(K(e)){var a=Kt(e);t.mainType=a.main||null,t.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};A(e,function(l,u){for(var c=!1,h=0;h<o.length;h++){var f=o[h],v=u.lastIndexOf(f);if(v>0&&v===u.length-f.length){var p=u.slice(0,v);p!=="data"&&(t.mainType=p,t[f.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:t,dataQuery:n,otherQuery:i}},r.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,i,a));function c(h,f,v,p){return h[v]==null||f[p||v]===h[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})(),xh=["symbol","symbolSize","symbolRotate","symbolOffset"],wp=xh.concat(["symbolKeepAspect"]),N2={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<xh.length;o++){var s=xh[o],l=r.get(s);ne(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||r.defaultSymbol,t.setVisual(H({legendIcon:r.legendIcon||n.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},n)),e.isSeriesFiltered(r))return;var u=Ae(i);function c(h,f){for(var v=r.getRawValue(f),p=r.getDataParams(f),m=0;m<u.length;m++){var y=u[m];h.setItemVisual(f,y,i[y](v,p))}}return{dataEach:a?c:null}}},z2={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!r.hasSymbolVisual||e.isSeriesFiltered(r))return;var t=r.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<wp.length;s++){var l=wp[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:t.hasItemOption?n:null}}};function F2(r,e,t){switch(t){case"color":var n=r.getItemVisual(e,"style");return n[r.getVisual("drawType")];case"opacity":return r.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(e,t)}}function V2(r,e){switch(e){case"color":var t=r.getVisual("style");return t[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(e)}}function ai(r,e,t,n,i){var a=r+e;t.isSilent(a)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var h=o.getData(),f=Hn(h,i.fromActionPayload);t.trigger(a,{type:a,seriesId:o.id,name:X(f)?h.getName(f[0]):h.getName(f),selected:K(l)?l:H({},l)})}})}function H2(r,e,t){r.on("selectchanged",function(n){var i=t.getModel();n.isFromClick?(ai("map","selectchanged",e,i,n),ai("pie","selectchanged",e,i,n)):n.fromAction==="select"?(ai("map","selected",e,i,n),ai("pie","selected",e,i,n)):n.fromAction==="unselect"&&(ai("map","unselected",e,i,n),ai("pie","unselected",e,i,n))})}function ma(r,e,t){for(var n;r&&!(e(r)&&(n=r,t));)r=r.__hostTarget||r.parent;return n}var $2=Math.round(Math.random()*9),G2=typeof Object.defineProperty=="function",W2=(function(){function r(){this._id="__ec_inner_"+$2++}return r.prototype.get=function(e){return this._guard(e)[this._id]},r.prototype.set=function(e,t){var n=this._guard(e);return G2?Object.defineProperty(n,this._id,{value:t,enumerable:!1,
15configurable:!0}):n[this._id]=t,this},r.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},r.prototype.has=function(e){return!!this._guard(e)[this._id]},r.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},r})(),U2=ye.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,i=e.width/2,a=e.height/2;r.moveTo(t,n-a),r.lineTo(t+i,n+a),r.lineTo(t-i,n+a),r.closePath()}}),Y2=ye.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,i=e.width/2,a=e.height/2;r.moveTo(t,n-a),r.lineTo(t+i,n),r.lineTo(t,n+a),r.lineTo(t-i,n),r.closePath()}}),Z2=ye.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.x,n=e.y,i=e.width/5*3,a=Math.max(i,e.height),o=i/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,h=Math.sin(u),f=Math.cos(u),v=o*.6,p=o*.7;r.moveTo(t-c,l+s),r.arc(t,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(t+c-h*v,l+s+f*v,t,n-p,t,n),r.bezierCurveTo(t,n-p,t-c+h*v,l+s+f*v,t-c,l+s),r.closePath()}}),X2=ye.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.height,n=e.width,i=e.x,a=e.y,o=n/3*2;r.moveTo(i,a),r.lineTo(i+o,a+t),r.lineTo(i,a+t/4*3),r.lineTo(i-o,a+t),r.lineTo(i,a),r.closePath()}}),j2={line:jr,rect:Ce,roundRect:Ce,square:Ce,circle:Tl,diamond:Y2,pin:Z2,arrow:X2,triangle:U2},q2={line:function(r,e,t,n,i){i.x1=r,i.y1=e+n/2,i.x2=r+t,i.y2=e+n/2},rect:function(r,e,t,n,i){i.x=r,i.y=e,i.width=t,i.height=n},roundRect:function(r,e,t,n,i){i.x=r,i.y=e,i.width=t,i.height=n,i.r=Math.min(t,n)/4},square:function(r,e,t,n,i){var a=Math.min(t,n);i.x=r,i.y=e,i.width=a,i.height=a},circle:function(r,e,t,n,i){i.cx=r+t/2,i.cy=e+n/2,i.r=Math.min(t,n)/2},diamond:function(r,e,t,n,i){i.cx=r+t/2,i.cy=e+n/2,i.width=t,i.height=n},pin:function(r,e,t,n,i){i.x=r+t/2,i.y=e+n/2,i.width=t,i.height=n},arrow:function(r,e,t,n,i){i.x=r+t/2,i.y=e+n/2,i.width=t,i.height=n},triangle:function(r,e,t,n,i){i.cx=r+t/2,i.cy=e+n/2,i.width=t,i.height=n}},tl={};A(j2,function(r,e){tl[e]=new r});var K2=ye.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var n=Ns(r,e,t),i=this.shape;return i&&i.symbolType==="pin"&&e.position==="inside"&&(n.y=t.y+t.height*.4),n},buildPath:function(r,e,t){var n=e.symbolType;if(n!=="none"){var i=tl[n];i||(n="rect",i=tl[n]),q2[n](e.x,e.y,e.width,e.height,i.shape),i.buildPath(r,i.shape,t)}}});function Q2(r,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=r,t.fill=e||j.color.neutral00,t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=r:t.fill=r,this.markRedraw()}}function Kr(r,e,t,n,i,a,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=Rm(r.slice(8),new se(e,t,n,i),o?"center":"cover"):r.indexOf("path://")===0?l=xd(r.slice(7),{},new se(e,t,n,i),o?"center":"cover"):l=new K2({shape:{symbolType:r,x:e,y:t,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=Q2,a&&l.setColor(a),l}function J2(r){return X(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function By(r,e){if(r!=null)return X(r)||(r=[r,r]),[He(r[0],e[0])||0,He(te(r[1],r[0]),e[1])||0]}function Pn(r){return isFinite(r)}function eM(r,e,t){var n=e.x==null?0:e.x,i=e.x2==null?1:e.x2,a=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*t.width+t.x,i=i*t.width+t.x,a=a*t.height+t.y,o=o*t.height+t.y),n=Pn(n)?n:0,i=Pn(i)?i:1,a=Pn(a)?a:0,o=Pn(o)?o:0;var s=r.createLinearGradient(n,a,i,o);return s}function tM(r,e,t){var n=t.width,i=t.height,a=Math.min(n,i),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(o=o*n+t.x,s=s*i+t.y,l=l*a),o=Pn(o)?o:.5,s=Pn(s)?s:.5,l=l>=0&&Pn(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function bh(r,e,t){for(var n=e.type==="radial"?tM(r,e,t):eM(r,e,t),i=e.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function rM(r,e){if(r===e||!r&&!e)return!1;if(!r||!e||r.length!==e.length)return!0;for(var t=0;t<r.length;t++)if(r[t]!==e[t])return!0;return!1}function zo(r){return parseInt(r,10)}function Fo(r,e,t){var n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(t[n]!=null&&t[n]!=="auto")return parseFloat(t[n]);var s=document.defaultView.getComputedStyle(r);return(r[i]||zo(s[n])||zo(r.style[n]))-(zo(s[a])||0)-(zo(s[o])||0)|0}function nM(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:Se(r)?[r]:X(r)?r:null}function Ny(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&nM(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(t){var i=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(t=J(t,function(a){return a/i}),n/=i)}return[t,n]}var iM=new $n(!0);function rl(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function Sp(r){return typeof r=="string"&&r!=="none"}function nl(r){var e=r.fill;return e!=null&&e!=="none"}function Tp(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}
15else r.fill()}function Cp(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function _h(r,e,t){var n=am(e.image,e.__image,t);if(xl(n)){var i=r.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*d_),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function aM(r,e,t,n){var i,a=rl(t),o=nl(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||iM,h=e.__dirty;if(!n){var f=t.fill,v=t.stroke,p=o&&!!f.colorStops,m=a&&!!v.colorStops,y=o&&!!f.image,g=a&&!!v.image,x=void 0,b=void 0,_=void 0,S=void 0,w=void 0;(p||m)&&(w=e.getBoundingRect()),p&&(x=h?bh(r,f,w):e.__canvasFillGradient,e.__canvasFillGradient=x),m&&(b=h?bh(r,v,w):e.__canvasStrokeGradient,e.__canvasStrokeGradient=b),y&&(_=h||!e.__canvasFillPattern?_h(r,f,e):e.__canvasFillPattern,e.__canvasFillPattern=_),g&&(S=h||!e.__canvasStrokePattern?_h(r,v,e):e.__canvasStrokePattern,e.__canvasStrokePattern=S),p?r.fillStyle=x:y&&(_?r.fillStyle=_:o=!1),m?r.strokeStyle=b:g&&(S?r.strokeStyle=S:a=!1)}var T=e.getGlobalScale();c.setScale(T[0],T[1],e.segmentIgnoreThreshold);var D,L;r.setLineDash&&t.lineDash&&(i=Ny(e),D=i[0],L=i[1]);var M=!0;(u||h&fi)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),M=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),M&&c.rebuildPath(r,l?s:1),D&&(r.setLineDash(D),r.lineDashOffset=L),n||(t.strokeFirst?(a&&Cp(r,t),o&&Tp(r,t)):(o&&Tp(r,t),a&&Cp(r,t))),D&&r.setLineDash([])}function oM(r,e,t){var n=e.__image=am(t.image,e.__image,e,e.onload);if(!(!n||!xl(n))){var i=t.x||0,a=t.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;r.drawImage(n,u,c,t.sWidth,t.sHeight,i,a,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,h=o-u,f=s-c;r.drawImage(n,u,c,h,f,i,a,o,s)}else r.drawImage(n,i,a,o,s)}}function sM(r,e,t){var n,i=t.text;if(i!=null&&(i+=""),i){r.font=t.font||Zr,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var a=void 0,o=void 0;r.setLineDash&&t.lineDash&&(n=Ny(e),a=n[0],o=n[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),t.strokeFirst?(rl(t)&&r.strokeText(i,t.x,t.y),nl(t)&&r.fillText(i,t.x,t.y)):(nl(t)&&r.fillText(i,t.x,t.y),rl(t)&&r.strokeText(i,t.x,t.y)),a&&r.setLineDash([])}}var Mp=["shadowBlur","shadowOffsetX","shadowOffsetY"],Dp=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function zy(r,e,t,n,i){var a=!1;if(!n&&(t=t||{},e===t))return!1;if(n||e.opacity!==t.opacity){it(r,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?Nn.opacity:o}(n||e.blend!==t.blend)&&(a||(it(r,i),a=!0),r.globalCompositeOperation=e.blend||Nn.blend);for(var s=0;s<Mp.length;s++){var l=Mp[s];(n||e[l]!==t[l])&&(a||(it(r,i),a=!0),r[l]=r.dpr*(e[l]||0))}return(n||e.shadowColor!==t.shadowColor)&&(a||(it(r,i),a=!0),r.shadowColor=e.shadowColor||Nn.shadowColor),a}function Ap(r,e,t,n,i){var a=ja(e,i.inHover),o=n?null:t&&ja(t,i.inHover)||{};if(a===o)return!1;var s=zy(r,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(it(r,i),s=!0),Sp(a.fill)&&(r.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(it(r,i),s=!0),Sp(a.stroke)&&(r.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(it(r,i),s=!0),r.globalAlpha=a.opacity==null?1:a.opacity),e.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&e.getLineScale?e.getLineScale():1);r.lineWidth!==u&&(s||(it(r,i),s=!0),r.lineWidth=u)}for(var c=0;c<Dp.length;c++){var h=Dp[c],f=h[0];(n||a[f]!==o[f])&&(s||(it(r,i),s=!0),r[f]=a[f]||h[1])}return s}function lM(r,e,t,n,i){return zy(r,ja(e,i.inHover),t&&ja(t,i.inHover),n,i)}function Fy(r,e){var t=e.transform,n=r.dpr||1;t?r.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):r.setTransform(n,0,0,n,0,0)}function uM(r,e,t){for(var n=!1,i=0;i<r.length;i++){var a=r[i];n=n||a.isZeroArea(),Fy(e,a),e.beginPath(),a.buildPath(e,a.shape),e.clip()}t.allClipped=n}function cM(r,e){return r&&e?r[0]!==e[0]||r[1]!==e[1]||r[2]!==e[2]||r[3]!==e[3]||r[4]!==e[4]||r[5]!==e[5]:!(!r&&!e)}var Lp=1,kp=2,Ip=3,Pp=4;function hM(r){var e=nl(r),t=rl(r);return!(r.lineDash||!(+e^+t)||e&&typeof r.fill!="string"||t&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function it(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function ja(r,e){return e&&r.__hoverStyle||r.style}function Vy(r,e){Rn(r,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Rn(r,e,t,n){var i=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~ht,e.__isRendered=!1;return}var a=e.__clipPaths,o=t.prevElClipPaths,s=!1,l=!1;
15if((!o||rM(a,o))&&(o&&o.length&&(it(r,t),r.restore(),l=s=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),a&&a.length&&(it(r,t),r.save(),uM(a,r,t),s=!0),t.prevElClipPaths=a),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=t.prevEl;u||(l=s=!0);var c=e instanceof ye&&e.autoBatch&&hM(e.style);s||cM(i,u.transform)?(it(r,t),Fy(r,e)):c||it(r,t);var h=ja(e,t.inHover);e instanceof ye?(t.lastDrawType!==Lp&&(l=!0,t.lastDrawType=Lp),Ap(r,e,u,l,t),(!c||!t.batchFill&&!t.batchStroke)&&r.beginPath(),aM(r,e,h,c),c&&(t.batchFill=h.fill||"",t.batchStroke=h.stroke||"")):e instanceof Vs?(t.lastDrawType!==Ip&&(l=!0,t.lastDrawType=Ip),Ap(r,e,u,l,t),sM(r,e,h)):e instanceof Jr?(t.lastDrawType!==kp&&(l=!0,t.lastDrawType=kp),lM(r,e,u,l,t),oM(r,e,h)):e.getTemporalDisplayables&&(t.lastDrawType!==Pp&&(l=!0,t.lastDrawType=Pp),dM(r,e,t)),c&&n&&it(r,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function dM(r,e,t){var n=e.getDisplayables(),i=e.getTemporalDisplayables();r.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Rn(r,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,c=i.length;u<c;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Rn(r,l,a,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,r.restore()}var Yu=new W2,Rp=new Di(100),Ep=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function wh(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),n=e.getZr(),i=n.painter.type==="svg";r.dirty&&Yu.delete(r);var a=Yu.get(r);if(a)return a;var o=me(r,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/t,Yu.set(r,s),r.dirty=!1,s;function l(u){for(var c=[t],h=!0,f=0;f<Ep.length;++f){var v=o[Ep[f]];if(v!=null&&!X(v)&&!K(v)&&!Se(v)&&typeof v!="boolean"){h=!1;break}c.push(v)}var p;if(h){p=c.join(",")+(i?"-svg":"");var m=Rp.get(p);m&&(i?u.svgElement=m:u.image=m)}var y=$y(o.dashArrayX),g=fM(o.dashArrayY),x=Hy(o.symbol),b=vM(y),_=Gy(g),S=!i&&yr.createCanvas(),w=i&&{tag:"g",attrs:{},key:"dcl",children:[]},T=L(),D;S&&(S.width=T.width*t,S.height=T.height*t,D=S.getContext("2d")),M(),h&&Rp.put(p,S||w),u.image=S,u.svgElement=w,u.svgWidth=T.width,u.svgHeight=T.height;function L(){for(var C=1,I=0,k=b.length;I<k;++I)C=Uf(C,b[I]);for(var R=1,I=0,k=x.length;I<k;++I)R=Uf(R,x[I].length);C*=R;var O=_*b.length*x.length;return{width:Math.max(1,Math.min(C,o.maxTileWidth)),height:Math.max(1,Math.min(O,o.maxTileHeight))}}function M(){D&&(D.clearRect(0,0,S.width,S.height),o.backgroundColor&&(D.fillStyle=o.backgroundColor,D.fillRect(0,0,S.width,S.height)));for(var C=0,I=0;I<g.length;++I)C+=g[I];if(C<=0)return;for(var k=-_,R=0,O=0,z=0;k<T.height;){if(R%2===0){for(var P=O/2%x.length,B=0,V=0,U=0;B<T.width*2;){for(var Y=0,I=0;I<y[z].length;++I)Y+=y[z][I];if(Y<=0)break;if(V%2===0){var N=(1-o.symbolSize)*.5,G=B+y[z][V]*N,oe=k+g[R]*N,xe=y[z][V]*o.symbolSize,F=g[R]*o.symbolSize,_e=U/2%x[P].length;st(G,oe,xe,F,x[P][_e])}B+=y[z][V],++U,++V,V===y[z].length&&(V=0)}++z,z===y.length&&(z=0)}k+=g[R],++O,++R,R===g.length&&(R=0)}function st(lt,Fe,ae,ce,tn){var Ye=i?1:t,uf=Kr(tn,lt*Ye,Fe*Ye,ae*Ye,ce*Ye,o.color,o.symbolKeepAspect);if(i){var cf=n.painter.renderOneToVNode(uf);cf&&w.children.push(cf)}else Vy(D,uf)}}}}function Hy(r){if(!r||r.length===0)return[["rect"]];if(K(r))return[[r]];for(var e=!0,t=0;t<r.length;++t)if(!K(r[t])){e=!1;break}if(e)return Hy([r]);for(var n=[],t=0;t<r.length;++t)K(r[t])?n.push([r[t]]):n.push(r[t]);return n}function $y(r){if(!r||r.length===0)return[[0,0]];if(Se(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,n=0;n<r.length;++n)if(!Se(r[n])){t=!1;break}if(t)return $y([r]);for(var i=[],n=0;n<r.length;++n)if(Se(r[n])){var e=Math.ceil(r[n]);i.push([e,e])}else{var e=J(r[n],function(s){return Math.ceil(s)});e.length%2===1?i.push(e.concat(e)):i.push(e)}return i}function fM(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(Se(r)){var e=Math.ceil(r);return[e,e]}var t=J(r,function(n){return Math.ceil(n)});return r.length%2?t.concat(t):t}function vM(r){return J(r,function(e){return Gy(e)})}function Gy(r){for(var e=0,t=0;t<r.length;++t)e+=r[t];return r.length%2===1?e*2:e}function pM(r,e){r.eachRawSeries(function(t){if(!r.isSeriesFiltered(t)){var n=t.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=wh(s,e)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=wh(i,e)}}})}var Rt=new zt,Wy={};function gM(r,e){Wy[r]=e}function mM(r){return Wy[r]}var yM=1,xM=800,bM=900,_M=1e3,wM=2e3,SM=5e3,Uy=1e3,TM=1100,Gd=2e3,Yy=3e3,CM=4e3,Hl=4500,MM=4600,DM=5e3,AM=6e3,Zy=7e3,LM={PROCESSOR:{FILTER:_M,SERIES_FILTER:xM,STATISTIC:SM},VISUAL:{LAYOUT:Uy,PROGRESSIVE_LAYOUT:TM,GLOBAL:Gd,CHART:Yy,POST_CHART_LAYOUT:MM,COMPONENT:CM,BRUSH:DM,CHART_ITEM:Hl,ARIA:AM,DECAL:Zy}},Re="__flagInMainProcess",Vo="__mainProcessVersion",Oe="__pendingUpdate",Zu="__needsUpdateStatus",Op=/^[a-zA-Z0-9_]+$/,Xu="__connectUpdateStatus",Bp=0,kM=1,IM=2;function Xy(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){this.id;return}return qy(this,r,e)}}function jy(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return qy(this,r,e)}}function qy(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),zt.prototype[e].apply(r,t)}var Ky=(function(r){$(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(zt),Qy=Ky.prototype;Qy.on=jy("on");Qy.off=jy("off");var Cn,ju,Ho,ur,$o,qu,Ku,oi,si,Np,zp,Qu,Fp,Go,Vp,Jy,mt,Hp,li,ex=(function(r){$(e,r);function e(t,n,i){var a=r.call(this,new B2)||this;a._chartsViews=[],a._chartsMap={}
15,a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},a._dom=t;var o="canvas",s="auto",l=!1;a[Vo]=1,i.ssr;var u=a._zr=Gf(t,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:te(i.useDirtyRect,l),useCoarsePointer:te(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=$d(ee(u.flush,u),17),a._updateTheme(n),a._locale=kT(i.locale||Wm),a._coordSysMgr=new Rd;var c=a._api=Vp(a);function h(f,v){return f.__prio-v.__prio}return ls(al,h),ls(Ch,h),a._scheduler=new Iy(a,c,Ch,al),a._messageCenter=new Ky,a._initEvents(),a.resize=ee(a.resize,a),u.animation.on("frame",a._onframe,a),Np(u,a),zp(u,a),Ic(a),a}return e.prototype._onframe=function(){if(!this._disposed){Hp(this);var t=this._scheduler;if(this[Oe]){var n=this[Oe].silent;this[Re]=!0,li(this);try{Cn(this),ur.update.call(this,null,this[Oe].updateParams)}catch(l){throw this[Re]=!1,this[Oe]=null,l}this._zr.flush(),this[Re]=!1,this[Oe]=null,oi.call(this,n),si.call(this,n)}else if(t.unfinished){var i=yM,a=this._model,o=this._api;t.unfinished=!1;do{var s=+new Date;t.performSeriesTasks(a),t.performDataProcessorTasks(a),qu(this,a),t.performVisualTasks(a),Go(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,n,i){if(!this[Re]){if(this._disposed){this.id;return}var a,o,s;if(Q(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Re]=!0,li(this),!this._model||n){var l=new gC(this._api),u=this._theme,c=this._model=new Nd;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},Mh);var h={seriesTransition:s,optionChanged:!0};if(i)this[Oe]={silent:a,updateParams:h},this[Re]=!1,this.getZr().wakeUp();else{try{Cn(this),ur.update.call(this,null,h)}catch(f){throw this[Oe]=null,this[Re]=!1,f}this._ssr||this._zr.flush(),this[Oe]=null,this[Re]=!1,oi.call(this,a),si.call(this,a)}}},e.prototype.setTheme=function(t,n){if(!this[Re]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[Oe]&&(a==null&&(a=this[Oe].silent),o=this[Oe].updateParams,this[Oe]=null),this[Re]=!0,li(this);try{this._updateTheme(t),i.setTheme(this._theme),Cn(this),ur.update.call(this,{type:"setTheme"},o)}catch(s){throw this[Re]=!1,s}this[Re]=!1,oi.call(this,a),si.call(this,a)}}},e.prototype._updateTheme=function(t){K(t)&&(t=tx[t]),t&&(t=ue(t),t&&hy(t,!0),this._theme=t)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ie.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var n=this._zr.painter;return n.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr,n=t.storage.getDisplayList();return A(n,function(i){i.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var n=t.excludeComponents,i=this._model,a=[],o=this;A(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return A(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var n=t.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if($p[i]){var l=s,u=s,c=-s,h=-s,f=[],v=t&&t.pixelRatio||this.getDevicePixelRatio();A(ka,function(b,_){if(b.group===i){var S=n?b.getZr().painter.getSvgDom().innerHTML:b.renderToCanvas(ue(t)),w=b.getDom().getBoundingClientRect();l=a(w.left,l),u=a(w.top,u),c=o(w.right,c),h=o(w.bottom,h),f.push({dom:S,left:w.left,top:w.top})}}),l*=v,u*=v,c*=v,h*=v;var p=c-l,m=h-u,y=yr.createCanvas(),g=Gf(y,{renderer:n?"svg":"canvas"});if(g.resize({width:p,height:m}),n){var x="";return A(f,function(b){var _=b.left-l,S=b.top-u;x+='<g transform="translate('+_+","+S+')">'+b.dom+"</g>"}
15),g.painter.getSvgRoot().innerHTML=x,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return t.connectedBackgroundColor&&g.add(new Ce({shape:{x:0,y:0,width:p,height:m},style:{fill:t.connectedBackgroundColor}})),A(f,function(b){var _=new Jr({style:{x:b.left*v-l,y:b.top*v-u,image:b.dom}});g.add(_)}),g.refreshImmediately(),y.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n,i){return $o(this,"convertToPixel",t,n,i)},e.prototype.convertToLayout=function(t,n,i){return $o(this,"convertToLayout",t,n,i)},e.prototype.convertFromPixel=function(t,n,i){return $o(this,"convertFromPixel",t,n,i)},e.prototype.containPixel=function(t,n){if(this._disposed){this.id;return}var i=this._model,a,o=yu(i,t);return A(o,function(s,l){l.indexOf("Models")>=0&&A(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(a=a||h.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(t,n){var i=this._model,a=yu(i,t,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?F2(s,l,n):V2(s,n)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;A(PM,function(i){var a=function(o){var s=t.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&ma(l,function(m){var y=ve(m);if(y&&y.dataIndex!=null){var g=y.dataModel||s.getSeriesByIndex(y.seriesIndex);return u=g&&g.getDataParams(y.dataIndex,y.dataType,l)||{},!0}else if(y.eventData)return u=H({},y.eventData),!0},!0),u){var h=u.componentType,f=u.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",f=u.seriesIndex);var v=h&&f!=null&&s.getComponent(h,f),p=v&&t[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];u.event=o,u.type=i,t._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:v,view:p},t.trigger(i,u)}};a.zrEventfulCallAtLast=!0,t._zr.on(i,a,t)});var n=this._messageCenter;A(Th,function(i,a){n.on(a,function(o){t.trigger(a,o)})}),H2(n,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&rm(this.getDom(),Ud,"");var n=this,i=n._api,a=n._model;A(n._componentsViews,function(o){o.dispose(a,i)}),A(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete ka[n.id]},e.prototype.resize=function(t){if(!this[Re]){if(this._disposed){this.id;return}this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=t&&t.silent;this[Oe]&&(a==null&&(a=this[Oe].silent),i=!0,this[Oe]=null),this[Re]=!0,li(this);try{i&&Cn(this),ur.update.call(this,{type:"resize",animation:H({duration:0},t&&t.animation)})}catch(o){throw this[Re]=!1,o}this[Re]=!1,oi.call(this,a),si.call(this,a)}}},e.prototype.showLoading=function(t,n){if(this._disposed){this.id;return}if(Q(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!!Dh[t]){var i=Dh[t](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var n=H({},t);return n.type=Sh[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){this.id;return}if(Q(n)||(n={silent:!!n}
15),!!il[t.type]&&this._model){if(this[Re]){this._pendingActions.push(t);return}var i=n.silent;Ku.call(this,t,i);var a=n.flush;a?this._zr.flush():a!==!1&&ie.browser.weChat&&this._throttledZrFlush(),oi.call(this,i),si.call(this,i)}},e.prototype.updateLabelLayout=function(){Rt.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var n=t.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=(function(){Cn=function(h){var f=h._scheduler;f.restorePipelines(h._model),f.prepareStageTasks(),ju(h,!0),ju(h,!1),f.plan()},ju=function(h,f){for(var v=h._model,p=h._scheduler,m=f?h._componentsViews:h._chartsViews,y=f?h._componentsMap:h._chartsMap,g=h._zr,x=h._api,b=0;b<m.length;b++)m[b].__alive=!1;f?v.eachComponent(function(w,T){w!=="series"&&_(T)}):v.eachSeries(_);function _(w){var T=w.__requireNewView;w.__requireNewView=!1;var D="_ec_"+w.id+"_"+w.type,L=!T&&y[D];if(!L){var M=Kt(w.type),C=f?Bt.getClass(M.main,M.sub):Ot.getClass(M.sub);L=new C,L.init(v,x),y[D]=L,m.push(L),g.add(L.group)}w.__viewId=L.__id=D,L.__alive=!0,L.__model=w,L.group.__ecComponentInfo={mainType:w.mainType,index:w.componentIndex},!f&&p.prepareView(L,w,v,x)}for(var b=0;b<m.length;){var S=m[b];S.__alive?b++:(!f&&S.renderTask.dispose(),g.remove(S.group),S.dispose(v,x),m.splice(b,1),y[S.__id]===S&&delete y[S.__id],S.__id=S.group.__ecComponentInfo=null)}},Ho=function(h,f,v,p,m){var y=h._model;if(y.setUpdatePayload(v),!p){A([].concat(h._componentsViews).concat(h._chartsViews),S);return}var g={};g[p+"Id"]=v[p+"Id"],g[p+"Index"]=v[p+"Index"],g[p+"Name"]=v[p+"Name"];var x={mainType:p,query:g};m&&(x.subType=m);var b=v.excludeSeriesId,_;b!=null&&(_=re(),A(Qe(b),function(w){var T=tr(w,null);T!=null&&_.set(T,!0)})),y&&y.eachComponent(x,function(w){var T=_&&_.get(w.id)!=null;if(!T)if(Sv(v))if(w instanceof ir)v.type===zn&&!v.notBlur&&!w.get(["emphasis","disabled"])&&fS(w,v,h._api);else{var D=vd(w.mainType,w.componentIndex,v.name,h._api),L=D.focusSelf,M=D.dispatchers;v.type===zn&&L&&!v.notBlur&&ah(w.mainType,w.componentIndex,h._api),M&&A(M,function(C){v.type===zn?Gs(C):Ws(C)})}else lh(v)&&w instanceof ir&&(gS(w,v,h._api),_v(w),mt(h))},h),y&&y.eachComponent(x,function(w){var T=_&&_.get(w.id)!=null;T||S(h[p==="series"?"_chartsMap":"_componentsMap"][w.__viewId])},h);function S(w){w&&w.__alive&&w[f]&&w[f](w.__model,y,h._api,v)}},ur={prepareAndUpdate:function(h){Cn(this),ur.update.call(this,h,h&&{optionChanged:h.newOption!=null})},update:function(h,f){var v=this._model,p=this._api,m=this._zr,y=this._coordSysMgr,g=this._scheduler;if(v){v.setUpdatePayload(h),g.restoreData(v,h),g.performSeriesTasks(v),y.create(v,p),g.performDataProcessorTasks(v,h),qu(this,v),y.update(v,p),n(v),g.performVisualTasks(v,h);var x=v.get("backgroundColor")||"transparent";m.setBackgroundColor(x);var b=v.get("darkMode");b!=null&&b!=="auto"&&m.setDarkMode(b),Qu(this,v,p,h,f),Rt.trigger("afterupdate",v,p)}},updateTransform:function(h){var f=this,v=this._model,p=this._api;if(v){v.setUpdatePayload(h);var m=[];v.eachComponent(function(g,x){if(g!=="series"){var b=f.getViewOfComponentModel(x);if(b&&b.__alive)if(b.updateTransform){var _=b.updateTransform(x,v,p,h);_&&_.update&&m.push(b)}else m.push(b)}});var y=re();v.eachSeries(function(g){var x=f._chartsMap[g.__viewId];if(x.updateTransform){var b=x.updateTransform(g,v,p,h);b&&b.update&&y.set(g.uid,1)}else y.set(g.uid,1)}),n(v),this._scheduler.performVisualTasks(v,h,{setDirty:!0,dirtyMap:y}),Go(this,v,p,h,{},y),Rt.trigger("afterupdate",v,p)}},updateView:function(h){var f=this._model;f&&(f.setUpdatePayload(h),Ot.markUpdateMethod(h,"updateView"),n(f),this._scheduler.performVisualTasks(f,h,{setDirty:!0}),Qu(this,f,this._api,h,{}),Rt.trigger("afterupdate",f,this._api))},updateVisual:function(h){var f=this,v=this._model;v&&(v.setUpdatePayload(h),v.eachSeries(function(p){p.getData().clearAllVisual()}),Ot.markUpdateMethod(h,"updateVisual"),n(v),this._scheduler.performVisualTasks(v,h,{visualType:"visual",setDirty:!0}),v.eachComponent(function(p,m){if(p!=="series"){var y=f.getViewOfComponentModel(m);y&&y.__alive&&y.updateVisual(m,v,f._api,h)}}),v.eachSeries(function(p){var m=f._chartsMap[p.__viewId];m.updateVisual(p,v,f._api,h)}),Rt.trigger("afterupdate",v,this._api))},updateLayout:function(h){ur.update.call(this,h)}};function t(h,f,v,p,m){if(h._disposed){h.id;return}for(var y=h._model,g=h._coordSysMgr.getCoordinateSystems(),x,b=yu(y,v),_=0;_<g.length;_++){var S=g[_];if(S[f]&&(x=S[f](y,b,p,m))!=null)return x}}$o=t,qu=function(h,f){var v=h._chartsMap,p=h._scheduler;f.eachSeries(function(m){p.updateStreamModes(m,v[m.__viewId])})},Ku=function(h,f){var v=this,p=this.getModel(),m=h.type,y=h.escapeConnect,g=il[m],x=(g.update||"update").split(":"),b=x.pop(),_=x[0]!=null&&Kt(x[0]);this[Re]=!0,li(this);var S=[h],w=!1;h.batch&&(w=!0,S=J(h.batch,function(z){return z=me(H({},z),h),z.batch=null,z}));var T=[],D,L=[],M=g.nonRefinedEventType,C=lh(h),I=Sv(h);if(I&&wm(this._api),A(S,function(z){var P=g.action(z,p,v._api);if(g.refineEvent?L.push(P):D=P,D=D||H({},z),D.type=M,T.push(D),I){var B=sd(h),V=B.queryOptionMap,U=B.mainTypeSpecified,Y=U?V.keys()[0]:"series";Ho(v,b,z,Y),mt(v)}else C?(Ho(v,b,z,"series"),mt(v)):_&&Ho(v,b,z,_.main,_.sub)}),b!=="none"&&!I&&!C&&!_)try{this[Oe]?(Cn(this),ur.update.call(this,h),this[Oe]=null):ur[b].call(this,h)}catch(z){throw this[Re]=!1,z}if(w?D={type:M,escapeConnect:y,batch:T}:D=T[0],this[Re]=!1,!f){var k=void 0;if(g.refineEvent){var R=g.refineEvent(L,h,p,this._api).eventContent;xr(Q(R)),k=me({type:g.refinedEventType},R),k.fromAction=h.type,k.fromActionPayload=h,k.escapeConnect=!0}var O=this._messageCenter;
15O.trigger(D.type,D),k&&O.trigger(k.type,k)}},oi=function(h){for(var f=this._pendingActions;f.length;){var v=f.shift();Ku.call(this,v,h)}},si=function(h){!h&&this.trigger("updated")},Np=function(h,f){h.on("rendered",function(v){f.trigger("rendered",v),h.animation.isFinished()&&!f[Oe]&&!f._scheduler.unfinished&&!f._pendingActions.length&&f.trigger("finished")})},zp=function(h,f){h.on("mouseover",function(v){var p=v.target,m=ma(p,sh);m&&(vS(m,v,f._api),mt(f))}).on("mouseout",function(v){var p=v.target,m=ma(p,sh);m&&(pS(m,v,f._api),mt(f))}).on("click",function(v){var p=v.target,m=ma(p,function(x){return ve(x).dataIndex!=null},!0);if(m){var y=m.selected?"unselect":"select",g=ve(m);f._api.dispatchAction({type:y,dataType:g.dataType,dataIndexInside:g.dataIndex,seriesIndex:g.seriesIndex,isFromClick:!0})}})};function n(h){h.clearColorPalette(),h.eachSeries(function(f){f.clearColorPalette()})}function i(h){var f=[],v=[],p=!1;if(h.eachComponent(function(x,b){var _=b.get("zlevel")||0,S=b.get("z")||0,w=b.getZLevelKey();p=p||!!w,(x==="series"?v:f).push({zlevel:_,z:S,idx:b.componentIndex,type:x,key:w})}),p){var m=f.concat(v),y,g;ls(m,function(x,b){return x.zlevel===b.zlevel?x.z-b.z:x.zlevel-b.zlevel}),A(m,function(x){var b=h.getComponent(x.type,x.idx),_=x.zlevel,S=x.key;y!=null&&(_=Math.max(y,_)),S?(_===y&&S!==g&&_++,g=S):g&&(_===y&&_++,g=""),y=_,b.setZLevel(_)})}}Qu=function(h,f,v,p,m){i(f),Fp(h,f,v,p,m),A(h._chartsViews,function(y){y.__alive=!1}),Go(h,f,v,p,m),A(h._chartsViews,function(y){y.__alive||y.remove(f,v)})},Fp=function(h,f,v,p,m,y){A(y||h._componentsViews,function(g){var x=g.__model;u(x,g),g.render(x,f,v,p),l(x,g),c(x,g)})},Go=function(h,f,v,p,m,y){var g=h._scheduler;m=H(m||{},{updatedSeries:f.getSeries()}),Rt.trigger("series:beforeupdate",f,v,m);var x=!1;f.eachSeries(function(b){var _=h._chartsMap[b.__viewId];_.__alive=!0;var S=_.renderTask;g.updatePayload(S,p),u(b,_),y&&y.get(b.uid)&&S.dirty(),S.perform(g.getPerformArgs(S))&&(x=!0),_.group.silent=!!b.get("silent"),s(b,_),_v(b)}),g.unfinished=x||g.unfinished,Rt.trigger("series:layoutlabels",f,v,m),Rt.trigger("series:transition",f,v,m),f.eachSeries(function(b){var _=h._chartsMap[b.__viewId];l(b,_),c(b,_)}),o(h,f),Rt.trigger("series:afterupdate",f,v,m)},mt=function(h){h[Zu]=!0,h.getZr().wakeUp()},li=function(h){h[Vo]=(h[Vo]+1)%1e3},Hp=function(h){h[Zu]&&(h.getZr().storage.traverse(function(f){Ca(f)||a(f)}),h[Zu]=!1)};function a(h){for(var f=[],v=h.currentStates,p=0;p<v.length;p++){var m=v[p];m==="emphasis"||m==="blur"||m==="select"||f.push(m)}h.selected&&h.states.select&&f.push("select"),h.hoverState===wl&&h.states.emphasis?f.push("emphasis"):h.hoverState===_l&&h.states.blur&&f.push("blur"),h.useStates(f)}function o(h,f){var v=h._zr,p=v.storage,m=0;p.traverse(function(y){y.isGroup||m++}),m>f.get("hoverLayerThreshold")&&!ie.node&&!ie.worker&&f.eachSeries(function(y){if(!y.preventUsingHoverLayer){var g=h._chartsMap[y.__viewId];g.__alive&&g.eachRendered(function(x){x.states.emphasis&&(x.states.emphasis.hoverLayer=!0)})}})}function s(h,f){var v=h.get("blendMode")||null;f.eachRendered(function(p){p.isGroup||(p.style.blend=v)})}function l(h,f){if(!h.preventAutoZ){var v=Wa(h);f.eachRendered(function(p){return Vm(p,v.z,v.zlevel),!0})}}function u(h,f){f.eachRendered(function(v){if(!Ca(v)){var p=v.getTextContent(),m=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),m&&m.stateTransition&&(m.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function c(h,f){var v=h.getModel("stateAnimation"),p=h.isAnimationEnabled(),m=v.get("duration"),y=m>0?{duration:m,delay:v.get("delay"),easing:v.get("easing")}:null;f.eachRendered(function(g){if(g.states&&g.states.emphasis){if(Ca(g))return;if(g instanceof ye&&wS(g),g.__dirty){var x=g.prevStates;x&&g.useStates(x)}if(p){g.stateTransition=y;var b=g.getTextContent(),_=g.getTextGuideLine();b&&(b.stateTransition=y),_&&(_.stateTransition=y)}g.__dirty&&a(g)}})}Vp=function(h){return new((function(f){$(v,f);function v(){return f!==null&&f.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(p){for(;p;){var m=p.__ecComponentInfo;if(m!=null)return h._model.getComponent(m.mainType,m.index);p=p.parent}},v.prototype.enterEmphasis=function(p,m){Gs(p,m),mt(h)},v.prototype.leaveEmphasis=function(p,m){Ws(p,m),mt(h)},v.prototype.enterBlur=function(p){dS(p),mt(h)},v.prototype.leaveBlur=function(p){ym(p),mt(h)},v.prototype.enterSelect=function(p){xm(p),mt(h)},v.prototype.leaveSelect=function(p){bm(p),mt(h)},v.prototype.getModel=function(){return h.getModel()},v.prototype.getViewOfComponentModel=function(p){return h.getViewOfComponentModel(p)},v.prototype.getViewOfSeriesModel=function(p){return h.getViewOfSeriesModel(p)},v.prototype.getMainProcessVersion=function(){return h[Vo]},v})(uy))(h)},Jy=function(h){function f(v,p){for(var m=0;m<v.length;m++){var y=v[m];y[Xu]=p}}A(Sh,function(v,p){h._messageCenter.on(p,function(m){if($p[h.group]&&h[Xu]!==Bp){if(m&&m.escapeConnect)return;var y=h.makeActionFromEvent(m),g=[];A(ka,function(x){x!==h&&x.group===h.group&&g.push(x)}),f(g,Bp),A(g,function(x){x[Xu]!==kM&&x.dispatchAction(y)}),f(g,IM)}})})}})(),e})(zt),Wd=ex.prototype;Wd.on=Xy("on");Wd.off=Xy("off");Wd.one=function(r,e,t){var n=this;function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];e&&e.apply&&e.apply(this,a),n.off(r,i)}this.on.call(this,r,i,t)};var PM=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var il={},Sh={},Th={},Ch=[],Mh=[],al=[],tx={},Dh={},ka={},$p={},RM=+new Date-0,Ud="_echarts_instance_";function $l(r,e,t){{var n=EM(r);if(n)return n}var i=new ex(r,e,t);return i.id="ec_"+RM++,ka[i.id]=i,rm(r,Ud,i.id),Jy(i),Rt.trigger("afterinit",i),i}function EM(r){return ka[e1(r,Ud)]}function rx(r,e){tx[r]=e}function nx(r){de(Mh,r)<0&&Mh.push(r)}function ix(r,e){Zd(Ch,r,e,wM)}function OM(r){Yd("afterinit",r)}function BM(r){Yd("afterupdate",r)}function Yd(r,e){Rt.on(r,e)}function Yn(r,e,t){var n,i,a,o,s;ne(e)&&(t=e,e=""),Q(r)?(n=r.type,i=r.event,o=r.update,s=r.publishNonRef
15inedEvent,t||(t=r.action),a=r.refineEvent):(n=r,i=e);function l(c){return c.toLowerCase()}i=l(i||n);var u=a?l(n):i;il[n]||(xr(Op.test(n)&&Op.test(i)),a&&xr(i!==n),il[n]={actionType:n,refinedEventType:i,nonRefinedEventType:u,update:o,action:t,refineEvent:a},Th[i]=1,a&&s&&(Th[u]=1),Sh[u]=n)}function NM(r,e){Rd.register(r,e)}function zM(r,e){Zd(al,r,e,Uy,"layout")}function Zn(r,e){Zd(al,r,e,Yy,"visual")}var Gp=[];function Zd(r,e,t,n,i){if((ne(e)||Q(e))&&(t=e,e=n),!(de(Gp,t)>=0)){Gp.push(t);var a=Iy.wrapStageHandler(t,i);a.__prio=e,a.__raw=t,r.push(a)}}function ax(r,e){Dh[r]=e}function FM(r,e,t){var n=mM("registerMap");n&&n(r,e,t)}var VM=YC;Zn(Gd,w2);Zn(Hl,S2);Zn(Hl,T2);Zn(Gd,N2);Zn(Hl,z2);Zn(Zy,pM);nx(hy);ix(bM,AC);ax("default",C2);Yn({type:zn,event:zn,update:zn},Ke);Yn({type:vs,event:vs,update:vs},Ke);Yn({type:Hs,event:dd,update:Hs,action:Ke,refineEvent:Xd,publishNonRefinedEvent:!0});Yn({type:nh,event:dd,update:nh,action:Ke,refineEvent:Xd,publishNonRefinedEvent:!0});Yn({type:$s,event:dd,update:$s,action:Ke,refineEvent:Xd,publishNonRefinedEvent:!0});function Xd(r,e,t,n){return{eventContent:{selected:mS(t),isFromClick:e.isFromClick||!1}}}rx("default",{});rx("dark",Oy);function ji(r){return r==null?0:r.length||1}function Wp(r){return r}var HM=(function(){function r(e,t,n,i,a,o){this._old=e,this._new=t,this._oldKeyGetter=n||Wp,this._newKeyGetter=i||Wp,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},i=new Array(e.length),a=new Array(t.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(t,n,a,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=i[o],l=n[s],u=ji(l);if(u>1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(t,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],c=i[l],h=ji(u),f=ji(c);if(h>1&&f===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(h===1&&f>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(h===1&&f===1)this._update&&this._update(c,u),i[l]=null;else if(h>1&&f>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(h>1)for(var v=0;v<h;v++)this._remove&&this._remove(u[v]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},r.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var i=e[n],a=t[i],o=ji(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);t[i]=null}},r.prototype._initIndexMap=function(e,t,n,i){for(var a=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[i](e[o],o);if(a||(n[o]=s),!!t){var l=t[s],u=ji(l);u===0?(t[s]=o,a&&n.push(s)):u===1?t[s]=[l,o]:l.push(o)}}},r})(),$M=(function(){function r(e,t){this._encode=e,this._schema=t}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r})();function GM(r,e){var t={},n=t.encode={},i=re(),a=[],o=[],s={};A(r.dimensions,function(f){var v=r.getDimensionInfo(f),p=v.coordDim;if(p){var m=v.coordDimIndex;Ju(n,p)[m]=f,v.isExtraCoord||(i.set(p,1),UM(v.type)&&(a[0]=f),Ju(s,p)[m]=r.getDimensionIndex(v.name)),v.defaultTooltip&&o.push(f)}iy.each(function(y,g){var x=Ju(n,g),b=v.otherDims[g];b!=null&&b!==!1&&(x[b]=v.name)})});var l=[],u={};i.each(function(f,v){var p=n[v];u[v]=p[0],l=l.concat(p)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=J(l,function(f){return r.getDimensionInfo(f).storeDimIndex}),t.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(a=c.slice());var h=n.tooltip;return h&&h.length?o=h.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,t.userOutput=new $M(s,e),t}function Ju(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function WM(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function UM(r){return!(r==="ordinal"||r==="time")}var _s=(function(){function r(e){this.otherDims={},e!=null&&H(this,e)}return r})(),YM=Me(),ZM={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},ox=(function(){function r(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=ux(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return te(this._dimNameMap.get(e),-1)},r.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},r.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=vy(this.source),n=!cx(e),i="",a=[],o=0,s=0;o<e;o++){var l=void 0,u=void 0,c=void 0,h=this.dimensions[s];if(h&&h.storeDimIndex===o)l=t?h.name:null,u=h.type,c=h.ordinalMeta,s++;else{var f=this.getSourceDimension(o);f&&(l=t?f.name:null,u=f.type)}a.push({property:l,type:u,ordinalMeta:c}),t&&l!=null&&(!h||!h.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=ZM[u]||"f",c&&(i+=c.uid),i+="$"}var v=this.source,p=[v.seriesLayoutBy,v.startIndex,i].join("$$");return{dimensions:a,hash:p}},r.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===t)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(t);o&&(i=o.name)}e.push(i)}return e},r.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r})();function sx(r){return r instanceof ox}function lx(r){for(var e=re(),t=0;t<(r||[]).length;t++){var n=r[t],i=Q(n)?n.name:n;i!=null&&e.get(i)==null&&e.set(i,t)}return e}function ux(r){var e=YM(r);return e.dimNameMap||(e.dimNameMap=lx(r.dimensionsDefine))}function cx(r){return r>30}var qi=Q,Mr=J,XM=typeof Int32Array>"u"?Array:Int32Array,jM="e\0\0",Up=-1,qM=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],KM=["_approximateExtent"],Yp,Wo,Ki,Qi,ec,Ji,tc,QM=(function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual
15={},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,i=!1;sx(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var h=n[c],f=K(h)?new _s({name:h}):h instanceof _s?h:new _s(h),v=f.name;f.type=f.type||"float",f.coordDim||(f.coordDim=v,f.coordDimIndex=0);var p=f.otherDims=f.otherDims||{};o.push(v),a[v]=f,u[v]!=null&&(l=!0),f.createInvertedIndices&&(s[v]=[]);var m=c;Se(f.storeDimIndex)&&(m=f.storeDimIndex),p.itemName===0&&(this._nameDimIdx=m),p.itemId===0&&(this._idDimIdx=m),i&&(f.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted){var y=this._dimIdxToName=re();A(o,function(g){y.set(a[g].storeDimIndex,g)})}}return r.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var i=this._schema.getSourceDimension(t);if(i)return i.name},r.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},r.prototype._recognizeDimIndex=function(e){if(Se(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},r.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);return t},r.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},r.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(n){return t.hasOwnProperty(n)?t[n]:void 0}:function(n){return t[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return i?i[t]:null},r.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,n=t.encode[e];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(e,t,n){var i=this,a;if(e instanceof ph&&(a=e),!a){var o=this.dimensions,s=zd(e)||at(e)?new py(e,o.length):e;a=new ph;var l=Mr(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=GM(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},r.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=t[l],o&&tc(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var i=this._dimInfos[t[n]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==Wr&&!e.fillStorage},r.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===gt;if(l&&!i.pure)for(var u=[],c=e;c<t;c++){var h=i.getItem(c,u);if(!this.hasItemOption&&$w(h)&&(this.hasItemOption=!0),h){var f=h.name;a[c]==null&&f!=null&&(a[c]=tr(f,null));var v=h.id;o[c]==null&&v!=null&&(o[c]=tr(v,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<t;c++)tc(this,c);Yp(this)}},r.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},r.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},r.prototype.setCalculationInfo=function(e,t){qi(e)?H(this._calculationInfo,e):this._calculationInfo[e]=t},r.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=Ki(this,this._nameDimIdx,t)),n==null&&(n=""),n},r.prototype._getCategory=function(e,t){var n=this._store.get(e,t),i=this._store.getOrdinalMeta(e);return i?i.categories[n]:n},r.prototype.getId=function(e){return Wo(this,this.getRawIndex(e))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(e,t){var n=this._store,i=this._dimInfos[e];if(i)return n.get(i.storeDimIndex,t)},r.prototype.getByRawIndex=function(e,t){var n=this._store,i=this._dimInfos[e];if(i)return n.getByRawIndex(i.storeDimIndex,t)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},r.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},r.prototype.getValues=function(e,t){var n=this,i=this._store;return X(e)?i.getValues(Mr(e,function(a){return n._getStoreDimIndex(a)}),t):i.getValues(e)},r.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,i=t.length;n<i;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},r.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},r.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},r.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},r.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],i=n&&n[t];return i==null||isNaN(i)?Up:i},r.prototype.each=function(e,t,n){ne(e)&&(n=t,t=e,e=[]);var i=n||this,a=Mr(Qi(e),this._getStoreDimIndex,this);this._store.each(a,i?ee(t,i):t)},r.prototype.filterSelf=function(e,t,n){ne(e)&&(n=t,t=e,e=[]);var i=n||this,a=Mr(Qi(e),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?ee(t,i):t),this},r.prototype.selectRange=function(e){var t=this,n={},i=Ae(e);return A(i,function(a){var o=t._getStoreDimIndex(a);n[o]=e[a]}),this._store=this._store.selectRange(n),this},r.prototype.mapArray=function(e,t,n){ne(e)&&(n=t,t=e,e=[]),n=n||this;var i=[];return this.each(e,function(){i.push(t&&t.apply(this,arguments))},n),i},r.prototype.map=function(e,t,n,i){var a=n||i||this,o=Mr(Qi(e),this._getStoreDimIndex,this),s=Ji(this);return s._store=this._store.map(o,a?ee(t,a):t),s},r.prototype.modify=function(e,t,n,i){var a=n||i||this,o=Mr(Qi(e),this._getStoreDimIndex,this);this._store.modify(o,a?ee(t,a):t)},r.prototype.downSample=function(e,t,n,i){var a=Ji(this);return a._store=this._store.downSample(this._getStoreDimIndex(e),t,n,i),a},r.prototype.minmaxDownSample=function(e,t){var n=Ji(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},r.prototype.lttbDownSample=function(e,t){var n=Ji(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},r.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},r.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new Le(n,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;
15return new HM(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return Wo(e,n)},function(n){return Wo(t,n)})},r.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},r.prototype.setVisual=function(e,t){this._visual=this._visual||{},qi(e)?H(this._visual,e):this._visual[e]=t},r.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],i=n&&n[t];return i??this.getVisual(t)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[t];return a==null&&(a=this.getVisual(t),X(a)?a=a.slice():qi(a)&&(a=H({},a)),i[t]=a),a},r.prototype.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,qi(t)?H(i,t):i[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){qi(e)?H(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?H(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;rS(n,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){A(this._graphicEls,function(n,i){n&&e&&e.call(t,n,i)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:Mr(this.dimensions,this._getDimInfo,this),this.hostModel)),ec(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var n=this[e];ne(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return t.apply(this,[i].concat(Qh(arguments)))})},r.internalField=(function(){Yp=function(e){var t=e._invertedIndicesMap;A(t,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=t[i]=new XM(o.categories.length);for(var l=0;l<n.length;l++)n[l]=Up;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},Ki=function(e,t,n){return tr(e._getCategory(t,n),null)},Wo=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Ki(e,e._idDimIdx,t)),n==null&&(n=jM+t),n},Qi=function(e){return X(e)||(e=e!=null?[e]:[]),e},Ji=function(e){var t=new r(e._schema?e._schema:Mr(e.dimensions,e._getDimInfo,e),e.hostModel);return ec(t,e),t},ec=function(e,t){A(qM.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,A(KM,function(n){e[n]=ue(t[n])}),e._calculationInfo=H({},t._calculationInfo)},tc=function(e,t){var n=e._nameList,i=e._idList,a=e._nameDimIdx,o=e._idDimIdx,s=n[t],l=i[t];if(s==null&&a!=null&&(n[t]=s=Ki(e,a,t)),l==null&&o!=null&&(i[t]=l=Ki(e,o,t)),l==null&&s!=null){var u=e._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),i[t]=l}}})(),r})();function JM(r,e){zd(r)||(r=dy(r)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||r.dimensionsDefine||[],i=re(),a=[],o=tD(r,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&cx(o),l=n===r.dimensionsDefine,u=l?ux(r):lx(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var h=re(c),f=new by(o),v=0;v<f.length;v++)f[v]=-1;function p(L){var M=f[L];if(M<0){var C=n[L],I=Q(C)?C:{name:C},k=new _s,R=I.name;R!=null&&u.get(R)!=null&&(k.name=k.displayName=R),I.type!=null&&(k.type=I.type),I.displayName!=null&&(k.displayName=I.displayName);var O=a.length;return f[L]=O,k.storeDimIndex=L,a.push(k),k}return a[M]}if(!s)for(var v=0;v<o;v++)p(v);h.each(function(L,M){var C=Qe(L).slice();if(C.length===1&&!K(C[0])&&C[0]<0){h.set(M,!1);return}var I=h.set(M,[]);A(C,function(k,R){var O=K(k)?u.get(k):k;O!=null&&O<o&&(I[R]=O,y(p(O),M,R))})});var m=0;A(t,function(L){var M,C,I,k;if(K(L))M=L,k={};else{k=L,M=k.name;var R=k.ordinalMeta;k.ordinalMeta=null,k=H({},k),k.ordinalMeta=R,C=k.dimsDef,I=k.otherDims,k.name=k.coordDim=k.coordDimIndex=k.dimsDef=k.otherDims=null}var O=h.get(M);if(O!==!1){if(O=Qe(O),!O.length)for(var z=0;z<(C&&C.length||1);z++){for(;m<o&&p(m).coordDim!=null;)m++;m<o&&O.push(m++)}A(O,function(P,B){var V=p(P);if(l&&k.type!=null&&(V.type=k.type),y(me(V,k),M,B),V.name==null&&
15C){var U=C[B];!Q(U)&&(U={name:U}),V.name=V.displayName=U.name,V.defaultTooltip=U.defaultTooltip}I&&me(V.otherDims,I)})}});function y(L,M,C){iy.get(M)!=null?L.otherDims[M]=C:(L.coordDim=M,L.coordDimIndex=C,i.set(M,!0))}var g=e.generateCoord,x=e.generateCoordCount,b=x!=null;x=g?x||1:0;var _=g||"value";function S(L){L.name==null&&(L.name=L.coordDim)}if(s)A(a,function(L){S(L)}),a.sort(function(L,M){return L.storeDimIndex-M.storeDimIndex});else for(var w=0;w<o;w++){var T=p(w),D=T.coordDim;D==null&&(T.coordDim=rD(_,i,b),T.coordDimIndex=0,(!g||x<=0)&&(T.isExtraCoord=!0),x--),S(T),T.type==null&&(ly(r,w)===ut.Must||T.isExtraCoord&&(T.otherDims.itemName!=null||T.otherDims.seriesName!=null))&&(T.type="ordinal")}return eD(a),new ox({source:r,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function eD(r){for(var e=re(),t=0;t<r.length;t++){var n=r[t],i=n.name,a=e.get(i)||0;a>0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function tD(r,e,t,n){var i=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,n||0);return A(e,function(a){var o;Q(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function rD(r,e,t){if(t||e.hasKey(r)){for(var n=0;e.hasKey(r+n);)n++;r+=n}return e.set(r,!0),r}var nD=(function(){function r(e){this.coordSysDims=[],this.axisMap=re(),this.categoryAxisMap=re(),this.coordSysName=e}return r})();function iD(r){var e=r.get("coordinateSystem"),t=new nD(e),n=aD[e];if(n)return n(r,t,t.axisMap,t.categoryAxisMap),t}var aD={cartesian2d:function(r,e,t,n){var i=r.getReferringComponents("xAxis",qe).models[0],a=r.getReferringComponents("yAxis",qe).models[0];e.coordSysDims=["x","y"],t.set("x",i),t.set("y",a),ui(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),ui(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var i=r.getReferringComponents("singleAxis",qe).models[0];e.coordSysDims=["single"],t.set("single",i),ui(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var i=r.getReferringComponents("polar",qe).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",a),t.set("angle",o),ui(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),ui(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,n){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,n){var i=r.ecModel,a=i.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();A(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];t.set(c,u),ui(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(r,e,t,n){var i=r.getReferringComponents("matrix",qe).models[0];e.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");t.set("x",a),t.set("y",o),n.set("x",a),n.set("y",o)}};function ui(r){return r.get("type")==="category"}function oD(r,e,t){t=t||{};var n=t.byIndex,i=t.stackedCoordDimension,a,o,s;sD(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,h,f;if(A(a,function(x,b){K(x)&&(a[b]=x={name:x}),l&&!x.isExtraCoord&&(!n&&!u&&x.ordinalMeta&&(u=x),!c&&x.type!=="ordinal"&&x.type!=="time"&&(!i||i===x.coordDim)&&(c=x))}),c&&!n&&!u&&(n=!0),c){h="__\0ecstackresult_"+r.id,f="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=c.coordDim,p=c.type,m=0;A(a,function(x){x.coordDim===v&&m++});var y={name:h,coordDim:v,coordDimIndex:m,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},g={name:f,coordDim:f,coordDimIndex:m+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(y.storeDimIndex=s.ensureCalculationDimension(f,p),g.storeDimIndex=s.ensureCalculationDimension(h,p)),o.appendCalculationDimension(y),o.appendCalculationDimension(g)):(a.push(y),a.push(g))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:f,stackResultDimension:h}}function sD(r){return!sx(r.schema)}function Ii(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function lD(r,e){return Ii(r,e)?r.getCalculationInfo("stackResultDimension"):e}function uD(r,e){var t=r.get("coordinateSystem"),n=Rd.get(t),i;return e&&e.coordSysDims&&(i=J(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=WM(l)}return o}
15)),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function cD(r,e,t){var n,i;return t&&A(r,function(a,o){var s=a.coordDim,l=t.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(r[n].otherDims.itemName=0),n}function jd(r,e,t){t=t||{};var n=e.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===gt;var o=iD(e),s=uD(e,o),l=t.useEncodeDefaulter,u=ne(l)?l:l?Pe(nC,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=JM(i,c),f=cD(h.dimensions,t.createInvertedIndices,o),v=a?null:n.getSharedDataStore(h),p=oD(e,{schema:h,store:v}),m=new QM(h,e);m.setCalculationInfo(p);var y=f!=null&&hD(i)?function(g,x,b,_){return _===f?b:this.defaultDimValueGetter(g,x,b,_)}:null;return m.hasItemOption=!1,m.initData(a?i:v,null,y),m}function hD(r){if(r.sourceFormat===gt){var e=dD(r.data||[]);return!X(io(e))}}function dD(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}function Ah(r){return r.type==="interval"||r.type==="log"}function fD(r,e,t,n,i){var a={},o=a.interval=q0(e/t);n!=null&&o<n&&(o=a.interval=n),i!=null&&o>i&&(o=a.interval=i);var s=a.intervalPrecision=qa(o),l=a.niceTickExtent=[$e(Math.ceil(r[0]/o)*o,s),$e(Math.floor(r[1]/o)*o,s)];return vD(l,r),a}function rc(r){var e=Math.pow(10,ad(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,$e(t*e)}function qa(r){return vr(r)+2}function Zp(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function vD(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),Zp(r,0,e),Zp(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function qd(r,e){return r>=e[0]&&r<=e[1]}var pD=(function(){function r(){this.normalize=Xp,this.scale=jp}return r.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=ee(e.normalize,e),this.scale=ee(e.scale,e)):(this.normalize=Xp,this.scale=jp)},r})();function Xp(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function jp(r,e){return r*(e[1]-e[0])+e[0]}function Lh(r,e,t){var n=Math.log(r);return[Math.log(t?e[0]:Math.max(0,e[0]))/n,Math.log(t?e[1]:Math.max(0,e[1]))/n]}var en=(function(){function r(e){this._calculator=new pD,this._setting=e||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]<t[0]?e[0]:t[0],e[1]>t[1]?e[1]:t[1])},r.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},r.prototype._innerSetExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t),this._brkCtx&&this._brkCtx.update(n)},r.prototype.setBreaksFromOption=function(e){},r.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r})();yl(en);var gD=0,kh=(function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++gD,this._onCollect=e.onCollect}return r.createByAxisModel=function(e){var t=e.option,n=t.data,i=n&&J(n,mD);return new r({categories:i,needCollect:!i,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!K(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var i=this._getOrCreateMap();return t=i.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,i.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=re(this.categories))},r})();function mD(r){return Q(r)&&r.value!=null?r.value:r+""}var hx=(function(r){$(e,r);function e(t){var n=r.call(this,t)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");
15return i||(i=new kh({})),X(i)&&(i=new kh({categories:J(i,function(a){return Q(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(t){return t==null?NaN:K(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return qd(t,this._extent)&&t>=0&&t<this._ordinalMeta.categories.length},e.prototype.normalize=function(t){return t=this._getTickNumber(t),this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(this._calculator.scale(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],n=this._extent,i=n[0];i<=n[1];)t.push({value:i}),i++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=t.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];i[o]=u,a[u]=o}for(var c=0;o<s;++o){for(;a[c]!=null;)c++;i.push(c),a[c]=o}},e.prototype._getTickNumber=function(t){var n=this._ticksByOrdinalNumber;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getRawOrdinalNumber=function(t){var n=this._ordinalNumbersByTick;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var n=this.getRawOrdinalNumber(t.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e})(en);en.registerClass(hx);var Dr=$e,Pi=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t==null||t===""?NaN:Number(t)},e.prototype.contain=function(t){return qd(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=qa(t)},e.prototype.getTicks=function(t){t=t||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=qs(),l=[];if(!n)return l;t.breakTicks;var u=1e4;i[0]<a[0]&&(t.expandToNicedExtent?l.push({value:Dr(a[0]-n,o)}):l.push({value:i[0]}));for(var c=function(p,m){return Math.round((m-p)/n)},h=a[0];h<=a[1];){if(l.push({value:h}),h=Dr(h+n,o),this._brkCtx){var f=this._brkCtx.calcNiceTickMultiple(h,c);f>=0&&(h=Dr(h+f*n,o))}if(l.length>0&&h===l[l.length-1].value)break;if(l.length>u)return[]}var v=l.length?l[l.length-1].value:a[1];return i[1]>v&&(t.expandToNicedExtent?l.push({value:Dr(v+n,o)}):l.push({value:i[1]})),t.breakTicks,l},e.prototype.getMinorTicks=function(t){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;o<n.length;o++){var s=n[o],l=n[o-1];if(!(l.break||s.break)){for(var u=0,c=[],h=s.value-l.value,f=h/t,v=qa(f);u<t-1;){var p=Dr(l.value+(u+1)*f,v);p>a[0]&&p<a[1]&&c.push(p),u++}var m=qs();m&&m.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(y){return y},this._interval,a),i.push(c)}}return i},e.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.getLabel=function(t,n){if(t==null)return"";var i=n&&n.precision;i==null?i=vr(t.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=Dr(t.value,i,!0);return Jm(a)},e.prototype.calcNiceTicks=function(t,n,i){t=t||5;var a=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,a.reverse(),this._innerSetExtent(a[0],a[1]),a=this._extent.slice());var s=fD(a,o,t,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var n=this._extent.slice();if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);t.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this._innerSetExtent(n[0],n[1]),n=this._extent.slice(),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval,s=this._intervalPrecision;t.fixMin||(n[0]=Dr(Math.floor(n[0]/o)*o,s)),t.fixMax||(n[1]=Dr(Math.ceil(n[1]/o)*o,s)),this._innerSetExtent(n[0],n[1])},e.prototype.setNiceExtent=function(t,n){this._niceExtent=[t,n]},e.type="interval",e})(en);en.registerClass(Pi);var dx=typeof Float32Array<"u",yD=dx?Float32Array:Array;function pr(r){return X(r)?dx?new Float32Array(r):r:new yD(r)}var xD="__ec_stack_";function fx(r){return r.get("stack")||xD+r.seriesIndex}function Kd(r){return r.dim+r.index}function vx(r,e){var t=[];return e.eachSeriesByType(r,function(n){gx(n)&&t.push(n)}),t}function bD(r){var e={};
15A(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var h=l.getData(),f=c.dim+"_"+c.index,v=h.getDimensionIndex(h.mapDimension(c.dim)),p=h.getStore(),m=0,y=p.count();m<y;++m){var g=p.get(v,m);e[f]?e[f].push(g):e[f]=[g]}});var t={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(i){i.sort(function(l,u){return l-u});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}t[n]=a}}return t}function px(r){var e=bD(r),t=[];return A(r,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],c=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),f=Math.abs(h[1]-h[0]);s=u?c/f*u:c}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var p=He(n.get("barWidth"),s),m=He(n.get("barMaxWidth"),s),y=He(n.get("barMinWidth")||(mx(n)?.5:1),s),g=n.get("barGap"),x=n.get("barCategoryGap"),b=n.get("defaultBarGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:m,barMinWidth:y,barGap:g,barCategoryGap:x,defaultBarGap:b,axisKey:Kd(a),stackId:fx(n)})}),_D(t)}function _D(r){var e={};A(r,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var h=n.barMaxWidth;h&&(l[u].maxWidth=h);var f=n.barMinWidth;f&&(l[u].minWidth=f);var v=n.barGap;v!=null&&(s.gap=v);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return A(e,function(n,i){t[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Ae(a).length;s=Math.max(35-l*4,15)+"%"}var u=He(s,o),c=He(n.gap,1),h=n.remainedWidth,f=n.autoWidthCount,v=(h-u)/(f+(f-1)*c);v=Math.max(v,0),A(a,function(g){var x=g.maxWidth,b=g.minWidth;if(g.width){var _=g.width;x&&(_=Math.min(_,x)),b&&(_=Math.max(_,b)),g.width=_,h-=_+c*_,f--}else{var _=v;x&&x<_&&(_=Math.min(x,h)),b&&b>_&&(_=b),_!==v&&(g.width=_,h-=_+c*_,f--)}}),v=(h-u)/(f+(f-1)*c),v=Math.max(v,0);var p=0,m;A(a,function(g,x){g.width||(g.width=v),m=g,p+=g.width*(1+c)}),m&&(p-=m.width*c);var y=-p/2;A(a,function(g,x){t[i][x]=t[i][x]||{bandWidth:o,offset:y,width:g.width},y+=g.width*(1+c)})}),t}function wD(r,e,t){if(r&&e){var n=r[Kd(e)];return n}}function SD(r,e){var t=vx(r,e),n=px(t);A(t,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=fx(i),u=n[Kd(s)][l],c=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:h})})}function TD(r){return{seriesType:r,plan:Hd(),reset:function(e){if(gx(e)){var t=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=t.getDimensionIndex(t.mapDimension(a.dim)),s=t.getDimensionIndex(t.mapDimension(i.dim)),l=e.get("showBackground",!0),u=t.mapDimension(a.dim),c=t.getCalculationInfo("stackResultDimension"),h=Ii(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),f=a.isHorizontal(),v=CD(i,a),p=mx(e),m=e.get("barMinHeight")||0,y=c&&t.getDimensionIndex(c),g=t.getLayout("size"),x=t.getLayout("offset");return{progress:function(b,_){for(var S=b.count,w=p&&pr(S*3),T=p&&l&&pr(S*3),D=p&&pr(S),L=n.master.getRect(),M=f?L.width:L.height,C,I=_.getStore(),k=0;(C=b.next())!=null;){var R=I.get(h?y:o,C),O=I.get(s,C),z=v,P=void 0;h&&(P=+R-I.get(o,C));var B=void 0,V=void 0,U=void 0,Y=void 0;if(f){var N=n.dataToPoint([R,O]);if(h){var G=n.dataToPoint([P,O]);z=G[0]}B=z,V=N[1]+x,U=N[0]-z,Y=g,Math.abs(U)<m&&(U=(U<0?-1:1)*m)}else{var N=n.dataToPoint([O,R]);if(h){var G=n.dataToPoint([O,P]);z=G[1]}B=N[0]+x,V=z,U=g,Y=N[1]-z,Math.abs(Y)<m&&(Y=(Y<=0?-1:1)*m)}p?(w[k]=B,w[k+1]=V,w[k+2]=f?U:Y,T&&(T[k]=f?L.x:B,T[k+1]=f?V:L.y,T[k+2]=M),D[C]=C):_.setItemLayout(C,{x:B,y:V,width:U,height:Y}),k+=3}p&&_.setLayout({largePoints:w,largeDataIndices:D,largeBackgroundPoints:T,valueAxisHorizontal:f})}}}}}}function gx(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function mx(r){return r.pipelineContext&&r.pipelineContext.large}function CD(r,e){var t=e.model.get("startValue");return t||(t=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?t>0?t:1:t))}var MD=function(r,e,t,n){for(;t<n;){var i=t+n>>>1;r[i][1]<e?t=i+1:n=i}return t},yx=(function(r){$(e,r);function e(t){var n=r.call(this,t)||this;return n.type="time",n}return e.prototype.getLabel=function(t){var n=this.getSetting("useUTC");return Bl(t.value,Vv[VT(Da(this._minLevelUnit))]||Vv.second,n,this.get
15Setting("locale"))},e.prototype.getFormattedLabel=function(t,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return HT(t,n,i,o,a)},e.prototype.getTicks=function(t){var n=this._interval,i=this._extent,a=[];if(!n)return a;var o=this.getSetting("useUTC"),s=Ks(i[1],o);a.push({value:i[0],time:{level:0,upperTimeUnit:s,lowerTimeUnit:s}});var l=ED(this._minLevelUnit,this._approxInterval,o,i,this._getExtentSpanWithBreaks(),this._brkCtx);a=a.concat(l);var u=Ks(i[1],o);a.push({value:i[1],time:{level:0,upperTimeUnit:u,lowerTimeUnit:u}}),this.getSetting("useUTC");var c=Fn.length-1,h=0;return A(a,function(f){c=Math.min(c,de(Fn,f.time.upperTimeUnit)),h=Math.max(h,f.time.level)}),a},e.prototype.calcNiceExtent=function(t){var n=this.getExtent();if(n[0]===n[1]&&(n[0]-=Mt,n[1]+=Mt),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-Mt}this._innerSetExtent(n[0],n[1]),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,n,i){t=t||10;var a=this._getExtentSpanWithBreaks();this._approxInterval=a/t,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var o=Uo.length,s=Math.min(MD(Uo,this._approxInterval,0,o),o-1);this._interval=Uo[s][1],this._intervalPrecision=qa(this._interval),this._minLevelUnit=Uo[Math.max(s-1,0)][0]},e.prototype.parse=function(t){return Se(t)?t:+Bi(t)},e.prototype.contain=function(t){return qd(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e})(Pi),Uo=[["second",Cd],["minute",Md],["hour",Ma],["quarter-day",Ma*6],["half-day",Ma*12],["day",Mt*1.2],["half-week",Mt*3.5],["week",Mt*7],["month",Mt*31],["quarter",Mt*95],["half-year",Fv/2],["year",Fv]];function DD(r,e,t,n){return dh(new Date(e),r,n).getTime()===dh(new Date(t),r,n).getTime()}function AD(r,e){return r/=Mt,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function LD(r){var e=30*Mt;return r/=e,r>6?6:r>3?3:r>2?2:1}function kD(r){return r/=Ma,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function qp(r,e){return r/=e?Md:Cd,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function ID(r){return q0(r)}function PD(r,e,t){var n=Math.max(0,de(Fn,e)-1);return dh(new Date(r),Fn[n],t).getTime()}function RD(r,e){var t=new Date(0);t[r](1);var n=t.getTime();t[r](1+e);var i=t.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function ED(r,e,t,n,i,a){var o=1e4,s=BT,l=0;function u(k,R,O,z,P,B,V){for(var U=RD(P,k),Y=R,N=new Date(Y);Y<O&&Y<=n[1]&&(V.push({value:Y}),!(l++>o));)if(N[P](N[z]()+k),Y=N.getTime(),a){var G=a.calcNiceTickMultiple(Y,U);G>0&&(N[P](N[z]()+G*k),Y=N.getTime())}V.push({value:Y,notAdd:!0})}function c(k,R,O){var z=[],P=!R.length;if(!DD(Da(k),n[0],n[1],t)){P&&(R=[{value:PD(n[0],k,t)},{value:n[1]}]);for(var B=0;B<R.length-1;B++){var V=R[B].value,U=R[B+1].value;if(V!==U){var Y=void 0,N=void 0,G=void 0,oe=!1;switch(k){case"year":Y=Math.max(1,Math.round(e/Mt/365)),N=Ym(t),G=$T(t);break;case"half-year":case"quarter":case"month":Y=LD(e),N=Dd(t),G=Zm(t);break;case"week":case"half-week":case"day":Y=AD(e),N=Ad(t),G=Xm(t),oe=!0;break;case"half-day":case"quarter-day":case"hour":Y=kD(e),N=Ld(t),G=jm(t);break;case"minute":Y=qp(e,!0),N=kd(t),G=qm(t);break;case"second":Y=qp(e,!1),N=Id(t),G=Km(t);break;case"millisecond":Y=ID(e),N=Pd(t),G=Qm(t);break}U>=n[0]&&V<=n[1]&&u(Y,V,U,N,G,oe,z),k==="year"&&O.length>1&&B===0&&O.unshift({value:O[0].value-Y})}}for(var B=0;B<z.length;B++)O.push(z[B])}}for(var h=[],f=[],v=0,p=0,m=0;m<s.length;++m){var y=Da(s[m]);if(FT(s[m])){c(s[m],h[h.length-1]||[],f);var g=s[m+1]?Da(s[m+1]):null;if(y!==g){if(f.length){p=v,f.sort(function(k,R){return k.value-R.value});for(var x=[],b=0;b<f.length;++b){var _=f[b].value;(b===0||f[b-1].value!==_)&&(x.push(f[b]),_>=n[0]&&_<=n[1]&&v++)}var S=i/e;if(v>S*1.5&&p>S/1.5||(h.push(x),v>S||r===s[m]))break}f=[]}}}for(var w=ze(J(h,function(k){return ze(k,function(R){return R.value>=n[0]&&R.value<=n[1]&&!R.notAdd})}),function(k){return k.length>0}),T=[],D=w.length-1,m=0;m<w.length;++m)for(var L=w[m],M=0;M<L.length;++M){var C=Ks(L[M].value,t);T.push({value:L[M].value,time:{level:D-m,upperTimeUnit:C,lowerTimeUnit:C}})}T.sort(function(k,R){return k.value-R.value});for(var I=[],m=0;m<T.length;++m)(m===0||T[m].value!==T[m-1].value)&&I.push(T[m]);return I}en.registerClass(yx);var Ih=$e,OD=Math.floor,BD=Math.ceil,Yo=Math.pow,Zo=Math.log,xx=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Pi,t}return e.prototype.getTicks=function(t){t=t||{};var n=this._extent.slice(),i=this._originalScale.getExtent(),a=r.prototype.getTicks.call(this,t),o=this.base;return this._originalScale._innerGetBreaks(),J(a,function(s){var l=s.value,u=null,c=Yo(o,l);l===n[0]&&this._fixMin?u=i[0]:l===n[1]&&this._fixMax&&(u=i[1]);var h;return u!=null&&(c=nc(c,u)),{value:c,break:h}},this)},e.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},e.prototype.setExtent=function(t,n){this._originalScale.setExtent(t,n);var i=Lh(this.base,[t,n]);r.prototype.setExtent.call(this,i[0],i[1])},e.prototype.getExtent=function(){var t=this.base,n=r.prototype.getExtent.call(this);n[0]=Yo(t,n[0]),n[1]=Yo(t,n[1]);var i=this._originalScale.getExtent();return this._fixMin&&(n[0]=nc(n[0],i[0])),this._fixMax&&(n[1]=nc(n[1],i[1])),n},e.prototype.unionExtentFromData=function(t,n){this._originalScale.unionExtentFromData(t,n);var i=Lh(this.base,t.getApproximateExtent(n),!0);this._innerUnionExtent(i)},e.prototype.calcNiceTicks=function(t){t=t||10;var n=this._extent.slice(),i=this._getExtentSpanWithBreaks();if(!(!isFinite(i)||i<=0)){var a=Bw(i),o=t/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Ih(BD(n[0]/a)*a),Ih(OD(n[1]/a)*a)];this._interval=a,this._intervalPrecision=qa(a),this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){r.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.contain=function(t){return t=Zo(t)/Zo(this.base),r.prototype.contain.call(this,t)},e.prototype.normalize=function(t){return t=Zo(t)/Zo(this.base),r.prototype.normalize.call(this,t)},e.prototype.scale=function(t){return t=r.prototype.scale.call(this,t),Yo(this.base,t)},e.prototype.setBreaksFromOption=function(t){},e.type="log",e})(Pi);function nc(r,e){return Ih(r,vr(e))}
15en.registerClass(xx);var ND=(function(){function r(e,t,n){this._prepareParams(e,t,n)}return r.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var a=t.get("min",!0);a==null&&(a=t.get("startValue",!0));var o=this._modelMinRaw=a;ne(o)?this._modelMinNum=Xo(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=Xo(e,o));var s=this._modelMaxRaw=t.get("max",!0);if(ne(s)?this._modelMaxNum=Xo(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=Xo(e,s)),i)this._axisDataLen=t.getCategories().length;else{var l=t.get("boundaryGap"),u=X(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Xr(u[0],1),Xr(u[1],1)]}},r.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),s=this._modelMinRaw==="dataMin"?t:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=e?i?0:NaN:t-a[0]*o),l==null&&(l=e?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var h=Oa(s)||Oa(l)||e&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var f=this._determinedMin,v=this._determinedMax;return f!=null&&(s=f,u=!0),v!=null&&(l=v,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:h}},r.prototype.modifyDataMinMax=function(e,t){this[FD[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var n=zD[e];this[n]=t},r.prototype.freeze=function(){this.frozen=!0},r})(),zD={min:"_determinedMin",max:"_determinedMax"},FD={min:"_dataMin",max:"_dataMax"};function bx(r,e,t){var n=r.rawExtentInfo;return n||(n=new ND(r,e,t),r.rawExtentInfo=n,n)}function Xo(r,e){return e==null?null:Oa(e)?NaN:r.parse(e)}function _x(r,e){var t=r.type,n=bx(r,e,r.getExtent()).calculate();r.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&t==="time"){var s=vx("bar",o),l=!1;if(A(s,function(h){l=l||h.getBaseAxis()===e.axis}),l){var u=px(s),c=VD(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function VD(r,e,t,n){var i=t.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=wD(n,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;A(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;A(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,h=1-(s+l)/a,f=c/h-c;return e+=f*(l/u),r-=f*(s/u),{min:r,max:e}}function Kp(r,e){var t=e,n=_x(r,t),i=n.extent,a=t.get("splitNumber");r instanceof xx&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(Cx(t)),r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function HD(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new hx({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new yx({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(en.getClass(e)||Pi)}}function $D(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function so(r){var e=r.getLabelModel().get("formatter");if(r.type==="time"){var t=NT(e);return function(i,a){return r.scale.getFormattedLabel(i,a,t)}}else{if(K(e))return function(i){var a=r.scale.getLabel(i),o=e.replace("{value}",a??"");return o};if(ne(e)){if(r.type==="category")return function(i,a){return e(ol(r,i),i.value-r.scale.getExtent()[0],null)};var n=qs();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),e(ol(r,i),a,o)}}else return function(i){return r.scale.getLabel(i)}}}function ol(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function Qd(r){var e=r.get("interval");return e??"auto"}function Sx(r){return r.type==="category"&&Qd(r.getLabelModel())===0}function Tx(r,e){var t={};return A(r.mapDimensionsAll(e),function(n){t[lD(r,n)]=!0}),Ae(t)}function GD(r,e,t){e&&A(Tx(e,t),function(n){var i=e.getApproximateExtent(n);i[0]<r[0]&&(r[0]=i[0]),i[1]>r[1]&&(r[1]=i[1])})}function Ri(r){return r==="middle"||r==="center"}function Ka(r){return r.getShallow("show")}function Cx(r){var e=r.get("breaks",!0);e==null}var WD=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r})(),Qp=[],UD={registerPreprocessor:nx,registerProcessor:ix,registerPostInit:OM,registerPostUpdate:BM,registerUpdateLifecycle:Yd,registerAction:Yn,registerCoordinateSystem:NM,registerLayout:zM,registerVisual:Zn,registerTransform:VM,registerLoading:ax,registerMap:FM,registerImpl:gM,PRIORITY:LM,ComponentModel:ge,ComponentView:Bt,SeriesModel:ir,ChartView:Ot,registerComponentModel:function(r){ge.registerClass(r)},registerComponentView:function(r){Bt.registerClass(r)},registerSeriesModel:function(r){ir.registerClass(r)},registerChartView:function(r){Ot.registerClass(r)},registerCustomSeries:function(r,e){},registerSubTypeDefaulter:function(r,e){ge.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){kw(r,e)}};function pt(r){if(X(r)){A(r,function(e){pt(e)});return}de(Qp,r)>=0||(Qp.push(r),ne(r)&&(r={install:r}),r.install(UD))}var YD=Me(),Ia=Me(),Nt={estimate:1,determine:2};function sl(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function Mx(r,e){var t=J(e,function(n){return r.scale.parse(n)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function ZD(r,e){var t=r.getLabelModel().get("customValues");if(t){var n=so(r),i=r.scale.getExtent(),a=Mx(r,t),o=ze(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:J(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?jD(r,e):KD(r)}function XD(r,e,t){var n=r.getTickModel().get("customValues");if(n){var i=r.scale.getExtent(),a=Mx(r,n);return{ticks:ze(a,function(o){return o>=i[0]&&o<=i[1]})}}return r.type==="category"?qD(r,e):{ticks:J(r.scale.getTicks(t),function(o){return o.value})}}function jD(r,e){var t=r.getLabelModel(),n=Dx(r,t,e);return!t.get("show")||r.scale.isBlank()?{labels:[]}:n}function Dx(r,e,t){var n=JD(r),i=Qd(e),a=t.kind===Nt.estimate;if(!a){var o=Lx(n,i);if(o)return o}var s,l;ne(i)?s=Px(r,i):(l=i==="auto"?eA(r,t):i,s=Ix(r,l));var u={labels:s,labelCategoryInterval:l};return a?t.out.noPxChangeTryDetermine.push(function(){return Ph(n,i,u),!0}):Ph(n,i,u),u}function qD(r,e){var t=QD(r),n=Qd(e),i=Lx(t,n);if(i)return i;var a,o;if((!e.get("show")||r.scale.isBlank())&&(a=[]),ne(n))a=Px(r,n,!0);else if(n==="auto"){var s=Dx(r,r.getLabelModel(),sl(Nt.determine));o=s.labelCategoryInterval,a=J(s.labels,function(l){return l.tickValue})}else o=n,a=Ix(r,o,!0);return Ph(t,n,{ticks:a,tickCategoryInterval:o})}function KD(r){var e=r.scale.getTicks(),t=so(r);
15return{labels:J(e,function(n,i){return{formattedLabel:t(n,i),rawLabel:r.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var QD=Ax("axisTick"),JD=Ax("axisLabel");function Ax(r){return function(t){return Ia(t)[r]||(Ia(t)[r]={list:[]})}}function Lx(r,e){for(var t=0;t<r.list.length;t++)if(r.list[t].key===e)return r.list[t].value}function Ph(r,e,t){return r.list.push({key:e,value:t}),t}function eA(r,e){if(e.kind===Nt.estimate){var t=r.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return Ia(r).autoInterval=t,!0}),t}var n=Ia(r).autoInterval;return n??(Ia(r).autoInterval=r.calculateCategoryInterval(e))}function tA(r,e){var t=e.kind,n=nA(r),i=so(r),a=(n.axisRotate-n.labelRotate)/180*Math.PI,o=r.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1,c=40;l>c&&(u=Math.max(1,Math.floor(l/c)));for(var h=s[0],f=r.dataToCoord(h+1)-r.dataToCoord(h),v=Math.abs(f*Math.cos(a)),p=Math.abs(f*Math.sin(a)),m=0,y=0;h<=s[1];h+=u){var g=0,x=0,b=W0(i({value:h}),n.font,"center","top");g=b.width*1.3,x=b.height*1.3,m=Math.max(m,g,7),y=Math.max(y,x,7)}var _=m/v,S=y/p;isNaN(_)&&(_=1/0),isNaN(S)&&(S=1/0);var w=Math.max(0,Math.floor(Math.min(_,S)));if(t===Nt.estimate)return e.out.noPxChangeTryDetermine.push(ee(rA,null,r,w,l)),w;var T=kx(r,w,l);return T??w}function rA(r,e,t){return kx(r,e,t)==null}function kx(r,e,t){var n=YD(r.model),i=r.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-e)<=1&&Math.abs(o-t)<=1&&a>e&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=t,n.lastAutoInterval=e,n.axisExtent0=i[0],n.axisExtent1=i[1]}function nA(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function Ix(r,e,t){var n=so(r),i=r.scale,a=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=Sx(r),f=o.get("showMinLabel")||h,v=o.get("showMaxLabel")||h;f&&u!==a[0]&&m(a[0]);for(var p=u;p<=a[1];p+=l)m(p);v&&p-l!==a[1]&&m(a[1]);function m(y){var g={value:y};s.push(t?y:{formattedLabel:n(g),rawLabel:i.getLabel(g),tickValue:y,time:void 0,break:void 0})}return s}function Px(r,e,t){var n=r.scale,i=so(r),a=[];return A(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(t?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var Jp=[0,1],iA=(function(){function r(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return r.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=n&&e<=i},r.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return X0(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},r.prototype.dataToCoord=function(e,t){var n=this._extent,i=this.scale;return e=i.normalize(i.parse(e)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),eg(n,i.count())),Ne(e,Jp,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),eg(n,i.count()));var a=Ne(e,n,Jp,t);return this.scale.scale(a)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=XD(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),i=n.ticks,a=J(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return aA(this,a,o,e.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var n=this.scale.getMinorTicks(t),i=J(n,function(a){return J(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(e){return e=e||sl(Nt.determine),ZD(this,e).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},r.prototype.calculateCategoryInterval=function(e){return e=e||sl(Nt.determine),tA(this,e)},r})();function eg(r,e){var t=r[1]-r[0],n=e,i=t/n/2;r[0]+=i,r[1]-=i}function aA(r,e,t,n){var i=e.length;if(!r.onBand||t||!i)return;var a=r.getExtent(),o,s;
15if(i===1)e[0].coord=a[0],e[0].onBand=!0,o=e[1]={coord:a[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;A(e,function(v){v.coord-=u/2,v.onBand=!0});var c=r.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var h=a[0]>a[1];f(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&f(a[0],e[0].coord)&&e.unshift({coord:a[0],onBand:!0}),f(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&f(o.coord,a[1])&&e.push({coord:a[1],onBand:!0});function f(v,p){return v=$e(v),p=$e(p),h?v>p:v<p}}var tg=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],oA=1,ll=2,Rx=oA|ll;function ul(r,e,t){t=t||Rx,e?r.dirty|=t:r.dirty&=~t}function Ex(r,e){return e=e||Rx,r.dirty==null||!!(r.dirty&e)}function Qr(r){if(r)return Ex(r)&&sA(r,r.label,r),r}function sA(r,e,t){var n=e.getComputedTransform();r.transform=wd(r.transform,n);var i=r.localRect=Ga(r.localRect,e.getBoundingRect()),a=e.style,o=a.margin,s=t&&t.marginForce,l=t&&t.minMarginForce,u=t&&t.marginDefault,c=a.__marginType;c==null&&u&&(o=u,c=_i.textMargin);for(var h=0;h<4;h++)ic[h]=c===_i.minMargin&&l&&l[h]!=null?l[h]:s&&s[h]!=null?s[h]:o?o[h]:0;c===_i.textMargin&&Xs(i,ic,!1,!1);var f=r.rect=Ga(r.rect,i);return n&&f.applyTransform(n),c===_i.minMargin&&Xs(f,ic,!1,!1),r.axisAligned=_d(n),(r.label=r.label||{}).ignore=e.ignore,ul(r,!1),ul(r,!0,ll),r}var ic=[0,0,0,0];function lA(r,e,t){return r.transform=wd(r.transform,t),r.localRect=Ga(r.localRect,e),r.rect=Ga(r.rect,e),t&&r.rect.applyTransform(t),r.axisAligned=_d(t),r.obb=void 0,(r.label=r.label||{}).ignore=!1,r}function uA(r,e){if(r){r.label.x+=e.x,r.label.y+=e.y,r.label.markRedraw();var t=r.transform;t&&(t[4]+=e.x,t[5]+=e.y);var n=r.rect;n&&(n.x+=e.x,n.y+=e.y);var i=r.obb;i&&i.fromBoundingRect(r.localRect,t)}}function rg(r,e){for(var t=0;t<tg.length;t++){var n=tg[t];r[n]==null&&(r[n]=e[n])}return Qr(r)}function ng(r){var e=r.obb;return(!e||Ex(r,ll))&&(r.obb=e=e||new Im,e.fromBoundingRect(r.localRect,r.transform),ul(r,!1,ll)),e}function cA(r){var e=[];r.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function t(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var n=0;n<r.length;n++){var i=Qr(r[n]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,l=0;l<e.length;l++)if(Jd(i,e[l],null,{touchThreshold:.05})){s=!0;break}s?(t(a),o&&t(o)):e.push(i)}}}function Jd(r,e,t,n){return!r||!e||r.label&&r.label.ignore||e.label&&e.label.ignore||!r.rect.intersect(e.rect,t,n)?!1:r.axisAligned&&e.axisAligned?!0:ng(r).intersect(ng(e),t,n)}var hA=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){return jd(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var n=new Ee,i=Kr("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);n.add(i),i.setStyle(t.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=t.itemHeight*.8,u=Kr(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);n.add(u),u.setStyle(t.itemStyle);var c=t.iconRotate==="inherit"?o:t.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=j.color.neutral00,u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.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},e})(ir);function ef(r,e){var t=r.mapDimensionsAll("defaultedLabel"),n=t.length;if(n===1){var i=ki(r,e,t[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<t.length;o++)a.push(ki(r,e,t[o]));return a.join(" ")}}function Ox(r,e){var t=r.mapDimensionsAll("defaultedLabel");if(!X(e))return e+"";for(var n=[],i=0;i<t.length;i++){var a=r.getDimensionIndex(t[i]);a>=0&&n.push(e[a])}return n.join(" ")}var tf=(function(r){$(e,r);function e(t,n,i,a){var o=r.call(this)||this;return o.updateData(t,n,i,a),o}return e.prototype._createSymbol=function(t,n,i,a,o,s){this.removeAll();var l=Kr(t,-1,-1,2,2,null,s);l.attr({z2:te(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=dA,this._symbolType=t,this.add(l)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Gs(this.childAt(0))},e.prototype.downplay=function(){Ws(this.childAt(0))},e.prototype.setZ=function(t,n){var i=this.childAt(0);i.zlevel=t,i.z=n},e.prototype.setDraggable=function(t,n){var i=this.childAt(0);i.draggable=t,i.cursor=!n&&t?"move":i.cursor},e.prototype.updateData=function(t,n,i,a){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=e.getSymbolZ2(t,n),c=o!==this._symbolType,h=a&&a.disableAnimation;if(c){var f=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,l,u,f)}else{var v=this.childAt(0);v.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};h?v.attr(p):vt(v,p,s,n),Pm(v)}if(this._updateCommon(t,n,l,i,a),c){var v=this.childAt(0);if(!h){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,br(v,p,s,n)}}h&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,n,i,a,o){var s=this.childAt(0),l=t.hostModel,u,c,h,f,v,p,m,y,g;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,h=a.selectItemStyle,f=a.focus,v=a.blurScope,m=a.labelStatesModels,y=a.hoverScale,g=a.cursorStyle,p=a.emphasisDisabled),!a||t.hasItemOption){var x=a&&a.itemModel?a.itemModel:t.getItemModel(n),b=x.getModel("emphasis");u=b.getModel("itemStyle").getItemStyle(),h=x.getModel(["select","itemStyle"]).getItemStyle(),c=x.getModel(["blur","itemStyle"]).getItemStyle(),f=b.get("focus"),v=b.get("blurScope"),p=b.get("disabled"),m=Pl(x),y=b.getShallow("scale"),g=x.getShallow("cursor")}var _=t.getItemVisual(n,"symbolRotate");
15s.attr("rotation",(_||0)*Math.PI/180||0);var S=By(t.getItemVisual(n,"symbolOffset"),i);S&&(s.x=S[0],s.y=S[1]),g&&s.attr("cursor",g);var w=t.getItemVisual(n,"style"),T=w.fill;if(s instanceof Jr){var D=s.style;s.useStyle(H({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},w))}else s.__isEmptyBrush?s.useStyle(H({},w)):s.useStyle(w),s.style.decal=null,s.setColor(T,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var L=t.getItemVisual(n,"liftZ"),M=this._z2;L!=null?M==null&&(this._z2=s.z2,s.z2+=L):M!=null&&(s.z2=M,this._z2=null);var C=o&&o.useNameLabel;Il(s,m,{labelFetcher:l,labelDataIndex:n,defaultText:I,inheritColor:T,defaultOpacity:w.opacity});function I(O){return C?t.getName(O):ef(t,O)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var k=s.ensureState("emphasis");k.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=c;var R=y==null||y===!0?Math.max(1.1,3/this._sizeY):isFinite(y)&&y>0?+y:1;k.scaleX=this._sizeX*R,k.scaleY=this._sizeY*R,this.setSymbolScale(1),Ys(this,f,v,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,n,i){var a=this.childAt(0),o=ve(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&Zs(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Zs(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,n){return J2(t.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(t,n){return t.getItemVisual(n,"z2")},e})(Ee);function dA(r,e){this.parent.drift(r,e)}function ac(r,e,t,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(t))&&
15!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function ig(r){return r!=null&&!Q(r)&&(r={isIgnore:r}),r||{}}function ag(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:Pl(e),cursorStyle:e.get("cursor")}}var fA=(function(){function r(e){this.group=new Ee,this._SymbolCtor=e||tf}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=ig(t);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=ag(e),u={disableAnimation:s},c=t.getSymbolPoint||function(h){return e.getItemLayout(h)};a||n.removeAll(),e.diff(a).add(function(h){var f=c(h);if(ac(e,f,h,t)){var v=new o(e,h,l,u);v.setPosition(f),e.setItemGraphicEl(h,v),n.add(v)}}).update(function(h,f){var v=a.getItemGraphicEl(f),p=c(h);if(!ac(e,p,h,t)){n.remove(v);return}var m=e.getItemVisual(h,"symbol")||"circle",y=v&&v.getSymbolType&&v.getSymbolType();if(!v||y&&y!==m)n.remove(v),v=new o(e,h,l,u),v.setPosition(p);else{v.updateData(e,h,l,u);var g={x:p[0],y:p[1]};s?v.attr(g):vt(v,g,i)}n.add(v),e.setItemGraphicEl(h,v)}).remove(function(h){var f=a.getItemGraphicEl(h);f&&f.fadeOut(function(){n.remove(f)},i)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=ag(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=ig(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var o=t.getItemLayout(a);if(ac(t,o,a,n)){var s=new this._SymbolCtor(t,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(e){Ll(this._progressiveEls||this.group,e)},r.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(i){i.fadeOut(function(){t.remove(i)},n.hostModel)}):t.removeAll()},r})();function Bx(r,e,t){var n=r.getBaseAxis(),i=r.getOtherAxis(n),a=vA(i,t),o=n.dim,s=i.dim,l=e.mapDimension(s),u=e.mapDimension(o),c=s==="x"||s==="radius"?1:0,h=J(r.dimensions,function(p){return e.mapDimension(p)}),f=!1,v=e.getCalculationInfo("stackResultDimension");return Ii(e,h[0])&&(f=!0,h[0]=v),Ii(e,h[1])&&(f=!0,h[1]=v),{dataDimsForPoint:h,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function vA(r,e){var t=0,n=r.scale.getExtent();return e==="start"?t=n[0]:e==="end"?t=n[1]:Se(e)&&!isNaN(e)?t=e:n[0]>0?t=n[0]:n[1]<0&&(t=n[1]),t}function Nx(r,e,t,n){var i=NaN;r.stacked&&(i=t.get(t.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=t.get(r.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function pA(r,e){var t=[];return e.diff(r).add(function(n){t.push({cmd:"+",idx:n})}).update(function(n,i){t.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){t.push({cmd:"-",idx:n})}).execute(),t}function gA(r,e,t,n,i,a,o,s){for(var l=pA(r,e),u=[],c=[],h=[],f=[],v=[],p=[],m=[],y=Bx(i,e,o),g=r.getLayout("points")||[],x=e.getLayout("points")||[],b=0;b<l.length;b++){var _=l[b],S=!0,w=void 0,T=void 0;switch(_.cmd){case"=":w=_.idx*2,T=_.idx1*2;var D=g[w],L=g[w+1],M=x[T],C=x[T+1];(isNaN(D)||isNaN(L))&&(D=M,L=C),u.push(D,L),c.push(M,C),h.push(t[w],t[w+1]),f.push(n[T],n[T+1]),m.push(e.getRawIndex(_.idx1));break;case"+":var I=_.idx,k=y.dataDimsForPoint,R=i.dataToPoint([e.get(k[0],I),e.get(k[1],I)]);T=I*2,u.push(R[0],R[1]),c.push(x[T],x[T+1]);var O=Nx(y,i,e,I);h.push(O[0],O[1]),f.push(n[T],n[T+1]),m.push(e.getRawIndex(I));break;case"-":S=!1}S&&(v.push(_),p.push(p.length))}p.sort(function(xe,F){return m[xe]-m[F]});for(var z=u.length,P=pr(z),B=pr(z),V=pr(z),U=pr(z),Y=[],b=0;b<p.length;b++){var N=p[b],G=b*2,oe=N*2;P[G]=u[oe],P[G+1]=u[oe+1],B[G]=c[oe],B[G+1]=c[oe+1],V[G]=h[oe],V[G+1]=h[oe+1],U[G]=f[oe],U[G+1]=f[oe+1],Y[b]=v[N]}return{current:P,next:B,stackedOnCurrent:V,stackedOnNext:U,status:Y}}var Ar=Math.min,Lr=Math.max;function Vn(r,e){return isNaN(r)||isNaN(e)}function Rh(r,e,t,n,i,a,o,s,l){for(var u,c,h,f,v,p,m=t,y=0;y<n;y++){var g=e[m*2],x=e[m*2+1];if(m>=i||m<0)break;if(Vn(g,x)){if(l){m+=a;continue}break}if(m===t)r[a>0?"moveTo":"lineTo"](g,x),h=g,f=x;else{var b=g-u,_=x-c;if(b*b+_*_<.5){m+=a;continue}if(o>0){for(var S=m+a,w=e[S*2],T=e[S*2+1];w===g&&T===x&&y<n;)y++,S+=a,m+=a,w=e[S*2],T=e[S*2+1],g=e[m*2],x=e[m*2+1],b=g-u,_=x-c;var D=y+1;if(l)for(;Vn(w,T)&&D<n;)D++,S+=a,w=e[S*2],T=e[S*2+1];var L=.5,M=0,C=0,I=void 0,k=void 0;if(D>=n||Vn(w,T))v=g,p=x;else{M=w-u,C=T-c;var R=g-u,O=w-g,z=x-c,P=T-x,B=void 0,V=void 0;if(s==="x"){B=Math.abs(R),V=Math.abs(O);var U=M>0?1:-1;v=g-U*B*o,p=x,I=g+U*V*o,k=x}else if(s==="y"){B=Math.abs(z),V=Math.abs(P);var Y=C>0?1:-1;v=g,p=x-Y*B*o,I=g,k=x+Y*V*o}else B=Math.sqrt(R*R+z*z),V=Math.sqrt(O*O+P*P),L=V/(V+B),v=g-M*o*(1-L),p=x-C*o*(1-L),I=g+M*o*L,k=x+C*o*L,I=Ar(I,Lr(w,g)),k=Ar(k,Lr(T,x)),I=Lr(I,Ar(w,g)),k=Lr(k,Ar(T,x)),M=I-g,C=k-x,v=g-M*B/V,p=x-C*B/V,v=Ar(v,Lr(u,g)),p=Ar(p,Lr(c,x)),v=Lr(v,Ar(u,g)),p=Lr(p,Ar(c,x)),M=g-v,C=x-p,I=g+M*V/B,k=x+C*V/B}r.bezierCurveTo(h,f,v,p,g,x),h=I,f=k}else r.lineTo(g,x)}u=g,c=x,m+=a}return y}var zx=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),mA=(function(r){$(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:j.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new zx},e.prototype.buildPath=function(t,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Vn(i[o*2-2],i[o*2-1]);o--);for(;a<o&&Vn(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=Rh(t,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(t,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=$n.CMD,s,l,u=n==="x",c=[],h=0;h<a.length;){var f=a[h++],v=void 0,p=void 0,m=void 0,y=void 0,g=void 0,x=void 0,b=void 0;switch(f){case o.M:s=a[h++],l=a[h++];break;case o.L:if(v=a[h++],p=a[h++],b=u?(t-s)/(v-s):(t-l)/(p-l),b<=1&&b>=0){var _=u?(p-l)*b+l:(v-s)*b+s;return u?[t,_]:[_,t]}s=v,l=p;break;case o.C:v=a[h++],p=a[h++],m=a[h++],y=a[h++],g=a[h++],x=a[h++];var S=u?Ps(s,v,m,g,t,c):Ps(l,p,y,x,t,c);if(S>0)for(var w=0;w<S;w++){var T=c[w];if(T<=1&&T>=0){var _=u?Ve(l,p,y,x,T):Ve(s,v,m,g,T);return u?[t,_]:[_,t]}}s=g,l=x;break}}},e})(ye),yA=(function(r){$(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(zx),xA=(function(r){$(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new yA},e.prototype.buildPath=function(t,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Vn(i[s*2-2],i[s*2-1]);s--);for(;o<s&&Vn(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=Rh(t,i,o,s,s,1,n.smooth,l,n.connectNulls);Rh(t,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,t.closePath()}},e})(ye);function Fx(r,e,t,n,i){var a=r.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=t.get(["lineStyle","width"])||0;
15o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var h=new Ce({shape:{x:o,y:s,width:l,height:u}});if(e){var f=r.getBaseAxis(),v=f.isHorizontal(),p=f.inverse;v?(p&&(h.shape.x+=l),h.shape.width=0):(p||(h.shape.y+=u),h.shape.height=0);var m=ne(i)?function(y){i(y,h)}:null;br(h,{shape:{width:l,height:u,x:o,y:s}},t,null,n,m)}return h}function Vx(r,e,t){var n=r.getArea(),i=$e(n.r0,1),a=$e(n.r,1),o=new Ni({shape:{cx:$e(r.cx,1),cy:$e(r.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,br(o,{shape:{endAngle:n.endAngle,r:a}},t)}return o}function bA(r,e,t,n,i){if(r){if(r.type==="polar")return Vx(r,e,t);if(r.type==="cartesian2d")return Fx(r,e,t,n,i)}else return null;return null}function rf(r,e){return r.type===e}function og(r,e){if(r.length===e.length){for(var t=0;t<r.length;t++)if(r[t]!==e[t])return;return!0}}function sg(r){for(var e=1/0,t=1/0,n=-1/0,i=-1/0,a=0;a<r.length;){var o=r[a++],s=r[a++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(t=Math.min(s,t),i=Math.max(s,i))}return[[e,t],[n,i]]}function lg(r,e){var t=sg(r),n=t[0],i=t[1],a=sg(e),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function ug(r){return Se(r)?r:r?.5:0}function _A(r,e,t){if(!t.valueDim)return[];for(var n=e.count(),i=pr(n*2),a=0;a<n;a++){var o=Nx(t,r,e,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function kr(r,e,t,n,i){var a=t.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],c=[],h=[],f=[];if(i){for(l=0;l<r.length;l+=2){var v=e||r;!isNaN(v[l])&&!isNaN(v[l+1])&&f.push(r[l],r[l+1])}r=f}for(l=0;l<r.length-2;l+=2)switch(h[0]=r[l+2],h[1]=r[l+3],c[0]=r[l],c[1]=r[l+1],s.push(c[0],c[1]),n){case"end":u[o]=h[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var p=(c[o]+h[o])/2,m=[];u[o]=m[o]=p,u[1-o]=c[1-o],m[1-o]=h[1-o],s.push(u[0],u[1]),s.push(m[0],m[1]);break;default:u[o]=c[o],u[1-o]=h[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function wA(r,e){var t=[],n=r.length,i,a;function o(c,h,f){var v=c.coord,p=(f-v)/(h.coord-v),m=nw(p,[c.color,h.color]);return{coord:f,color:m}}for(var s=0;s<n;s++){var l=r[s],u=l.coord;if(u<0)i=l;else if(u>e){a?t.push(o(a,l,e)):i&&t.push(o(i,l,0),o(i,l,e));break}else i&&(t.push(o(i,l,0)),i=null),t.push(l),a=l}return t}function SA(r,e,t){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&e.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=e.getAxis(i),u=J(a.stops,function(b){return{coord:l.toGlobalCoord(l.dataToCoord(b.value)),color:b.color}}),c=u.length,h=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var f=wA(u,i==="x"?t.getWidth():t.getHeight()),v=f.length;if(!v&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var p=10,m=f[0].coord-p,y=f[v-1].coord+p,g=y-m;if(g<.001)return"transparent";A(f,function(b){b.offset=(b.coord-m)/g}),f.push({offset:v?f[v-1].offset:.5,color:h[1]||"transparent"}),f.unshift({offset:v?f[0].offset:.5,color:h[0]||"transparent"});var x=new km(0,0,0,0,f,!0);return x[i]=m,x[i+"2"]=y,x}}}function TA(r,e,t){var n=r.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=t.getAxesByScale("ordinal")[0];if(a&&!(i&&CA(a,e))){var o=e.mapDimension(a.dim),s={};return A(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function CA(r,e){var t=r.getExtent(),n=Math.abs(t[1]-t[0])/r.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(tf.getSymbolSize(e,o)[r.isHorizontal()?1:0]*1.5>n)return!1;return!0}function MA(r,e){return isNaN(r)||isNaN(e)}function DA(r){for(var e=r.length/2;e>0&&MA(r[e*2-2],r[e*2-1]);e--);return e-1}function cg(r,e){return[r[e*2],r[e*2+1]]}function AA(r,e,t){for(var n=r.length/2,i=t==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=r[u*2+i],!(isNaN(o)||isNaN(r[u*2+1-i]))){if(u===0){a=o;continue}if(a<=e&&o>=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function Hx(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e<nr.length;e++)if(r.get([nr[e],"endLabel","show"]))return!0;return!1}function oc(r,e,t,n){if(rf(e,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=Hx(n)?function(v,p){r._endLabelOnDuring(v,p,o,s,a,i,e)}:null,u=e.getBaseAxis().isHorizontal(),c=Fx(e,t,n,function(){var v=r._endLabel;v&&t&&s.originalX!=null&&v.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var h=c.shape,f=Math.max(h.width,h.height);u?(h.y-=f,h.height+=f*2):(h.x-=f,h.width+=f*2)}return l&&l(1,c),c}else return Vx(e,t,n)}function LA(r,e){var t=e.getBaseAxis(),n=t.isHorizontal(),i=t.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:r.get("align")||a,verticalAlign:r.get("verticalAlign")||o}}}var kA=(function(r){$(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(){var t=new Ee,n=new fA;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=t,this._changePolyState=ee(this._changePolyState,this)},e.prototype.render=function(t,n,i){var a=t.coordinateSystem,o=this.group,s=t.getData(),l=t.getModel("lineStyle"),u=t.getModel("areaStyle"),c=s.getLayout("points")||[],h=a.type==="polar",f=this._coordSys,v=this._symbolDraw,p=this._polyline,m=this._polygon,y=this._lineGroup,g=!n.ssr&&t.get("animation"),x=!u.isEmpty(),b=u.get("origin"),_=Bx(a,s,b),S=x&&_A(a,s,_),w=t.get("showSymbol"),T=t.get("connectNulls"),D=w&&!h&&TA(t,s,a),L=this._data;L&&L.eachItemGraphicEl(function(xe,F){xe.__temp&&(o.remove(xe),L.setItemGraphicEl(F,null))}),w||v.remove(),o.add(y);var M=h?!1:t.get("step"),C;a&&a.getArea&&t.get("clip",!0)&&(C=a.getArea(),C.width!=null?(C.x-=.1,C.y-=.1,C.width+=.2,C.height+=.2):C.r0&&(C.r0-=.5,C.r+=.5)),this._clipShapeForSymbol=C;var I=SA(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(p&&f.type===a.type&&M===this._step))w&&v.updateData(s,{isIgnore:D,clipShape:C,disableAnimation:!0,get
15SymbolPoint:function(xe){return[c[xe*2],c[xe*2+1]]}}),g&&this._initSymbolLabelAnimation(s,a,C),M&&(S&&(S=kr(S,c,a,M,T)),c=kr(c,null,a,M,T)),p=this._newPolyline(c),x?m=this._newPolygon(c,S):m&&(y.remove(m),m=this._polygon=null),h||this._initOrUpdateEndLabel(t,a,Wn(I)),y.setClipPath(oc(this,a,!0,t));else{x&&!m?m=this._newPolygon(c,S):m&&!x&&(y.remove(m),m=this._polygon=null),h||this._initOrUpdateEndLabel(t,a,Wn(I));var k=y.getClipPath();if(k){var R=oc(this,a,!1,t);br(k,{shape:R.shape},t)}else y.setClipPath(oc(this,a,!0,t));w&&v.updateData(s,{isIgnore:D,clipShape:C,disableAnimation:!0,getSymbolPoint:function(xe){return[c[xe*2],c[xe*2+1]]}}),(!og(this._stackedOnPoints,S)||!og(this._points,c))&&(g?this._doUpdateAnimation(s,S,a,i,M,b,T):(M&&(S&&(S=kr(S,c,a,M,T)),c=kr(c,null,a,M,T)),p.setShape({points:c}),m&&m.setShape({points:c,stackedOnPoints:S})))}var O=t.getModel("emphasis"),z=O.get("focus"),P=O.get("blurScope"),B=O.get("disabled");if(p.useStyle(me(l.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),oh(p,t,"lineStyle"),p.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var V=p.getState("emphasis").style;V.lineWidth=+p.style.lineWidth+1}ve(p).seriesIndex=t.seriesIndex,Ys(p,z,P,B);var U=ug(t.get("smooth")),Y=t.get("smoothMonotone");if(p.setShape({smooth:U,smoothMonotone:Y,connectNulls:T}),m){var N=s.getCalculationInfo("stackedOnSeries"),G=0;m.useStyle(me(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),N&&(G=ug(N.get("smooth"))),m.setShape({smooth:U,stackedOnSmooth:G,smoothMonotone:Y,connectNulls:T}),oh(m,t,"areaStyle"),ve(m).seriesIndex=t.seriesIndex,Ys(m,z,P,B)}var oe=this._changePolyState;s.eachItemGraphicEl(function(xe){xe&&(xe.onHoverStateChange=oe)}),this._polyline.onHoverStateChange=oe,this._data=s,this._coordSys=a,this._stackedOnPoints=S,this._points=c,this._step=M,this._valueOrigin=b,t.get("triggerLineEvent")&&(this.packEventData(t,p),m&&this.packEventData(t,m))},e.prototype.packEventData=function(t,n){ve(n).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,n,i,a){var o=t.getData(),s=Hn(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],h=l[s*2+1];if(isNaN(c)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,h))return;var f=t.get("zlevel")||0,v=t.get("z")||0;u=new tf(o,s),u.x=c,u.y=h,u.setZ(f,v);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=f,p.z=v,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Ot.prototype.highlight.call(this,t,n,i,a)},e.prototype.downplay=function(t,n,i,a){var o=t.getData(),s=Hn(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Ot.prototype.downplay.call(this,t,n,i,a)},e.prototype._changePolyState=function(t){var n=this._polygon;yv(this._polyline,t),n&&yv(n,t)},e.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new mA({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(t,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new xA({shape:{points:t,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(t,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");ne(c)&&(c=c(null));var h=u.get("animationDelay")||0,f=ne(h)?h(null):h;t.eachItemGraphicEl(function(v,p){var m=v;if(m){var y=[v.x,v.y],g=void 0,x=void 0,b=void 0;if(i)if(o){var _=i,S=n.pointToCoord(y);a?(g=_.startAngle,x=_.endAngle,b=-S[1]/180*Math.PI):(g=_.r0,x=_.r,b=S[0])}else{var w=i;a?(g=w.x,x=w.x+w.width,b=v.x):(g=w.y+w.height,x=w.y,b=v.y)}var T=x===g?0:(b-g)/(x-g);l&&(T=1-T);var D=ne(h)?h(p):c*T+f,L=m.getSymbolPath(),M=L.getTextContent();m.attr({scaleX:0,scaleY:0}),m.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:D}),M&&M.animateFrom({style:{opacity:0}
15},{duration:300,delay:D}),L.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,n,i){var a=t.getModel("endLabel");if(Hx(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Je({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=DA(l);c>=0&&(Il(s,Pl(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:c,defaultText:function(h,f,v){return v!=null?Ox(o,v):ef(o,h)},enableTextSetter:!0},LA(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=i.getLayout("points"),f=i.hostModel,v=f.get("connectNulls"),p=s.get("precision"),m=s.get("distance")||0,y=l.getBaseAxis(),g=y.isHorizontal(),x=y.inverse,b=n.shape,_=x?g?b.x:b.y+b.height:g?b.x+b.width:b.y,S=(g?m:0)*(x?-1:1),w=(g?0:-m)*(x?-1:1),T=g?"x":"y",D=AA(h,_,T),L=D.range,M=L[1]-L[0],C=void 0;if(M>=1){if(M>1&&!v){var I=cg(h,L[0]);u.attr({x:I[0]+S,y:I[1]+w}),o&&(C=f.getRawValue(L[0]))}else{var I=c.getPointOn(_,T);I&&u.attr({x:I[0]+S,y:I[1]+w});var k=f.getRawValue(L[0]),R=f.getRawValue(L[1]);o&&(C=r1(i,p,k,R,D.t))}a.lastFrameIndex=L[0]}else{var O=t===1||a.lastFrameIndex>0?L[0]:0,I=cg(h,O);o&&(C=f.getRawValue(O)),u.attr({x:I[0]+S,y:I[1]+w})}if(o){var z=Rl(u);typeof z.setLabelText=="function"&&z.setLabelText(C)}}},e.prototype._doUpdateAnimation=function(t,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,h=t.hostModel,f=gA(this._data,t,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),v=f.current,p=f.stackedOnCurrent,m=f.next,y=f.stackedOnNext;if(o&&(p=kr(f.stackedOnCurrent,f.current,i,o,l),v=kr(f.current,null,i,o,l),y=kr(f.stackedOnNext,f.next,i,o,l),m=kr(f.next,null,i,o,l)),lg(v,m)>3e3||c&&lg(p,y)>3e3){u.stopAnimation(),u.setShape({points:m}),c&&(c.stopAnimation(),c.setShape({points:m,stackedOnPoints:y}));return}u.shape.__points=f.current,u.shape.points=v;var g={shape:{points:m}};f.current!==v&&(g.shape.__points=f.next),u.stopAnimation(),vt(u,g,h),c&&(c.setShape({points:v,stackedOnPoints:p}),c.stopAnimation(),vt(c,{shape:{stackedOnPoints:y}},h),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var x=[],b=f.status,_=0;_<b.length;_++){var S=b[_].cmd;if(S==="="){var w=t.getItemGraphicEl(b[_].idx1);w&&x.push({el:w,ptIdx:_})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var T=u.shape.__points,D=0;D<x.length;D++){var L=x[D].el,M=x[D].ptIdx*2;L.x=T[M],L.y=T[M+1],L.markRedraw()}})},e.prototype.remove=function(t){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e})(Ot);function IA(r,e){return{seriesType:r,plan:Hd(),reset:function(t){var n=t.getData(),i=t.coordinateSystem;if(t.pipelineContext,!!i){var a=J(i.dimensions,function(h){return n.mapDimension(h)}).slice(0,2),o=a.length,s=n.getCalculationInfo("stackResultDimension");Ii(n,a[0])&&(a[0]=s),Ii(n,a[1])&&(a[1]=s);var l=n.getStore(),u=n.getDimensionIndex(a[0]),c=n.getDimensionIndex(a[1]);return o&&{progress:function(h,f){for(var v=h.end-h.start,p=pr(v*o),m=[],y=[],g=h.start,x=0;g<h.end;g++){var b=void 0;if(o===1){var _=l.get(u,g);b=i.dataToPoint(_,null,y)}else m[0]=l.get(u,g),m[1]=l.get(c,g),b=i.dataToPoint(m,null,y);p[x++]=b[0],p[x++]=b[1]}f.setLayout("points",p)}}}}}}var PA={average:function(r){for(var e=0,t=0,n=0;n<r.length;n++)isNaN(r[n])||(e+=r[n],t++);return t===0?NaN:e/t},sum:function(r){for(var e=0,t=0;t<r.length;t++)e+=r[t]||0;return e},max:function(r){for(var e=-1/0,t=0;t<r.length;t++)r[t]>e&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t<r.length;t++)r[t]<e&&(e=r[t]);return isFinite(e)?e:NaN},nearest:function(r){return r[0]}},RA=function(r){return Math.round(r.length/2)};function $x(r){return{seriesType:r,reset:function(e,t,n){var i=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),h=n.getDevicePixelRatio(),f=Math.abs(c[1]-c[0])*(h||1),v=Math.round(s/f);if(isFinite(v)&&v>1){a==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/v)):a==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/v));var p=void 0;K(a)?p=PA[a]:ne(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/v,p,RA))}}}}}function Gl(r){r.registerChartView(kA),r.registerSeriesModel(hA),r.registerLayout(IA("line")),r.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)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,$x("line"))}var Eh=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return jd(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(t),s=a.dataToPoint(o);if(i)A(a.getAxes(),function(f,v){if(f.type==="category"&&n!=null){var p=f.getTicksCoords(),m=f.getTickModel().get("alignWithLabel"),y=o[v],g=n[v]==="x1"||n[v]==="y1";if(g&&!m&&(y+=1),p.length<2)return;if(p.length===2){s[v]=f.toGlobalCoord(f.getExtent()[g?1:0]);return}for(var x=void 0,b=void 0,_=1,S=0;S<p.length;S++){var w=p[S].coord,T=S===p.length-1?p[S-1].tickValue+_:p[S].tickValue;if(T===y){b=w;break}else if(T<y)x=w;else if(x!=null&&T>y){b=(w+x)/2;break}S===1&&(_=T-p[0].tickValue)}b==null&&(x?x&&(b=p[p.length-1].coord):b=p[0].coord),s[v]=f.toGlobalCoord(b)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e})(ir);ir.registerClass(Eh);var EA=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return jd(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>t&&(t=n),t},e.prototype.brushSelector=function(t,n,i){return i.rect(n.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Ol(Eh.defaultOption,{clip:!0,roundCap:!1,showBackgroun
15d:!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:j.color.primary,borderWidth:2}},realtimeSort:!1}),e})(Eh),OA=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),hg=(function(r){$(e,r);function e(t){var n=r.call(this,t)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new OA},e.prototype.buildPath=function(t,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,h=n.endAngle,f=n.clockwise,v=Math.PI*2,p=f?h-c<v:c-h<v;p||(c=h-(f?v:-v));var m=Math.cos(c),y=Math.sin(c),g=Math.cos(h),x=Math.sin(h);p?(t.moveTo(m*o+i,y*o+a),t.arc(m*u+i,y*u+a,l,-Math.PI+c,c,!f)):t.moveTo(m*s+i,y*s+a),t.arc(i,a,s,c,h,!f),t.arc(g*u+i,x*u+a,l,h-Math.PI*2,h-Math.PI,!f),o!==0&&t.arc(i,a,o,h,c,f)},e})(ye);function BA(r,e){e=e||{};var t=e.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return Ns(n,i,a);var s=r(o),l=i.distance!=null?i.distance:5,u=this.shape,c=u.cx,h=u.cy,f=u.r,v=u.r0,p=(f+v)/2,m=u.startAngle,y=u.endAngle,g=(m+y)/2,x=t?Math.abs(f-v)/2:0,b=Math.cos,_=Math.sin,S=c+f*b(m),w=h+f*_(m),T="left",D="top";switch(s){case"startArc":S=c+(v-l)*b(g),w=h+(v-l)*_(g),T="center",D="top";break;case"insideStartArc":S=c+(v+l)*b(g),w=h+(v+l)*_(g),T="center",D="bottom";break;case"startAngle":S=c+p*b(m)+jo(m,l+x,!1),w=h+p*_(m)+qo(m,l+x,!1),T="right",D="middle";break;case"insideStartAngle":S=c+p*b(m)+jo(m,-l+x,!1),w=h+p*_(m)+qo(m,-l+x,!1),T="left",D="middle";break;case"middle":S=c+p*b(g),w=h+p*_(g),T="center",D="middle";break;case"endArc":S=c+(f+l)*b(g),w=h+(f+l)*_(g),T="center",D="bottom";break;case"insideEndArc":S=c+(f-l)*b(g),w=h+(f-l)*_(g),T="center",D="top";break;case"endAngle":S=c+p*b(y)+jo(y,l+x,!0),w=h+p*_(y)+qo(y,l+x,!0),T="left",D="middle";break;case"insideEndAngle":S=c+p*b(y)+jo(y,-l+x,!0),w=h+p*_(y)+qo(y,-l+x,!0),T="right",D="middle";break;default:return Ns(n,i,a)}return n=n||{},n.x=S,n.y=w,n.align=T,n.verticalAlign=D,n}}function NA(r,e,t,n){if(Se(n)){r.setTextConfig({rotation:n});return}else if(X(e)){r.setTextConfig({rotation:0});return}var i=r.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=t(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),r.setTextConfig({rotation:c})}function jo(r,e,t){return e*Math.sin(r)*(t?-1:1)}function qo(r,e,t){return e*Math.cos(r)*(t?1:-1)}function zA(r,e,t){var n=r.get("borderRadius");if(n==null)return{cornerRadius:0};X(n)||(n=[n,n,n,n]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:J(n,function(a){return Xr(a,i)})}}var sc=Math.max,lc=Math.min;function FA(r,e){var t=r.getArea&&r.getArea();if(rf(r,"cartesian2d")){var n=r.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=e.getLayout("bandWidth");n.isHorizontal()?(t.x-=i,t.width+=i*2):(t.y-=i,t.height+=i*2)}}return t}var VA=(function(r){$(e,r);function e(){var t=r.call(this)||this;return t.type=e.type,t._isFirstFrame=!0,t}return e.prototype.render=function(t,n,i,a){this._model=t,this._removeOnRenderedListener(i),this._updateDrawMode(t);var o=t.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,n,i):this._renderNormal(t,n,i,a))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,n){this._progressiveEls=[],this._incrementalRenderLarge(t,n)},e.prototype.eachRendered=function(t){Ll(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t,n,i,a){var o=this.group,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.getBaseAxis(),h;u.type==="cartesian2d"?h=c.isHorizontal():u.type==="polar"&&(h=c.dim==="angle");var f=t.isAnimationEnabled()?t:null,v=HA(t,u);v&&this._enableRealtimeSort(v,s,i);var p=t.get("clip",!0)||v,m=FA(u,s);o.removeClipPath();
15var y=t.get("roundCap",!0),g=t.get("showBackground",!0),x=t.getModel("backgroundStyle"),b=x.get("borderRadius")||0,_=[],S=this._backgroundEls,w=a&&a.isInitSort,T=a&&a.type==="changeAxisOrder";function D(C){var I=Ko[u.type](s,C);if(!I)return null;var k=XA(u,h,I);return k.useStyle(x.getItemStyle()),u.type==="cartesian2d"?k.setShape("r",b):k.setShape("cornerRadius",b),_[C]=k,k}s.diff(l).add(function(C){var I=s.getItemModel(C),k=Ko[u.type](s,C,I);if(k&&(g&&D(C),!(!s.hasValue(C)||!gg[u.type](k)))){var R=!1;p&&(R=dg[u.type](m,k));var O=fg[u.type](t,s,C,k,h,f,c.model,!1,y);v&&(O.forceLabelAnimation=!0),mg(O,s,C,I,k,t,h,u.type==="polar"),w?O.attr({shape:k}):v?vg(v,f,O,k,C,h,!1,!1):br(O,{shape:k},t,C),s.setItemGraphicEl(C,O),o.add(O),O.ignore=R}}).update(function(C,I){var k=s.getItemModel(C),R=Ko[u.type](s,C,k);if(R){if(g){var O=void 0;S.length===0?O=D(I):(O=S[I],O.useStyle(x.getItemStyle()),u.type==="cartesian2d"?O.setShape("r",b):O.setShape("cornerRadius",b),_[C]=O);var z=Ko[u.type](s,C),P=Wx(h,z,u);vt(O,{shape:P},f,C)}var B=l.getItemGraphicEl(I);if(!s.hasValue(C)||!gg[u.type](R)){o.remove(B);return}var V=!1;p&&(V=dg[u.type](m,R),V&&o.remove(B));var U=B&&(B.type==="sector"&&y||B.type==="sausage"&&!y);if(U&&(B&&ps(B,t,I),B=null),B?Pm(B):B=fg[u.type](t,s,C,R,h,f,c.model,!0,y),v&&(B.forceLabelAnimation=!0),T){var Y=B.getTextContent();if(Y){var N=Rl(Y);N.prevValue!=null&&(N.prevValue=N.value)}}else mg(B,s,C,k,R,t,h,u.type==="polar");w?B.attr({shape:R}):v?vg(v,f,B,R,C,h,!0,T):vt(B,{shape:R},t,C,null),s.setItemGraphicEl(C,B),B.ignore=V,o.add(B)}}).remove(function(C){var I=l.getItemGraphicEl(C);I&&ps(I,t,C)}).execute();var L=this._backgroundGroup||(this._backgroundGroup=new Ee);L.removeAll();for(var M=0;M<_.length;++M)L.add(_[M]);o.add(L),this._backgroundEls=_,this._data=s},e.prototype._renderLarge=function(t,n,i){this._clear(),xg(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,n){this._removeBackground(),xg(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var n=t.get("clip",!0)&&bA(t.coordinateSystem,!1,t),i=this.group;n?i.setClipPath(n):i.removeClipPath()},e.prototype._enableRealtimeSort=function(t,n,i){var a=this;if(n.count()){var o=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,t,i),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,n,i){var a=[];return t.each(t.mapDimension(n.dim),function(o,s){var l=i(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:J(a,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,n,i){for(var a=i.scale,o=t.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=t.rawIndexOf(o,a.getRawOrdinalNumber(l)),h=c<0?Number.MIN_VALUE:n(t.indexOfRawIndex(c));if(h>s)return!0;s=h}return!1},e.prototype._isOrderDifferentInView=function(t,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,n,i,a){if(this._isOrderChangedWithinSameData(t,n,i)){var o=this._dataSort(t,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,n,i){var a=n.baseAxis,o=this._dataSort(t,a,function(s){return t.get(t.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(t,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(t,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var n=this.group,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackgroun
15d(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){ps(a,t,ve(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e})(Ot),dg={cartesian2d:function(r,e){var t=e.width<0?-1:1,n=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=r.x+r.width,a=r.y+r.height,o=sc(e.x,r.x),s=lc(e.x+e.width,i),l=sc(e.y,r.y),u=lc(e.y+e.height,a),c=s<o,h=u<l;return e.x=c&&o>i?s:o,e.y=h&&l>a?u:l,e.width=c?0:s-o,e.height=h?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||h},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}var i=lc(e.r,r.r),a=sc(e.r0,r.r0);e.r=i,e.r0=a;var o=i-a<0;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},fg={cartesian2d:function(r,e,t,n,i,a,o,s,l){var u=new Ce({shape:H({},n),z2:1});if(u.__dataIndex=t,u.name="item",a){var c=u.shape,h=i?"height":"width";c[h]=0}return u},polar:function(r,e,t,n,i,a,o,s,l){var u=!i&&l?hg:Ni,c=new u({shape:n,z2:1});c.name="item";var h=Gx(i);if(c.calculateTextPosition=BA(h,{isRoundCap:u===hg}),a){var f=c.shape,v=i?"r":"endAngle",p={};f[v]=i?n.r0:n.startAngle,p[v]=n[v],(s?vt:br)(c,{shape:p},a)}return c}};function HA(r,e){var t=r.get("realtimeSort",!0),n=e.getBaseAxis();if(t&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function vg(r,e,t,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?vt:br)(t,{shape:l},e,i,null);var c=e?r.baseAxis.model:null;(o?vt:br)(t,{shape:u},c,i)}function pg(r,e){for(var t=0;t<e.length;t++)if(!isFinite(r[e[t]]))return!0;return!1}var $A=["x","y","width","height"],GA=["cx","cy","r","startAngle","endAngle"],gg={cartesian2d:function(r){return!pg(r,$A)},polar:function(r){return!pg(r,GA)}},Ko={cartesian2d:function(r,e,t){var n=r.getItemLayout(e);if(!n)return null;var i=t?UA(t,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(r,e,t){var n=r.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function WA(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function Gx(r){return(function(e){var t=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+t;default:return n}}})(r)}function mg(r,e,t,n,i,a,o,s){var l=e.getItemVisual(t,"style");if(s){if(!a.get("roundCap")){var c=r.shape,h=zA(n.getModel("itemStyle"),c);H(c,h),r.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var f=n.getShallow("cursor");f&&r.attr("cursor",f);var v=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=Pl(n);Il(r,p,{labelFetcher:a,labelDataIndex:t,defaultText:ef(a.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var m=r.getTextContent();if(s&&m){var y=n.get(["label","position"]);r.textConfig.inside=y==="middle"?!0:null,NA(r,y==="outside"?v:y,Gx(o),n.get(["label","rotate"]))}yT(m,p,a.getRawValue(t),function(x){return Ox(e,x)});var g=n.getModel(["emphasis"]);Ys(r,g.get("focus"),g.get("blurScope"),g.get("disabled")),oh(r,n),WA(i)&&(r.style.fill="none",r.style.stroke="none",A(r.states,function(x){x.style&&(x.style.fill=x.style.stroke="none")}))}function UA(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var YA=(function(){function r(){}return r})(),yg=(function(r){$(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new YA},e.prototype.buildPath=function(t,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<i.length;c+=3)l[a]=u,l[o]=i[c+2],s[a]=i[c+a],s[o]=i[c+o],t.rect(s[0],s[1],l[0],l[1])},e})(ye);function xg(r,e,t,n){var i=r.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=r.getModel("backgroundStyle"),u=i.getLayout("largeBackgroun
15dPoints");if(u){var c=new yg({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),e.add(c),t&&t.push(c)}var h=new yg({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=a,h.largeDataIndices=o,h.barWidth=s,e.add(h),h.useStyle(i.getVisual("style")),h.style.stroke=null,ve(h).seriesIndex=r.seriesIndex,r.get("silent")||(h.on("mousedown",bg),h.on("mousemove",bg)),t&&t.push(h)}var bg=$d(function(r){var e=this,t=ZA(e,r.offsetX,r.offsetY);ve(e).dataIndex=t>=0?t:null},30,!1);function ZA(r,e,t){for(var n=r.baseDimIdx,i=1-n,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,h=a.length/3;c<h;c++){var f=c*3;if(l[n]=u,l[i]=a[f+2],s[n]=a[f+n],s[i]=a[f+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),e>=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function Wx(r,e,t){if(rf(t,"cartesian2d")){var n=e,i=t.getArea();return{x:r?n.x:i.x,y:r?i.y:n.y,width:r?n.width:i.width,height:r?i.height:n.height}}else{var i=t.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:r?i.r0:a.r0,r:r?i.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function XA(r,e,t){var n=r.type==="polar"?Ni:Ce;return new n({shape:Wx(e,t,r),silent:!0,z2:0})}function jA(r){r.registerChartView(VA),r.registerSeriesModel(EA),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Pe(SD,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,TD("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,$x("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var Ux={left:0,right:0,top:0,bottom:0},cl=["25%","25%"],qA=(function(r){$(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(t,n){var i=zi(t.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&t.outerBounds&&qr(t.outerBounds,i)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&qr(this.option.outerBounds,t.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:Ux,outerBoundsContain:"all",outerBoundsClampWidth:cl[0],outerBoundsClampHeight:cl[1],backgroundColor:j.color.transparent,borderWidth:1,borderColor:j.color.neutral30},e})(ge),Oh=(function(r){$(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",qe).models[0]},e.type="cartesian2dAxis",e})(ge);ar(Oh,WD);var Yx={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:!0,onZeroAxisIndex:null,lineStyle:{color:j.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:j.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:j.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[j.color.backgroundTint,j.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:j.color.neutral00,borderColor:j.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},KA=fe({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},Yx),nf=fe({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:j.color.axisMinorSplitLine,width:1}}},Yx),QA=fe({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},nf),JA=me({logBase:10},nf);const eL={category:KA,value:nf,time:QA,log:JA};var tL={value:1,category:1,time:1,log:1},rL=null;function nL(){return rL}function _g(r,e,t,n){A(tL,function(i,a){var o=fe(fe({},eL[a],!0),n,!0),s=(function(l){$(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,h){var f=Ua(this),v=f?zi(c):{},p=h.getTheme();fe(c,p.get(a+"Axis")),fe(c,this.getDefaultOption()),c.type=wg(c),f&&qr(c,v,f)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=kh.createByAxisModel(this))},u.prototype.getCategories=function(c){var h=this.option;if(h.type==="category")return c?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){return{breaks:[]}},u.type=e+"Axis."+a,u.defaultOption=o,u})(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",wg)}function wg(r){return r.type||(r.data?"category":"value")}var iL=(function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return J(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ze(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r})(),Bh=["x","y"];function Sg(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var aL=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Bh,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!Sg(t)||!Sg(n))){var i=t.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,h=(s[1]-o[1])/u,f=o[0]-i[0]*c,v=o[1]-a[0]*h,p=this._transform=[c,0,0,h,f,v];this._invTransform=ro([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,n){var i=this.dataToPoint(t),a=this.dataToPoint(n),o=this.getArea(),s=new se(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,n,i){i=i||[];var a=t[0],o=t[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return At(i,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},e.prototype.clampData=function(t,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(t[0]),u=a.parse(t[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(t,n,i){if(i=i||[],this._invTransform)return At(i,t,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(t[0]),n),i[1]=o.coordToData(o.toLocalCoord(t[1]),n),i},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-t,o=Math.min(i[0],i[1])-t,s=Math.max(n[0],n[1])-a+t,l=Math.max(i[0],i[1])-o+t;return new se(a,o,s,l)},e})(iL),oL=(function(r){$(e,r);function e(t,n,i,a,o){var s=r.call(this,t,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),t&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(t,n){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),n)}
15,e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e})(iA),sL="expandAxisBreak",Fr=Math.PI,lL=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],uL=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Qa=Me(),Zx=Me(),Xx=(function(){function r(e){this.recordMap={},this.resolveAxisNameOverlap=e}return r.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,i=this.recordMap,a=i[t]||(i[t]=[]);return a[n]||(a[n]={ready:{}})},r})();function cL(r,e,t,n){var i=t.axis,a=e.ensureRecord(t),o=[],s,l=af(r.axisName)&&Ri(r.nameLocation);A(n,function(p){var m=Qr(p);if(!(!m||m.label.ignore)){o.push(m);var y=a.transGroup;l&&(y.transform?ro(ea,y.transform):td(ea),m.transform&&ba(ea,ea,m.transform),se.copy(Qo,m.localRect),Qo.applyTransform(ea),s?s.union(Qo):se.copy(s=new se(0,0,0,0),Qo))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(p,m){return Math.abs(p.label[u]-c)-Math.abs(m.label[u]-c)}),l&&s){var h=i.getExtent(),f=Math.min(h[0],h[1]),v=Math.max(h[0],h[1])-f;s.union(new se(f,0,v,1))}a.stOccupiedRect=s,a.labelInfoList=o}var ea=mr(),Qo=new se(0,0,0,0),jx=function(r,e,t,n,i,a){if(Ri(r.nameLocation)){var o=a.stOccupiedRect;o&&qx(lA({},o,a.transGroup.transform),n,i)}else Kx(a.labelInfoList,a.dirVec,n,i)};function qx(r,e,t){var n=new be;Jd(r,e,n,{direction:Math.atan2(t.y,t.x),bidirectional:!1,touchThreshold:.05})&&uA(e,n)}function Kx(r,e,t,n){for(var i=be.dot(n,e)>=0,a=0,o=r.length;a<o;a++){var s=r[i?a:o-1-a];s.label.ignore||qx(s,t,n)}}var Ur=(function(){function r(e,t,n,i){this.group=new Ee,this._axisModel=e,this._api=t,this._local={},this._shared=i||new Xx(jx),this._resetCfgDetermined(n)}return r.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},r.prototype.__getRawCfg=function(){return this._cfg.raw},r.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},i=te(e.axisName,t.get("name")),a=t.get("nameMoveOverlap");(a==null||a==="auto")&&(a=te(e.defaultNameMoveOverlap,!0));var o={raw:e,position:e.position,rotation:e.rotation,nameDirection:te(e.nameDirection,1),tickDirection:te(e.tickDirection,1),labelDirection:te(e.labelDirection,1),labelOffset:te(e.labelOffset,0),silent:te(e.silent,!0),axisName:i,nameLocation:wi(t.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:af(i)&&a,optionHideOverlap:t.get(["axisLabel","hideOverlap"]),showMinorTicks:t.get(["minorTick","show"])};this._cfg=o;var s=new Ee({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(t);l.transGroup=this._transformGroup,l.dirVec=new be(Math.cos(-o.rotation),Math.sin(-o.rotation))},r.prototype.build=function(e,t){var n=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),A(hL,function(i){e[i]&&dL[i](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},r.innerTextLayout=function(e,t,n){var i=j0(t-e),a,o;return zs(i)?(o=n>0?"top":"bottom",a="center"):zs(i-Fr)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<Fr?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r})(),hL=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],dL={axisLine:function(r,e,t,n,i,a,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=a.transform,c=[l[0],0],h=[l[1],0],f=c[0]>h[0];u&&(At(c,c,u),At(h,h,u));var v=H({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())nL().buildAxisBreakLine(n,i,a,p);else{var m=new jr(H({shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]}},p));Ha(m.shape,m.style.lineWidth),m.anid="line",i.add(m)}var y=n.get(["axisLine","symbol"]);if(y!=null){var g=n.get(["axisLine","symbolSize"]);K(y)&&(y=[y,y]),(K(g)||Se(g))&&(g=[g,g]);var x=By(n.get(["axisLine","symbolOffset"])||0,g),b=g[0],_=g[1];A([{rotate:r.rotation+Math.PI/2,offset:x[0],r:0}
15,{rotate:r.rotation-Math.PI/2,offset:x[1],r:Math.sqrt((c[0]-h[0])*(c[0]-h[0])+(c[1]-h[1])*(c[1]-h[1]))}],function(S,w){if(y[w]!=="none"&&y[w]!=null){var T=Kr(y[w],-b/2,-_/2,b,_,v.stroke,!0),D=S.r+S.offset,L=f?h:c;T.attr({rotation:S.rotate,x:L[0]+D*Math.cos(r.rotation),y:L[1]-D*Math.sin(r.rotation),silent:!0,z2:11}),i.add(T)}})}}},axisTickLabelEstimate:function(r,e,t,n,i,a,o,s){var l=Cg(e,i,s);l&&Tg(r,e,t,n,i,a,o,Nt.estimate)},axisTickLabelDetermine:function(r,e,t,n,i,a,o,s){var l=Cg(e,i,s);l&&Tg(r,e,t,n,i,a,o,Nt.determine);var u=gL(r,i,a,n);pL(r,e.labelLayoutList,u),mL(r,i,a,n,r.tickDirection)},axisName:function(r,e,t,n,i,a,o,s){var l=t.ensureRecord(n);e.nameEl&&(i.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(af(u)){var c=r.nameLocation,h=r.nameDirection,f=n.getModel("nameTextStyle"),v=n.get("nameGap")||0,p=n.axis.getExtent(),m=n.axis.inverse?-1:1,y=new be(0,0),g=new be(0,0);c==="start"?(y.x=p[0]-m*v,g.x=-m):c==="end"?(y.x=p[1]+m*v,g.x=m):(y.x=(p[0]+p[1])/2,y.y=r.labelOffset+h*v,g.y=h);var x=mr();g.transform(rd(x,x,r.rotation));var b=n.get("nameRotate");b!=null&&(b=b*Fr/180);var _,S;Ri(c)?_=Ur.innerTextLayout(r.rotation,b??r.rotation,h):(_=fL(r.rotation,c,b||0,p),S=r.raw.axisNameAvailableWidth,S!=null&&(S=Math.abs(S/Math.sin(_.rotation)),!isFinite(S)&&(S=null)));var w=f.getFont(),T=n.get("nameTruncate",!0)||{},D=T.ellipsis,L=As(r.raw.nameTruncateMaxWidth,T.maxWidth,S),M=s.nameMarginLevel||0,C=new Je({x:y.x,y:y.y,rotation:_.rotation,silent:Ur.isLabelSilent(n),style:Gn(f,{text:u,font:w,overflow:"truncate",width:L,ellipsis:D,fill:f.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:f.get("align")||_.textAlign,verticalAlign:f.get("verticalAlign")||_.textVerticalAlign}),z2:1});if(Al({el:C,componentModel:n,itemName:u}),C.__fullText=u,C.anid="name",n.get("triggerEvent")){var I=Ur.makeAxisEventDataBase(n);I.targetType="axisName",I.name=u,ve(C).eventData=I}a.add(C),C.updateTransform(),e.nameEl=C;var k=l.nameLayout=Qr({label:C,priority:C.z2,defaultAttr:{ignore:C.ignore},marginDefault:Ri(c)?lL[M]:uL[M]});if(l.nameLocation=c,i.add(C),C.decomposeTransform(),r.shouldNameMoveOverlap&&k){var R=t.ensureRecord(n);t.resolveAxisNameOverlap(r,t,n,k,g,R)}}}};function Tg(r,e,t,n,i,a,o,s){Jx(e)||yL(r,e,i,s,n,o);var l=e.labelLayoutList;xL(r,n,l,a),r.rotation;var u=r.optionHideOverlap;vL(n,l,u),u&&cA(ze(l,function(c){return c&&!c.label.ignore})),cL(r,t,n,l)}function fL(r,e,t,n){var i=j0(t-r),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return zs(i-Fr/2)?(o=l?"bottom":"top",a="center"):zs(i-Fr*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<Fr*1.5&&i>Fr/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function vL(r,e,t){if(Sx(r.axis))return;function n(s,l,u){var c=Qr(e[l]),h=Qr(e[u]);if(!(!c||!h)){if(s===!1||c.suggestIgnore){ya(c.label);return}if(h.suggestIgnore){ya(h.label);return}var f=.1;if(!t){var v=[0,0,0,0];c=rg({marginForce:v},c),h=rg({marginForce:v},h)}Jd(c,h,null,{touchThreshold:f})&&ya(s?h.label:c.label)}}var i=r.get(["axisLabel","showMinLabel"]),a=r.get(["axisLabel","showMaxLabel"]),o=e.length;n(i,0,1),n(a,o-1,o-2)}function pL(r,e,t){r.showMinorTicks||A(e,function(n){if(n&&n.label.ignore)for(var i=0;i<t.length;i++){var a=t[i],o=Zx(a),s=Qa(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){ya(a);return}}})}function ya(r){r&&(r.ignore=!0)}function Qx(r,e,t,n,i){for(var a=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;
15o[0]=u,o[1]=0,s[0]=u,s[1]=t,e&&(At(o,o,e),At(s,s,e));var c=new jr({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Ha(c.shape,c.style.lineWidth),c.anid=i+"_"+r[l].tickValue,a.push(c);var h=Zx(c);h.onBand=!!r[l].onBand,h.tickValue=r[l].tickValue}return a}function gL(r,e,t,n){var i=n.axis,a=n.getModel("axisTick"),o=a.get("show");if(o==="auto"&&(o=!0,r.raw.axisTickAutoShow!=null&&(o=!!r.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel("lineStyle"),l=r.tickDirection*a.get("length"),u=i.getTicksCoords(),c=Qx(u,t.transform,l,me(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<c.length;h++)e.add(c[h]);return c}function mL(r,e,t,n,i){var a=n.axis,o=n.getModel("minorTick");if(!(!r.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=i*o.get("length"),c=me(l.getLineStyle(),me(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),h=0;h<s.length;h++)for(var f=Qx(s[h],t.transform,u,c,"minorticks_"+h),v=0;v<f.length;v++)e.add(f[v])}}function Cg(r,e,t){if(Jx(r)){var n=r.axisLabelsCreationContext,i=n.out.noPxChangeTryDetermine;if(t.noPxChange){for(var a=!0,o=0;o<i.length;o++)a=a&&i[o]();if(a)return!1}i.length&&(e.remove(r.labelGroup),Nh(r,null,null,null))}return!0}function yL(r,e,t,n,i,a){var o=i.axis,s=As(r.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new Ee;t.add(l);var u=sl(n);if(!s||o.scale.isBlank()){Nh(e,[],l,u);return}var c=i.getModel("axisLabel"),h=o.getViewLabels(u),f=(As(r.raw.labelRotate,c.get("rotate"))||0)*Fr/180,v=Ur.innerTextLayout(r.rotation,f,r.labelDirection),p=i.getCategories&&i.getCategories(!0),m=[],y=i.get("triggerEvent"),g=1/0,x=-1/0;A(h,function(_,S){var w,T=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(_.tickValue):_.tickValue,D=_.formattedLabel,L=_.rawLabel,M=c;if(p&&p[T]){var C=p[T];Q(C)&&C.textStyle&&(M=new Le(C.textStyle,c,i.ecModel))}var I=M.getTextColor()||i.get(["axisLine","lineStyle","color"]),k=M.getShallow("align",!0)||v.textAlign,R=te(M.getShallow("alignMinLabel",!0),k),O=te(M.getShallow("alignMaxLabel",!0),k),z=M.getShallow("verticalAlign",!0)||M.getShallow("baseline",!0)||v.textVerticalAlign,P=te(M.getShallow("verticalAlignMinLabel",!0),z),B=te(M.getShallow("verticalAlignMaxLabel",!0),z),V=10+(((w=_.time)===null||w===void 0?void 0:w.level)||0);g=Math.min(g,V),x=Math.max(x,V);var U=new Je({x:0,y:0,rotation:0,silent:Ur.isLabelSilent(i),z2:V,style:Gn(M,{text:D,align:S===0?R:S===h.length-1?O:k,verticalAlign:S===0?P:S===h.length-1?B:z,fill:ne(I)?I(o.type==="category"?L:o.type==="value"?T+"":T,S):I})});U.anid="label_"+T;var Y=Qa(U);if(Y.break=_.break,Y.tickValue=T,Y.layoutRotation=v.rotation,Al({el:U,componentModel:i,itemName:D,formatterParamsExtra:{isTruncated:function(){return U.isTruncated},value:L,tickIndex:S}}),y){var N=Ur.makeAxisEventDataBase(i);N.targetType="axisLabel",N.value=L,N.tickIndex=S,_.break&&(N.break={start:_.break.parsedBreak.vmin,end:_.break.parsedBreak.vmax}),o.type==="category"&&(N.dataIndex=T),ve(U).eventData=N,_.break&&_L(i,a,U,_.break)}m.push(U),l.add(U)});var b=J(m,function(_){return{label:_,priority:Qa(_).break?_.z2+(x-g+1):_.z2,defaultAttr:{ignore:_.ignore}}});Nh(e,b,l,u)}function Jx(r){return!!r.labelLayoutList}function Nh(r,e,t,n){r.labelLayoutList=e,r.labelGroup=t,r.axisLabelsCreationContext=n}function xL(r,e,t,n){var i=e.get(["axisLabel","margin"]);A(t,function(a,o){var s=Qr(a);if(s){var l=s.label,u=Qa(l);s.suggestIgnore=l.ignore,l.ignore=!1,Kc(cr,bL),cr.x=e.axis.dataToCoord(u.tickValue),cr.y=r.labelOffset+r.labelDirection*i,cr.rotation=u.layoutRotation,n.add(cr),cr.updateTransform(),n.remove(cr),cr.decomposeTransform(),Kc(l,cr),l.markRedraw(),ul(s,!0),Qr(s)}})}var cr=new Ce,bL=new Ce;function af(r){return!!r}function _L(r,e,t,n){t.on("click",function(i){var a={type:sL,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};a[r.axis.dim+"AxisIndex"]=r.componentIndex,e.dispatchAction(a)})}function hl(r,e,t){t=t||{};var n=e.axis,i={},a=n.getAxesOnZeroOf()[0],o=n.position,s=a?"onZero":o,l=n.dim,u=[r.x,r.x+r.width,r.y,r.y+r.height],c={left:0,right:1,top:0,bottom:1,onZero:2},h=e.get("offset")||0,f=l==="x"?[u[2]-h,u[3]+h]:[u[0]-h,u[1]+h];if(a){var v=a.toGlobalCoord(a.dataToCoord(0));f[c.onZero]=Math.max(Math.min(v,f[1]),f[0])}i.position=[l==="y"?f[c[s]]:u[0],l==="x"?f[c[s]]:u[3]],i.rotation=Math.PI/2*(l==="x"?0:1);var p={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=p[o],i.labelOffset=a?f[c[o]]-f[c.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),As(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var m=e.get(["axisLabel","rotate"]);return i.labelRotate=s==="top"?-m:m,i.z2=1,i}
15function wL(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function Mg(r){var e={xAxisModel:null,yAxisModel:null};return A(e,function(t,n){var i=n.replace(/Model$/,""),a=r.getReferringComponents(i,qe).models[0];e[n]=a}),e}function SL(r,e,t,n,i,a){for(var o=hl(r,t),s=!1,l=!1,u=0;u<e.length;u++)Ah(e[u].getOtherAxis(t.axis).scale)&&(s=l=!0,t.axis.type==="category"&&t.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=a,new Ur(t,n,o,i)}function TL(r,e,t){var n=hl(e,t);r.updateCfg(n)}function CL(r,e,t){var n=Pi.prototype,i=n.getTicks.call(t),a=n.getTicks.call(t,{expandToNicedExtent:!0}),o=i.length-1,s=n.getInterval.call(t),l=_x(r,e),u=l.extent,c=l.fixMin,h=l.fixMax;r.type==="log"&&(u=Lh(r.base,u,!0)),r.setBreaksFromOption(Cx(e)),r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:h});var f=n.getExtent.call(r);c&&(u[0]=f[0]),h&&(u[1]=f[1]);var v=n.getInterval.call(r),p=u[0],m=u[1];if(c&&h)v=(m-p)/o;else if(c)for(m=u[0]+v*o;m<u[1]&&isFinite(m)&&isFinite(u[1]);)v=rc(v),m=u[0]+v*o;else if(h)for(p=u[1]-v*o;p>u[0]&&isFinite(p)&&isFinite(u[0]);)v=rc(v),p=u[1]-v*o;else{var y=r.getTicks().length-1;y>o&&(v=rc(v));var g=v*o;m=Math.ceil(u[1]/v)*v,p=$e(m-g),p<0&&u[0]>=0?(p=0,m=$e(g)):m>0&&u[1]<=0&&(m=0,p=-$e(g))}var x=(i[0].value-a[0].value)/s,b=(i[o].value-a[o].value)/s;n.setExtent.call(r,p+v*x,m+v*b),n.setInterval.call(r,v),(x||b)&&n.setNiceExtent.call(r,p+v,m-v)}var Dg=[[3,1],[0,2]],ML=(function(){function r(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Bh,this._initCartesian(e,t,n),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=Ae(o),u=l.length;if(u){for(var c=[],h=u-1;h>=0;h--){var f=+l[h],v=o[f],p=v.model,m=v.scale;Ah(m)&&p.get("alignTicks")&&p.get("interval")==null?c.push(v):(Kp(m,p),Ah(m)&&(s=v))}c.length&&(s||(s=c.pop(),Kp(s.scale,s.model)),A(c,function(y){CL(y.scale,y.model,s.scale)}))}}i(n.x),i(n.y);var a={};A(n.x,function(o){Ag(n,"y",o,a)}),A(n.y,function(o){Ag(n,"x",o,a)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,n){var i=Od(e,t),a=this._rect=Li(e.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(eb(o,a),!n){var u=AL(a,s,o,l,t),c=void 0;if(l)c=Ig(a.clone(),"axisLabel",null,a,o,u,i);else{var h=LL(e,a,i),f=h.outerBoundsRect,v=h.parsedOuterBoundsContain,p=h.outerBoundsClamp;f&&(c=Ig(f,v,p,a,o,u,i))}tb(a,o,Nt.determine,null,c,i)}A(this._coordsList,function(m){m.calcAffineTransform()})},r.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n="x"+e+"y"+t;return this._coordsMap[n]}Q(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===e||a[i].getAxis("y").index===t)return a[i]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(e,t,n){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},r.prototype.convertFromPixel=function(e,t,n){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},r.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents("xAxis",qe).models[0],i=e.yAxisModel||t&&t.getReferringComponents("yAxis",qe).models[0],a=e.gridModel,o=this._coordsList,s,l;if(t)s=t.coordinateSystem,de(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},r.prototype._initCartesian=function(e,t,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(t.eachComponent("xAxis",u("x"),this),t.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,A(s.x,function(c,h){A(s.y,function(f,v){var p="x"+h+"y"+v,m=new aL(p);m.master=i,m.model=e,i._coordsMap[p]=m,i._coordsList.push(m),m.addAxis(c),m.addAxis(f)})});function u(c){return function(h,f){if(uc(h,e)){var v=h.get("position");c==="x"?v!=="top"&&v!=="bottom"&&(v=o.bottom?"top":"bottom"):v!=="left"&&v!=="right"&&(v=o.left?"right":"left"),o[v]=!0;var p=new oL(c,HD(h),[0,0],h.get("type"),v),m=p.type==="category";p.onBand=m&&h.get("boundaryGap"),p.inverse=h.get("inverse"),h.axis=p,p.model=h,p.grid=a,p.index=f,a._axesList.push(p),s[c][f]=p,l[c]++}}}},r.prototype._updateScale=function(e,t){A(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),e.eachSeries(function(i){if(wL(i)){var a=Mg(i),o=a.xAxisModel,s=a.yAxisModel;if(!uc(o,t)||!uc(s,t))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),c=l.getAxis("x"),h=l.getAxis("y");n(u,c),n(u,h)}},this);function n(i,a){A(Tx(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},r.prototype.getTooltipAxes=function(e){var t=[],n=[];return A(this.getCartesians(),function(i){var a=e!=null&&e!=="auto"?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(a);de(t,a)<0&&t.push(a),de(n,o)<0&&n.push(o)}),{baseAxes:t,otherAxes:n}},r.create=function(e,t){var n=[];return e.eachComponent("grid",function(i,a){var o=new r(i,e,t);o.name="grid_"+a,o.resize(i,t,!0),i.coordinateSystem=o,n.push(o)}),e.eachSeries(function(i){XT({targetModel:i,coordSysType:"cartesian2d",coordSysProvider:a});function a(){var o=Mg(i),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel(),c=u.coordinateSystem;return c.getCartesian(s.componentIndex,l.componentIndex)}}),n},r.dimensions=Bh,r})();function uc(r,e){return r.getCoordSysModel()===e}function Ag(r,e,t,n){t.getAxesOnZeroOf=function(){return a?[a]:[]};var i=r[e],a,o=t.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)Lg(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&Lg(i[u])&&!n[c(i[u])]){a=i[u];break}a&&(n[c(a)]=!0);function c(h){return h.dim+"_"+h.index}}function Lg(r){return r&&r.type!=="category"&&r.type!=="time"&&$D(r)}function DL(r,e){var t=r.getExtent(),n=t[0]+t[1];r.toGlobalCoord=r.dim==="x"?function(i){return i+e}:function(i){return n-i+e},r.toLocalCoord=r.dim==="x"?function(i){return i-e}:function(i){return n-i+e}}function eb(r,e){A(r.x,function(t){return kg(t,e.x,e.width)}),A(r.y,function(t){return kg(t,e.y,e.height)})}function kg(r,e,t){var n=[0,t],i=r.inverse?1:0;r.setExtent(n[i],n[1-i]),DL(r,e)}function Ig(r,e,t,n,i,a,o){tb(n,i,Nt.estimate,e,!1,o);var s=[0,0,0,0];u(0),u(1),c(n,0,NaN),c(n,1,NaN);var l=a_(s,function(f){return f>0})==null;return Xs(n,s,!0,!0,t),eb(i,n),l;function u(f){A(i[An[f]],function(v){if(Ka(v.model)){var p=a.ensureRecord(v.model),m=p.labelInfoList;if(m)for(var y=0;y<m.length;y++){var g=m[y],x=v.scale.normalize(Qa(g.label).tickValue);x=f===1?1-x:x,c(g.rect,f,x),c(g.rect,1-f,NaN)}var b=p.nameLayout;if(b){var x=Ri(p.nameLocation)?.5:NaN;c(b.rect,f,x),c(b.rect,1-f,NaN)}}})}function c(f,v,p){var m=r[An[v]]-f[An[v]],y=f[Va[v]]+f[An[v]]-(r[Va[v]]+r[An[v]]);m=h(m,1-p),y=h(y,p);var g=Dg[v][0],x=Dg[v][1];s[g]=dt(s[g],m),s[x]=dt(s[x],y)}function h(f,v){return f>0&&!Oa(v)&&v>1e-4&&(f/=v),f}}function AL(r,e,t,n,i){var a=new Xx(kL);return A(t,function(o){return A(o,function(s){if(Ka(s.model)){var l=!n;s.axisBuilder=SL(r,e,s.model,i,a,l)}})}),a}function tb(r,e,t,n,i,a){var o=t===Nt.determine;A(e,function(u){return A(u,function(c){Ka(c.model)&&(TL(c.axisBuilder,r,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[An[1-u]]=r[Va[u]]<=a.refContainer[Va[u]]*.5?0:1-u===1?2:1}A(e,function(u,c){return A(u,function(h){Ka(h.model)&&((n==="all"||o)&&h.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}
15),o&&h.axisBuilder.build({axisLine:!0}))})})}function LL(r,e,t){var n,i=r.get("outerBoundsMode",!0);i==="same"?n=e.clone():(i==null||i==="auto")&&(n=Li(r.get("outerBounds",!0)||Ux,t.refContainer));var a=r.get("outerBoundsContain",!0),o;a==null||a==="auto"||de(["all","axisLabel"],a)<0?o="all":o=a;var s=[Qc(te(r.get("outerBoundsClampWidth",!0),cl[0]),e.width),Qc(te(r.get("outerBoundsClampHeight",!0),cl[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var kL=function(r,e,t,n,i,a){var o=t.axis.dim==="x"?"y":"x";jx(r,e,t,n,i,a),Ri(r.nameLocation)||A(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&Kx(s.labelInfoList,s.dirVec,n,i)})};function IL(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return PL(t,r,e),t.seriesInvolved&&EL(t,r),t}function PL(r,e,t){var n=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];A(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Ja(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,h=c.getModel("tooltip",n);if(A(s.getAxes(),Pe(m,!1,null)),s.getTooltipAxes&&n&&h.get("show")){var f=h.get("trigger")==="axis",v=h.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(h.get(["axisPointer","axis"]));(f||v)&&A(p.baseAxes,Pe(m,v?"cross":!0,f)),v&&A(p.otherAxes,Pe(m,"cross",!1))}function m(y,g,x){var b=x.model.getModel("axisPointer",i),_=b.get("show");if(!(!_||_==="auto"&&!y&&!zh(b))){g==null&&(g=b.get("triggerTooltip")),b=y?RL(x,h,i,e,y,g):b;var S=b.get("snap"),w=b.get("triggerEmphasis"),T=Ja(x.model),D=g||S||x.type==="category",L=r.axesInfo[T]={key:T,axis:x,coordSys:s,axisPointerModel:b,triggerTooltip:g,triggerEmphasis:w,involveSeries:D,snap:S,useHandle:zh(b),seriesModels:[],linkGroup:null};u[T]=L,r.seriesInvolved=r.seriesInvolved||D;var M=OL(a,x);if(M!=null){var C=o[M]||(o[M]={axesInfo:{}});C.axesInfo[T]=L,C.mapper=a[M].mapper,L.linkGroup=C}}}})}function RL(r,e,t,n,i,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};A(s,function(f){l[f]=ue(o.get(f))}),l.snap=r.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var h=l.lineStyle=o.get("crossStyle");h&&me(u,h.textStyle)}}return r.model.getModel("axisPointer",new Le(l,t,n))}function EL(r,e){e.eachSeries(function(t){var n=t.coordinateSystem,i=t.get(["tooltip","trigger"],!0),a=t.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||t.get(["axisPointer","show"],!0)===!1||A(r.coordSysAxesInfo[Ja(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function OL(r,e){for(var t=e.model,n=e.dim,i=0;i<r.length;i++){var a=r[i]||{};if(cc(a[n+"AxisId"],t.id)||cc(a[n+"AxisIndex"],t.componentIndex)||cc(a[n+"AxisName"],t.name))return i}}function cc(r,e){return r==="all"||X(r)&&de(r,e)>=0||r===e}function BL(r){var e=of(r);if(e){var t=e.axisPointerModel,n=e.axis.scale,i=t.option,a=t.get("status"),o=t.get("value");o!=null&&(o=n.parse(o));var s=zh(t);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=e.axis.scale.isBlank()?"hide":"show")}}function of(r){var e=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Ja(r)]}function NL(r){var e=of(r);return e&&e.axisPointerModel}function zh(r){return!!r.get(["handle","show"])}function Ja(r){return r.type+"||"+r.id}var Pg={},rb=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i,a){this.axisPointerClass&&BL(t),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,i,!0)},e.prototype.updateAxisPointer=function(t,n,i,a){this._doUpdateAxisPointerClass(t,i,!1)},e.prototype.remove=function(t,n){var i=this._axisPointer;i&&i.remove(n)},e.prototype.dispose=function(t,n){this._disposeAxisPointer(n),r.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,i){var a=e.getAxisPointerClass(this.axisPointerClass);if(a){var o=NL(t);o?(this._axisPointer||(this._axisPointer=new a)).render(t,o,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,n){Pg[t]=n},e.getAxisPointerClass=function(t){return t&&Pg[t]},e.type="axis",e})(Bt),Fh=Me();function zL(r,e,t,n){var i=t.axis;
15if(!i.scale.isBlank()){var a=t.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,h=Fh(r).splitAreaColors,f=re(),v=0;if(h)for(var p=0;p<u.length;p++){var m=h.get(u[p].tickValue);if(m!=null){v=(m+(c-1)*p)%c;break}}var y=i.toGlobalCoord(u[0].coord),g=o.getAreaStyle();s=X(s)?s:[s];for(var p=1;p<u.length;p++){var x=i.toGlobalCoord(u[p].coord),b=void 0,_=void 0,S=void 0,w=void 0;i.isHorizontal()?(b=y,_=l.y,S=x-b,w=l.height,y=b+S):(b=l.x,_=y,S=l.width,w=x-_,y=_+w);var T=u[p-1].tickValue;T!=null&&f.set(T,v),e.add(new Ce({anid:T!=null?"area_"+T:null,shape:{x:b,y:_,width:S,height:w},style:me({fill:s[v]},g),autoBatch:!0,silent:!0})),v=(v+1)%c}Fh(r).splitAreaColors=f}}}function FL(r){Fh(r).splitAreaColors=null}var VL=["splitArea","splitLine","minorSplitLine","breakArea"],nb=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="CartesianAxisPointer",t}return e.prototype.render=function(t,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ee,this.group.add(this._axisGroup),!!Ka(t)){this._axisGroup.add(t.axis.axisBuilder.group),A(VL,function(l){t.get([l,"show"])&&HL[l](this,this._axisGroup,t,t.getCoordSysModel(),i)},this);var s=a&&a.type==="changeAxisOrder"&&a.isInitSort;s||zm(o,this._axisGroup,t),r.prototype.render.call(this,t,n,i,a)}},e.prototype.remove=function(){FL(this)},e.type="cartesianAxis",e})(rb),HL={splitLine:function(r,e,t,n,i){var a=t.axis;if(!a.scale.isBlank()){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=X(l)?l:[l];for(var h=n.coordinateSystem.getRect(),f=a.isHorizontal(),v=0,p=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),m=[],y=[],g=s.getLineStyle(),x=0;x<p.length;x++){var b=a.toGlobalCoord(p[x].coord);if(!(x===0&&!u||x===p.length-1&&!c)){var _=p[x].tickValue;f?(m[0]=b,m[1]=h.y,y[0]=b,y[1]=h.y+h.height):(m[0]=h.x,m[1]=b,y[0]=h.x+h.width,y[1]=b);var S=v++%l.length,w=new jr({anid:_!=null?"line_"+_:null,autoBatch:!0,shape:{x1:m[0],y1:m[1],x2:y[0],y2:y[1]},style:me({stroke:l[S]},g),silent:!0});Ha(w.shape,g.lineWidth),e.add(w)}}}},minorSplitLine:function(r,e,t,n,i){var a=t.axis,o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=n.coordinateSystem.getRect(),u=a.isHorizontal(),c=a.getMinorTicksCoords();if(c.length)for(var h=[],f=[],v=s.getLineStyle(),p=0;p<c.length;p++)for(var m=0;m<c[p].length;m++){var y=a.toGlobalCoord(c[p][m].coord);u?(h[0]=y,h[1]=l.y,f[0]=y,f[1]=l.y+l.height):(h[0]=l.x,h[1]=y,f[0]=l.x+l.width,f[1]=y);var g=new jr({anid:"minor_line_"+c[p][m].tickValue,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:f[0],y2:f[1]},style:v,silent:!0});Ha(g.shape,v.lineWidth),e.add(g)}},splitArea:function(r,e,t,n,i){zL(r,e,t,n)},breakArea:function(r,e,t,n,i){t.axis.scale}},ib=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e})(nb),$L=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=ib.type,t}return e.type="yAxis",e})(nb),GL=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,n){this.group.removeAll(),t.get("show")&&this.group.add(new Ce({shape:t.coordinateSystem.getRect(),style:me({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e})(Bt),Rg={offset:0};function WL(r){r.registerComponentView(GL),r.registerComponentModel(qA),r.registerCoordinateSystem("cartesian2d",ML),_g(r,"x",Oh,Rg),_g(r,"y",Oh,Rg),r.registerComponentView(ib),r.registerComponentView($L),r.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}var UL=Me();function Eg(r,e){return!!UL(r)[e]}Yn({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Ke);var YL={axisPointer:1,tooltip:1,brush:1};function ZL(r,e,t){var n=e.getComponentByElement(r.topTarget);if(!n||n===t||YL.hasOwnProperty(n.mainType))return!1;var i=n.coordinateSystem;if(!i||i.model===t)return!1;var a=Wa(n),o=Wa(t);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var XL=(function(r){$(e,r);function e(t){var n=r.call(this)||this;n._zr=t;var i=ee(n._mousedownHandler,n),a=ee(n._mousemoveHandler,n),o=ee(n._mouseupHandler,n),s=ee(n._mousewheelHandler,n),l=ee(n._pinchHandler,n);return n.enable=function(u,c){var h=c.zInfo,f=Wa(h.component),v=f.z,p=f.zlevel,m={component:h.component,z:v,zlevel:p,z2:te(h.z2,-1/0)},y=H({},c.triggerInfo);this._opt=me(H({},c),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:m,triggerInfo:y}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this._enabled=!0,this.disable(),(u===!0||u==="move"||u==="pan")&&(ra(t,"mousedown",i,m),ra(t,"mousemove",a,m),ra(t,"mouseup",o,m)),(u===!0||u==="scale"||u==="zoom")&&(ra(t,"mousewheel",s,m),ra(t,"pinch",l,m)))},n.disable=function(){this._enabled=!1,na(t,"mousedown",i),na(t,"mousemove",a),na(t,"mouseup",o),na(t,"mousewheel",s),na(t,"pinch",l)},n}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype._checkPointer=function(t,n,i){var a=this._opt,o=a.zInfoParsed;
15if(ZL(t,a.api,o.component))return!1;var s=a.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(t,n,i)),u&&s.isInClip&&!s.isInClip(t,n,i)&&(u=!1),u},e.prototype._decideCursorStyle=function(t,n,i,a){var o=t.target;if(!o&&this._checkPointer(t,n,i))return"grab";if(a)return o&&o.cursor||"default"},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(mf(t)||ta(t))){for(var n=t.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var i=t.offsetX,a=t.offsetY;this._checkPointer(t,i,a)&&(this._x=i,this._y=a,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){var n=this._zr;if(!(t.gestureEvent==="pinch"||Eg(n,"globalPan")||ta(t))){var i=t.offsetX,a=t.offsetY;if(!this._dragging||!ws("moveOnMouseMove",t,this._opt)){var o=this._decideCursorStyle(t,i,a,!1);o&&n.setCursorStyle(o);return}n.setCursorStyle("grabbing");var s=this._x,l=this._y,u=i-s,c=a-l;this._x=i,this._y=a,this._opt.preventDefaultMouseMove&&Mi(t.event),t.__ecRoamConsumed=!0,Og(this,"pan","moveOnMouseMove",t,{dx:u,dy:c,oldX:s,oldY:l,newX:i,newY:a,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){if(!ta(t)){var n=this._zr;if(!mf(t)){this._dragging=!1;var i=this._decideCursorStyle(t,t.offsetX,t.offsetY,!0);i&&n.setCursorStyle(i)}}},e.prototype._mousewheelHandler=function(t){if(!ta(t)){var n=ws("zoomOnMouseWheel",t,this._opt),i=ws("moveOnMouseWheel",t,this._opt),a=t.wheelDelta,o=Math.abs(a),s=t.offsetX,l=t.offsetY;if(!(a===0||!n&&!i)){if(n){var u=o>3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var h=Math.abs(a),f=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:f,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(t){if(!(Eg(this._zr,"globalPan")||ta(t))){var n=t.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,t,{scale:n,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(t,n,i,a,o){t._checkPointer(a,o.originX,o.originY)&&(Mi(a.event),a.__ecRoamConsumed=!0,Og(t,n,i,a,o))},e})(zt);function ta(r){return r.__ecRoamConsumed}var jL=Me();function Wl(r){var e=jL(r);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function ra(r,e,t,n){for(var i=Wl(r),a=i.roam,o=a[e]=a[e]||[],s=0;s<o.length;s++){var l=o[s].zInfoParsed;
15if((l.zlevel-n.zlevel||l.z-n.z||l.z2-n.z2)<=0)break}o.splice(s,0,{listener:t,zInfoParsed:n}),qL(r,e)}function na(r,e,t){for(var n=Wl(r),i=n.roam[e]||[],a=0;a<i.length;a++)if(i[a].listener===t){i.splice(a,1),i.length||KL(r,e);return}}function qL(r,e){var t=Wl(r);t.uniform[e]||r.on(e,t.uniform[e]=function(n){var i=t.roam[e];if(i)for(var a=0;a<i.length;a++)i[a].listener(n)})}function KL(r,e){var t=Wl(r),n=t.uniform;n[e]&&(r.off(e,n[e]),n[e]=null)}function Og(r,e,t,n,i){i.isAvailableBehavior=ee(ws,null,t,n),r.trigger(e,i)}function ws(r,e,t){var n=t[r];return!r||n&&(!K(n)||e.event[n+"Key"])}function eo(r,e,t,n,i,a){r=r||0;var o=t[1]-t[0];if(i!=null&&(i=ci(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=ci(s,[0,o]),i=a=ci(s,[i,a]),n=0}e[0]=ci(e[0],t),e[1]=ci(e[1],t);var l=hc(e,n);e[n]+=r;var u=i||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=ci(e[n],c);var h;return h=hc(e,n),i!=null&&(h.sign!==l.sign||h.span<i)&&(e[1-n]=e[n]+l.sign*i),h=hc(e,n),a!=null&&h.span>a&&(e[1-n]=e[n]+h.sign*a),e}function hc(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function ci(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var Ln=Me(),Bg=ue,dc=ee,QL=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,n,i){var a=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,t,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new Ee,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),n.getZr().add(s);else{var f=Pe(Ng,t,h);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,t)}Fg(s,t,!0),this._renderHandle(a)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var n=t.get("animation"),i=e.axis,a=i.type==="category",o=t.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=of(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(e,t,n,i,a){},r.prototype.createPointerEl=function(e,t,n,i){var a=t.pointer;if(a){var o=Ln(e).pointerEl=new fT[a.type](Bg(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,i){if(t.label){var a=Ln(e).labelEl=new Je(Bg(t.label));e.add(a),zg(a,i)}},r.prototype.updatePointerEl=function(e,t,n){var i=Ln(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,n,i){var a=Ln(e).labelEl;a&&(a.setStyle(t.label.style),n(a,{x:t.label.x,y:t.label.y}),zg(a,i))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=t.getModel("handle"),o=t.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=bd(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Mi(u.event)},onmousedown:dc(this._onHandleDragMove,this,0,0),drift:dc(this._onHandleDragMove,this),ondragend:dc(this._onHandleDragEnd,this)}),n.add(i)),Fg(i,t,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");X(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Vl(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){Ng(this._axisPointerModel,!t&&this._moveAnimation,this._handle,fc(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(fc(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(fc(i)),Ln(n).lastProp=null,this._doDispat
15chAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,i=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Js(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},r})();function Ng(r,e,t,n){ab(Ln(t).lastProp,n)||(Ln(t).lastProp=n,e?vt(t,n,r):(t.stopAnimation(),t.attr(n)))}function ab(r,e){if(Q(r)&&Q(e)){var t=!0;return A(e,function(n,i){t=t&&ab(r[i],n)}),!!t}else return r===e}function zg(r,e){r[e.get(["label","show"])?"show":"hide"]()}function fc(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function Fg(r,e,t){var n=e.get("z"),i=e.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=t)})}function JL(r){var e=r.get("type"),t=r.getModel(e+"Style"),n;return e==="line"?(n=t.getLineStyle(),n.fill=null):e==="shadow"&&(n=t.getAreaStyle(),n.stroke=null),n}function ek(r,e,t,n,i){var a=t.get("value"),o=ob(a,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Nl(s.get("padding")||0),u=s.getFont(),c=W0(o,u),h=i.position,f=c.width+l[1]+l[3],v=c.height+l[0]+l[2],p=i.align;p==="right"&&(h[0]-=f),p==="center"&&(h[0]-=f/2);var m=i.verticalAlign;m==="bottom"&&(h[1]-=v),m==="middle"&&(h[1]-=v/2),tk(h,f,v,n);var y=s.get("backgroundColor");(!y||y==="auto")&&(y=e.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:Gn(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:y}),z2:10}}function tk(r,e,t,n){var i=n.getWidth(),a=n.getHeight();r[0]=Math.min(r[0]+e,i)-e,r[1]=Math.min(r[1]+t,a)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function ob(r,e,t,n,i){r=e.scale.parse(r);var a=e.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:ol(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};A(n,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,h=u&&u.getDataParams(c);h&&s.seriesData.push(h)}),K(o)?a=o.replace("{value}",a):ne(o)&&(a=o(s))}return a}function sb(r,e,t){var n=mr();return rd(n,n,t.rotation),Bc(n,n,t.position),$a([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function rk(r,e,t,n,i,a){var o=Ur.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=i.get(["label","margin"]),ek(e,n,i,a,{position:sb(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function nk(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function ik(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}var ak=(function(r){$(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=Vg(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var f=JL(a),v=ok[u](s,h,c);v.style=f,t.graphicKey=v.type,t.pointer=v}var p=hl(l.getRect(),i);rk(n,t,p,i,a,o)},e.prototype.getHandleTransform=function(t,n,i){var a=hl(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=sb(n.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Vg(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,h=[t.x,t.y];h[c]+=n[c],h[c]=Math.min(l[1],h[c]),h[c]=Math.max(l[0],h[c]);var f=(u[1]+u[0])/2,v=[f,f];v[c]=h[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:v,tooltipOption:p[c]}},e})(QL);function Vg(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var ok={line:function(r,e,t){var n=nk([e,t[0]],[e,t[1]],Hg(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=Math.max(1,r.getBandWidth()),i=t[1]-t[0];return{type:"Rect",shape:ik([e-n/2,t[0]],[n,i],Hg(r))}}};function Hg(r){return r.dim==="x"?0:1}var sk=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:j.color.border,width:1,type:"dashed"},shadowStyle:{color:j.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:j.color.neutral00,padding:[5,7,5,7],backgroundColor:j.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:j.color.accent40,throttle:40}},e})(ge),gr=Me(),lk=A;function lb(r,e,t){if(!ie.node){var n=e.getZr();gr(n).records||(gr(n).records={}),uk(n,e);var i=gr(n).records[r]||(gr(n).records[r]={});i.handler=t}}function uk(r,e){if(gr(r).initialized)return;
15gr(r).initialized=!0,t("click",Pe($g,"click")),t("mousemove",Pe($g,"mousemove")),t("globalout",hk);function t(n,i){r.on(n,function(a){var o=dk(e);lk(gr(r).records,function(s){s&&i(s,a,o.dispatchAction)}),ck(o.pendings,e)})}}function ck(r,e){var t=r.showTip.length,n=r.hideTip.length,i;t?i=r.showTip[t-1]:n&&(i=r.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function hk(r,e,t){r.handler("leave",null,t)}function $g(r,e,t,n){e.handler(r,t,n)}function dk(r){var e={showTip:[],hideTip:[]},t=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=t,r.dispatchAction(n))};return{dispatchAction:t,pendings:e}}function Vh(r,e){if(!ie.node){var t=e.getZr(),n=(gr(t).records||{})[r];n&&(gr(t).records[r]=null)}}var fk=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=n.getComponent("tooltip"),o=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";lb("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,n){Vh("axisPointer",n)},e.prototype.dispose=function(t,n){Vh("axisPointer",n)},e.type="axisPointer",e})(Bt);function ub(r,e){var t=[],n=r.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Hn(a,r);if(o==null||o<0||X(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)t=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),h=c.dim,f=u.dim,v=h==="x"||h==="radius"?1:0,p=a.mapDimension(f),m=[];m[v]=a.get(p,o),m[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(m)||[]}else t=l.dataToPoint(a.getValues(J(l.dimensions,function(g){return a.mapDimension(g)}),o))||[];else if(s){var y=s.getBoundingRect().clone();y.applyTransform(s.transform),t=[y.x+y.width/2,y.y+y.height/2]}return{point:t,el:s}}var Gg=Me();function vk(r,e,t){var n=r.currTrigger,i=[r.x,r.y],a=r,o=r.dispatchAction||ee(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Ss(i)&&(i=ub({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Ss(i),u=a.axesInfo,c=s.axesInfo,h=n==="leave"||Ss(i),f={},v={},p={list:[],map:{}},m={showPointer:Pe(gk,v),showTooltip:Pe(mk,p)};A(s.coordSysMap,function(g,x){var b=l||g.containPoint(i);A(s.coordSysAxesInfo[x],function(_,S){var w=_.axis,T=_k(u,_);if(!h&&b&&(!u||T)){var D=T&&T.value;D==null&&!l&&(D=w.pointToData(i)),D!=null&&Wg(_,D,m,!1,f)}})});var y={};return A(c,function(g,x){var b=g.linkGroup;b&&!v[x]&&A(b.axesInfo,function(_,S){var w=v[S];if(_!==g&&w){var T=w.value;b.mapper&&(T=g.axis.scale.parse(b.mapper(T,Ug(_),Ug(g)))),y[g.key]=T}})}),A(y,function(g,x){Wg(c[x],g,m,!0,f)}),yk(v,c,f),xk(p,i,r,o),bk(c,o,t),f}}function Wg(r,e,t,n,i){var a=r.axis;
15if(!(a.scale.isBlank()||!a.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=pk(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&H(i,s[0]),!n&&r.snap&&a.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function pk(r,e){var t=e.axis,n=t.dim,i=r,a=[],o=Number.MAX_VALUE,s=-1;return A(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),h,f;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(c,r,t);f=v.dataIndices,h=v.nestestValue}else{if(f=l.indicesOfNearest(n,c[0],r,t.type==="category"?.5:null),!f.length)return;h=l.getData().get(c[0],f[0])}if(!(h==null||!isFinite(h))){var p=r-h,m=Math.abs(p);m<=o&&((m<o||p>=0&&s<0)&&(o=m,s=p,i=h,a.length=0),A(f,function(y){a.push({seriesIndex:l.seriesIndex,dataIndexInside:y,dataIndex:l.getData().getRawIndex(y)})}))}}),{payloadBatch:a,snapToValue:i}}function gk(r,e,t,n){r[e.key]={value:t,payloadBatch:n}}function mk(r,e,t,n){var i=t.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=Ja(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function yk(r,e,t){var n=t.axesInfo=[];A(e,function(i,a){var o=i.axisPointerModel.option,s=r[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function xk(r,e,t,n){if(Ss(e)||!r.list.length){n({type:"hideTip"});return}var i=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function bk(r,e,t){var n=t.getZr(),i="axisPointerLastHighlights",a=Gg(n)[i]||{},o=Gg(n)[i]={};A(r,function(u,c){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&A(h.seriesDataIndices,function(f){var v=f.seriesIndex+" | "+f.dataIndex;o[v]=f})});var s=[],l=[];A(a,function(u,c){!o[c]&&l.push(u)}),A(o,function(u,c){!a[c]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function _k(r,e){for(var t=0;t<(r||[]).length;t++){var n=r[t];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function Ug(r){var e=r.axis.model,t={},n=t.axisDim=r.axis.dim;return t.axisIndex=t[n+"AxisIndex"]=e.componentIndex,t.axisName=t[n+"AxisName"]=e.name,t.axisId=t[n+"AxisId"]=e.id,t}function Ss(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function cb(r){rb.registerAxisPointerClass("CartesianAxisPointer",ak),r.registerComponentModel(sk),r.registerComponentView(fk),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!X(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=IL(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},vk)}function Ul(r){pt(WL),pt(cb)}var Yg=["x","y","radius","angle","single"],wk=["cartesian2d","polar","singleAxis"];function Sk(r){var e=r.get("coordinateSystem");return de(wk,e)>=0}function Vr(r){return r+"Axis"}function Tk(r,e){var t=re(),n=[],i=re();r.eachComponent({mainType:"dataZoom",query:e},function(c){i.get(c.uid)||s(c)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var h=!1;return c.eachTargetAxis(function(f,v){var p=t.get(f);p&&p[v]&&(h=!0)}),h}function u(c){c.eachTargetAxis(function(h,f){(t.get(h)||t.set(h,[]))[f]=!0})}return n}function hb(r){var e=r.ecModel,t={infoList:[],infoMap:re()};return r.eachTargetAxis(function(n,i){var a=e.getComponent(Vr(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(a)}}}),t}var vc=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r})(),dl=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,n,i){var a=Zg(t);this.settledOption=a,this.mergeDefaultAndTheme(t,i),this._doInit(a)},e.prototype.mergeOption=function(t){var n=Zg(t);fe(this.option,t,!0),fe(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;A([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=re(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return A(Yg,function(i){var a=this.getReferringComponents(Vr(i),Jw);if(a.specified){n=!0;var o=new vc;A(a.models,function(s){o.add(s.componentIndex)}),t.set(i,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(t,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var h=u[0];if(h){var f=new vc;if(f.add(h.componentIndex),t.set(c,f),a=!1,c==="x"||c==="y"){var v=h.getReferringComponents("grid",qe).models[0];v&&A(u,function(p){h.componentIndex!==p.componentIndex&&v===p.getReferringComponents("grid",qe).models[0]&&f.add(p.componentIndex)})}}}a&&A(Yg,function(u){if(a){var c=i.findComponents({mainType:Vr(u),filter:function(f){return f.get("type",!0)==="category"}});if(c[0]){var h=new vc;h.add(c[0].componentIndex),t.set(u,h),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(n){!t&&(t=n)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var n=this._rangePropMode,i=this.get("rangeMode");A([["start","startValue"],["end","endValue"]],function(a,o){var s=t[a[0]]!=null,l=t[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(n,i){t==null&&(t=this.ecModel.getComponent(Vr(n),i))},this),t},e.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each(function(i,a){A(i.indexList,function(o){t.call(n,a,o)})})},e.prototype.getAxisProxy=function(t,n){var i=this.getAxisModel(t,n);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(t,n){var i=this._targetAxisInfoMap.get(t);if(i&&i.indexMap[n])return this.ecModel.getComponent(Vr(t),n)},e.prototype.setRawRange=function(t){var n=this.option,i=this.settledOption;A([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(n[a[0]]=i[a[0]]=t[a[0]],n[a[1]]=i[a[1]]=t[a[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var n=this.option;A(["start","startValue","end","endValue"],function(i){n[i]=t[i]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,n){if(t==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(t,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;a<i.length;a++)for(var o=i[a],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;n||(n=u)}return n},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e})(ge);function Zg(r){var e={};return A(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}var db=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i,a){this.dataZoomModel=t,this.ecModel=n,this.api=i},e.type="dataZoom",e})(Bt),vi=A,Xg=va,Ck=(function(){function r(e,t,n,i){this._dimName=e,this._axisIndex=t,this.ecModel=i,this._dataZoomModel=n}return r.prototype.hostedBy=function(e){return this._dataZoomModel===e},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(Sk(t)){var n=Vr(this._dimName),i=t.getReferringComponents(n,qe).models[0];i&&this._axisIndex===i.componentIndex&&e.push(t)}},this),e},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return ue(this._minMaxSpan)},r.prototype.calculateDataWindow=function(e){var t=this._dataExtent,n=this.getAxisModel(),i=n.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;vi(["start","end"],function(f,v){var p=e[f],m=e[f+"Value"];a[v]==="percent"?(p==null&&(p=o[v]),m=i.parse(Ne(p,o,t))):(u=!0,m=m==null?t[v]:i.parse(m),p=Ne(m,t,o)),l[v]=m==null||isNaN(m)?t[v]:m,s[v]=p==null||isNaN(p)?o[v]:p}),Xg(l),Xg(s);var c=this._minMaxSpan;u?h(l,s,t,o,!1):h(s,l,o,t,!0);function h(f,v,p,m,y){var g=y?"Span":"ValueSpan";eo(0,f,p,"all",c["min"+g],c["max"+g]);for(var x=0;x<2;x++)v[x]=Ne(f[x],p,m,!0),y&&(v[x]=i.parse(v[x]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=Mk(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var n=this._dimName,i=this.getTargetSeriesModels(),a=e.get("filterMode"),o=this._valueWindow;if(a==="none")return;vi(i,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(c.length){if(a==="weakFilter"){var h=u.getStore(),f=J(c,function(v){return u.getDimensionIndex(v)},u);u.filterSelf(function(v){for(var p,m,y,g=0;g<c.length;g++){var x=h.get(f[g],v),b=!isNaN(x),_=x<o[0],S=x>o[1];if(b&&!_&&!S)return!0;b&&(y=!0),_&&(p=!0),S&&(m=!0)}return y&&p&&m})}else vi(c,function(v){if(a==="empty")l.setData(u=u.map(v,function(m){return s(m)?m:NaN}));else{var p={};p[v]=o,u.selectRange(p)}});vi(c,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;vi(["min","max"],function(i){var a=t.get(i+"Span"),o=t.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=Ne(n[0]+o,n,[0,100],!0):a!=null&&(o=Ne(a,[0,100],n,!0)-n[0]),e[i+"Span"]=a,e[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var i=X0(n,[0,500]);i=Math.min(i,20);var a=e.axis.scale.rawExtentInfo;t[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),t[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},r})();function Mk(r,e,t){var n=[1/0,-1/0];vi(t,function(o){GD(n,o.getData(),e)});var i=r.getAxisModel(),a=bx(i.axis.scale,i,n).calculate();return[a.min,a.max]}var Dk={getTargetSeries:function(r){function e(i){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(Vr(o),s);i(o,s,l,a)})})}e(function(i,a,o,s){o.__dzAxisProxy=null});var t=[];e(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Ck(i,a,s,r),t.push(o.__dzAxisProxy))});var n=re();return A(t,function(i){A(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).reset(t)}),t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var n=t.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function Ak(r){r.registerAction("dataZoom",function(e,t){var n=Tk(t,e);A(n,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var jg=!1;function fb(r){jg||(jg=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Dk),Ak(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Lk(r,e){var t=Nl(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var i=new Ce({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}
15);return i}var kk=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:j.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:j.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:j.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:j.color.tertiary,fontSize:14}},e})(ge);function vb(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function pb(r){if(ie.domSupported){for(var e=document.documentElement.style,t=0,n=r.length;t<n;t++)if(r[t]in e)return r[t]}}var gb=pb(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ik=pb(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function mb(r,e){if(!r)return e;e=ey(e,!0);var t=r.indexOf(e);return r=t===-1?e:"-"+r.slice(0,t)+"-"+e,r.toLowerCase()}function Pk(r,e){var t=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return t?t[e]:null}var Rk=mb(Ik,"transition"),sf=mb(gb,"transform"),Ek="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(ie.transform3dSupported?"will-change:transform;":"");function Ok(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function Bk(r,e,t){if(!K(t)||t==="inside")return"";var n=r.get("backgroundColor"),i=r.get("borderWidth");e=Wn(e);var a=Ok(t),o=Math.max(Math.round(i)*1.5,6),s="",l=sf+":",u;de(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,h=o+i,f=h*Math.abs(Math.cos(c))+h*Math.abs(Math.sin(c)),v=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-h)/2)*100)/100;s+=";"+a+":-"+v+"px";var p=e+" solid "+i+"px;",m=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'<div style="'+m.join("")+'"></div>'}function Nk(r,e,t){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return t&&(i=" "+r/2+"s "+n,a="opacity"+i+",visibility"+i),e||(i=" "+r+"s "+n,a+=(a.length?",":"")+(ie.transformSupported?""+sf+i:",left"+i+",top"+i)),Rk+":"+a}function qg(r,e,t){var n=r.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!ie.transformSupported)return t?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=ie.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return t?"top:0;left:0;"+sf+":"+o+";":[["top",0],["left",0],[gb,o]]}function zk(r){var e=[],t=r.get("fontSize"),n=r.getTextColor();n&&e.push("color:"+n),e.push("font:"+r.getFont());var i=te(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+i+"px");var a=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return a&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),A(["decoration","align"],function(u){var c=r.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function Fk(r,e,t,n){var i=[],a=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),c=r.get("shadowOffsetY"),h=r.getModel("textStyle"),f=Dy(r,"html"),v=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+v),e&&a>0&&i.push(Nk(a,t,n)),o&&i.push("background-color:"+o),A(["width","color","radius"],function(p){var m="border-"+p,y=ey(m),g=r.get(y);g!=null&&i.push(m+":"+g+(p==="color"?"":"px"))}),i.push(zk(h)),f!=null&&i.push("padding:"+Nl(f).join("px ")+"px"),i.join(";")+";"}function Kg(r,e,t,n,i){var a=e&&e.painter;if(t){var o=a&&a.getViewportRoot();o&&w_(r,o,t,n,i)}else{r[0]=n,r[1]=i;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var Vk=(function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,ie.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;
15var i=this._zr=e.getZr(),a=t.appendTo,o=a&&(K(a)?document.querySelector(a):Ea(a)?a:ne(a)&&a(e.getDom()));Kg(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();bt(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=Pk(t,"position"),i=t.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=Ek+Fk(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+qg(a[0],a[1],!0)+("border-color:"+Wn(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(K(a)&&n.get("trigger")==="item"&&!vb(n)&&(s=Bk(n,i,a)),K(e))o.innerHTML=e+s;else if(e){o.innerHTML="",X(e)||(e=[e]);for(var l=0;l<e.length;l++)Ea(e[l])&&e[l].parentNode!==o&&o.appendChild(e[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},r.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(Kg(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var i=this.el.style,a=qg(n[0],n[1]);A(a,function(o){i[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility="hidden",t.opacity="0"):t.display="none",ie.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ee(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;S_(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},r})(),Hk=(function(){function r(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),Jg(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return r.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(e,t,n,i,a){var o=this;Q(e)&&nt(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new Je({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:Dy(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),A(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),A(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect
15(),n=Qg(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},r.prototype.moveTo=function(e,t){var n=this.el;if(n){var i=this._styleCoord;Jg(i,this._zr,e,t),e=i[0],t=i[1];var a=n.style,o=Or(a.borderWidth||0),s=Qg(a);n.x=e+o+s.left,n.y=t+o+s.top,n.markRedraw()}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ee(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r})();function Or(r){return Math.max(0,r)}function Qg(r){var e=Or(r.shadowBlur||0),t=Or(r.shadowOffsetX||0),n=Or(r.shadowOffsetY||0);return{left:Or(e-t),right:Or(e+t),top:Or(e-n),bottom:Or(e+n)}}function Jg(r,e,t,n){r[0]=t,r[1]=n,r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var $k=new Ce({shape:{x:-1,y:-1,width:2,height:2}}),Gk=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){if(!(ie.node||!n.getDom())){var i=t.getComponent("tooltip"),a=this._renderMode=t1(i.get("renderMode"));this._tooltipContent=a==="richText"?new Hk(n):new Vk(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},e.prototype.render=function(t,n,i){if(!(ie.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(t),a.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?Vl(this,"_updatePosition",50,"fixRate"):Js(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,n=t.get("triggerOn");lb("itemTooltip",this._api,ee(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,i=this._api,a=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(t,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,n,i,a){if(!(a.from===this.uid||ie.node||!i.getDom())){var o=e0(a,i);this._ticket="";var s=a.dataByCoordSys,l=Zk(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=$k;c.x=a.x,c.y=a.y,c.update(),ve(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(t,n,i,a))return;var h=ub(a,n),f=h.point[0],v=h.point[1];f!=null&&v!=null&&this._tryShow({offsetX:f,offsetY:v,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(t,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(e0(a,i))},e.prototype._manuallyAxisShowTip=function(t,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),h=ia([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(t,n){var i=t.target,a=this._tooltipModel;if(a){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(i){var s=ve(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;ma(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(ve(c).dataIndex!=null?l=c:ve(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(t,l,n):u?this._showComponentItemTooltip(t,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(t,n){var i=t.get("showDelay");n=ee(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(t,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=ia([n.tooltipOption],a),l=this._renderMode,u=[],c=Za("section",{blocks:[],noHeader:!0}),h=[],f=new Uu;A(t,function(x){A(x.dataByAxis,function(b){var _=i.getComponent(b.axisDim+"Axis",b.axisIndex),S=b.value;if(!(!_||S==null)){var w=ob(S,_.axis,i,b.seriesDataIndices,b.valueLabelOpt),T=Za("section",{header:w,noHeader:!jt(w),sortBlocks:!0,blocks:[]});c.blocks.push(T),A(b.seriesDataIndices,function(D){var L=i.getSeriesByIndex(D.seriesIndex),M=D.dataIndexInside,C=L.getDataParams(M);if(!(C.dataIndex<0)){C.axisDim=b.axisDim,C.axisIndex=b.axisIndex,C.axisType=b.axisType,C.axisId=b.axisId,C.axisValue=ol(_.axis,{value:S}),C.axisValueLabel=w,C.marker=f.makeTooltipMarker("item",Wn(C.color),l);var I=sp(L.formatTooltip(M,!0,null)),k=I.frag;if(k){var R=ia([L],a).get("valueFormatter");
15T.blocks.push(R?H({valueFormatter:R},k):k)}I.text&&h.push(I.text),u.push(C)}})}})}),c.blocks.reverse(),h.reverse();var v=n.position,p=s.get("order"),m=dp(c,f,l,p,i.get("useUTC"),s.get("textStyle"));m&&h.unshift(m);var y=l==="richText"?` 16 17`:"<br/>",g=h.join(y);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],v,null,f)})},e.prototype._showSeriesItemTooltip=function(t,n,i){var a=this._ecModel,o=ve(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,h=o.dataType,f=u.getData(h),v=this._renderMode,p=t.positionDefault,m=ia([f.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),y=m.get("trigger");if(!(y!=null&&y!=="item")){var g=u.getDataParams(c,h),x=new Uu;g.marker=x.makeTooltipMarker("item",Wn(g.color),v);var b=sp(u.formatTooltip(c,!1,h)),_=m.get("order"),S=m.get("valueFormatter"),w=b.frag,T=w?dp(S?H({valueFormatter:S},w):w,x,v,_,a.get("useUTC"),m.get("textStyle")):b.text,D="item_"+u.name+"_"+c;this._showOrMove(m,function(){this._showTooltipContent(m,T,g,D,t.offsetX,t.offsetY,t.position,t.target,x)}),i({type:"showTip",dataIndexInside:c,dataIndex:f.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,n,i){var a=this._renderMode==="html",o=ve(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(K(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=ue(l),l.content=tt(l.content));var h=[l],f=this._ecModel.getComponent(o.componentMainType,o.componentIndex);f&&h.push(f),h.push({formatter:l.content});var v=t.positionDefault,p=ia(h,this._tooltipModel,v?{position:v}:null),m=p.get("content"),y=Math.random()+"",g=new Uu;this._showOrMove(p,function(){var x=ue(p.get("formatterParams")||{});this._showTooltipContent(p,m,x,y,t.offsetX,t.offsetY,t.position,n,g)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,n,i,a,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var f=t.get("formatter");l=l||t.get("position");var v=n,p=this._getNearestPoint([o,s],i,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)),m=p.color;if(f)if(K(f)){var y=t.ecModel.get("useUTC"),g=X(i)?i[0]:i,x=g&&g.axisType&&g.axisType.indexOf("time")>=0;v=f,x&&(v=Bl(g.axisValue,v,y)),v=ty(v,i,!0)}else if(ne(f)){var b=ee(function(_,S){_===this._ticket&&(h.setContent(S,c,t,m,l),this._updatePosition(t,l,o,s,h,i,u))},this);this._ticket=a,v=f(i,a,b)}else v=f;h.setContent(v,c,t,m,l),h.show(t,m),this._updatePosition(t,l,o,s,h,i,u)}},e.prototype._getNearestPoint=function(t,n,i,a,o){if(i==="axis"||X(n))return{color:a||o};if(!X(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(t,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||t.get("position");var h=o.getSize(),f=t.get("align"),v=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),ne(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:h.slice()})),X(n))i=He(n[0],u),a=He(n[1],c);else if(Q(n)){var m=n;m.width=h[0],m.height=h[1];var y=Li(m,{width:u,height:c});i=y.x,a=y.y,f=null,v=null}else if(K(n)&&l){var g=Yk(n,p,h,t.get("borderWidth"));i=g[0],a=g[1]}else{var g=Wk(i,a,o,u,c,f?null:20,v?null:20);i=g[0],a=g[1]}if(f&&(i-=t0(f)?h[0]/2:f==="right"?h[0]:0),v&&(a-=t0(v)?h[1]/2:v==="bottom"?h[1]:0),vb(t)){var g=Uk(i,a,o,u,c);i=g[0],a=g[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(t,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===t.length;return o&&A(i,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},h=c.dataByAxis||[];o=o&&u.length===h.length,o&&A(u,function(f,v){var p=h[v]||{},m=f.seriesDataIndices||[],y=p.seriesDataIndices||[];o=o&&f.value===p.value&&f.axisType===p.axisType&&f.axisId===p.axisId&&m.length===y.length,o&&A(m,function(g,x){var b=y[x];o=o&&g.seriesIndex===b.seriesIndex&&g.dataIndex===b.dataIndex}),a&&A(f.seriesDataIndices,function(g){var x=g.seriesIndex,b=n[x],_=a[x];b&&_&&_.data!==b.data&&(o=!1)})})}
17),this._lastDataByCoordSys=t,this._cbParamsList=n,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,n){ie.node||!n.getDom()||(Js(this,"_updatePosition"),this._tooltipContent.dispose(),Vh("itemTooltip",n))},e.type="tooltip",e})(Bt);function ia(r,e,t){var n=e.ecModel,i;t?(i=new Le(t,n,n),i=new Le(e.option,i,n)):i=e;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof Le&&(o=o.get("tooltip",!0)),K(o)&&(o={formatter:o}),o&&(i=new Le(o,i,n)))}return i}function e0(r,e){return r.dispatchAction||ee(e.dispatchAction,e)}function Wk(r,e,t,n,i,a,o){var s=t.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>n?r-=l+a:r+=a),o!=null&&(e+u+o>i?e-=u+o:e+=o),[r,e]}function Uk(r,e,t,n,i){var a=t.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,n)-o,e=Math.min(e+s,i)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function Yk(r,e,t,n){var i=t[0],a=t[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-i/2,l=e.y+c/2-a/2;break;case"top":s=e.x+u/2-i/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+c+o;break;case"left":s=e.x-i-o,l=e.y+c/2-a/2;break;case"right":s=e.x+u+o,l=e.y+c/2-a/2}return[s,l]}function t0(r){return r==="center"||r==="middle"}function Zk(r,e,t){var n=sd(r).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=ao(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=ve(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function Yl(r){pt(cb),r.registerComponentModel(kk),r.registerComponentView(Gk),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Ke),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Ke)}var Xk=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},Hh=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},e.prototype._updateSelector=function(t){var n=t.selector,i=this.ecModel;n===!0&&(n=t.selector=["all","inverse"]),X(n)&&A(n,function(a,o){K(a)&&(a={type:a}),n[o]=fe(a,Xk(i,a.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<t.length;i++){var a=t[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var n=[],i=[];t.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var h=l.legendVisualProvider,f=h.getAllNames();t.isSeriesFiltered(l)||(i=i.concat(f)),f.length?n=n.concat(f):c=!0}else c=!0;c&&od(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=re(),s=J(a,function(l){return(K(l)||Se(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Le(l,this,this.ecModel))},this);this._data=ze(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;A(a,function(o){n[o.get("name")]=!1})}n[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var n=this.option.selected;n.hasOwnProperty(t)||(n[t]=!0),this[n[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,n=this.option.selected;A(t,function(i){n[i.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,n=this.option.selected;A(t,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},e.prototype.isSelected=function(t){var n=this.option.selected;return!(n.hasOwnProperty(t)&&!n[t])&&de(this._availableNames,t)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:j.size.m,align:"auto",backgroundColor:j.color.transparent,borderColor:j.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:j.color.disabled,inactiveBorderColor:j.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:j.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miter
17Limit:"inherit"},textStyle:{color:j.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:j.color.tertiary,borderWidth:1,borderColor:j.color.border},emphasis:{selectorLabel:{show:!0,color:j.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e})(ge),hi=Pe,$h=A,Jo=Ee,yb=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new Jo),this.group.add(this._selectorGroup=new Jo),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,n,i,l,s,u);var c=Od(t,i).refContainer,h=t.getBoxLayoutParams(),f=t.get("padding"),v=Li(h,c,f),p=this.layoutInner(t,o,v,a,l,u),m=Li(me({width:p.width,height:p.height},h),c,f);this.group.x=m.x-p.x,this.group.y=m.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Lk(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,n,i,a,o,s,l){var u=this.getContentGroup(),c=re(),h=n.get("selectedMode"),f=n.get("triggerEvent"),v=[];i.eachRawSeries(function(p){!p.get("legendHoverLink")&&v.push(p.id)}),$h(n.getData(),function(p,m){var y=this,g=p.get("name");if(!this.newlineDisabled&&(g===""||g===` 18`)){var x=new Jo;x.newline=!0,u.add(x);return}var b=i.getSeriesByName(g)[0];if(!c.get(g))if(b){var _=b.getData(),S=_.getVisual("legendLineStyle")||{},w=_.getVisual("legendIcon"),T=_.getVisual("style"),D=this._createItem(b,g,m,p,n,t,S,T,w,h,a);D.on("click",hi(r0,g,null,a,v)).on("mouseover",hi(Gh,b.name,null,a,v)).on("mouseout",hi(Wh,b.name,null,a,v)),i.ssr&&D.eachChild(function(L){var M=ve(L);M.seriesIndex=b.seriesIndex,M.dataIndex=m,M.ssrType="legend"}),f&&D.eachChild(function(L){y.packEventData(L,n,b,m,g)}),c.set(g,!0)}else i.eachRawSeries(function(L){var M=this;if(!c.get(g)&&L.legendVisualProvider){var C=L.legendVisualProvider;if(!C.containName(g))return;var I=C.indexOfName(g),k=C.getItemVisual(I,"style"),R=C.getItemVisual(I,"legendIcon"),O=Qt(k.fill);O&&O[3]===0&&(O[3]=.2,k=H(H({},k),{fill:no(O,"rgba")}));var z=this._createItem(L,g,m,p,n,t,{},k,R,h,a);z.on("click",hi(r0,null,g,a,v)).on("mouseover",hi(Gh,null,g,a,v)).on("mouseout",hi(Wh,null,g,a,v)),i.ssr&&z.eachChild(function(P){var B=ve(P);B.seriesIndex=L.seriesIndex,B.dataIndex=m,B.ssrType="legend"}),f&&z.eachChild(function(P){M.packEventData(P,n,L,m,g)}),c.set(g,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},e.prototype.packEventData=function(t,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};ve(t).eventData=s},e.prototype._createSelector=function(t,n,i,a,o){var s=this.getSelectorGroup();$h(t,function(u){var c=u.type,h=new Je({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(h);var f=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);Il(h,{normal:f,emphasis:v},{defaultText:u.title}),Us(h)})},e.prototype._createItem=function(t,n,i,a,o,s,l,u,c,h,f){var v=t.visualDrawType,p=o.get("itemWidth"),m=o.get("itemHeight"),y=o.isSelected(n),g=a.get("symbolRotate"),x=a.get("symbolKeepAspect"),b=a.get("icon");c=b||c||"roundRect";var _=jk(c,a,l,u,v,y,f),S=new Jo,w=a.getModel("textStyle");if(ne(t.getLegendIcon)&&(!b||b==="inherit"))S.add(t.getLegendIcon({itemWidth:p,itemHeight:m,icon:c,iconRotate:g,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:x}));else{var T=b==="inherit"&&t.getData().getVisual("symbol")?g==="inherit"?t.getData().getVisual("symbolRotate"):g:0;S.add(qk({itemWidth:p,itemHeight:m,icon:c,iconRotate:T,itemStyle:_.itemStyle,symbolKeepAspect:x}))}var D=s==="left"?p+5:-5,L=s,M=o.get("formatter"),C=n;K(M)&&M?C=M.replace("{name}",n??""):ne(M)&&(C=M(n));var I=y?w.getTextColor():a.get("inactiveColor");S.add(new Je({style:Gn(w,{text:C,x:D,y:m/2,fill:I,align:L,verticalAlign:"middle"},{inheritColor:I})}));
18var k=new Ce({shape:S.getBoundingRect(),style:{fill:"transparent"}}),R=a.getModel("tooltip");return R.get("show")&&Al({el:k,componentModel:o,itemName:n,itemTooltipOption:R.option}),S.add(k),S.eachChild(function(O){O.silent=!0}),k.silent=!h,this.getContentGroup().add(S),Us(S),S.__legendDataIndex=i,S},e.prototype.layoutInner=function(t,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Aa(t.get("orient"),l,t.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),h=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Aa("horizontal",u,t.get("selectorItemGap",!0));var f=u.getBoundingRect(),v=[-f.x,-f.y],p=t.get("selectorButtonGap",!0),m=t.getOrient().index,y=m===0?"width":"height",g=m===0?"height":"width",x=m===0?"y":"x";s==="end"?v[m]+=c[y]+p:h[m]+=f[y]+p,v[1-m]+=c[g]/2-f[g]/2,u.x=v[0],u.y=v[1],l.x=h[0],l.y=h[1];var b={x:0,y:0};return b[y]=c[y]+p+f[y],b[g]=Math.max(c[g],f[g]),b[x]=Math.min(0,f[x]+v[1-m]),b}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e})(Bt);function jk(r,e,t,n,i,a,o){function s(y,g){y.lineWidth==="auto"&&(y.lineWidth=g.lineWidth>0?2:0),$h(y,function(x,b){y[b]==="inherit"&&(y[b]=g[b])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?n.decal:wh(h,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:t).opacity),s(u,n);var f=e.getModel("lineStyle"),v=f.getLineStyle();if(s(v,t),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!a){var p=e.get("inactiveBorderWidth"),m=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&m?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),v.stroke=f.get("inactiveColor"),v.lineWidth=f.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function qk(r){var e=r.icon||"roundRect",t=Kr(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill=j.color.neutral00,t.style.lineWidth=2),t}function r0(r,e,t,n){Wh(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r??e}),Gh(r,e,t,n)}function xb(r){for(var e=r.getZr().storage.getDisplayList(),t,n=0,i=e.length;n<i&&!(t=e[n].states.emphasis);)n++;return t&&t.hoverLayer}function Gh(r,e,t,n){xb(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:n})}function Wh(r,e,t,n){xb(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:n})}function Kk(r){var e=r.findComponents({mainType:"legend"});e&&e.length&&r.filterSeries(function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0})}function aa(r,e,t){var n=r==="allSelect"||r==="inverseSelect",i={},a=[];t.eachComponent({mainType:"legend",query:e},function(s){n?s[r]():s[r](e.name),n0(s,i),a.push(s.componentIndex)});var o={};return t.eachComponent("legend",function(s){A(i,function(l,u){s[l?"select":"unSelect"](u)}),n0(s,o)}),n?{selected:o,legendIndex:a}:{name:e.name,selected:o}}function n0(r,e){var t=e||{};return A(r.getData(),function(n){var i=n.get("name");if(!(i===` 19`||i==="")){var a=r.isSelected(i);Et(t,i)?t[i]=t[i]&&a:t[i]=a}}),t}function Qk(r){r.registerAction("legendToggleSelect","legendselectchanged",Pe(aa,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Pe(aa,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Pe(aa,"inverseSelect")),r.registerAction("legendSelect","legendselected",Pe(aa,"select")),r.registerAction("legendUnSelect","legendunselected",Pe(aa,"unSelect"))}function bb(r){r.registerComponentModel(Hh),r.registerComponentView(yb),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,Kk),r.registerSubTypeDefaulter("legend",function(){return"plain"}),Qk(r)}var Jk=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,n,i){var a=zi(t);r.prototype.init.call(this,t,n,i),i0(this,t,a)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),i0(this,this.option,t)},e.type="legend.scroll",e.defaultOption=Ol(Hh.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:j.color.accent50,pageIconInactiveColor:j.color.accent10,pageIconSize:15,pageTextStyle:{color:j.color.tert
19iary},animationDurationUpdate:800}),e})(Hh);function i0(r,e,t){var n=r.getOrient(),i=[1,1];i[n.index]=0,qr(e,t,{type:"box",ignoreSize:!!i})}var a0=Ee,pc=["width","height"],gc=["x","y"],e5=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new a0),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new a0)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,n,i,a,o,s,l){var u=this;r.prototype.renderInner.call(this,t,n,i,a,o,s,l);var c=this._controllerGroup,h=n.get("pageIconSize",!0),f=X(h)?h:[h,h];p("pagePrev",0);var v=n.getModel("pageTextStyle");c.add(new Je({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(m,y){var g=m+"DataIndex",x=bd(n.get("pageIcons",!0)[n.getOrient().name][y],{onclick:ee(u._pageGo,u,g,n,a)},{x:-f[0]/2,y:-f[1]/2,width:f[0],height:f[1]});x.name=m,c.add(x)}},e.prototype.layoutInner=function(t,n,i,a,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,c=pc[u],h=gc[u],f=pc[1-u],v=gc[1-u];o&&Aa("horizontal",l,t.get("selectorItemGap",!0));var p=t.get("selectorButtonGap",!0),m=l.getBoundingRect(),y=[-m.x,-m.y],g=ue(i);o&&(g[c]=i[c]-m[c]-p);var x=this._layoutContentAndController(t,a,g,u,c,f,v,h);if(o){if(s==="end")y[u]+=x[c]+p;else{var b=m[c]+p;y[u]-=b,x[h]-=b}x[c]+=m[c]+p,y[1-u]+=x[v]+x[f]/2-m[f]/2,x[f]=Math.max(x[f],m[f]),x[v]=Math.min(x[v],m[v]+y[1-u]),l.x=y[0],l.y=y[1],l.markRedraw()}return x},e.prototype._layoutContentAndController=function(t,n,i,a,o,s,l,u){var c=this.getContentGroup(),h=this._containerGroup,f=this._controllerGroup;Aa(t.get("orient"),c,t.get("itemGap"),a?i.width:null,a?null:i.height),Aa("horizontal",f,t.get("pageButtonItemGap",!0));var v=c.getBoundingRect(),p=f.getBoundingRect(),m=this._showController=v[o]>i[o],y=[-v.x,-v.y];n||(y[a]=c[u]);var g=[0,0],x=[-p.x,-p.y],b=te(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(m){var _=t.get("pageButtonPosition",!0);_==="end"?x[a]+=i[o]-p[o]:g[a]+=p[o]+b}x[1-a]+=v[s]/2-p[s]/2,c.setPosition(y),h.setPosition(g),f.setPosition(x);var S={x:0,y:0};if(S[o]=m?i[o]:v[o],S[s]=Math.max(v[s],p[s]),S[l]=Math.min(0,p[l]+x[1-a]),h.__rectSize=i[o],m){var w={x:0,y:0};w[o]=Math.max(i[o]-p[o]-b,0),w[s]=S[s],h.setClipPath(new Ce({shape:w})),h.__rectSize=w[o]}else f.eachChild(function(D){D.attr({invisible:!0,silent:!0})});var T=this._getPageInfo(t);return T.pageIndex!=null&&vt(c,{x:T.contentPosition[0],y:T.contentPosition[1]},m?t:null),this._updatePageInfoView(t,T),S},e.prototype._pageGo=function(t,n,i){var a=this._getPageInfo(n)[t];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var i=this._controllerGroup;A(["pagePrev","pageNext"],function(c){var h=c+"DataIndex",f=n[h]!=null,v=i.childOfName(c);v&&(v.setStyle("fill",f?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),v.cursor=f?"pointer":"default")});var a=i.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",K(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=t.getOrient().index,s=pc[o],l=gc[o],u=this._findTargetItemIndex(n),c=i.children(),h=c[u],f=c.length,v=f?1:0,p={contentPosition:[i.x,i.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var m=_(h);p.contentPosition[o]=-m.s;for(var y=u+1,g=m,x=m,b=null;y<=f;++y)b=_(c[y]),(!b&&x.e>g.s+a||b&&!S(b,g.s))&&(x.i>g.i?g=x:g=b,g&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=g.i),++p.pageCount)),x=b;for(var y=u-1,g=m,x=m,b=null;y>=-1;--y)b=_(c[y]),(!b||!S(x,b.s))&&g.i<x.i&&(x=g,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=g.i),++p.pageCount,++p.pageIndex),g=b;return p;
19function _(w){if(w){var T=w.getBoundingRect(),D=T[l]+w[l];return{s:D,e:D+T[s],i:w.__legendDataIndex}}}function S(w,T){return w.e>=T&&w.s<=T+a}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===t&&(n=s)}),n??a},e.type="legend.scroll",e})(yb);function t5(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function r5(r){pt(bb),r.registerComponentModel(Jk),r.registerComponentView(e5),t5(r)}function Zl(r){pt(bb),pt(r5)}var n5=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=Ol(dl.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e})(dl),lf=Me();function i5(r,e,t){lf(r).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=t)})}function a5(r,e){for(var t=lf(r).coordSysRecordMap,n=t.keys(),i=0;i<n.length;i++){var a=n[i],o=t.get(a),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||_b(t,o))}}}function _b(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function o5(r,e){var t={model:e,containsPoint:Pe(l5,e),dispatchAction:Pe(s5,r),dataZoomInfoMap:null,controller:null},n=t.controller=new XL(r.getZr());return A(["pan","zoom","scrollMove"],function(i){n.on(i,function(a){var o=[];t.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function s5(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function l5(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function u5(r,e,t){var n,i="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return r.each(function(s){var l=s.model,u=l.get("disabled",!0)?!1:l.get("zoomLock",!0)?"move":!0;a[i+u]>a[i+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:t,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function c5(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=lf(t),i=n.coordSysRecordMap||(n.coordSysRecordMap=re());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=hb(a);A(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,o5(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=re());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){_b(i,a);return}var c=u5(l,a,t);o.enable(c.controlType,c.opt),Vl(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var h5=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,i){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),i5(i,t,{pan:ee(mc.pan,this),zoom:ee(mc.zoom,this),scrollMove:ee(mc.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){a5(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e})(db),mc={zoom:function(r,e,t,n){var i=this.range,a=i.slice(),o=r.axisModels[0];if(o){var s=yc[e](null,[n.originX,n.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
19if(eo(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:o0(function(r,e,t,n,i,a){var o=yc[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:o0(function(r,e,t,n,i,a){var o=yc[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,t);return o.signal*(r[1]-r[0])*a.scrollDelta})};function o0(r){return function(e,t,n,i){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,n,i);if(eo(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var yc={grid:function(r,e,t,n,i){var a=t.axis,o={},s=i.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,e,t,n,i){var a=t.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,e,t,n,i){var a=t.axis,o=i.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function d5(r){fb(r),r.registerComponentModel(n5),r.registerComponentView(h5),c5(r)}var f5=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Ol(dl.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:j.color.accent10,borderRadius:0,backgroundColor:j.color.transparent,dataBackground:{lineStyle:{color:j.color.accent30,width:.5},areaStyle:{color:j.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:j.color.accent40,width:.5},areaStyle:{color:j.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:j.color.neutral00,borderColor:j.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:j.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:j.color.tertiary},brushSelect:!0,brushStyle:{color:j.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:j.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e})(dl),oa=Ce,v5=1,xc=30,p5=7,sa="horizontal",s0="vertical",g5=5,m5=["line","bar","candlestick","scatter"],y5={easing:"cubicOut",duration:100,delay:0},x5=(function(r){$(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=ee(this._onBrush,this),this._onBrushEnd=ee(this._onBrushEnd,this)},e.prototype.render=function(t,n,i,a){if(r.prototype.render.apply(this,arguments),Vl(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}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Js(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new Ee;
19this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,i=t.get("brushSelect"),a=i?p5:0,o=Od(t,n).refContainer,s=this._findCoordRect(),l=t.get("defaultLocationEdgeGap",!0)||0,u=this._orient===sa?{right:o.width-s.x-s.width,top:o.height-xc-l-a,width:s.width,height:xc}:{right:l,top:s.y,width:xc,height:s.height},c=zi(t.option);A(["right","top","width","height"],function(f){c[f]==="ph"&&(c[f]=u[f])});var h=Li(c,o);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===s0&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===sa&&!o?{scaleY:l?1:-1,scaleX:1}:i===sa&&o?{scaleY:l?1:-1,scaleX:-1}:i===s0&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=n.x-u.x,t.y=n.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=t.get("brushSelect");i.add(new oa({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new oa({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:ee(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,i=this._shadowSize||[],a=t.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var h=o.getDataExtent(t.thisDim),f=o.getDataExtent(l),v=(f[1]-f[0])*.3;f=[f[0]-v,f[1]+v];var p=[0,n[1]],m=[0,n[0]],y=[[n[0],0],[0,0]],g=[],x=m[1]/Math.max(1,o.count()-1),b=n[0]/(h[1]-h[0]),_=t.thisAxis.type==="time",S=-x,w=Math.round(o.count()/n[0]),T;o.each([t.thisDim,l],function(I,k,R){if(w>0&&R%w){_||(S+=x);return}S=_?(+I-h[0])*b:S+x;var O=k==null||isNaN(k)||k==="",z=O?0:Ne(k,f,p,!0);O&&!T&&R?(y.push([y[y.length-1][0],0]),g.push([g[g.length-1][0],0])):!O&&T&&(y.push([S,0]),g.push([S,0])),O||(y.push([S,z]),g.push([S,z])),T=O}),u=this._shadowPolygonPts=y,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var D=this.dataZoomModel;function L(I){var k=D.getModel(I?"selectedDataBackground":"dataBackground"),R=new Ee,O=new Cl({shape:{points:u},segmentIgnoreThreshold:1,style:k.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),z=new Ml({shape:{points:c},segmentIgnoreThreshold:1,style:k.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return R.add(O),R.add(z),R}for(var M=0;M<3;M++){var C=L(M===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();A(l,function(u){if(!i&&!(n!==!0&&de(m5,u.get("type"))<0)){var c=a.getComponent(Vr(o),s).axis,h=b5(o),f,v=u.coordinateSystem;h!=null&&v.getOtherAxis&&(f=v.getOtherAxis(c).inverse),h=u.getData().mapDimension(h);var p=u.getData().mapDimension(o);i={thisAxis:c,series:u,thisDim:p,otherDim:h,otherAxisInverse:f}}},this)},this),i}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,h=l.get("brushSelect"),f=n.filler=new oa({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(f),o.add(new oa({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c}
19,style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:v5,fill:j.color.transparent}})),A([0,1],function(b){var _=l.get("handleIcon");!tl[_]&&_.indexOf("path://")<0&&_.indexOf("image://")<0&&(_="path://"+_);var S=Kr(_,-1,0,2,2,null,!0);S.attr({cursor:_5(this._orient),draggable:!0,drift:ee(this._onDragMove,this,b),ondragend:ee(this._onDragEnd,this),onmouseover:ee(this._showDataInfo,this,!0),onmouseout:ee(this._showDataInfo,this,!1),z2:5});var w=S.getBoundingRect(),T=l.get("handleSize");this._handleHeight=He(T,this._size[1]),this._handleWidth=w.width/w.height*this._handleHeight,S.setStyle(l.getModel("handleStyle").getItemStyle()),S.style.strokeNoScale=!0,S.rectHover=!0,S.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Us(S);var D=l.get("handleColor");D!=null&&(S.style.fill=D),o.add(i[b]=S);var L=l.getModel("textStyle"),M=l.get("handleLabel")||{},C=M.show||!1;t.add(a[b]=new Je({silent:!0,invisible:!C,style:Gn(L,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:L.getTextColor(),font:L.getFont()}),z2:10}))},this);var v=f;if(h){var p=He(l.get("moveHandleSize"),s[1]),m=n.moveHandle=new Ce({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),y=p*.8,g=n.moveHandleIcon=Kr(l.get("moveHandleIcon"),-y/2,-y/2,y,y,j.color.neutral00,!0);g.silent=!0,g.y=s[1]+p/2-.5,m.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var x=Math.min(s[1]/2,Math.max(p,10));v=n.moveZone=new Ce({invisible:!0,shape:{y:s[1]-x,height:p+x}}),v.on("mouseover",function(){u.enterEmphasis(m)}).on("mouseout",function(){u.leaveEmphasis(m)}),o.add(m),o.add(g),o.add(v)}v.attr({draggable:!0,cursor:"default",drift:ee(this._onDragMove,this,"all"),ondragstart:ee(this._showDataInfo,this,!0),ondragend:ee(this._onDragEnd,this),onmouseover:ee(this._showDataInfo,this,!0),onmouseout:ee(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[Ne(t[0],[0,100],n,!0),Ne(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];eo(n,a,o,i.get("zoomLock")?"all":t,s.minSpan!=null?Ne(s.minSpan,l,o,!0):null,s.maxSpan!=null?Ne(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=va([Ne(a[0],o,l,!0),Ne(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var n=this._displayables,i=this._handleEnds,a=va(i.slice()),o=this._size;A([0,1],function(v){var p=n.handles[v],m=this._handleHeight;p.attr({scaleX:m/2,scaleY:m/2,x:i[v]+(v?-1:1),y:o[1]/2-m/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;c<l.length;c++){var h=l[c],f=h.getClipPath();f||(f=new Ce,h.setClipPath(f)),f.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var n=this.dataZoomModel,i=this._displayables,a=i.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,h=t?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(h[0],u),this._formatLabel(h[1],u)]}}var f=va(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(p){var m=Bm(i.handles[p].parent,this.group),y=Nm(p===0?"right":"left",m),g=this._handleWidth/2+g5,x=$a([f[p]+(p===0?-g:g),this._size[1]/2],m);a[p].setStyle({x:x[0],y:x[1],verticalAlign:o===sa?"middle":y,align:o===sa?y:"center",text:s[p]})}},e.prototype._formatLabel=function(t,n){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=t==null||isNaN(t)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return ne(a)?a(t,s):K(a)?a.replace("{value}",s):s},e.prototype._showDataInfo=function(t){var n=this.dataZoomModel.get("handleLabel")||{},i=n.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=a.get("show")||!1,s=t||this._dragging?o:i,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},e.prototype._onDragMove=function(t,n,i,a){this._dragging=!0,Mi(a.event);
19var o=this._displayables.sliderGroup.getLocalTransform(),s=$a([n,i],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>n[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,i=t.offsetY;this._brushStart=new be(n,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();eo(0,l,o,0,u.minSpan!=null?Ne(u.minSpan,s,o,!0):null,u.maxSpan!=null?Ne(u.maxSpan,s,o,!0):null),this._range=va([Ne(l[0],o,s,!0),Ne(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Mi(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new oa({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,n),c=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:h[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?y5:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=hb(this.dataZoomModel).infoList;if(!t&&n.length){var i=n[0].model.coordinateSystem;t=i.getRect&&i.getRect()}if(!t){var a=this.api.getWidth(),o=this.api.getHeight();t={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return t},e.type="dataZoom.slider",e})(db);function b5(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function _5(r){return r==="vertical"?"ns-resize":"ew-resize"}function w5(r){r.registerComponentModel(f5),r.registerComponentView(x5),fb(r)}function Xl(r){pt(d5),pt(w5)}function l0(r,e,t){var n=yr.createCanvas(),i=e.getWidth(),a=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",r)),n.width=i*t,n.height=a*t,n}var bc=(function(r){$(e,r);function e(t,n,i){var a=r.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||Bs,typeof t=="string"?o=l0(t,n,i):Q(t)&&(o=t,t=o.id),a.id=t,a.dom=o;var s=o.style;return s&&(C0(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=l0("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new se(0,0,0,0);
19function c(x){if(!(!x.isFinite()||x.isZero()))if(o.length===0){var b=new se(0,0,0,0);b.copy(x),o.push(b)}else{for(var _=!1,S=1/0,w=0,T=0;T<o.length;++T){var D=o[T];if(D.intersect(x)){var L=new se(0,0,0,0);L.copy(D),L.union(x),o[T]=L,_=!0;break}else if(l){u.copy(x),u.union(D);var M=x.width*x.height,C=D.width*D.height,I=u.width*u.height,k=I-M-C;k<S&&(S=k,w=T)}}if(l&&(o[w].union(x),_=!0),!_){var b=new se(0,0,0,0);b.copy(x),o.push(b)}l||(l=o.length>=s)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var f=t[h];if(f){var v=f.shouldBePainted(i,a,!0,!0),p=f.__isRendered&&(f.__dirty&ht||!v)?f.getPrevPaintRect():null;p&&c(p);var m=v&&(f.__dirty&ht||!f.__isRendered)?f.getPaintRect():null;m&&c(m)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var f=n[h],v=f&&f.shouldBePainted(i,a,!0,!0);if(f&&(!v||!f.__zr)&&f.__isRendered){var p=f.getPrevPaintRect();p&&c(p)}}var y;do{y=!1;for(var h=0;h<o.length;){if(o[h].isZero()){o.splice(h,1);continue}for(var g=h+1;g<o.length;)o[h].intersect(o[g])?(y=!0,o[h].union(o[g]),o.splice(g,1)):g++;h++}}while(y);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=t+"px",o.height=n+"px"),a.width=t*i,a.height=n*i,s&&(s.width=t*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},e.prototype.clear=function(t,n,i){var a=this.dom,o=this.ctx,s=a.width,l=a.height;n=n||this.clearColor;var u=this.motionBlur&&!t,c=this.lastFrameAlpha,h=this.dpr,f=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/h,l/h));var v=this.domBack;function p(m,y,g,x){if(o.clearRect(m,y,g,x),n&&n!=="transparent"){var b=void 0;if(vl(n)){var _=n.global||n.__width===g&&n.__height===x;b=_&&n.__canvasGradient||bh(o,n,{x:0,y:0,width:g,height:x}),n.__canvasGradient=b,n.__width=g,n.__height=x}else s_(n)&&(n.scaleX=n.scaleX||h,n.scaleY=n.scaleY||h,b=_h(o,n,{dirty:function(){f.setUnpainted(),f.painter.refresh()}}));o.save(),o.fillStyle=b||n,o.fillRect(m,y,g,x),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(v,m,y,g,x),o.restore())}!i||u?p(0,0,s,l):i.length&&A(i,function(m){p(m.x*h,m.y*h,m.width*h,m.height*h)})},e})(zt),u0=1e5,Mn=314159,es=.01,S5=.001;function T5(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function C5(r,e){var t=document.createElement("div");return t.style.cssText=["position:relative","width:"+r+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",t}var M5=(function(){function r(e,t,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=n=H({},n||{}),this.dpr=n.devicePixelRatio||Bs,this._singleCanvas=a,this.root=e;var o=e.style;o&&(C0(e),e.innerHTML=""),this.storage=t;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var c=e,h=c.width,f=c.height;n.width!=null&&(h=n.width),n.height!=null&&(f=n.height),this.dpr=n.devicePixelRatio||1,c.width=h*this.dpr,c.height=f*this.dpr,this._width=h,this._height=f;var v=new bc(c,this,this.dpr);v.__builtin__=!0,v.initContext(),l[Mn]=v,v.zlevel=Mn,s.push(Mn),this._domRoot=e}else{this._width=Fo(e,0,n),this._height=Fo(e,1,n);var u=this._domRoot=C5(this._width,this._height);e.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=a===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),!!t){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<t;o++){var s=e[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(u0)),a||(a=n.ctx,a.save()),Rn(a,s,i,o===t-1))}
19a&&a.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(u0)},r.prototype.paintOne=function(e,t){Vy(e,t)},r.prototype._paintList=function(e,t,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(e);var a=this._doPaintList(e,t,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;ks(function(){l._paintList(e,t,n,i)})}}},r.prototype._compositeManually=function(){var e=this.getLayer(Mn).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(i){i.virtual&&e.drawImage(i.dom,0,0,t,n)})},r.prototype._doPaintList=function(e,t,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&a.push(u)}for(var c=!0,h=!1,f=function(m){var y=a[m],g=y.ctx,x=o&&y.createRepaintRects(e,t,v._width,v._height),b=n?y.__startIndex:y.__drawIndex,_=!n&&y.incremental&&Date.now,S=_&&Date.now(),w=y.zlevel===v._zlevelList[0]?v._backgroundColor:null;if(y.__startIndex===y.__endIndex)y.clear(!1,w,x);else if(b===y.__startIndex){var T=e[b];(!T.incremental||!T.notClear||n)&&y.clear(!1,w,x)}b===-1&&(console.error("For some unknown reason. drawIndex is -1"),b=y.__startIndex);var D,L=function(k){var R={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(D=b;D<y.__endIndex;D++){var O=e[D];if(O.__inHover&&(h=!0),i._doPaintEl(O,y,o,k,R,D===y.__endIndex-1),_){var z=Date.now()-S;if(z>15)break}}R.prevElClipPaths&&g.restore()};if(x)if(x.length===0)D=y.__endIndex;else for(var M=v.dpr,C=0;C<x.length;++C){var I=x[C];g.save(),g.beginPath(),g.rect(I.x*M,I.y*M,I.width*M,I.height*M),g.clip(),L(I),g.restore()}else g.save(),L(),g.restore();y.__drawIndex=D,y.__drawIndex<y.__endIndex&&(c=!1)},v=this,p=0;p<a.length;p++)f(p);return ie.wxa&&A(this._layers,function(m){m&&m.ctx&&m.ctx.draw&&m.ctx.draw()}),{finished:c,needsRefreshHover:h}},r.prototype._doPaintEl=function(e,t,n,i,a,o){var s=t.ctx;if(n){var l=e.getPaintRect();(!i||l&&l.intersect(i))&&(Rn(s,e,a,o),e.setPrevPaintRect(l))}else Rn(s,e,a,o)},r.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Mn);var n=this._layers[e];return n||(n=new bc("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?fe(n,this._layerConfig[e],!0):this._layerConfig[e-es]&&fe(n,this._layerConfig[e-es],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},r.prototype.insertLayer=function(e,t){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,l=-1;if(!n[e]&&T5(t)){if(a>0&&e>i[0]){for(l=0;l<a-1&&!(i[l]<e&&i[l+1]>e);l++);s=n[i[l]]}if(i.splice(l+1,0,e),n[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];e.call(t,this._layers[a],a)}},r.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&e.call(t,o,a)}},r.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||e.call(t,o,a)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(h,f){h.__dirty=h.__used=!1});function t(h){a&&(a.__endIndex!==h&&(a.__dirty=!0),a.__endIndex=h)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var i=e[n];if(i.zlevel!==e[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,l;for(l=0;l<e.length;l++){var i=e[l],u=i.zlevel,c=void 0;s!==u&&(s=u,o=0),i.incremental?(c=this.getLayer(u+S5,this._needsManuallyCompositing),
19c.incremental=!0,o=1):c=this.getLayer(u+(o>0?es:0),this._needsManuallyCompositing),c.__builtin__||Kh("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),a=c),i.__dirty&ht&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(h,f){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,A(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?fe(n[e],t,!0):n[e]=t;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===e||a===e+es){var o=this._layers[a];fe(o,n[e],!0)}}}},r.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,i=t[e];i&&(i.dom.parentNode.removeChild(i.dom),delete t[e],n.splice(de(n,e),1))},r.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(e!=null&&(i.width=e),t!=null&&(i.height=t),e=Fo(a,0,i),t=Fo(a,1,i),n.style.display="",this._width!==e||t!==this._height){n.style.width=e+"px",n.style.height=t+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this.getLayer(Mn).resize(e,t)}return this},r.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[Mn].dom;var t=new bc("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 i=t.dom.width,a=t.dom.height;this.eachLayer(function(h){h.__builtin__?n.drawImage(h.dom,0,0,i,a):h.renderToCanvas&&(n.save(),h.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];Rn(n,c,o,l===u-1)}return t.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r})();function jl(r){r.registerPainter("canvas",M5)}pt([Gl,Ul,Yl,Zl,Xl,jl]);const ts={backgroundColor:"transparent",textStyle:{color:"#94a3b8"},grid:{top:60,right:16,bottom:50,left:60,containLabel:!1},xAxis:{type:"category",axisLine:{lineStyle:{color:"#334155"}},axisTick:{show:!1},axisLabel:{color:"#64748b",fontSize:10},splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#64748b",fontSize:10},splitLine:{lineStyle:{color:"#1e293b",type:"dashed"}}},tooltip:{trigger:"axis",backgroundColor:"#1e293b",borderColor:"#334155",textStyle:{color:"#e2e8f0",fontSize:12}},legend:{top:10,textStyle:{color:"#94a3b8",fontSize:11},itemWidth:12,itemHeight:8}},D5=({option:r,height:e=300})=>{const t=je(null),n=je(null);return he(()=>{if(!t.current)return;n.current||(n.current=$l(t.current)),n.current.setOption(r,!0);const i=()=>n.current?.resize();return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[r]),he(()=>()=>{n.current?.dispose(),n.current=null},[]),d("div",{ref:t,style:{width:"100%",height:`${e}px`}})},A5=({history:r})=>{const[e,t]=E([]),n=new Set;for(const u of r)u.spiders&&Object.keys(u.spiders).forEach(c=>n.add(c));const i=Array.from(n).sort();if(e.length===0&&i.length>0){const u={};for(const h of r)if(h.spiders)for(const[f,v]of Object.entries(h.spiders))u[f]=(u[f]||0)+Number(v);const c=Object.entries(u).sort((h,f)=>f[1]-h[1]).slice(0,5).map(([h])=>h);t(c)}const a=u=>{e.includes(u)?t(e.filter(c=>c!==u)):t([...e,u])},o={baidu:"#3b82f6",google:"#10b981",bing:"#f59e0b",sogou:"#8b5cf6",yandex:"#ef4444",bytespider:"#ec4899",360:"#14b8a6",shenma:"#f97316"},s=r.slice(),l={...ts,tooltip:{...ts.tooltip,formatter:u=>{let c=`<div style="margin-bottom:4px">${u[0].axisValue}</div>`;return u.forEach(h=>{c+=`<div><span style="color:${h.color}">â</span> ${Hr[h.seriesName]||h.seriesName}: <b>
19${h.value.toLocaleString()}</b></div>`}),c}},xAxis:{...ts.xAxis,data:s.map(u=>u.date.slice(5))},yAxis:{...ts.yAxis},series:e.map(u=>({name:u,type:"line",data:s.map(c=>c.spiders?.[u]||0),smooth:!0,symbol:"circle",symbolSize:4,lineStyle:{color:o[u]||"#94a3b8",width:2},itemStyle:{color:o[u]||"#94a3b8"}}))};return d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[d("div",{class:"px-3 py-2 sm:px-4 sm:py-3 border-b border-slate-700",children:[d("div",{class:"flex items-center justify-between mb-3",children:[d("div",{class:"flex items-center gap-2",children:[d("span",{class:"i-heroicons-chart-bar w-4 h-4 text-slate-400"}),d("h3",{class:"font-medium text-white text-sm",children:"èèåå²è¶å¿"})]}),d("span",{class:"text-slate-500 text-xs",children:["è¿ ",r.length," 天"]})]}),d("div",{class:"flex flex-wrap gap-2",children:i.map(u=>{const c=e.includes(u),h=o[u]||"#94a3b8";return d("button",{onClick:()=>a(u),class:`px-2 py-1 rounded text-xs transition-all ${c?"bg-slate-700 text-white border border-slate-600":"bg-slate-900/50 text-slate-500 border border-slate-700/50 hover:border-slate-600"}`,children:[d("span",{class:"inline-block w-2 h-2 rounded-full mr-1",style:`background-color: ${h}`}),Hr[u]||u]},u)})})]}),e.length===0?d("div",{class:"p-8 text-center",children:[d("span",{class:"i-heroicons-chart-bar-square w-10 h-10 text-slate-600 mx-auto block mb-3"}),d("p",{class:"text-slate-400 text-sm",children:"è¯·éæ©è¦æ¥ççèè"})]}):d("div",{class:"p-3 sm:p-4",children:[d(D5,{option:l,height:280}),d("div",{class:"mt-4 pt-4 border-t border-slate-700/50 grid grid-cols-2 sm:grid-cols-3 gap-2",children:e.map(u=>{const c=o[u]||"#94a3b8",h=s.reduce((v,p)=>v+Number(p.spiders?.[u]||0),0),f=Math.round(h/s.length);return d("div",{class:"flex items-center gap-2 text-xs",children:[d("span",{class:"w-3 h-3 rounded-full flex-shrink-0",style:`background-color: ${c}`}),d("div",{class:"flex-1 min-w-0",children:[d("div",{class:"text-slate-400 truncate",children:Hr[u]||u}),d("div",{class:"text-white",children:["æ»è®¡ ",h.toLocaleString()," / å ",f.toLocaleString()]})]})]},u)})})]})]})},L5=({domain:r,data:e,onBack:t})=>{const[n,i]=E("overview"),a=e.spiderTotal||0;return d("div",{class:"space-y-4 sm:space-y-6",children:[d("div",{class:"flex items-center justify-between",children:d("button",{onClick:t,class:"inline-flex items-center gap-2 text-slate-400 hover:text-white transition-colors text-sm",children:[d("span",{class:"i-heroicons-arrow-left w-4 h-4"}),d("span",{children:"è¿åç«ç¹å表"})]})}),d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 p-4 sm:p-5",children:[d("div",{class:"flex items-center gap-3 mb-4",children:[d("div",{class:"w-10 h-10 bg-blue-600/20 rounded-lg flex items-center justify-center",children:d("span",{class:"i-heroicons-globe-alt w-5 h-5 text-blue-400"})}),d("div",{children:[d("h2",{class:"text-lg font-bold text-white",children:r}),d("p",{class:"text-slate-400 text-sm",children:"ç«ç¹è¯¦ç»ç»è®¡"})]})]}),d("div",{class:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[d("div",{class:"bg-slate-900/50 rounded-lg p-3 border border-slate-700/50",children:[d("div",{class:"text-slate-400 text-xs mb-1.5 text-center",children:"仿¥ PV"}),d("div",{class:"text-xl font-bold text-blue-400 mb-2 text-center",children:(e.today?.pv||0).toLocaleString()}),d("div",{class:"flex items-center justify-center gap-1.5 text-xs",children:[d("span",{class:"inline-flex items-center gap-0.5 px-1.5 py-0.5 bg-slate-700/50 rounded text-slate-400",children:[d("span",{class:"i-heroicons-device-phone-mobile w-3 h-3"}),(e.today?.mobilePv||0).toLocaleString()]}),d("span",{class:"inline-flex items-center gap-0.5 px-1.5 py-0.5 bg-slate-700/50 rounded text-slate-400",children:[d("span",{class:"i-heroicons-computer-desktop w-3 h-3"}),(e.today?.pcPv||0).toLocaleString()]})]})]}),d("div",{class:"bg-slate-900/50 rounded-lg p-3 border border-slate-700/50",children:[d("div",{class:"text-slate-400 text-xs mb-1.5 text-center",children:"仿¥ UV"}),d("div",{class:"text-xl font-bold text-green-400 mb-2 text-center",children:(e.today?.uv||0).toLocaleStr
19ing()}),d("div",{class:"flex items-center justify-center gap-1.5 text-xs",children:[d("span",{class:"inline-flex items-center gap-0.5 px-1.5 py-0.5 bg-slate-700/50 rounded text-slate-400",children:[d("span",{class:"i-heroicons-device-phone-mobile w-3 h-3"}),(e.today?.mobileUv||0).toLocaleString()]}),d("span",{class:"inline-flex items-center gap-0.5 px-1.5 py-0.5 bg-slate-700/50 rounded text-slate-400",children:[d("span",{class:"i-heroicons-computer-desktop w-3 h-3"}),(e.today?.pcUv||0).toLocaleString()]})]})]}),d("div",{class:"bg-slate-900/50 rounded-lg p-3 border border-slate-700/50",children:[d("div",{class:"text-slate-400 text-xs mb-1.5 text-center",children:"èè访é®"}),d("div",{class:"text-xl font-bold text-yellow-400 text-center",children:a.toLocaleString()})]})]})]}),e.history&&e.history.length>0&&d(A5,{history:e.history}),d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[d("div",{class:"flex border-b border-slate-700",children:[d("button",{onClick:()=>i("overview"),class:`flex-1 px-4 py-3 text-sm font-medium transition-colors ${n==="overview"?"text-white bg-slate-700/50 border-b-2 border-blue-500":"text-slate-400 hover:text-white hover:bg-slate-700/30"}`,children:[d("span",{class:"i-heroicons-chart-bar w-4 h-4 inline-block mr-1.5 align-text-bottom"}),"æ°æ®æ¦è§"]}),d("button",{onClick:()=>i("spider"),class:`flex-1 px-4 py-3 text-sm font-medium transition-colors ${n==="spider"?"text-white bg-slate-700/50 border-b-2 border-yellow-500":"text-slate-400 hover:text-white hover:bg-slate-700/30"}`,children:[d("span",{class:"i-heroicons-bug-ant w-4 h-4 inline-block mr-1.5 align-text-bottom"}),"èèåæ"]}),d("button",{onClick:()=>i("path"),class:`flex-1 px-4 py-3 text-sm font-medium transition-colors ${n==="path"?"text-white bg-slate-700/50 border-b-2 border-green-500":"text-slate-400 hover:text-white hover:bg-slate-700/30"}`,children:[d("span",{class:"i-heroicons-folder w-4 h-4 inline-block mr-1.5 align-text-bottom"}),"è·¯å¾åæ"]})]}),d("div",{class:"p-4",children:[n==="overview"&&d("div",{class:"space-y-4",children:e.history&&e.history.length>0?d("div",{class:"overflow-x-auto",children:d("table",{class:"w-full text-sm",children:[d("thead",{children:d("tr",{class:"text-slate-500 text-xs border-b border-slate-700",children:[d("th",{class:"text-left px-3 py-2 font-medium",children:"æ¥æ"}),d("th",{class:"text-right px-3 py-2 font-medium",children:"PV"}),d("th",{class:"text-right px-3 py-2 font-medium",children:"UV"}),d("th",{class:"text-right px-3 py-2 font-medium",children:"èè"}),d("th",{class:"text-right px-3 py-2 font-medium",children:"PV åå"})]})}),d("tbody",{children:e.history.slice().reverse().map((o,s)=>{const l=e.history.slice().reverse(),u=s<l.length-1?l[s+1].pv:o.pv,c=u>0?(o.pv-u)/u*100:0,h=c>0;return d("tr",{class:"border-b border-slate-700/50 hover:bg-slate-700/20",children:[d("td",{class:"px-3 py-2 text-slate-300",children:o.date}),d("td",{class:"px-3 py-2 text-right text-blue-400 whitespace-nowrap",children:[d("span",{class:"mr-1.5",children:o.pv.toLocaleString()}),d("span",{class:"inline-flex items-center gap-0.5 px-1.5 py-0.5 bg-slate-700/50 rounded text-slate-400 text-xs",children:[d("span",{class:"i-heroicons-device-phone-mobile w-3 h-3"}),Number(o.mobilePv||0).toLocaleString()]}),d("span",{class:"inline-flex items-center gap-0.5 px-1.5 py-0.5 bg-slate-700/50 rounded text-slate-400 text-xs ml-1",children:[d("span",{class:"i-heroicons-computer-desktop w-3 h-3"}),Number(o.pcPv||0).toLocaleString()]})]}),d("td",{class:"px-3 py-2 text-right text-green-400 whitespace-nowrap",children:[d("span",{class:"mr-1.5",children:o.uv.toLocaleString()}),d("span",{class:"inline-flex items-center gap-0.5 px-1.5 py-0.5 bg-slate-700/50 rounded text-slate-400 text-xs",children:[d("span",{class:"i-heroicons-device-phone-mobile w-3 h-3"}),Number(o.mobileUv||0).toLocaleString()]}),d("span",{class:"inline-flex items-center gap-0.5 px-1.5 py-0.5 bg-slate-700/50 rounded text-slate-400 text-xs ml-1",children:[d("span",{class:"i-heroicons-computer-desktop w-3 h-3"}
19),Number(o.pcUv||0).toLocaleString()]})]}),d("td",{class:"px-3 py-2 text-right text-yellow-400",children:o.spiderPv.toLocaleString()}),d("td",{class:"px-3 py-2 text-right",children:s<l.length-1&&d("span",{class:`text-xs ${h?"text-green-400":"text-red-400"}`,children:[h?"â":"â"," ",Math.abs(c).toFixed(1),"%"]})})]})})})]})}):d("div",{class:"text-center py-8 text-slate-500",children:"ææ å岿°æ®"})}),n==="spider"&&d("div",{class:"space-y-4",children:[d("div",{children:[d("h4",{class:"text-slate-400 text-xs mb-3",children:"仿¥èèæè¡"}),Object.entries(e.today?.spiders||{}).length>0?d("div",{class:"space-y-2",children:Object.entries(e.today?.spiders||{}).sort((o,s)=>s[1]-o[1]).map(([o,s],l)=>{const u=Object.values(e.today?.spiders||{}).reduce((h,f)=>h+Number(f),0),c=u>0?Math.round(s/u*100):0;return d("div",{class:"flex items-center gap-3",children:[d("span",{class:"text-slate-500 text-xs w-6",children:l+1}),d("div",{class:"flex-1",children:[d("div",{class:"flex justify-between items-center mb-1",children:[d("span",{class:"text-white text-sm",children:Hr[o]||o}),d("span",{class:"text-slate-400 text-xs",children:[s," 次 (",c,"%)"]})]}),d("div",{class:"h-1.5 bg-slate-700 rounded-full overflow-hidden",children:d("div",{class:"h-full bg-yellow-500/60 rounded-full",style:`width:${c}%`})})]})]},o)})}):d("div",{class:"text-center py-6 text-slate-500 text-sm",children:"ææ èèè®¿é®æ°æ®"})]}),(e.today?.spiderUa||[]).length>0&&d("div",{class:"pt-4 border-t border-slate-700/50",children:[d("h4",{class:"text-slate-400 text-xs mb-3",children:"ç¬è« UA ç¹å¾ï¼Top 10ï¼"}),d("div",{class:"space-y-2",children:(e.today.spiderUa||[]).slice(0,10).map((o,s)=>d("div",{class:"bg-slate-900/40 rounded-lg p-3",children:[d("div",{class:"flex justify-between items-center mb-1",children:[d("span",{class:"text-slate-300 text-sm",children:Hr[o.spider]||o.spider}),d("span",{class:"text-slate-400 text-xs",children:[o.count," 次"]})]}),d("div",{class:"text-yellow-400/70 font-mono text-[10px] break-all leading-relaxed",children:o.ua})]},s))})]})]}),n==="path"&&d("div",{children:[d("h4",{class:"text-slate-400 text-xs mb-3",children:"仿¥è·¯å¾åå¸"}),Object.entries(e.today?.paths||{}).length>0?d("div",{class:"space-y-2",children:Object.entries(e.today?.paths||{}).sort((o,s)=>s[1]-o[1]).map(([o,s],l)=>{const u=Object.values(e.today?.paths||{}).reduce((h,f)=>h+Number(f),0),c=u>0?Math.round(s/u*100):0;return d("div",{class:"flex items-center gap-3",children:[d("span",{class:"text-slate-500 text-xs w-6",children:l+1}),d("div",{class:"flex-1",children:[d("div",{class:"flex justify-between items-center mb-1",children:[d("span",{class:"text-white text-sm",children:kb[o]||o}),d("span",{class:"text-slate-400 text-xs",children:[s," 次 (",c,"%)"]})]}),d("div",{class:"h-1.5 bg-slate-700 rounded-full overflow-hidden",children:d("div",{class:"h-full bg-green-500/60 rounded-full",style:`width:${c}%`})})]})]},o)})}):d("div",{class:"text-center py-6 text-slate-500 text-sm",children:"ææ è·¯å¾æ°æ®"})]})]})]})]})};pt([Gl,jA,Ul,Yl,Zl,Xl,jl]);const Ir={backgroundColor:"transparent",textStyle:{color:"#94a3b8"},grid:{top:60,right:16,bottom:50,left:60,containLabel:!1},xAxis:{type:"category",axisLine:{lineStyle:{color:"#334155"}},axisTick:{show:!1},axisLabel:{color:"#64748b",fontSize:10},splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#64748b",fontSize:10},splitLine:{lineStyle:{color:"#1e293b",type:"dashed"}}},tooltip:{trigger:"axis",backgroundColor:"#1e293b",borderColor:"#334155",textStyle:{color:"#e2e8f0",fontSize:12}},legend:{top:10,textStyle:{color:"#94a3b8",fontSize:11},itemWidth:12,itemHeight:8}},k5=({option:r,height:e=300})=>{const t=je(null),n=je(null);return he(()=>{if(!t.current)return;n.current||(n.current=$l(t.current)),n.current.setOption(r,!0);const i=()=>n.current?.resize();return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[r]),he(()=>()=>{n.current?.dispose(),n.current=null},[]),d("div",{ref:t,style:{width:"100%",height:`${e}px`}})},I5=({adStats:r})=>{const[e,t]=E("trend"),n=r?.daily||[],i=new Map;for(const h of n){const f=String(h.d).slice(5,10);i.has(f)||i.set(f,{banner:0,player:0,total:0});const v=i.get(f),p=Number(h.cnt);h.ad_type==="banner"&&(v.banner+=p),h.ad_type==="player"&&(v.player+=p),v.total+=p}const a=Array.from(i.keys()).sort(),o=a.map(h=>i.get(h).banner),s=a.map(h=>i.get(h).player),l=a.map(h=>i.get(h).total),u={...Ir,tooltip:{...Ir.tooltip,formatter:h=>{let f=`<div style="margin-bottom:4px">${h[0].axisValue}</div>`;return h.forEach(v=>{f+=`<div><span style="color:${v.color}">â</span> ${v.seriesName}: <b>
19${v.value.toLocaleString()}</b></div>`}),f}},xAxis:{...Ir.xAxis,data:a},yAxis:{...Ir.yAxis},series:[{name:"æ»ç¹å»",type:"line",data:l,smooth:!0,symbol:"circle",symbolSize:4,lineStyle:{color:"#f59e0b",width:2},itemStyle:{color:"#f59e0b"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#f59e0b40"},{offset:1,color:"#f59e0b05"}]}}}]},c={...Ir,tooltip:{...Ir.tooltip,formatter:h=>{let f=`<div style="margin-bottom:4px">${h[0].axisValue}</div>`;return h.forEach(v=>{f+=`<div><span style="color:${v.color}">â</span> ${v.seriesName}: <b>${v.value.toLocaleString()}</b></div>`}),f}},xAxis:{...Ir.xAxis,data:a},yAxis:{...Ir.yAxis},series:[{name:"横å¹
广å",type:"bar",data:o,itemStyle:{color:"#3b82f6"},barMaxWidth:20},{name:"ææ¾å¨å¹¿å",type:"bar",data:s,itemStyle:{color:"#10b981"},barMaxWidth:20}]};return d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[d("div",{class:"px-4 py-3 border-b border-slate-700",children:[d("div",{class:"flex items-center justify-between mb-3",children:[d("div",{class:"flex items-center gap-2",children:[d("span",{class:"i-heroicons-chart-bar w-4 h-4 text-slate-400"}),d("h3",{class:"font-medium text-white text-sm",children:"广åç¹å»è¶å¿"})]}),d("span",{class:"text-slate-500 text-xs",children:"è¿ 7 天"})]}),d("div",{class:"flex gap-2",children:[d("button",{onClick:()=>t("trend"),class:`px-3 py-1.5 rounded text-xs transition-all ${e==="trend"?"bg-amber-600/20 text-amber-400 border border-amber-600/30":"bg-slate-700/50 text-slate-400 border border-slate-600/30 hover:border-slate-500"}`,children:"æ»ä½è¶å¿"}),d("button",{onClick:()=>t("type"),class:`px-3 py-1.5 rounded text-xs transition-all ${e==="type"?"bg-blue-600/20 text-blue-400 border border-blue-600/30":"bg-slate-700/50 text-slate-400 border border-slate-600/30 hover:border-slate-500"}`,children:"ç±»å对æ¯"})]})]}),d("div",{class:"p-4",children:n.length===0?d("div",{class:"text-center py-8",children:[d("span",{class:"i-heroicons-chart-bar-square w-10 h-10 text-slate-600 mx-auto block mb-3"}),d("p",{class:"text-slate-400 text-sm",children:"ææ å¹¿åç¹å»æ°æ®"})]}):d(we,{children:[d(k5,{option:e==="trend"?u:c,height:280}),d("div",{class:"mt-4 pt-4 border-t border-slate-700/50 grid grid-cols-2 sm:grid-cols-3 gap-3",children:[d("div",{class:"text-center",children:[d("div",{class:"text-slate-400 text-xs mb-1",children:"æ»ç¹å»"}),d("div",{class:"text-xl font-bold text-amber-400",children:l.reduce((h,f)=>h+f,0).toLocaleString()})]}),d("div",{class:"text-center",children:[d("div",{class:"text-slate-400 text-xs mb-1",children:"横å¹
广å"}),d("div",{class:"text-xl font-bold text-blue-400",children:o.reduce((h,f)=>h+f,0).toLocaleString()})]}),d("div",{class:"text-center",children:[d("div",{class:"text-slate-400 text-xs mb-1",children:"ææ¾å¨å¹¿å"}),d("div",{class:"text-xl font-bold text-green-400",children:s.reduce((h,f)=>h+f,0).toLocaleString()})]})]})]})})]})},rs=({label:r,field:e,sortKey:t,sortDir:n,onSort:i,align:a="center"})=>d("th",{class:`px-2 py-1.5 sm:p-3 font-medium whitespace-nowrap cursor-pointer select-none hover:text-slate-300 transition-colors ${a==="center"?"text-center":a==="right"?"text-right":"text-left"}`,onClick:()=>i(e),children:d("span",{class:`inline-flex items-center gap-1 ${a==="center"?"justify-center":a==="right"?"justify-end":"justify-start"}`,children:[r,d("span",{class:`w-3.5 h-3.5 flex-shrink-0 ${t===e?n==="asc"?"i-heroicons-bars-arrow-up text-blue-400":"i-heroicons-bars-arrow-down text-blue-400":"i-heroicons-arrows-up-down text-slate-600"}`})]})}),P5=({domains:r,onSelect:e})=>{const[t,n]=E("todayPv"),[i,a]=E("desc"),[o,s]=E(""),l=h=>{t===h?a(i==="asc"?"desc":"asc"):(n(h),a(h==="name"||h==="domain"?"asc":"desc"))},u=r.filter(h=>{if(!o.trim())return!0;const f=o.toLowerCase();return(h.name||"").toLowerCase().includes(f)||h.domain.toLowerCase().includes(f)}),c=[...u].sort((h,f)=>{const v=h[t]??"",p=f[t]??"",m=typeof v=="string"?v.localeCompare(p):v-p;return i==="asc"?m:-m});return d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[d("div",{class:"px-3 py-2 sm:px-5 sm:py-3 border-b border-slate-700",children:[d("div",{class:"flex items-center justify-between mb-3",children:[d("div",{class:"flex items-center gap-2",children:[d("span",{class:"i-heroicons-globe-alt w-4 h-4 sm:w-5 sm:h-5 text-slate-400"}),d("h3",{class:"font-medium text-white text-sm",children:"ç«ç¹å表"})]}),d("span",{class:"text-slate-500 text-xs",children:[u.length!==r.length&&`${u.length} / `,r.length," 个ç«ç¹"]})]}),d("div",{class:"relative",children:[d("span",{class:"absolute left-3 top-1/2 -translate-y-1/2 i-heroicons-magnifying-glass w-4 h-4 text-slate-500"}),d("input",{type:"text",value:o,onInput:h=>s(h.target.value),placeholder:"æç´¢ç«ç¹åç§°æåå...",class:"w-full pl-9 pr-9 py-2 bg-slate-900/50 border border-slate-700 rounded-lg text-slate-300 text-sm placeholder-slate-500 focus:outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500 transition-colors"}),o&&d("button",{onClick:()=>s(""),class:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300 transition-colors","aria-label":"æ¸
é
19¤çé",children:d("span",{class:"i-heroicons-x-mark w-4 h-4"})})]})]}),u.length?d("div",{class:"overflow-x-auto",children:d("table",{class:"w-full",children:[d("thead",{children:d("tr",{class:"text-slate-500 text-xs bg-slate-800/50",children:[d(rs,{label:"ç«ç¹åç§°",field:"name",sortKey:t,sortDir:i,onSort:l,align:"left"}),d("th",{class:"text-left px-2 py-1.5 sm:p-3 font-medium",children:"åå"}),d(rs,{label:"PV",field:"todayPv",sortKey:t,sortDir:i,onSort:l,align:"center"}),d(rs,{label:"UV",field:"todayUv",sortKey:t,sortDir:i,onSort:l,align:"center"}),d(rs,{label:"èè",field:"spiderPv",sortKey:t,sortDir:i,onSort:l,align:"center"}),d("th",{class:"text-right px-3 py-1.5 sm:p-3 font-medium",children:"æä½"})]})}),d("tbody",{children:c.map(h=>d("tr",{class:"border-t border-slate-700 hover:bg-slate-700/30 transition-colors",children:[d("td",{class:"px-2 py-1.5 sm:p-3",children:d("span",{class:"text-slate-300 text-xs sm:text-sm truncate block max-w-[100px] sm:max-w-[160px]",children:h.name||"-"})}),d("td",{class:"px-2 py-1.5 sm:p-3",children:d("span",{class:"font-medium text-white text-sm sm:text-base truncate block max-w-[120px] sm:max-w-none",children:h.domain})}),d("td",{class:"px-2 py-1.5 sm:p-3 text-center",children:d("div",{class:"flex items-center justify-center gap-1.5",children:[d("span",{class:"text-blue-400 text-sm font-medium",children:h.todayPv.toLocaleString()}),d("span",{class:"inline-flex items-center gap-0.5 px-1.5 py-0.5 bg-slate-700/50 rounded text-slate-400 text-xs",children:[d("span",{class:"i-heroicons-device-phone-mobile w-3 h-3"}),Number(h.todayMobilePv||0).toLocaleString()]}),d("span",{class:"inline-flex items-center gap-0.5 px-1.5 py-0.5 bg-slate-700/50 rounded text-slate-400 text-xs",children:[d("span",{class:"i-heroicons-computer-desktop w-3 h-3"}),Number(h.todayPcPv||0).toLocaleString()]})]})}),d("td",{class:"px-2 py-1.5 sm:p-3 text-center",children:d("div",{class:"flex items-center justify-center gap-1.5",children:[d("span",{class:"text-green-400 text-sm font-medium",children:h.todayUv.toLocaleString()}),d("span",{class:"inline-flex items-center gap-0.5 px-1.5 py-0.5 bg-slate-700/50 rounded text-slate-400 text-xs",children:[d("span",{class:"i-heroicons-device-phone-mobile w-3 h-3"}),Number(h.todayMobileUv||0).toLocaleString()]}),d("span",{class:"inline-flex items-center gap-0.5 px-1.5 py-0.5 bg-slate-700/50 rounded text-slate-400 text-xs",children:[d("span",{class:"i-heroicons-computer-desktop w-3 h-3"}),Number(h.todayPcUv||0).toLocaleString()]})]})}),d("td",{class:"px-2 py-1.5 sm:p-3 text-center",children:d("span",{class:"text-yellow-400 text-sm font-medium",children:h.spiderPv.toLocaleString()})}),d("td",{class:"px-3 py-1.5 sm:p-3 text-right",children:d("button",{onClick:()=>e(h.domain),class:"inline-flex items-center gap-1 px-2 py-1 sm:px-3 sm:py-1.5 bg-blue-600/20 text-blue-400 rounded-lg text-xs sm:text-sm hover:bg-blue-600/30 transition-colors whitespace-nowrap",children:["详æ
",d("span",{class:"i-heroicons-arrow-right w-3 h-3 sm:w-4 sm:h-4"})]})})]}))})]})}):d("div",{class:"p-8 text-center",children:[d("span",{class:"i-heroicons-inbox w-10 h-10 text-slate-600 mx-auto block mb-3"}),d("p",{class:"text-slate-400 text-sm",children:o?"æªæ¾å°å¹é
çç«ç¹":"ææ ç«ç¹æ°æ®"}),o&&d("button",{onClick:()=>s(""),class:"mt-3 text-blue-400 hover:text-blue-300 text-sm transition-colors",children:"æ¸
é¤çé"})]})]})},R5=({spiderRank:r,spiderUa:e,onClose:t})=>{const[n,i]=E(null),a=Object.entries(r).sort((s,l)=>l[1]-s[1]),o=a.reduce((s,[,l])=>s+l,0);return d("div",{class:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60",onClick:t,children:d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 w-full max-w-md
19shadow-xl",onClick:s=>s.stopPropagation(),children:[d("div",{class:"flex items-center justify-between px-4 py-3 border-b border-slate-700",children:[d("div",{class:"flex items-center gap-2",children:[d("span",{class:"i-heroicons-bug-ant w-4 h-4 text-yellow-400"}),d("h3",{class:"font-medium text-white text-sm",children:"å
¨ç«èèæè¡ï¼ä»æ¥ï¼"})]}),d("button",{onClick:t,class:"text-slate-400 hover:text-white transition-colors",children:d("span",{class:"i-heroicons-x-mark w-5 h-5"})})]}),d("div",{class:"p-4 max-h-[70vh] overflow-y-auto",children:a.length===0?d("div",{class:"text-slate-500 text-xs text-center py-6",children:"ææ èèè®¿é®æ°æ®"}):d("div",{class:"space-y-2",children:a.map(([s,l],u)=>{const c=o>0?Math.round(l/o*100):0,h=e[s]||[],f=n===s;return d("div",{children:[d("div",{class:`cursor-pointer rounded-lg px-2 py-1 transition-colors ${h.length>0?"hover:bg-slate-700/50":""}`,onClick:()=>h.length>0&&i(f?null:s),children:[d("div",{class:"flex items-center justify-between text-xs mb-1",children:[d("div",{class:"flex items-center gap-2",children:[d("span",{class:"text-slate-500 w-4 text-right",children:u+1}),d("span",{class:"text-white",children:Hr[s]||s}),h.length>0&&d("span",{class:`i-heroicons-chevron-down w-3 h-3 text-slate-500 transition-transform ${f?"rotate-180":""}`})]}),d("div",{class:"flex items-center gap-2",children:[d("span",{class:"text-slate-400",children:[c,"%"]}),d("span",{class:"text-yellow-400 font-mono w-12 text-right",children:l.toLocaleString()})]})]}),d("div",{class:"h-1 bg-slate-700 rounded-full overflow-hidden",children:d("div",{class:"h-full bg-yellow-500/60 rounded-full",style:`width:${c}%`})})]}),f&&h.length>0&&d("div",{class:"mt-1 mb-2 ml-6 space-y-1",children:h.map((v,p)=>d("div",{class:"bg-slate-900/60 rounded px-2 py-1.5",children:[d("div",{class:"flex justify-between items-center mb-0.5",children:[d("span",{class:"text-slate-500 text-[10px]",children:["#",p+1]}),d("span",{class:"text-slate-400 text-[10px]",children:[v.count.toLocaleString()," 次"]})]}),d("div",{class:"text-yellow-400/80 font-mono text-[10px] break-all leading-relaxed",children:v.ua})]},p))})]},s)})})}),d("div",{class:"px-4 py-3 border-t border-slate-700 flex justify-between items-center",children:[d("span",{class:"text-slate-500 text-xs",children:["å
± ",a.length," ç§èèï¼å计 ",o.toLocaleString()," 次"]}),d("button",{onClick:t,class:"px-3 py-1.5 bg-slate-700 text-slate-300 rounded-lg text-xs hover:bg-slate-600 transition-colors",children:"å
³é"})]})]})})};pt([Gl,Ul,Yl,Zl,Xl,jl]);const Pr={backgroundColor:"transparent",textStyle:{color:"#94a3b8"},grid:{top:60,right:16,bottom:50,left:60,containLabel:!1},xAxis:{type:"category",axisLine:{lineStyle:{color:"#334155"}},axisTick:{show:!1},axisLabel:{color:"#64748b",fontSize:10},splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#64748b",fontSize:10},splitLine:{lineStyle:{color:"#1e293b",type:"dashed"}}},tooltip:{trigger:"axis",backgroundColor:"#1e293b",borderColor:"#334155",textStyle:{color:"#e2e8f0",fontSize:12}},legend:{top:10,textStyle:{color:"#94a3b8",fontSize:11},itemWidth:12,itemHeight:8}},E5=({option:r,height:e=300})=>{const t=je(null),n=je(null);return he(()=>{if(!t.current)return;n.current||(n.current=$l(t.current)),n.current.setOption(r,!0);const i=()=>n.current?.resize();return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[r]),he(()=>()=>{n.current?.dispose(),n.current=null},[]),d("div",{ref:t,style:{width:"100%",height:`${e}px`}})},O5=()=>{const[r,e]=E([]),[t,n]=E(!0),[i,a]=E("traffic"),[o,s]=E([]);he(()=>{(async()=>{try{const m=await le("/stats/global-history");if(m.error)console.error("API è¿åé误:",m.error),e([]);else if(e(m.history||[]),(m.history||[]).length>0){const y={};for(const x of m.history||[])for(const[b,_]of Object.entries(x.spiders||{}))y[b]=(y[b]||0)+_;const g=Object.entries(y).sort((x,b)=>b[1]-x[1]).slice(0,5).map(([x])=>x);s(g)}}catch(m){console.error("è·åå
¨ç«å岿°æ®å¤±è´¥:",m),e([])}n(!1)})()},[]);const l={...Pr,tooltip:{...Pr.tooltip,formatter:p=>{let m=`<div style="margin-bottom:4px">${p[0].axisValue}</div>`;return p.forEach(y=>{const g=y.seriesName==="PV"||y.seriesName==="UV"||y.seriesName==="èè访é®"?y.value.toLocaleStr
19ing():y.value;m+=`<div><span style="color:${y.color}">â</span> ${y.seriesName}: <b>${g}</b></div>`}),m}},xAxis:{...Pr.xAxis,data:r.map(p=>p.date.slice(5))},yAxis:{...Pr.yAxis},series:[{name:"PV",type:"line",data:r.map(p=>p.pv),smooth:!0,symbol:"circle",symbolSize:4,lineStyle:{color:"#3b82f6",width:2},itemStyle:{color:"#3b82f6"}},{name:"UV",type:"line",data:r.map(p=>p.uv),smooth:!0,symbol:"circle",symbolSize:4,lineStyle:{color:"#10b981",width:2},itemStyle:{color:"#10b981"}},{name:"èè访é®",type:"line",data:r.map(p=>p.spiderPv),smooth:!0,symbol:"circle",symbolSize:4,lineStyle:{color:"#f59e0b",width:2},itemStyle:{color:"#f59e0b"}}]},u={baidu:"#3b82f6",google:"#10b981",bing:"#f59e0b",sogou:"#8b5cf6",yandex:"#ef4444",bytespider:"#ec4899",360:"#14b8a6",shenma:"#f97316"},c={...Pr,tooltip:{...Pr.tooltip,formatter:p=>{let m=`<div style="margin-bottom:4px">${p[0].axisValue}</div>`;return p.forEach(y=>{m+=`<div><span style="color:${y.color}">â</span> ${Hr[y.seriesName]||y.seriesName}: <b>${y.value.toLocaleString()}</b></div>`}),m}},xAxis:{...Pr.xAxis,data:r.map(p=>p.date.slice(5))},yAxis:{...Pr.yAxis},series:o.map(p=>({name:p,type:"line",data:r.map(m=>m.spiders?.[p]||0),smooth:!0,symbol:"circle",symbolSize:4,lineStyle:{color:u[p]||"#94a3b8",width:2},itemStyle:{color:u[p]||"#94a3b8"}}))},h=new Set;for(const p of r)Object.keys(p.spiders||{}).forEach(m=>h.add(m));const f=Array.from(h).sort(),v=p=>{o.includes(p)?s(o.filter(m=>m!==p)):s([...o,p])};return t?d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 p-8",children:d("div",{class:"flex items-center justify-center",children:[d("span",{class:"i-heroicons-arrow-path w-5 h-5 text-slate-400 animate-spin mr-2"}),d("span",{class:"text-slate-400",children:"å è½½ä¸..."})]})}):d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[d("div",{class:"px-4 py-3 border-b border-slate-700",children:[d("div",{class:"flex items-center justify-between mb-3",children:[d("div",{class:"flex items-center gap-2",children:[d("span",{class:"i-heroicons-chart-bar w-4 h-4 text-slate-400"}),d("h3",{class:"font-medium text-white text-sm",children:"å
¨ç«åå²è¶å¿"})]}),d("span",{class:"text-slate-500 text-xs",children:["è¿ ",r.length," 天"]})]}),d("div",{class:"flex gap-2",children:[d("button",{onClick:()=>a("traffic"),class:`px-3 py-1.5 rounded text-xs transition-all ${i==="traffic"?"bg-blue-600/20 text-blue-400 border border-blue-600/30":"bg-slate-700/50 text-slate-400 border border-slate-600/30 hover:border-slate-500"}`,children:"æµéè¶å¿"}),d("button",{onClick:()=>a("spider"),class:`px-3 py-1.5 rounded text-xs transition-all ${i==="spider"?"bg-yellow-600/20 text-yellow-400 border border-yellow-600/30":"bg-slate-700/50 text-slate-400 border border-slate-600/30 hover:border-slate-500"}`,children:"èèè¶å¿"})]}),i==="spider"&&d("div",{class:"mt-3 pt-3 border-t border-slate-700/50",children:[d("div",{class:"text-slate-500 text-xs mb-2",children:"éæ©èèï¼"}),d("div",{class:"flex flex-wrap gap-2",children:f.map(p=>{const m=o.includes(p),y=u[p]||"#94a3b8";return d("button",{onClick:()=>v(p),class:`px-2 py-1 rounded text-xs transition-all ${m?"bg-slate-700 text-white border border-slate-600":"bg-slate-900/50 text-slate-500 border border-slate-700/50 hover:border-slate-600"}`,children:[d("span",{class:"inline-block w-2 h-2 rounded-full mr-1",style:`background-color: ${y}`}),Hr[p]||p]},p)})})]})]}),d("div",{class:"p-4",children:r.length===0?d("div",{class:"text-center py-8",children:[d("span",{class:"i-heroicons-chart-bar-square w-10 h-10 text-slate-600 mx-auto block mb-3"}),d("p",{class:"text-slate-400 text-sm",children:"ææ å岿°æ®"})]}):d(E5,{option:i==="traffic"?l:c,height:320})})]})},B5=()=>{const[r,e]=E(null),[t,n]=E(null),[i,a]=E(null),[o,s]=E(null),[l,u]=E(!0),[c,h]=E(!1),[f,v]=E(!1),[p,m]=E("traffic"),y=async x=>{u(!0);try{if(x){const b=await le(`/stats?domain=${x}`);n(b)}else{const[b,_]=await Promise.all([le("/stats"),le("/ad-stats?days=7")]);e(b),a(_)}}catch(b){Z.error("å 载失败",b.message)}u(!1)},g=async()=>{if(await Dt({title:"æ¸
空ç»è®¡æ°æ®",message:"ç¡®å®è¦æ¸
空ææç»è®¡æ°æ®åï¼æ¤æä½ä¸å¯æ¢å¤ï¼
19",type:"danger",confirmText:"æ¸
空"})){h(!0);try{const x=await le("/stats/clear",{method:"POST"});x.success&&(Z.success("æ¸
空æå",`è®¿é®æ¥å¿ ${x.visitLog} æ¡ï¼å¹¿åç¹å» ${x.adClick} æ¡`),y(o))}catch(x){Z.error("æ¸
空失败",x.message)}h(!1)}};return he(()=>{y(o)},[o]),l?d(Cs,{}):o&&t?d(L5,{domain:o,data:t,onBack:()=>s(null)}):d("div",{class:"space-y-4 sm:space-y-6",children:[d("div",{class:"flex items-center justify-between gap-3",children:[d("div",{class:"flex gap-2",children:[d("button",{onClick:()=>m("traffic"),class:`inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-all ${p==="traffic"?"bg-blue-600 text-white shadow-lg shadow-blue-600/30":"bg-slate-700 text-slate-300 hover:bg-slate-600"}`,children:[d("span",{class:"i-heroicons-chart-bar w-4 h-4"}),"æµéç»è®¡"]}),d("button",{onClick:()=>m("ad"),class:`inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-all ${p==="ad"?"bg-amber-600 text-white shadow-lg shadow-amber-600/30":"bg-slate-700 text-slate-300 hover:bg-slate-600"}`,children:[d("span",{class:"i-heroicons-cursor-arrow-rays w-4 h-4"}),"广åç»è®¡"]})]}),d("div",{class:"flex gap-2",children:[d("button",{onClick:()=>y(o),disabled:l,class:"inline-flex items-center gap-2 px-3 py-2 bg-slate-700 text-slate-300 rounded-lg text-sm hover:bg-slate-600 transition-colors disabled:opacity-50",children:[d("span",{class:`i-heroicons-arrow-path w-4 h-4 ${l?"animate-spin":""}`}),d("span",{class:"hidden sm:inline",children:"å·æ°"})]}),d("button",{onClick:g,disabled:c,class:"inline-flex items-center gap-2 px-3 py-2 bg-red-600/20 text-red-400 rounded-lg text-sm hover:bg-red-600/30 transition-colors disabled:opacity-50",children:[d("span",{class:`i-heroicons-trash w-4 h-4 ${c?"animate-spin":""}`}),d("span",{class:"hidden sm:inline",children:c?"æ¸
空ä¸...":"æ¸
空ç»è®¡"})]})]})]}),p==="traffic"&&d(we,{children:[d("div",{class:"grid grid-cols-2 sm:grid-cols-4 gap-3 sm:gap-4",children:[d(hf,{title:"ç«ç¹æ°é",value:r?.domains?.length||0,icon:"i-heroicons-globe-alt"}),d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 p-3 sm:p-5 hover:border-slate-600 transition-colors",children:[d("div",{class:"flex items-center justify-between mb-1 sm:mb-3",children:[d("span",{class:"text-slate-400 text-xs sm:text-sm",children:"仿¥æ» PV"}),d("span",{class:"i-heroicons-eye w-4 h-4 sm:w-5 sm:h-5 text-blue-500"})]}),d("div",{class:"text-xl sm:text-3xl font-bold text-blue-400",children:(r?.totals?.pv||0).toLocaleString()}),d("div",{class:"flex items-center justify-end gap-1 mt-2 pt-2 border-t border-slate-700/50 text-xs text-slate-500",children:[d("span",{class:"i-heroicons-device-phone-mobile w-3 h-3"}),d("span",{children:(r?.totals?.mobilePv||0).toLocaleString()}),d("span",{children:"/"}),d("span",{class:"i-heroicons-computer-desktop w-3 h-3"}),d("span",{children:(r?.totals?.pcPv||0).toLocaleString()})]})]}),d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 p-3 sm:p-5 hover:border-slate-600 transition-colors",children:[d("div",{class:"flex items-center justify-between mb-1 sm:mb-3",children:[d("span",{class:"text-slate-400 text-xs sm:text-sm",children:"仿¥æ» UV"}),d("span",{class:"i-heroicons-user w-4 h-4 sm:w-5 sm:h-5 text-green-500"})]}),d("div",{class:"text-xl sm:text-3xl font-bold text-green-400",children:(r?.totals?.uv||0).toLocaleString()}),d("div",{class:"flex items-center justify-end gap-1 mt-2 pt-2 border-t border-slate-700/50 text-xs text-slate-500",children:[d("span",{class:"i-heroicons-device-phone-mobile w-3 h-3"}),d("span",{children:(r?.totals?.mobileUv||0).toLocaleString()}),d("span",{children:"/"}),d("span",{class:"i-heroicons-computer-desktop w-3 h-3"}),d("span",{children:(r?.totals?.pcUv||0).toLocaleString()})]})]}),d(hf,{title:"èèæ»è®¿é®",value:r?.totals?.spider||0,icon:"i-heroicons-bug-ant",color:"yellow",onClick:()=>v(!0)})]}),f&&d(R5,{spiderRank:r?.totals?.spiderRank||{},spiderUa:r?.totals?.spiderUa||{},onClose:()=>v(!1)}),d(O5,{}),d(P5,{domains:r?.domains||[],onSelect:s})]}),p==="ad"&&d(we,{children:[d(N5,{adStats:i}),d(I5,{adStats:i})]})]})},N5=({adStats:r})=>{const e=r?.today||[],t=r?.total||0;let n=0,i=0,a=0,o=0;for(const l of e)l.ad_type==="banner"&&(n=Number(l.cnt)),l.ad_type==="player"&&(i=Number(l.cnt)),a+=Number(l.mobile_cnt||0),o+=Number(l.pc_cnt||0);const s=n+i;return d("div",{class:"grid grid-cols-2 sm:grid-cols-4 gap-3 sm:gap-4",children:[d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 p-4",children:[d("div",{class:"flex items-center justify-between mb-2",children:[d("span",{class:"text-slate-400 text-xs",children:"仿¥æ»ç¹å»"}),d("span",{class:"i-heroicons-cursor-arrow-rays w-4 h-4 text-amber-400"})]}),d("div",{class:"text-2xl font-bold text-amber-400",children:s.toLocaleStr
19ing()}),d("div",{class:"text-slate-500 text-xs mt-1",children:["è¿7天å
± ",t.toLocaleString()," 次"]})]}),d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 p-4",children:[d("div",{class:"flex items-center justify-between mb-2",children:[d("span",{class:"text-slate-400 text-xs",children:"横å¹
广å"}),d("span",{class:"i-heroicons-rectangle-group w-4 h-4 text-blue-400"})]}),d("div",{class:"text-2xl font-bold text-blue-400",children:n.toLocaleString()}),d("div",{class:"text-slate-500 text-xs mt-1",children:"仿¥ç¹å»"})]}),d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 p-4",children:[d("div",{class:"flex items-center justify-between mb-2",children:[d("span",{class:"text-slate-400 text-xs",children:"ææ¾å¨å¹¿å"}),d("span",{class:"i-heroicons-play-circle w-4 h-4 text-green-400"})]}),d("div",{class:"text-2xl font-bold text-green-400",children:i.toLocaleString()}),d("div",{class:"text-slate-500 text-xs mt-1",children:"仿¥ç¹å»"})]}),d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 p-4",children:[d("div",{class:"flex items-center justify-between mb-2",children:[d("span",{class:"text-slate-400 text-xs",children:"设å¤åå¸"}),d("span",{class:"i-heroicons-device-phone-mobile w-4 h-4 text-purple-400"})]}),d("div",{class:"text-lg font-bold text-purple-400",children:[a," / ",o]}),d("div",{class:"text-slate-500 text-xs mt-1",children:"ç§»å¨ / PC"})]})]})},wb=({percent:r,color:e="blue"})=>{const t={blue:"bg-blue-500",green:"bg-green-500",yellow:"bg-yellow-500",red:"bg-red-500",purple:"bg-purple-500",cyan:"bg-cyan-500",indigo:"bg-indigo-500"},n=r>90?"bg-red-500":r>70?"bg-yellow-500":t[e]||"bg-blue-500";return d("div",{class:"w-full bg-slate-700 rounded-full h-2.5",children:d("div",{class:`${n} h-2.5 rounded-full transition-all duration-500`,style:{width:`${Math.min(r,100)}%`}})})},yt=({label:r,value:e,sub:t,percent:n,color:i})=>d("div",{class:"bg-slate-700/40 rounded-lg p-4 space-y-2",children:[d("div",{class:"flex items-center justify-between",children:[d("span",{class:"text-slate-400 text-sm",children:r}),n!==void 0&&d("span",{class:`text-sm font-mono ${n>90?"text-red-400":n>70?"text-yellow-400":"text-green-400"}`,children:[n,"%"]})]}),d("div",{class:"text-white font-bold text-lg",children:e}),n!==void 0&&d(wb,{percent:n,color:i}),t&&d("div",{class:"text-slate-500 text-xs",children:t})]}),Ze=r=>r>=1073741824?`${(r/1073741824).toFixed(1)} GB`:r>=1048576?`${(r/1048576).toFixed(1)} MB`:r>=1024?`${(r/1024).toFixed(1)} KB`:`${r} B`,_c=r=>r>=1024?`${(r/1024).toFixed(1)} GB`:`${r} MB`,ns=r=>{const e=Math.floor(r/86400),t=Math.floor(r%86400/3600),n=Math.floor(r%3600/60);return e>0?`${e}天 ${t}å°æ¶`:t>0?`${t}å°æ¶ ${n}åé`:`${n}åé`},z5=(r,e)=>{const t=new Date(r),n=l=>l.toString().padStart(2,"0"),i=n(t.getHours()),a=n(t.getMinutes()),o=t.getMonth()+1,s=t.getDate();return e==="2hour"||e==="day"?`${i}:${a}`:e==="week"?`${o}/${s} ${i}:00`:`${o}/${s}`},c0=r=>{const e=r.split(":");if(e.length===3){const[t,n,i]=e.map(Number),a=t*3600+n*60+i;return a>=60?`${(a/60).toFixed(1)}å`:`${a.toFixed(2)}ç§`}return r},F5=({data:r})=>{const{dbStatus:e,redisStatus:t,server:n,workers:i}=r,a=e.metrics||{},o=a.max_connections?Math.round(parseInt(a.Threads_connected||"0")/parseInt(a.max_connections)*100):0,s=parseInt(a.Innodb_buffer_pool_read_requests||"0")>0?Math.round((1-parseInt(a.Innodb_buffer_pool_reads||"0")/parseInt(a.Innodb_buffer_pool_read_requests||"1"))*1e4)/100:100,l=parseInt(a.Slow_queries||"0"),u=parseInt(a.Innodb_row_lock_waits||"0"),c=parseInt(a.Aborted_connects||"0"),h=t?.metrics||{},f=i.filter(g=>g.online),v=i.reduce((g,x)=>g+x.rss,0),p=i.reduce((g,x)=>g+x.heapUsed,0),m=i.reduce((g,x)=>g+x.heapTotal,0),y=m>0?Math.round(p/m*100):0;return d(we,{children:[d(Nr,{icon:"i-heroicons-cpu-chip text-blue-400",iconBg:"bg-blue-600/20",title:"æå¡å¨èµæº",desc:`${n.hostname} · ${n.platform}/${n.arch} · è¿è¡ ${ns(n.uptime)}`,children:[d("div",{class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[d(yt,{label:"CPU 使ç¨ç",value:`${n.cpuUsage}%`,sub:`${n.cpuModel?n.cpuModel+" · ":""}${n.cpuCount} æ ¸ · è´è½½ ${n.loadAvg.map(g=>g.toFixed(2)).join(" / ")}`,percent:n.cpuUsage,color:"blue"}),d(yt,{label:"ç³»ç»å
å",value:`${Ze(n.memUsed)} / ${Ze(n.memTotal)}`,sub:`ç©ºé² ${Ze(n.memFree)}`,percent:n.memUsage,color:"purple"}),d(yt,{label:"éç¾¤æ» RSS",value:Ze(v),sub:`${f.length}/${i.length} 个 Worker å¨çº¿`}),d(yt,{label:"é群 V8 å ",value:`${Ze(p)} / ${Ze(m)}`,sub:"ææ Worker å计",percent:y,color:"cyan"})]}),d("div",{class:"mt-4 flex flex-wrap gap-3",children:[n.networkInterfaces.length>0&&n.networkInterfaces.map(g=>d("span",{class:"px-3 py-1 bg-slate-700/50 rounded text-sm text-slate-400",children:[g.name,": ",d("span",{class:"text-slate-200 font-mono",children:g.address})]})),d("span",{class:"px-3 py-1 bg-slate-700/50 rounded text-sm text-slate-400",children:["Node: ",d("span",{class:"text-green-400 font-mono",children:n.nodeVersion})]})]})]}),i.length>0&&d(Nr,{icon:"i-heroicons-squares-2x2 text-indigo-400",iconBg:"bg-indigo-600/20",title:"PM2 é群",desc:`${f.length}/${i.length} 个 Worker å¨çº¿ · æ» RSS ${Ze(v)}`,children:d("div",{class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3",children:i.map(g=>{const x=g.heapTotal>0?Math.round(g.heapUsed/g.heapTotal*100):0;return d("div",{class:`rounded-lg p-4 space-y-2 border ${g.online?"bg-slate-700/40 border-slate-600/30":"bg-slate-800/60 border-red-800/30 opacity-60"}`,children:[d("div",{class:"flex items-center justify-between",children:[d("div",{class:"flex items-center gap-2",children:[d("span",{class:"text-slate-200 font-mono font-bold text-sm",children:["Worker #",g.id]}),g.isPrimary&&d("span",{class:"px-1.5 py-0.5 rounded text-xs font-medium bg-amber-600/20 text-amber-400",children:"主"})]}),d("span",{class:`px-2 py-0.5 rounded text-xs font-medium ${g.online?"bg-green-600/20 text-green-400":"bg-red-600/20 text-red-400"}`,children:g.online?"å¨çº¿":"离线"})]}),d("div",{class:"text-xs text-slate-500",children:["PID ",g.pid," · è¿è¡ ",ns(g.uptime)]}),d("div",{class:"space-y-1.5",children:[d("div",{class:"flex items-center justify-between text-xs",children:[d("span",{class:"text-slate-400",children:"RSS"}),d("span",{class:"text-slate-200 font-mono",children:Ze(g.rss)})]}),d("div",{class:"flex items-center justify-between text-xs",children:[d("span",{class:"text-slate-400",children:"V8 å "}),d("span",{class:"text-slate-200 font-mono",children:[Ze(g.heapUsed)," / ",Ze(g.heapTotal)]})]}),d(wb,{percent:x,color:"indigo"}),d("div",{class:"flex items-center justify-between text-xs",children:[d("span",{class:"text-slate-400",children:"å¤é¨å
å"}),d("span",{class:"text-slate-200 font-mono",children:Ze(g.external)})]})]})]})})})}),d(Nr,{icon:t?.ok?"i-heroicons-server-stack text-red-400":"i-heroicons-x-circle text-red-400",iconBg:(t?.ok,"bg-red-600/20"),title:"Redis ç¶æ",desc:t?.ok?`Redis ${t.version} · è¿è¡ ${ns(h.uptimeSeconds||0)}`:t?.error||"æªè¿æ¥",children:t?.ok?d("div",{class:"space-y-4",children:d("div",{class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[d(yt,{label:"å
å使ç¨",value:`${Ze(h.usedMemory)} / ${h.maxMemory>0?Ze(h.maxMemory):"æ éå¶"}
19`,sub:`æ·æ±° key: ${(h.evictedKeys||0).toLocaleString()}`,percent:h.memUsage||0,color:"red"}),d(yt,{label:"ç¼åå½ä¸ç",value:`${h.hitRate}%`,sub:`å½ä¸ ${(h.hits||0).toLocaleString()} · æªå½ä¸ ${(h.misses||0).toLocaleString()}`,percent:h.hitRate||0,color:"green"}),d(yt,{label:"Key æ°é",value:(h.keyCount||0).toLocaleString(),sub:`客æ·ç«¯è¿æ¥: ${h.connectedClients||0}`}),d(yt,{label:"ååé",value:`${(h.opsPerSec||0).toLocaleString()} ops/s`,sub:`累计å½ä»¤: ${(h.totalCommandsProcessed||0).toLocaleString()}`})]})}):d("div",{class:"text-red-400 p-4 bg-red-900/10 rounded-lg",children:t?.error||"Redis æªè¿æ¥"})}),d(Nr,{icon:e.ok?"i-heroicons-circle-stack text-green-400":"i-heroicons-x-circle text-red-400",iconBg:e.ok?"bg-green-600/20":"bg-red-600/20",title:"æ°æ®åºåå",desc:e.ok?`MySQL ${e.version} · è¿è¡ ${ns(parseInt(a.Uptime||"0"))}`:e.error,children:e.ok?d("div",{class:"space-y-4",children:[d("div",{class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[d(yt,{label:"è¿æ¥ä½¿ç¨ç",value:`${a.Threads_connected||0} / ${a.max_connections||"?"}`,sub:`æ´»è·çº¿ç¨ ${a.Threads_running||0} · åå²å³°å¼ ${a.Max_used_connections||0}`,percent:o,color:"green"}),d(yt,{label:"æ»æ¥è¯¢æ°",value:parseInt(a.Questions||"0").toLocaleString(),sub:`æ»è¿æ¥æ¬¡æ° ${parseInt(a.Connections||"0").toLocaleString()}`}),d(yt,{label:"ç¼å²æ± å½ä¸ç",value:`${s}%`,sub:`è¯·æ± ${parseInt(a.Innodb_buffer_pool_read_requests||"0").toLocaleString()} · ç£ç读 ${parseInt(a.Innodb_buffer_pool_reads||"0").toLocaleString()}`,percent:s,color:"cyan"}),d(yt,{label:"æå¼è¡¨æ°",value:a.Open_tables||"0",sub:`累计æå¼ ${parseInt(a.Opened_tables||"0").toLocaleString()}`})]}),d("div",{class:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[{label:"æ
¢æ¥è¯¢",value:l,warn:l>0},{label:"è¡éçå¾
",value:u,warn:u>100},{label:"å¹³åéçå¾
(ms)",value:parseInt(a.Innodb_row_lock_time_avg||"0"),warn:parseInt(a.Innodb_row_lock_time_avg||"0")>500},{label:"ä¸æè¿æ¥",value:c,warn:c>100}].map(g=>d("div",{class:`rounded-lg p-3 text-center ${g.warn?"bg-red-900/20 border border-red-800/50":"bg-slate-700/40"}`,children:[d("div",{class:"text-slate-400 text-xs mb-1",children:g.label}),d("div",{class:`text-lg font-bold font-mono ${g.warn?"text-red-400":"text-slate-200"}`,children:g.value.toLocaleString()})]}))}),d("div",{class:"grid grid-cols-2 gap-4",children:[d("div",{class:"bg-slate-700/40 rounded-lg p-3 flex items-center gap-3",children:[d("span",{class:"i-heroicons-arrow-down-tray w-5 h-5 text-green-400"}),d("div",{children:[d("div",{class:"text-slate-400 text-xs",children:"æ¥æ¶æµé"}),d("div",{class:"text-white font-mono",children:Ze(parseInt(a.Bytes_received||"0"))})]})]}),d("div",{class:"bg-slate-700/40 rounded-lg p-3 flex items-center gap-3",children:[d("span",{class:"i-heroicons-arrow-up-tray w-5 h-5 text-blue-400"}),d("div",{children:[d("div",{class:"text-slate-400 text-xs",children:"åéæµé"}),d("div",{class:"text-white font-mono",children:Ze(parseInt(a.Bytes_sent||"0"))})]})]})]})]}):d("div",{class:"text-red-400 p-4 bg-red-900/10 rounded-lg",children:e.error})})]})};pt([Gl,Ul,Yl,Zl,Xl,jl]);const is={backgroundColor:"transparent",textStyle:{color:"#94a3b8"},grid:{top:30,right:16,bottom:30,left:50,containLabel:!1},xAxis:{type:"category",axisLine:{lineStyle:{color:"#334155"}},axisTick:{show:!1},axisLabel:{color:"#64748b",fontSize:10},splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#64748b",fontSize:10},splitLine:{lineStyle:{color:"#1e293b",type:"dashed"}}},tooltip:{trigger:"axis",backgroundColor:"#1e293b",borderColor:"#334155",textStyle:{color:"#e2e8f0",fontSize:12}}};function V5(r,e,t,n,i,a){return{...is,tooltip:{...is.tooltip,formatter:o=>{const s=Array.isArray(o)?o[0]:o,l=a?a(s.value):`${s.value}${i}`;return`<span style="color:${t}">â</span> ${s.axisValue}<br/>${n}: <b>${l}</b>`}},xAxis:{...is.xAxis,data:r},yAxis:{...is.yAxis},series:[{name:n,type:"line",data:e,smooth:!0,symbol:"none",lineStyle:{color:t,width:2},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:t+"40"},{offset:1,color:t+"05"}]}}}]}}const H5=({option:r,height:e=180})=>{const t=je(null),n=je(null);return he(()=>{if(!t.current)return;n.current||(n.current=$l(t.current)),n.current.setOption(r,!0);const i=()=>n.current?.resize();return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[r]),he(()=>()=>{n.current?.dispose(),n.current=null},[]),d("div",{ref:t,style:{width:"100%",height:`${e}px`}})},Yt=({label:r,color:e,xData:t,yData:n,unit:i="%",formatValue:a})=>d("div",{class:"bg-slate-700/40 rounded-lg overflow-hidden",children:[d("div",{class:"px-3 pt-3 flex items-center justify-between",children:[d("span",{class:"text-slate-400 text-xs",children:r}),n.length>0&&d("span",{class:"text-xs font-mono",style:{color:e},children:a?a(n[n.length-1]):`${n[n.length-1]}${i}`})]}),d(H5,{option:V5(t,n,e,r,i,a),height:160})]}),$5=({value:r,onChange:e})=>d("div",{class:"flex gap-1 bg-slate-700/50 rounded-lg p-1",children:[{key:"2hour",label:"2å°æ¶"},{key:"day",label:"ä¸å¤©"},{key:"week",label:"ä¸å¨"},{key:"month",label:"䏿"}].map(n=>d("button",{onClick:()=>e(n.key),class:`px-3 py-1 rounded-md text-xs transition-colors ${r===n.key?"bg-blue-600 text-white":"text-slate-400 hover:text-white"}`,children:n.label}))}),G5=({query:r,index:e})=>{const[t,n]=E(!1);return d("div",{class:"bg-slate-700/40 rounded-lg overflow-hidden",children:[d("div",{class:"p-3 cursor-pointer hover:bg-slate-700/60 transition-colors",onClick:()=>n(!t),children:d("div",{class:"flex items-start justify-between gap-4",children:[d("div",{class:"flex-1 min-w-0",children:[d("div",{class:"flex items-center gap-2 mb-1",children:[d("span",{class:"text-slate-500 text-xs",children:["#",e+1]}),d("span",{class:"text-slate-400 text-xs",children:r.start_time}),r.db&&d("span",{class:"px-1.5 py-0.5 bg-blue-600/20 text-blue-400 text-xs rounded",children:r.db})]}),d("div",{class:"text-slate-200 text-sm font-mono truncate",children:[r.sql_text.slice(0,100),r.sql_text.length>100?"...":""]})]}),d("div",{class:"flex items-center gap-3 shrink-0",children:[d("div",{class:"text-right",children:[d("div",{class:"text-red-400 font-mono text-sm",children:c0(r.query_time)}),d("div",{class:"text-slate-500 text-xs",children:"æ§è¡æ¶é´"})]}),d("span",{class:`i-heroicons-chevron-down w-4 h-4 text-slate-500 transition-transform ${t?"rotate-180":""}`})]})]})}),t&&d("div",{class:"border-t border-slate-600/50 p-3 space-y-3",children:[d("div",{class:"grid grid-cols-2 sm:grid-cols-4 gap-3 text-xs",children:[d("div",{children:[d("span",{class:"text-slate-500",children:"éçå¾
"}),d("div",{class:"text-slate-300 font-mono",children:c0(r.lock_t
19ime)})]}),d("div",{children:[d("span",{class:"text-slate-500",children:"è¿åè¡æ°"}),d("div",{class:"text-slate-300 font-mono",children:r.rows_sent.toLocaleString()})]}),d("div",{children:[d("span",{class:"text-slate-500",children:"æ«æè¡æ°"}),d("div",{class:"text-slate-300 font-mono",children:r.rows_examined.toLocaleString()})]}),d("div",{children:[d("span",{class:"text-slate-500",children:"æ«æ/è¿åæ¯"}),d("div",{class:`font-mono ${r.rows_sent>0&&r.rows_examined/r.rows_sent>100?"text-yellow-400":"text-slate-300"}`,children:r.rows_sent>0?(r.rows_examined/r.rows_sent).toFixed(1):"-"})]})]}),d("div",{children:[d("div",{class:"text-slate-500 text-xs mb-1",children:"宿´ SQL"}),d("pre",{class:"bg-slate-800/50 rounded p-2 text-xs text-slate-300 font-mono overflow-x-auto whitespace-pre-wrap break-all max-h-48",children:r.sql_text})]})]})]})},W5=()=>{const[r,e]=E(null),[t,n]=E(!0),[i,a]=E(20),o=Yr(async()=>{n(!0);try{const l=await le(`/slow-queries?limit=${i}`);e(l)}catch{e(null)}n(!1)},[i]);if(he(()=>{o()},[i]),t&&!r)return d(Nr,{icon:"i-heroicons-clock text-red-400",iconBg:"bg-red-600/20",title:"æ
¢æ¥è¯¢è¯¦æ
",desc:"å è½½ä¸...",children:d("div",{class:"flex justify-center py-8",children:d("span",{class:"w-6 h-6 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"})})});if(!r||!r.enabled)return d(Nr,{icon:"i-heroicons-clock text-red-400",iconBg:"bg-red-600/20",title:"æ
¢æ¥è¯¢è¯¦æ
",desc:"æ¥çå
·ä½çæ
¢æ¥è¯¢ SQL",children:d("div",{class:"text-center py-8 space-y-3",children:[d("span",{class:"i-heroicons-exclamation-triangle w-12 h-12 text-yellow-500 mx-auto block"}),d("div",{class:"text-slate-400",children:"æ
¢æ¥è¯¢æ¥å¿æªå¯ç¨ææ æ³è®¿é®"}),d("div",{class:"text-slate-500 text-sm",children:["è¯·å¨ MySQL é
ç½®ä¸å¯ç¨ ",d("code",{class:"bg-slate-700 px-1 rounded",children:"slow_query_log"})," æ ",d("code",{class:"bg-slate-700 px-1 rounded",children:"performance_schema"})]})]})});const s=r.source==="performance_schema"?"Performance Schema":"slow_log 表";return d(Nr,{icon:"i-heroicons-clock text-red-400",iconBg:"bg-red-600/20",title:"æ
¢æ¥è¯¢è¯¦æ
",desc:`æ°æ®æ¥æº: ${s} · å
± ${r.total} æ¡è®°å½`,children:[d("div",{class:"flex items-center justify-between mb-4",children:[d("div",{class:"flex items-center gap-2",children:[d("span",{class:"text-slate-400 text-sm",children:"æ¾ç¤ºæ°é:"}),d("select",{value:i,onChange:l=>a(Number(l.target.value)),class:"bg-slate-700 text-slate-200 text-sm rounded px-2 py-1 border border-slate-600",children:[d("option",{value:10,children:"10"}),d("option",{value:20,children:"20"}),d("option",{value:50,children:"50"}),d("option",{value:100,children:"100"})]})]}),d("button",{onClick:o,class:"px-3 py-1.5 bg-slate-700 hover:bg-slate-600 text-slate-300 rounded-lg text-sm transition-colors flex items-center gap-1",children:[d("span",{class:`i-heroicons-arrow-path w-4 h-4 ${t?"animate-spin":""}`}),"å·æ°"]})]}),r.queries.length===0?d("div",{class:"text-center py-8 text-slate-500",children:[d("span",{class:"i-heroicons-check-circle w-12 h-12 text-green-500 mx-auto block mb-2"}),"ææ æ
¢æ¥è¯¢è®°å½"]}):d("div",{class:"space-y-2",children:r.queries.map((l,u)=>d(G5,{query:l,index:u}))})]})},U5=()=>{const[r,e]=E(null),[t,n]=E([]),[i,a]=E("day"),[o,s]=E(!0),[l,u]=E(!1),[c,h]=E(!1),f=Yr(async(y=!1)=>{y?u(!0):s(!0);try{const g=await le("/env-info");e(g)}catch{}s(!1),u(!1)},[]),v=Yr(async y=>{h(!0);try{const g=await le(`/system-stats-history?range=${y}`);n(g.data||[])}catch{}h(!1)},[]);if(he(()=>{f();const y=setInterval(()=>f(!0),15e3);return()=>clearInterval(y)},[]),he(()=>{v(i)},[i]),o)return d(Cs,{});if(!r)return d(Cs,{});const p=t.map(y=>z5(y.created_at,i)),m=y=>t.map(g=>Number(g[y]));return d("div",{class:"space-y-6",children:[d("div",{class:"flex items-center justify-between",children:[d("div",{class:"flex items-center gap-2 text-slate-500 text-sm",children:[d("span",{class:"i-heroicons-arrow-path w-4 h-4"}),"æ¯ 15 ç§èªå¨å·æ°",l&&d("span",{class:"w-3 h-3 border border-blue-500 border-t-transparent rounded-full animate-spin"})]}),d("button",{onClick:()=>f(!0),class:"px-3 py-1.5 bg-slate-700 hover:bg-slate-600 text-slate-300 rounded-lg text-sm transition-colors",children:"æå¨å·æ°"})]}),d(F5,{data:r}),d(Nr,{icon:"i-heroicons-chart-bar text-amber-400",iconBg:"bg-amber-600/20",title:"åå²è¶å¿",desc:"ç³»ç»ææ éæ¶é´åå",children:[d("div",{class:"flex items-center justify-between mb-4",children:[d($5,{value:i,onChange:a}),c&&d("span",{class:"w-4 h-4 border-2 border-blue-500 border-t-transparent roun
19ded-full animate-spin"})]}),t.length===0&&!c?d("div",{class:"text-slate-500 text-sm text-center py-8",children:"ææ å岿°æ®ï¼ç³»ç»æ¯ 5 åééé䏿¬¡ï¼è¯·ç¨åæ¥ç"}):d("div",{class:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[d(Yt,{label:"CPU 使ç¨ç",color:"#3b82f6",xData:p,yData:m("cpu_usage"),unit:"%"}),d(Yt,{label:"å
å使ç¨ç",color:"#a855f7",xData:p,yData:m("mem_usage"),unit:"%"}),d(Yt,{label:"Worker å¹³å RSS",color:"#f97316",xData:p,yData:m("node_rss"),unit:"",formatValue:y=>_c(y)}),d(Yt,{label:"Worker å³°å¼ RSS",color:"#fb923c",xData:p,yData:m("node_rss_max"),unit:"",formatValue:y=>_c(y)}),d(Yt,{label:"Worker å¹³å V8 å ",color:"#06b6d4",xData:p,yData:m("heap_used"),unit:"",formatValue:y=>_c(y)}),d(Yt,{label:"Worker æ°é",color:"#818cf8",xData:p,yData:m("worker_count"),unit:"",formatValue:y=>String(Math.round(y))}),d(Yt,{label:"ç³»ç»è´è½½ (1min)",color:"#22c55e",xData:p,yData:m("load_avg_1"),unit:"",formatValue:y=>y.toFixed(2)}),d(Yt,{label:"æ°æ®åºè¿æ¥æ°",color:"#eab308",xData:p,yData:m("db_connections"),unit:"",formatValue:y=>String(Math.round(y))}),d(Yt,{label:"ç¼å²æ± å½ä¸ç",color:"#14b8a6",xData:p,yData:m("db_buffer_hit_rate"),unit:"%"}),d(Yt,{label:"æ
¢æ¥è¯¢ç´¯è®¡",color:"#ef4444",xData:p,yData:m("db_slow_queries"),unit:"",formatValue:y=>String(Math.round(y))})]})]}),d(W5,{})]})},Y5={enabled:!1,showMobile:!1,showPc:!1,bannerEnabled:!1,playerEnabled:!1,bannerImage:"",bannerLink:"",playerImage:"",playerLink:"",remoteDomain:""},Z5={enabled:!1,interval:"",sources:"",range:"today",requestDelay:""},X5=[{id:"collector",title:"è§é¢éé",icon:"i-heroicons-cloud-arrow-down-solid text-cyan-400",iconBg:"bg-cyan-600/20"},{id:"ad",title:"广åé
ç½®",icon:"i-heroicons-megaphone-solid text-amber-400",iconBg:"bg-amber-600/20"}],j5=()=>{const[r,e]=E(Y5),[t,n]=E(Z5),[i,a]=E({collector:!0,ad:!1}),[o,s]=E(!0),[l,u]=E(!1),[c,h]=E(!1),[f,v]=E(null),p=je(null),m=M=>a(C=>({...C,[M]:!C[M]}));he(()=>{y()},[]);const y=async()=>{s(!0);try{const[M,C]=await Promise.all([le("/ad-config"),le("/config/collector")]);M.config&&e(M.config);const I=C.configs,k=I["collector.interval"]||"",R=k?String(Math.max(1,Math.round(parseInt(k,10)/3600))):"";n({enabled:I["collector.enabled"]==="1",interval:R,sources:I["collector.sources"]||"",range:I["collector.range"]||"today",requestDelay:I["collector.request_delay"]||""})}catch(M){Z.error("å è½½é
置失败",M.message)}s(!1)},g=async()=>{u(!0);const M={"ad.enabled":r.enabled?"1":"0","ad.show_mobile":r.showMobile?"1":"0","ad.show_pc":r.showPc?"1":"0","ad.banner_enabled":r.bannerEnabled?"1":"0","ad.player_enabled":r.playerEnabled?"1":"0","ad.banner_image":r.bannerImage,"ad.banner_link":r.bannerLink,"ad.player_image":r.playerImage,"ad.player_link":r.playerLink,"ad.remote_domain":r.remoteDomain,"collector.enabled":t.enabled?"1":"0","collector.interval":String(Math.max(1,parseInt(t.interval,10)||1)*3600),"collector.sources":t.sources,"collector.range":t.range,"collector.request_delay":t.requestDelay};try{const C=await De("/config",{configs:M});Z.success("ä¿åæå",C.message||"é
ç½®å·²æ´æ°")}catch(C){Z.error("ä¿å失败",C.message)}u(!1)},x=(M,C)=>e(I=>({...I,[M]:C})),b=(M,C)=>n(I=>({...I,[M]:C})),_=async()=>{try{const M=await le("/collector/progress");v(M),h(M.collecting),!M.collecting&&p.current&&(clearInterval(p.current),p.current=null)}catch{}},S=()=>{p.current||(_(),p.current=setInterval(_,2e3))},w=async()=>{h(!0),S();try{const M=await De("/collector/trigger",{});Z.success("ééå·²å¯å¨",M.message),_()}catch(M){Z.error("éé失败",M.message)}setTimeout(_,500)},T=async()=>{try{const M=await De("/collector/abort",{});Z.success("已忢",M.message)}catch(M){Z.error("åæ¢å¤±è´¥",M.message)}},D=async()=>{try{const M=await De("/collector/stop",{});Z.success("宿¶å·²åæ¢",M.message)}catch(M){Z.error("åæ¢å¤±è´¥",M.message)}};if(he(()=>(le("/collector/status").then(M=>{M.collecting&&(h(!0),S())}).catch(()=>{}),()=>{p.current&&(clearInterval(p.current),p.current=null)}),[]),o)return d("div",{class:"flex items-center justify-center py-20",children:d("div",{class:"w-8 h-8 border-2 border-blue-500 border-t-transparent roun
19ded-full animate-spin"})});const L=M=>{switch(M){case"collector":return d("div",{class:"space-y-3",children:[d(Br,{label:"ééå¼å ³",desc:"å¼å¯åæé´éèªå¨éé",checked:t.enabled,onChange:C=>b("enabled",C)}),d("div",{class:"grid grid-cols-3 gap-3",children:[d(Zt,{label:"ééé´éï¼æ¶ï¼",value:t.interval,onChange:C=>b("interval",C),placeholder:"1"}),d(Zt,{label:"请æ±é´éï¼ç§ï¼",value:t.requestDelay,onChange:C=>b("requestDelay",C),placeholder:"3"}),d("div",{children:[d("label",{class:"text-slate-400 text-xs mb-1 block",children:"ééèå´"}),d("select",{onChange:C=>b("range",C.target.value),class:"w-full px-3 py-1.5 bg-slate-700 border border-slate-600 rounded-lg text-slate-200 text-sm focus:border-blue-500 focus:outline-none",children:[d("option",{value:"today",selected:t.range==="today",children:"å½å¤©"}),d("option",{value:"week",selected:t.range==="week",children:"æ¬å¨"}),d("option",{value:"all",selected:t.range==="all",children:"å ¨é¨"})]})]})]}),d("div",{children:[d("label",{class:"text-slate-400 text-xs mb-1 block",children:"èµæºç«ï¼ä¸è¡ä¸ä¸ª URLï¼"}),d("textarea",{value:t.sources,onInput:C=>b("sources",C.target.value),placeholder:`https://360zy.com/api.php/provide/vod/from/360m3u8/at/json/ 20https://...`,rows:6,class:"w-full px-3 py-1.5 bg-slate-700 border border-slate-600 rounded-lg text-slate-200 text-xs font-mono placeholder-slate-500 focus:border-blue-500 focus:outline-none resize-none leading-relaxed"})]}),d("div",{class:"flex items-center gap-3 pt-1",children:[d("button",{onClick:w,disabled:c,class:"inline-flex items-center gap-1.5 px-4 py-1.5 bg-cyan-600 hover:bg-cyan-500 disabled:bg-cyan-600/50 text-white rounded-lg text-sm transition-colors",children:c?d(we,{children:[d("span",{class:"w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"ééä¸..."]}):d(we,{children:[d("span",{class:"i-heroicons-play-solid w-4 h-4"}),"ç«å³éé"]})}),c&&d("button",{onClick:T,class:"inline-flex items-center gap-1.5 px-4 py-1.5 bg-red-600 hover:bg-red-500 text-white rounded-lg text-sm transition-colors",children:[d("span",{class:"i-heroicons-stop-solid w-4 h-4"}),"忢éé"]}),d("button",{onClick:D,class:"inline-flex items-center gap-1.5 px-4 py-1.5 bg-slate-600 hover:bg-slate-500 text-white rounded-lg text-sm transition-colors",children:[d("span",{class:"i-heroicons-clock w-4 h-4"}),"忢宿¶"]})]}),f&&f.sources&&f.sources.length>0&&d("div",{class:"space-y-2 pt-2",children:[d("div",{class:"flex items-center justify-between",children:[d("span",{class:"text-slate-300 text-sm font-medium",children:"ééè¿åº¦"}),d("span",{class:"text-slate-500 text-xs",children:["æ»è®¡: æ°å¢ ",f.totals.inserted," · æ´æ° ",f.totals.updated," · è·³è¿ ",f.totals.skipped," · 失败 ",f.totals.errors]})]}),f.sources.map(C=>{const I={pending:{label:"çå¾ ä¸",color:"text-slate-400",bg:"bg-slate-600"},running:{label:"ééä¸",color:"text-cyan-400",bg:"bg-cyan-600"},done:{label:"宿",color:"text-green-400",bg:"bg-green-600"},error:{label:"åºé",color:"text-red-400",bg:"bg-red-600"},aborted:{label:"已忢",color:"text-yellow-400",bg:"bg-yellow-600"}},k=I[C.status]||I.pending,R=C.totalPages>0?Math.round(C.currentPage/C.totalPages*100):0;return d("div",{class:"bg-slate-700/40 rounded-lg p-3 space-y-1.5",children:[d("div",{class:"flex items-center justify-between",children:[d("div",{class:"flex items-center gap-2",children:[d("span",{class:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${k.bg}/20 ${k.color}`,children:[C.status==="running"&&d("span",{class:"w-2.5 h-2.5 border border-current border-t-transparent rounded-full animate-spin"}),k.label]}),d("span",{class:"text-slate-200 text-sm font-mono",children:["[",C.fromId,"]"]})]}),d("span",{class:"text-slate-500 text-xs",children:[C.currentPage,"/",C.totalPages," 页 · ",C.totalCount," æ¡"]})]}),C.status!=="pending"&&d("div",{class:"w-full bg-slate-600 rounded-full h-1.5",children:d("div",{class:`${C.status==="error"?"bg-red-500":C.status==="aborted"?"bg-yellow-500":"bg-cyan-500"} h-1.5 rounded-full transition-all duration-300`,style:{width:`${Math.min(R,100)}%`}})}),d("div",{class:"flex gap-3 text-xs text-slate-500",children:[d("span",{children:["æ°å¢ ",d("span",{class:"text-green-400",children:C.inserted})]}),d("span",{children:["æ´æ° ",d("span",{class:"text-blue-400",children:C.updated})]}),d("span",{children:["è·³è¿ ",d("span",{class:"text-slate-400",children:C.skipped})]}),C.errors>0&&d("span",{children:["失败 ",d("span",{class:"text-red-400",children:C.errors})]})]})]})})]})]});case"ad":return d("div",{class:"space-y-3",children:[d(Br,{label:"广åæ
20»å¼å
³",desc:"å
³éåææå¹¿å䏿¾ç¤º",checked:r.enabled,onChange:C=>x("enabled",C)}),d("div",{class:"grid grid-cols-2 gap-2",children:[d(Br,{label:"ç§»å¨ç«¯æ¾ç¤º",checked:r.showMobile,onChange:C=>x("showMobile",C)}),d(Br,{label:"PC端æ¾ç¤º",checked:r.showPc,onChange:C=>x("showPc",C)})]}),d("div",{class:"grid grid-cols-2 gap-2",children:[d(Br,{label:"åºé¨æ¨ªå¹
广å",checked:r.bannerEnabled,onChange:C=>x("bannerEnabled",C)}),d(Br,{label:"ææ¾å¨å¹¿å",checked:r.playerEnabled,onChange:C=>x("playerEnabled",C)})]}),d("div",{class:"p-3 bg-slate-700/30 rounded-lg space-y-2",children:[d("div",{class:"flex items-center gap-2",children:[d("span",{class:"i-heroicons-globe-alt w-4 h-4 text-purple-400"}),d("span",{class:"text-slate-300 text-sm font-medium",children:"è¿ç¨å¹¿ååå"})]}),d("input",{type:"text",value:r.remoteDomain,onInput:C=>x("remoteDomain",C.target.value),placeholder:"ä¾å¦: vectorone.vipï¼çç©ºä½¿ç¨æ¬å°é
ç½®ï¼",class:"w-full px-3 py-1.5 bg-slate-700 border border-slate-600 rounded-lg text-slate-200 text-sm placeholder-slate-500 focus:border-blue-500 focus:outline-none"}),d("p",{class:"text-slate-500 text-xs",children:"é
ç½®åå端ä»è¿ç¨æ¥å£è·å广åï¼å¼å
³ä»ç¶çæ"})]}),!r.remoteDomain&&d("div",{class:"space-y-3",children:[d("div",{class:"p-3 bg-slate-700/30 rounded-lg space-y-2",children:[d("span",{class:"text-slate-300 text-sm font-medium",children:"åºé¨æ¨ªå¹
"}),d(Zt,{label:"å¾ç URL",value:r.bannerImage,onChange:C=>x("bannerImage",C),placeholder:"https://example.com/banner.webp"}),d(Zt,{label:"è·³è½¬é¾æ¥",value:r.bannerLink,onChange:C=>x("bannerLink",C),placeholder:"https://example.com"})]}),d("div",{class:"p-3 bg-slate-700/30 rounded-lg space-y-2",children:[d("span",{class:"text-slate-300 text-sm font-medium",children:"ææ¾å¨å¹¿å"}),d(Zt,{label:"å¾ç URL",value:r.playerImage,onChange:C=>x("playerImage",C),placeholder:"https://example.com/player-ad.webp"}),d(Zt,{label:"è·³è½¬é¾æ¥",value:r.playerLink,onChange:C=>x("playerLink",C),placeholder:"https://example.com"})]})]})]})}};return d("div",{class:"space-y-3",children:[X5.map(M=>d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[d("button",{onClick:()=>m(M.id),class:"w-full flex items-center justify-between p-4 hover:bg-slate-700/30 transition-colors",children:[d("div",{class:"flex items-center gap-3",children:[d("div",{class:`w-9 h-9 ${M.iconBg} rounded-lg flex items-center justify-center`,children:d("span",{class:`${M.icon} w-5 h-5`})}),d("span",{class:"text-slate-100 font-medium",children:M.title})]}),d("span",{class:`i-heroicons-chevron-down w-5 h-5 text-slate-400 transition-transform ${i[M.id]?"rotate-180":""}`})]}),d("div",{class:`border-t border-slate-700/50 px-4 pb-4 pt-4 ${i[M.id]?"":"hidden"}`,children:L(M.id)})]},M.id)),d("div",{class:"flex items-center gap-4 pt-2",children:d("button",{onClick:g,disabled:l,class:"inline-flex items-center gap-2 px-5 py-2 bg-blue-600 hover:bg-blue-500 disabled:bg-blue-600/50 text-white rounded-lg text-sm font-medium transition-colors",children:l?d(we,{children:[d("span",{class:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"ä¿åä¸..."]}):d(we,{children:[d("span",{class:"i-heroicons-check w-4 h-4"}),"ä¿åé
ç½®"]})})})]})},h0=20,as="h-8 px-3 inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-lg text-xs font-medium transition-colors",di="h-8 px-3 bg-slate-700 border border-slate-600 rounded-lg text-sm text-white placeholder:text-slate-500 focus:outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500",la="h-8 px-3 bg-slate-700 border border-slate-600 rounded-lg text-sm text-slate-200 focus:outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500";function q5(r){return r?new Date(r*1e3).toLocaleString("zh-CN"):"-"}function K5(r){return{vodName:r.vodName||"",vodRemarks:r.vodRemarks||"",vodYear:r.vodYear||"",vodActor:r.vodActor||"",vodDirector:r.vodDirector||"",typeId:String(r.typeId||0),typeId1:String(r.typeId1||0),vodStatus:r.vodStatus===0?0:1}}const Q5=({typeList:r})=>{const[e,t]=E([]),[n,i]=E(0),[a,o]=E(1),[s,l]=E(!1),[u,c]=E(""),[h,f]=E(""),[v,p]=E("0"),[m,y]=E(""),[g,x]=E(null),[b,_]=E(null),[S,w]=E(!1),T=ss(()=>{const P=new Map;return r.forEach(B=>P.set(B.typeId,B.typeName)),P},[r]),D=Yr(async()=>
20{l(!0);try{const P=new URLSearchParams({page:String(a),pageSize:String(h0)});h&&P.set("search",h),Number(v)>0&&P.set("typeId",v),m!==""&&P.set("vodStatus",m);const B=await le(`/content/vods?${P.toString()}`);t(B.items||[]),i(Number(B.total||0))}catch(P){Z.error("å 载影ç失败",P.message||"æªç¥é误")}finally{l(!1)}},[a,h,v,m]);he(()=>{D()},[D]);const L=()=>{a!==1&&o(1),f(u.trim())},M=()=>{c(""),f(""),p("0"),y(""),o(1)},C=P=>{x(P.vodId),_(K5(P))},I=()=>{x(null),_(null)},k=async()=>{if(!(!g||!b)){if(!b.vodName.trim()){Z.warning("å½±çåç§°ä¸è½ä¸ºç©º");return}w(!0);try{await le(`/content/vods/${g}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({vodName:b.vodName.trim(),vodRemarks:b.vodRemarks,vodYear:b.vodYear,vodActor:b.vodActor,vodDirector:b.vodDirector,typeId:Number(b.typeId)||0,typeId1:Number(b.typeId1)||0,vodStatus:b.vodStatus===0?0:1})}),Z.success("å½±çæ´æ°æå"),I(),D()}catch(P){Z.error("å½±çæ´æ°å¤±è´¥",P.message||"æªç¥é误")}finally{w(!1)}}},R=async P=>{const B=P.vodStatus===1?0:1;try{await De(`/content/vods/${P.vodId}/status`,{vodStatus:B}),Z.success(B===1?"å½±ç已䏿¶":"å½±ç已䏿¶"),D()}catch(V){Z.error("ç¶ææ´æ°å¤±è´¥",V.message||"æªç¥é误")}},O=async P=>{if(await Dt({title:"å é¤å½±ç",message:`ç¡®å®å é¤å½±çã${P.vodName}ãåï¼ 21æ¤æä½ä¸å¯æ¢å¤ã`,type:"danger",confirmText:"确认å é¤"}))try{await Ts(`/content/vods/${P.vodId}`),Z.success("å½±çå 餿å"),e.length===1&&a>1?o(a-1):D()}catch(V){Z.error("å½±çå é¤å¤±è´¥",V.message||"æªç¥é误")}},z=Math.max(1,Math.ceil(n/h0));return d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[d("div",{class:"px-4 py-3 border-b border-slate-700 bg-slate-800/50",children:d("div",{class:"flex items-center justify-between gap-3",children:d("div",{class:"flex items-center gap-2",children:[d("span",{class:"i-heroicons-film w-5 h-5 text-blue-400"}),d("h3",{class:"font-semibold text-white",children:"å½±ç管ç"}),d("span",{class:"text-xs text-slate-500 ml-2",children:["å ± ",n.toLocaleString()," æ¡"]})]})})}),d("div",{class:"px-4 py-3 bg-slate-900/30 border-b border-slate-700",children:d("div",{class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-2.5",children:[d("div",{class:"relative",children:[d("span",{class:"absolute left-3 top-1/2 -translate-y-1/2 i-heroicons-magnifying-glass w-4 h-4 text-slate-500"}),d("input",{type:"text",value:u,onInput:P=>c(P.target.value),onKeyDown:P=>P.key==="Enter"&&L(),placeholder:"æç´¢å½±çåç§°...",class:`${di} pl-9 w-full`})]}),d("select",{value:v,onChange:P=>{p(P.target.value),o(1)},class:la,children:[d("option",{value:"0",children:"å ¨é¨åç±»"}),r.map(P=>d("option",{value:P.typeId,children:P.typeName}))]}),d("select",{value:m,onChange:P=>{y(P.target.value),o(1)},class:la,children:[d("option",{value:"",children:"å ¨é¨ç¶æ"}),d("option",{value:"1",children:"䏿¶"}),d("option",{value:"0",children:"已䏿¶"})]}),d("div",{class:"flex gap-2",children:[d("button",{type:"button",onClick:L,class:`${as} flex-1 bg-blue-600 hover:bg-blue-500 text-white`,children:[d("span",{class:"i-heroicons-magnifying-glass w-4 h-4"}),"æ¥è¯¢"]}),d("button",{type:"button",onClick:M,class:`${as} px-2.5 bg-slate-700 hover:bg-slate-600 text-slate-300`,title:"éç½®çé",children:d("span",{class:"i-heroicons-arrow-path w-4 h-4"})})]})]})}),d("div",{class:"overflow-x-auto",children:d("table",{class:"w-full min-w-[1000px] text-sm",children:[d("thead",{class:"bg-slate-900/60 text-slate-400 text-xs uppercase tracking-wide",children:d("tr",{children:[d("th",{class:"text-left px-4 py-2.5 font-medium",children:"ID"}),d("th",{class:"text-left px-4 py-2.5 font-medium",children:"å½±çåç§°"}),d("th",{class:"text-left px-4 py-2.5 font-medium",children:"åç±»"}),d("th",{class:"text-left px-4 py-2.5 font-medium",children:"年份"}),d("th",{class:"text-left px-4 py-2.5 font-medium",children:"夿³¨"}),d("th",{class:"text-center px-4 py-2.5 font-medium",children:"ç¶æ"}),d("th",{class:"text-left px-4 py-2.5 font-medium",children:"æ´æ°æ¶é´"}),d("th",{class:"text-right px-4 py-2.5 font-medium",children:"æä½"})]})}),d("tbody",{class:"divide-y divide-slate-700/50",children:s?d("tr",{children:d("td",{colSpan:8,class:"px-4 py-12 text-center",children:d("div",{class:"flex flex-col items-center gap-3",children:[d("span",{class:"i-heroicons-arrow-path w-6 h-6 text-slate-500 animate-spin"}),d("span",{class:"text-slate-400 text-sm",children:"å è½½ä¸..."})]})})}):e.length===0?d("tr",{children:d("td",{colSpan:8,class:"px-4 py-12 text-center",children:d("div",{class:"flex flex-col items-center gap-3",children:[d("span",{class:"i-heroicons-film w-10 h-10 text-slate-600"}),d("span",{class:"text-slate-400 text-sm",children:"ææ å½±çæ°æ®"})]})})}):e.map(P=>d("tr",{class:"hover:bg-slate-700/20 transition-colors",children:[d("td",{class:"px-4 py-3 text-slate-400 font-mono text-xs",children:P.vodId}),d("td",{class:"px-4 py-3",children:d("div",{class:"max-w-[280px]",children:[d("div",{class:"text-slate-100 font-medium truncate",title:P.vodName,children:P.vodName}),P.vodActor&&d("div",{class:"text-xs text-slate-500 truncate mt-0.5",title:P.vodActor,children:P.vodActor})]})}),d("td",{class:"px-4 py-3",children:d("span",{class:"inline-flex items-center px-2 py-0.5 rounded text-xs bg-slate-700 text-slate-300",children:T.get(P.typeId)||`#${P.typeId}`})}),d("td",{class:"px-4 py-3 text-slate-400 text-xs",children:P.vodYear||"-"}),d("td",{class:"px-4 py-3 text-slate-400 text-xs max-w-[180px] truncate",title:P.vodRemarks||"",children:P.vodRemarks||"-"}),d("td",{class:"px-4 py-3 text-center",children:d("span",{class:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${P.vodStatus===1?"bg-emerald-500/10 text-emerald-400 border border-emerald-500/20":"bg-slate-600/30 text-slate-400 border border-slate-600/30"}`,children:[d("span",{class:`w-1.5 h-1.5 rounded-full ${P.vodStatus===1?"bg-emerald-400":"bg-slate-500"}`}),P.vodStatus===1?"䏿¶":"䏿¶"]})}),d("td",{class:"px-4 py-3 text-slate-400 text-xs whitespace-nowrap",children:q5(P.vodTime)}),d("td",{class:"px-4 py-3",children:d("div",{class:"flex items-center justify-end gap-1.5",children:[d("button",{type:"button",onClick:()=>C(P),class:"inline-flex items-center gap-1 px-2.5 py-1.5 bg-cyan-600/10 hover:bg-cyan-600/20 text-cyan-400 rounded text-xs transition-colors border border-cyan-600/20",title:"ç¼è¾",children:[d("span",{class:"i-heroicons-pencil-square w-3.5 h-3.5"}),"ç¼è¾"]}),d("button",{type:"button",onClick:()=>R(P),class:`inline-flex items-center gap-1 px-2.5 py-1.5 rounded text-xs transition-colors border ${P.vodStatus===1?"bg-amber-600/10 hover:bg-amber-600/20 text-amber-400 border-amber-600/20":"bg-emerald-600/10 hover:bg-emerald-600/20 text-emerald-400 border-emerald-600/20"}`,title:P.vodStatus===1?"䏿¶":"䏿¶",children:[d("span",{class:`w-3.5 h-3.5 ${P.vodStatus===1?"i-heroicons-arrow-down-circle":"i-heroicons-arrow-up-circle"}`}),P.vodStatus===1?"䏿¶":"䏿¶"]}),d("button",{type:"button",onClick:()=>O(P),class:"inline-flex items-center gap-1 px-2.5 py-1.5 bg-red-600/10 hover:bg-red-600/20 text-red-400 rounded text-xs transition-colors border border-red-600/20",title:"å é¤",children:d("span",{class:"i-heroicons-trash w-3.5 h-3.5"})})]})})]}))})]})}),d("div",{class:"px-4 py-3 border-t border-slate-700 bg-slate-900/30",children:d(Zh,{page:a,totalPages:z,total:n,onPageChange:o})}),d(Mc,{open:!!g&&!!b,title:g?`ç¼è¾å½±ç #${g}`:"ç¼è¾å½±ç",onClose:I,children:b&&d("div",{class:"space-y-5",children:[d("div",{class:"space-y-3",children:[d("div",{class:"flex items-center gap-2 text-xs font-medium text-slate-300 uppercase tracking-wide",children:[d("span",{class:"i-heroicons-information-circle w-4 h-4 text-blue-400"}),"åºæ¬ä¿¡æ¯"]}),d("div",{class:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:["å½±çåç§° ",d("span",{class:"text-red-400",children:"*"})]}),d("input",{type:"text",value:b.vodName,onInput:P=>_({...b,vodName:P.target.value}),placeholder:"请è¾å ¥å½±çåç§°",class:di})]}),d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:"年份"}),d("input",{type:"text",value:b.vodYear,onInput:P=>_({...b,vodYear:P.target.value}
21),placeholder:"ä¾å¦ï¼2025",class:di})]}),d("label",{class:"flex flex-col gap-1.5 md:col-span-2",children:[d("span",{class:"text-xs text-slate-400",children:"夿³¨"}),d("input",{type:"text",value:b.vodRemarks,onInput:P=>_({...b,vodRemarks:P.target.value}),placeholder:"å¯é夿³¨ä¿¡æ¯",class:di})]})]})]}),d("div",{class:"space-y-3",children:[d("div",{class:"flex items-center gap-2 text-xs font-medium text-slate-300 uppercase tracking-wide",children:[d("span",{class:"i-heroicons-user-group w-4 h-4 text-green-400"}),"æ¼è人å"]}),d("div",{class:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:"导æ¼"}),d("input",{type:"text",value:b.vodDirector,onInput:P=>_({...b,vodDirector:P.target.value}),placeholder:"导æ¼ä¿¡æ¯",class:di})]}),d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:"æ¼å"}),d("input",{type:"text",value:b.vodActor,onInput:P=>_({...b,vodActor:P.target.value}),placeholder:"主æ¼ä¿¡æ¯",class:di})]})]})]}),d("div",{class:"space-y-3",children:[d("div",{class:"flex items-center gap-2 text-xs font-medium text-slate-300 uppercase tracking-wide",children:[d("span",{class:"i-heroicons-tag w-4 h-4 text-amber-400"}),"åç±»ä¸ç¶æ"]}),d("div",{class:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:"主åç±»"}),d("select",{value:b.typeId,onChange:P=>_({...b,typeId:P.target.value}),class:la,children:r.map(P=>d("option",{value:P.typeId,children:P.typeName}))})]}),d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:"å¯åç±»"}),d("select",{value:b.typeId1,onChange:P=>_({...b,typeId1:P.target.value}),class:la,children:r.map(P=>d("option",{value:P.typeId,children:P.typeName}))})]}),d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:"䏿¶ç¶æ"}),d("select",{value:String(b.vodStatus),onChange:P=>_({...b,vodStatus:Number(P.target.value)===0?0:1}),class:la,children:[d("option",{value:"1",children:"â 䏿¶"}),d("option",{value:"0",children:"â 䏿¶"})]})]})]})]}),d("div",{class:"flex items-center justify-end gap-2 pt-2 border-t border-slate-700",children:[d("button",{type:"button",onClick:I,class:`${as} bg-slate-700 hover:bg-slate-600 text-slate-200`,children:[d("span",{class:"i-heroicons-x-mark w-4 h-4"}),"åæ¶"]}),d("button",{type:"button",disabled:S,onClick:k,class:`${as} bg-blue-600 hover:bg-blue-500 disabled:bg-blue-600/50 disabled:cursor-not-allowed text-white`,children:S?d(we,{children:[d("span",{class:"i-heroicons-arrow-path w-4 h-4 animate-spin"}),"ä¿åä¸..."]}):d(we,{children:[d("span",{class:"i-heroicons-check-circle w-4 h-4"}),"ä¿åæ´æ¹"]})})]})]})})]})},d0=20,Dn="h-8 px-3 inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-lg text-xs font-medium transition-colors",Rr="h-8 px-3 bg-slate-700 border border-slate-600 rounded-lg text-sm text-white placeholder:text-slate-500 focus:outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500",ua="h-8 px-3 bg-slate-700 border border-slate-600 rounded-lg text-sm text-slate-200 focus:outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500",wc={ruleName:"",domain:"*",matchType:"vod_id",matchValue:"",enabled:1};function Sc(r){return r==="vod_id"?"å½±ç ID":r==="type_id"?"åç±» ID":"å
³é®è¯"}function Tc(r){return r==="*"?"*ï¼å
¨ååï¼":r}function J5(r){return{ruleName:r.ruleName||"",domain:r.domain||"*",matchType:r.matchType||"vod_id",matchValue:r.matchValue||"",enabled:r.enabled===0?0:1}}const eI=()=>{const[r,e]=E([]),[t,n]=E(0),[i,a]=E(1),[o,s]=E(!1),[l,u]=E(""),[c,h]=E(""),[f,v]=E(""),[p,m]=E(""),[y,g]=E(["*"]),[x,b]=E(["vod_id","type_id","keyword"]),[_,S]=E({...wc}),[w,T]=E(!1),[D,L]=E(!1),[M,C]=E(null),[I,k]=E(null),[R,O]=E(!1),z=Yr(async()=>{s(!0);try{const F=new URLSearchParams({page:String(i),pageSize:String(d0)});c&&F.set("search",c),f&&F.set("domain",f),p!==""&&F.set("enabled",p);const _e=await le(`/content/takedown-rules?${F.toString()}`);e(_e.items||[]),n(Number(_e.total||0)),Array.isArray(_e.domainOptions)&&_e.domainOptions.length>0&&g(_e.domainOptions),Array.isArray(_e.matchTypeOptions)&&_e.matchTypeOptions.length>0&&b(_e.matchTypeOptions)}catch(F){Z.error("å è½½è§å失败",F.message||"æªç¥é误")}finally{s(!1)}},[i,c,f,p]);he(()=>{z()},[z]);const P=()=>{i!==1&&a(1),h(l.trim())},B=()=>{u(""),h(""),v(""),m(""),a(1)},V=async()=>{const F={ruleName:_.ruleName.trim(),domain:_.domain||"*",matchType:_.matchType,matchValue:_.matchValue.trim(),enabled:_.enabled===0?0:1};if(!F.ruleName||!F.matchValue){Z.warning("è§ååç§°åå¹é
å¼ä¸è½ä¸ºç©º");return}L(!0);try{await De("/content/takedown-rules",F),Z.success("è§åå建æå"),S({...wc}),T(!1),a(1),z()}catch(_e){Z.error("å建è§å失败",_e.message||"æªç¥é误")}finally{L(!1)}},U=F=>{C(F.id),k(J5(F))},Y=()=>{C(null),k(null)},N=async()=>
21{if(!M||!I)return;const F={ruleName:I.ruleName.trim(),domain:I.domain||"*",matchType:I.matchType,matchValue:I.matchValue.trim(),enabled:I.enabled===0?0:1};if(!F.ruleName||!F.matchValue){Z.warning("è§ååç§°åå¹é å¼ä¸è½ä¸ºç©º");return}O(!0);try{await le(`/content/takedown-rules/${M}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)}),Z.success("è§åæ´æ°æå"),Y(),z()}catch(_e){Z.error("è§åæ´æ°å¤±è´¥",_e.message||"æªç¥é误")}finally{O(!1)}},G=async F=>{const _e=F.enabled===1?0:1;try{await De(`/content/takedown-rules/${F.id}/toggle`,{enabled:_e}),Z.success(_e===1?"è§åå·²å¯ç¨":"è§åå·²åç¨"),z()}catch(st){Z.error("è§åç¶ææ´æ°å¤±è´¥",st.message||"æªç¥é误")}},oe=async F=>{if(await Dt({title:"å é¤è§å",message:`ç¡®å®å é¤è§åã${F.ruleName}ãåï¼ 22æ¤æä½ä¸å¯æ¢å¤ã`,type:"danger",confirmText:"确认å é¤"}))try{await Ts(`/content/takedown-rules/${F.id}`),Z.success("è§åå 餿å"),r.length===1&&i>1?a(i-1):z()}catch(st){Z.error("è§åå é¤å¤±è´¥",st.message||"æªç¥é误")}},xe=Math.max(1,Math.ceil(t/d0));return d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[d("div",{class:"px-4 py-3 border-b border-slate-700 bg-slate-800/50",children:d("div",{class:"flex items-center justify-between gap-3",children:[d("div",{class:"flex items-center gap-2",children:[d("span",{class:"i-heroicons-shield-exclamation w-5 h-5 text-amber-400"}),d("h3",{class:"font-semibold text-white",children:"䏿¶è§å"}),d("span",{class:"text-xs text-slate-500 ml-2",children:["å ± ",t.toLocaleString()," æ¡"]})]}),d("button",{type:"button",onClick:()=>{S({...wc}),T(!0)},class:`${Dn} bg-amber-600 hover:bg-amber-500 text-white shadow-lg shadow-amber-600/20`,children:[d("span",{class:"i-heroicons-plus w-4 h-4"}),"æ°å»ºè§å"]})]})}),d("div",{class:"px-4 py-2.5 bg-blue-500/5 border-b border-slate-700",children:d("div",{class:"flex items-start gap-2 text-xs text-slate-400",children:[d("span",{class:"i-heroicons-information-circle w-4 h-4 text-blue-400 mt-0.5 flex-shrink-0"}),d("span",{children:"䏿¶è§åç¨äºæååå±è½ç¹å®å½±çãåç±»æå ³é®è¯ï¼æ¯æå ¨ååï¼*ï¼æåç¬ååé ç½®"})]})}),d("div",{class:"px-4 py-3 bg-slate-900/30 border-b border-slate-700",children:d("div",{class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-2.5",children:[d("div",{class:"relative",children:[d("span",{class:"absolute left-3 top-1/2 -translate-y-1/2 i-heroicons-magnifying-glass w-4 h-4 text-slate-500"}),d("input",{type:"text",value:l,onInput:F=>u(F.target.value),onKeyDown:F=>F.key==="Enter"&&P(),placeholder:"æç´¢è§ååç§°...",class:`${Rr} pl-9 w-full`})]}),d("input",{type:"text",list:"rule-domain-filter-options",value:f,onInput:F=>{v(F.target.value.trim()),a(1)},placeholder:"å ¨é¨åå",class:Rr}),d("datalist",{id:"rule-domain-filter-options",children:y.map(F=>d("option",{value:F,children:Tc(F)}))}),d("select",{value:p,onChange:F=>{m(F.target.value),a(1)},class:ua,children:[d("option",{value:"",children:"å ¨é¨ç¶æ"}),d("option",{value:"1",children:"å¯ç¨"}),d("option",{value:"0",children:"å·²åç¨"})]}),d("div",{class:"flex gap-2",children:[d("button",{type:"button",onClick:P,class:`${Dn} flex-1 bg-blue-600 hover:bg-blue-500 text-white`,children:[d("span",{class:"i-heroicons-magnifying-glass w-4 h-4"}),"æ¥è¯¢"]}),d("button",{type:"button",onClick:B,class:`${Dn} px-2.5 bg-slate-700 hover:bg-slate-600 text-slate-300`,title:"éç½®çé",children:d("span",{class:"i-heroicons-arrow-path w-4 h-4"})})]})]})}),d("div",{class:"overflow-x-auto",children:d("table",{class:"w-full min-w-[900px] text-sm",children:[d("thead",{class:"bg-slate-900/60 text-slate-400 text-xs uppercase tracking-wide",children:d("tr",{children:[d("th",{class:"text-left px-4 py-2.5 font-medium",children:"ID"}),d("th",{class:"text-left px-4 py-2.5 font-medium",children:"è§ååç§°"}),d("th",{class:"text-left px-4 py-2.5 font-medium",children:"åå"}),d("th",{class:"text-left px-4 py-2.5 font-medium",children:"å¹é ç±»å"}),d("th",{class:"text-left px-4 py-2.5 font-medium",children:"å¹é å¼"}),d("th",{class:"text-center px-4 py-2.5 font-medium",children:"ç¶æ"}),d("th",{class:"text-right px-4 py-2.5 font-medium",children:"æä½"})]})}),d("tbody",{class:"divide-y divide-slate-700/50",children:o?d("tr",{children:d("td",{colSpan:7,class:"px-4 py-12 text-center",children:d("div",{class:"flex flex-col items-center gap-3",children:[d("span",{class:"i-heroicons-arrow-path w-6 h-6 text-slate-500 animate-spin"}),d("span",{class:"text-slate-400 text-sm",children:"å è½½ä¸..."})]})})}):r.length===0?d("tr",{children:d("td",{colSpan:7,class:"px-4 py-12 text-center",children:d("div",{class:"flex flex-col items-center gap-3",children:[d("span",{class:"i-heroicons-shield-exclamation w-10 h-10 text-slate-600"}),d("span",{class:"text-slate-400 text-sm",children:"ææ ä¸æ¶è§å"})]})})}):r.map(F=>d("tr",{class:"hover:bg-slate-700/20 transition-colors",children:[d("td",{class:"px-4 py-3 text-slate-400 font-mono text-xs",children:F.id}),d("td",{class:"px-4 py-3",children:d("div",{class:"text-slate-100 font-medium max-w-[200px] truncate",title:F.ruleName,children:F.ruleName})}),d("td",{class:"px-4 py-3",children:d("span",{class:`inline-flex items-center px-2 py-0.5 rounded text-xs ${F.domain==="*"?"bg-purple-500/10 text-purple-400 border border-purple-500/20":"bg-slate-700 text-slate-300"}`,children:F.domain==="*"?"å ¨åå":F.domain})}),d("td",{class:"px-4 py-3",children:d("span",{class:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs bg-blue-500/10 text-blue-400 border border-blue-500/20",children:[F.matchType==="vod_id"&&d("span",{class:"i-heroicons-film w-3 h-3"}),F.matchType==="type_id"&&d("span",{class:"i-heroicons-tag w-3 h-3"}
22),F.matchType==="keyword"&&d("span",{class:"i-heroicons-key w-3 h-3"}),Sc(F.matchType)]})}),d("td",{class:"px-4 py-3 text-slate-300 font-mono text-xs max-w-[180px] truncate",title:F.matchValue,children:F.matchValue}),d("td",{class:"px-4 py-3 text-center",children:d("span",{class:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${F.enabled===1?"bg-emerald-500/10 text-emerald-400 border border-emerald-500/20":"bg-slate-600/30 text-slate-400 border border-slate-600/30"}`,children:[d("span",{class:`w-1.5 h-1.5 rounded-full ${F.enabled===1?"bg-emerald-400":"bg-slate-500"}`}),F.enabled===1?"å¯ç¨":"åç¨"]})}),d("td",{class:"px-4 py-3",children:d("div",{class:"flex items-center justify-end gap-1.5",children:[d("button",{type:"button",onClick:()=>U(F),class:"inline-flex items-center gap-1 px-2.5 py-1.5 bg-cyan-600/10 hover:bg-cyan-600/20 text-cyan-400 rounded text-xs transition-colors border border-cyan-600/20",title:"ç¼è¾",children:[d("span",{class:"i-heroicons-pencil-square w-3.5 h-3.5"}),"ç¼è¾"]}),d("button",{type:"button",onClick:()=>G(F),class:`inline-flex items-center gap-1 px-2.5 py-1.5 rounded text-xs transition-colors border ${F.enabled===1?"bg-amber-600/10 hover:bg-amber-600/20 text-amber-400 border-amber-600/20":"bg-emerald-600/10 hover:bg-emerald-600/20 text-emerald-400 border-emerald-600/20"}`,title:F.enabled===1?"åç¨":"å¯ç¨",children:[d("span",{class:`w-3.5 h-3.5 ${F.enabled===1?"i-heroicons-pause-circle":"i-heroicons-play-circle"}`}),F.enabled===1?"åç¨":"å¯ç¨"]}),d("button",{type:"button",onClick:()=>oe(F),class:"inline-flex items-center gap-1 px-2.5 py-1.5 bg-red-600/10 hover:bg-red-600/20 text-red-400 rounded text-xs transition-colors border border-red-600/20",title:"å é¤",children:d("span",{class:"i-heroicons-trash w-3.5 h-3.5"})})]})})]}))})]})}),d("div",{class:"px-4 py-3 border-t border-slate-700 bg-slate-900/30",children:d(Zh,{page:i,totalPages:xe,total:t,onPageChange:a})}),d(Mc,{open:w,title:"æ°å»ºä¸æ¶è§å",onClose:()=>T(!1),children:d("div",{class:"space-y-5",children:[d("div",{class:"bg-blue-500/5 border border-blue-500/20 rounded-lg p-3",children:d("div",{class:"flex items-start gap-2 text-xs text-blue-300",children:[d("span",{class:"i-heroicons-light-bulb w-4 h-4 mt-0.5 flex-shrink-0"}),d("div",{class:"space-y-1",children:[d("div",{children:"⢠影ç IDï¼å±è½æå® ID çå½±çï¼å¦ï¼307594ï¼"}),d("div",{children:"⢠åç±» IDï¼å±è½æ´ä¸ªåç±»ä¸çææå½±çï¼å¦ï¼5ï¼"}),d("div",{children:"⢠å
³é®è¯ï¼å±è½çåå
å«å
³é®è¯çå½±çï¼å¦ï¼å¨ä½ï¼"})]})]})}),d("div",{class:"space-y-3",children:[d("div",{class:"flex items-center gap-2 text-xs font-medium text-slate-300 uppercase tracking-wide",children:[d("span",{class:"i-heroicons-information-circle w-4 h-4 text-blue-400"}),"åºæ¬ä¿¡æ¯"]}),d("div",{class:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:["è§ååç§° ",d("span",{class:"text-red-400",children:"*"})]}),d("input",{type:"text",value:_.ruleName,onInput:F=>S({..._,ruleName:F.target.value}),placeholder:"ä¾å¦ï¼ç«ç¹ A å±è½è§å",class:Rr})]}),d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:"åºç¨åå"}),d("input",{type:"text",list:"create-rule-domain-options",value:_.domain,onInput:F=>S({..._,domain:F.target.value.trim()}),placeholder:"* 表示å
¨åå",class:Rr}),d("datalist",{id:"create-rule-domain-options",children:y.map(F=>d("option",{value:F,children:Tc(F)}))})]})]})]}),d("div",{class:"space-y-3",children:[d("div",{class:"flex items-center gap-2 text-xs font-medium text-slate-300 uppercase tracking-wide",children:[d("span",{class:"i-heroicons-funnel w-4 h-4 text-amber-400"}),"å¹é
è§å"]}),d("div",{class:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:["å¹é
ç±»å ",d("span",{class:"text-red-400",children:"*"})]}
22),d("select",{value:_.matchType,onChange:F=>S({..._,matchType:F.target.value}),class:ua,children:x.map(F=>d("option",{value:F,children:Sc(F)}))})]}),d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:["å¹é
å¼ ",d("span",{class:"text-red-400",children:"*"})]}),d("input",{type:"text",value:_.matchValue,onInput:F=>S({..._,matchValue:F.target.value}),placeholder:_.matchType==="vod_id"?"å½±ç IDï¼å¦ï¼307594":_.matchType==="type_id"?"åç±» IDï¼å¦ï¼5":"å
³é®è¯ï¼å¦ï¼å¨ä½",class:Rr})]}),d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:"å¯ç¨ç¶æ"}),d("select",{value:String(_.enabled),onChange:F=>S({..._,enabled:Number(F.target.value)===0?0:1}),class:ua,children:[d("option",{value:"1",children:"â å¯ç¨"}),d("option",{value:"0",children:"â åç¨"})]})]})]})]}),d("div",{class:"flex items-center justify-end gap-2 pt-2 border-t border-slate-700",children:[d("button",{type:"button",onClick:()=>T(!1),class:`${Dn} bg-slate-700 hover:bg-slate-600 text-slate-200`,children:[d("span",{class:"i-heroicons-x-mark w-4 h-4"}),"åæ¶"]}),d("button",{type:"button",disabled:D,onClick:V,class:`${Dn} bg-amber-600 hover:bg-amber-500 disabled:bg-amber-600/50 disabled:cursor-not-allowed text-white`,children:D?d(we,{children:[d("span",{class:"i-heroicons-arrow-path w-4 h-4 animate-spin"}),"å建ä¸..."]}):d(we,{children:[d("span",{class:"i-heroicons-plus-circle w-4 h-4"}),"å建è§å"]})})]})]})}),d(Mc,{open:!!M&&!!I,title:M?`ç¼è¾è§å #${M}
22`:"ç¼è¾è§å",onClose:Y,children:I&&d("div",{class:"space-y-5",children:[d("div",{class:"space-y-3",children:[d("div",{class:"flex items-center gap-2 text-xs font-medium text-slate-300 uppercase tracking-wide",children:[d("span",{class:"i-heroicons-information-circle w-4 h-4 text-blue-400"}),"åºæ¬ä¿¡æ¯"]}),d("div",{class:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:["è§ååç§° ",d("span",{class:"text-red-400",children:"*"})]}),d("input",{type:"text",value:I.ruleName,onInput:F=>k({...I,ruleName:F.target.value}),placeholder:"ä¾å¦ï¼ç«ç¹ A å±è½è§å",class:Rr})]}),d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:"åºç¨åå"}),d("input",{type:"text",list:"edit-rule-domain-options",value:I.domain,onInput:F=>k({...I,domain:F.target.value.trim()}),placeholder:"* 表示å
¨åå",class:Rr}),d("datalist",{id:"edit-rule-domain-options",children:y.map(F=>d("option",{value:F,children:Tc(F)}))})]})]})]}),d("div",{class:"space-y-3",children:[d("div",{class:"flex items-center gap-2 text-xs font-medium text-slate-300 uppercase tracking-wide",children:[d("span",{class:"i-heroicons-funnel w-4 h-4 text-amber-400"}),"å¹é
è§å"]}),d("div",{class:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:["å¹é
ç±»å ",d("span",{class:"text-red-400",children:"*"})]}),d("select",{value:I.matchType,onChange:F=>k({...I,matchType:F.target.value}),class:ua,children:x.map(F=>d("option",{value:F,children:Sc(F)}))})]}),d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:["å¹é
å¼ ",d("span",{class:"text-red-400",children:"*"})]}),d("input",{type:"text",value:I.matchValue,onInput:F=>k({...I,matchValue:F.target.value}),placeholder:I.matchType==="vod_id"?"å½±ç IDï¼å¦ï¼307594":I.matchType==="type_id"?"åç±» IDï¼å¦ï¼5":"å
³é®è¯ï¼å¦ï¼å¨ä½",class:Rr})]}),d("label",{class:"flex flex-col gap-1.5",children:[d("span",{class:"text-xs text-slate-400",children:"å¯ç¨ç¶æ"}),d("select",{value:String(I.enabled),onChange:F=>k({...I,enabled:Number(F.target.value)===0?0:1}),class:ua,children:[d("option",{value:"1",children:"â å¯ç¨"}),d("option",{value:"0",children:"â åç¨"})]})]})]})]}),d("div",{class:"flex items-center justify-end gap-2 pt-2 border-t border-slate-700",children:[d("button",{type:"button",onClick:Y,class:`${Dn} bg-slate-700 hover:bg-slate-600 text-slate-200`,children:[d("span",{class:"i-heroicons-x-mark w-4 h-4"}),"åæ¶"]}),d("button",{type:"button",disabled:R,onClick:N,class:`${Dn} bg-blue-600 hover:bg-blue-500 disabled:bg-blue-600/50 disabled:cursor-not-allowed text-white`,children:R?d(we,{children:[d("span",{class:"i-heroicons-arrow-path w-4 h-4 animate-spin"}),"ä¿åä¸..."]}):d(we,{children:[d("span",{class:"i-heroicons-check-circle w-4 h-4"}),"ä¿åæ´æ¹"]})})]})]})})]})},f0="h-8 px-3 inline-flex items-center justify-center rounded-lg text-xs font-medium transition-colors",tI=()=>{const[r,e]=E([]),[t,n]=E("vod");return he(()=>{le("/content/types").then(i=>e(i.types||[])).catch(i=>Z.error("å è½½å类失败",i.message||"æªç¥é误"))},[]),d("div",{class:"space-y-6",children:[d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 p-2 sm:p-3",children:d("div",{class:"flex items-center gap-2",children:[d("button",{type:"button",onClick:()=>n("vod"),class:`${f0} ${t==="vod"?"bg-blue-600 text-white":"bg-slate-700 text-slate-300 hover:bg-slate-600"}`,children:"å½±ç管ç"}),d("button",{type:"button",onClick:()=>n("rule"),class:`${f0} ${t==="rule"?"bg-blue-600 text-white":"bg-slate-700 text-slate-300 hover:bg-slate-600"}`,children:"䏿¶è§å"})]})}),t==="vod"?d(Q5,{typeList:r}):d(eI,{})]})},rI={baidu:{text:"text-blue-400",bg:"bg-blue-500/10",icon:"i-heroicons-magnifying-glass"},sogou:{text:"text-orange-400",bg:"bg-orange-500/10",icon:"i-heroicons-magnifying-glass"},manual:{text:"text-cyan-400",bg:"bg-cyan-500/10",icon:"i-heroicons-pencil-square"}},nI={baidu:"ç¾åº¦",sogou:"æç",manual:"æå¨"},iI=({stats:r,collectorStatus:e,collectorPending:t})=>{const n=r?.bySource||{},i=Object.entries(n).sort((a,o)=>o[1]-a[1]);return d("div",{class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 ga
22p-3 sm:gap-4",children:[d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 p-4 hover:border-slate-600 transition-colors",children:[d("div",{class:"flex items-center justify-between mb-2",children:[d("span",{class:"text-slate-400 text-xs",children:"æ»å
³é®è¯"}),d("div",{class:"w-8 h-8 bg-slate-700/50 rounded-lg flex items-center justify-center",children:d("span",{class:"i-heroicons-hashtag w-4 h-4 text-slate-400"})})]}),d("div",{class:"text-2xl font-bold text-white mb-2",children:r?.total?.toLocaleString()??"-"}),i.length>0&&d("div",{class:"space-y-1",children:i.map(([a,o])=>{const s=rI[a]||{text:"text-slate-400",bg:"bg-slate-700/50",icon:"i-heroicons-question-mark-circle"};return d("div",{class:"flex items-center justify-between text-xs",children:[d("div",{class:"flex items-center gap-1.5",children:[d("div",{class:`w-5 h-5 ${s.bg} rounded flex items-center justify-center`,children:d("span",{class:`${s.icon} w-3 h-3 ${s.text}`})}),d("span",{class:"text-slate-400",children:nI[a]||a})]}),d("span",{class:"text-slate-500 font-medium",children:o.toLocaleString()})]},a)})})]}),d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 p-4 hover:border-slate-600 transition-colors",children:[d("div",{class:"flex items-center justify-between mb-2",children:[d("span",{class:"text-slate-400 text-xs",children:"å¾
使ç¨"}),d("div",{class:"w-8 h-8 bg-green-500/10 rounded-lg flex items-center justify-center",children:d("span",{class:"i-heroicons-clock w-4 h-4 text-green-400"})})]}),d("div",{class:"text-2xl font-bold text-green-400",children:r?.unused?.toLocaleString()??"-"}),r&&r.total>0&&d("div",{class:"text-xs text-slate-500 mt-1",children:["å æ¯ ",(r.unused/r.total*100).toFixed(1),"%"]})]}),d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 p-4 hover:border-slate-600 transition-colors",children:[d("div",{class:"flex items-center justify-between mb-2",children:[d("span",{class:"text-slate-400 text-xs",children:"已使ç¨"}),d("div",{class:"w-8 h-8 bg-slate-700/50 rounded-lg flex items-center justify-center",children:d("span",{class:"i-heroicons-check-circle w-4 h-4 text-slate-400"})})]}),d("div",{class:"text-2xl font-bold text-slate-400",children:r?.used?.toLocaleString()??"-"}),r&&r.total>0&&d("div",{class:"text-xs text-slate-500 mt-1",children:["å æ¯ ",(r.used/r.total*100).toFixed(1),"%"]})]}),d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 p-4 hover:border-slate-600 transition-colors",children:[d("div",{class:"flex items-center justify-between mb-2",children:[d("span",{class:"text-slate-400 text-xs",children:"仿¥æ°å¢"}),d("div",{class:"w-8 h-8 bg-blue-500/10 rounded-lg flex items-center justify-center",children:d("span",{class:"i-heroicons-sparkles w-4 h-4 text-blue-400"})})]}),d("div",{class:"text-2xl font-bold text-blue-400",children:r?.todayCount?.toLocaleString()??"-"}),d("div",{class:"text-xs text-slate-500 mt-1",children:new Date().toLocaleDateString("zh-CN",{month:"long",day:"numeric"})})]}),d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 p-4 hover:border-slate-600 transition-colors",children:[d("div",{class:"flex items-center justify-between mb-2",children:[d("span",{class:"text-slate-400 text-xs",children:"ééç¶æ"}),d("div",{class:`w-8 h-8 rounded-lg flex items-center justify-center ${t?"bg-blue-500/10":e?.running?"bg-green-500/10":"bg-slate-700/50"}`,children:d("span",{class:`w-4 h-4 ${t?"i-heroicons-arrow-path text-blue-400 animate-spin":e?.running?"i-heroicons-play-circle text-green-400":"i-heroicons-pause-circle text-slate-400"}`})})]}),d("div",{class:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium ${t?"bg-blue-500/20 text-blue-400":e?.running?"bg-green-500/20 text-green-400":"bg-slate-700 text-slate-400"}`,children:[d("span",{class:`w-1.5 h-1.5 rounded-full ${t?"bg-blue-400 animate-pulse":e?.running?"bg-green-400 animate-pulse":"bg-slate-500"}`}),t?"忢ä¸":e?.running?"è¿è¡ä¸":"已忢"]}),e?.enabled!==void 0&&d("div",{class:"text-xs text-slate-500 mt-2",children:["èªå¨ééï¼",e.enabled?"å·²å¯ç¨":"å·²ç¦ç¨"]})]})]})},aI={baidu:{bg:"bg-blue-500/10",text:"text-blue-400",icon:"i-heroicons-magnifying-glass"},sogou:{bg:"bg-orange-500/10",text:"text-orange-400",icon:"i-heroicons-magnifying-glass"},manual:{bg:"bg-cyan-500/10",text:"text-cyan-400",icon:"i-heroicons-pencil-square"}},oI={baidu:"ç¾åº¦",sogou:"æç",manual:"æå¨"},Sb=({source:r})=>{const e=aI[r]||{bg:"bg-slate-700",text:"text-slate-400",icon:"i-heroicons-question-mark-circle"},t=oI[r]||r;return d("span",{class:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${e.bg} ${e.text}`,children:[d("span",{class:`${e.icon} w-3 h-3`}),t]})},Tb=({status:r})=>d("span",{class:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${r===0?"bg-green-500/10 text-green-400":"bg-slate-700 text-slate-400"}`,children:[d("span",{class:`w-1.5 h-1.5 rounded-full ${r===0?"bg-green-400":"bg-slate-500"}`}),r===0?"å¾
ç¨":"å·²ç¨"]}),sI=({kw:r,selected:e,onToggleSelect:t,onDelete:n})=>d("div",{class:"px-4 py-3 border-b border-slate-700/50 last:border-0 hover:bg-slate-700/20 transition-colors",children:d("div",{class:"flex items-start gap-3",children:[d("input",{type:"checkbox",checked:e,onChange:t,class:"mt-0.5 w-4 h-4 rounded bg-slate-700 border-slate-600 text-blue-600 focus:ring-blue-500 focus:ring-offset-slate-800 flex-shrink-0"}),d("div",{class:"flex-1 min-w-0",children:[d("div",{class:"text-white text-sm font-medium mb-1.5",children:r.keyword}),d("div",{class:"flex flex-wrap items-center gap-2",children:[r.source&&d(Sb,{source:r.source}),d(Tb,{status:r.status}),r.seedWord&&d("span",{class:"text-xs text-slate-500 truncate max-w-[150px]",children:["ç§åï¼",r.seedWord]})]}),d("div",{class:"text-xs text-slate-600 mt-1.5",children:r.createdAt})]}),d("button",{onClick:n,class:"w-8 h-8 flex items-center justify-center text-red-400 hover:bg-red-500/10 rounded-lg transition-colors flex-shrink-0",children:d("span",{class:"i-heroicons-trash w-4 h-4"})})]})}),lI=({keywords:r,loading:e,selected:t,onToggleSelect:n,onToggleSelectAll:i,onDelete:a})=>e?d("div",{class:"bg-slate-800 border border-slate-700 rounded-xl p-12 flex justify-center",children:d(Cs,{text:"å è½½ä¸..."})}):r.length===0?d("div",{class:"bg-slate-800 border border-slate-700 rounded-xl p-12",children:d("div",{class:"text-center",children:[d("div",{class:"w-16 h-16 bg-slate-700/50 rounded-full flex items-center justify-center mx-auto mb-4",children:d("span",{class:"i-heroicons-magnifying-glass w-8 h-8 text-slate-500"})}),d("div",{class:"text-slate-400 text-sm",children:"ææ å
³é®è¯"}),d("div",{class:"text-slate-600 text-xs mt-1",children:"æ·»å å
³é®è¯æå¯å¨ééå¼å§ä½¿ç¨"})]})}):d("div",{class:"bg-slate-800 border border-slate-700 rounded-xl overflow-hidden",children:[d("div",{class:"sm:hidden",children:[d("div",{class:"px-4 py-3 bg-slate-900/50 border-b border-slate-700 flex items-center justify-between sticky top-0 z-10",children:[d("label",{class:"flex items-center gap-2 cursor-pointer",children:[d("input",{type:"checkbox",checked:t.size===r.length&&r.length>0,onChange:i,class:"w-4 h-4 rounded bg-slate-700 border-slate-600 text-blue-600 focus:ring-blue-500 focus:ring-offset-slate-800"}),d("span",{class:"text-slate-400 text-xs",children:"å
¨é"})]}),d("span",{class:"text-slate-500 text-xs",children:[r.length," æ¡"]})]}),d("div",{class:"max-h-[60vh] overflow-y-auto",children:r.map(o=>d(sI,{kw:o,selected:t.has(o.id),onToggleSelect:()=>n(o.id),onDelete:()=>a([o.id])},o.id))})]}),d("div",{class:"hidden sm:block overflow-x-auto",children:d("table",{class:"w-full text-sm",children:[d("thead",{class:"bg-slate-900/50 sticky top-0 z-10",children:d("tr",{children:[d("th",{class:"px-4 py-3 text-left w-12",children:d("input",{type:"checkbox",checked:t.size===r.length&&r.length>0,onChange:i,class:"w-4 h-4 rounded bg-slate-700 border-slate-600 text-blue-600 focus:ring-blue-500 focus:ring-offset-slate-800"})}),d("th",{class:"px-4 py-3 text-left text-slate-400 font-medium",children:"å
³é®è¯"}),d("th",{class:"px-4 py-3 text-left text-slate-400 font-medium",children:"æ¥æº"}),d("th",{class:"px-4 py-3 text-left text-slate-400 font-medium",children:"ç§åè¯"}),d("th",{class:"px-4 py-3 text-left text-slate-400 font-medium",children:"ç¶æ"}),d("th",{class:"px-4 py-3 text-left text-slate-400 font-medium",children:"å建æ¶é´"}),d("th",{class:"px-4 py-3 text-center text-slate-400 font-medium w-20",children:"æä½"})]})}),d("tbody",{class:"divide-y divide-slate-700/50",children:r.map(o=>d("tr",{class:"hover:bg-slate-700/20 transition-colors",children:[d("td",{class:"px-4 py-3",children:d("input",{type:"checkbox",checked:t.has(o.id),onChange:()=>n(o.id),class:"w-4 h-4 rounded bg-slate-700 border-slate-600 text-blue-600 focus:ring-blue-500 focus:ring-offset-slate-800"})}),d("td",{class:"px-4 py-3",children:d("div",{class:"text-white font-medium",children:o.keyword})}),d("td",{class:"px-4 py-3",children:o.source?d(Sb,{source:o.source}):d("span",{class:"text-slate-600",children:"-"})}),d("td",{class:"px-4 py-3",children:d("div",{class:"text-slate-400 max-w-[200px] truncate",children:o.seedWord||d("span",{class:"text-slate-600",children:"-"})})}),d("td",{class:"px-4 py-3",children:d(Tb,{status:o.status})}),d("td",{class:"px-4 py-3 text-slate-500 text-xs",children:o.createdAt}),d("td",{class:"px-4 py-3 text-center",children:d("button",{onClick:()=>a([o.id]),class:"inline-flex items-center justify-center w-8 h-8 text-red-400 hover:bg-red-500/10 rounded-lg transition-colors",children:d("span",{class:"i-heroicons-trash w-4 h-4"})})})]},o.id))})]})})]}
22),uI={enabled:!1,interval:"",seedWords:"",filmKeywords:"",excludeKeywords:""},cI={autoEnabled:!1,targetTypeId:"",interval:"",batchSize:"",imgMapping:""},hI=()=>{const[r,e]=E(uI),[t,n]=E(cI),[i,a]=E(!0),[o,s]=E(!1),[l,u]=E(!1),[c,h]=E({keyword:!0,seo:!1}),f=b=>h(_=>({..._,[b]:!_[b]})),v=(b,_)=>e(S=>({...S,[b]:_})),p=(b,_)=>n(S=>({...S,[b]:_}));he(()=>{(async()=>{a(!0);try{const[_,S]=await Promise.all([le("/config/keyword"),le("/config/seo")]),w=_.configs;e({enabled:w["keyword.enabled"]==="1",interval:w["keyword.interval"]||"",seedWords:w["keyword.seed_words"]||"",filmKeywords:w["keyword.film_keywords"]||"",excludeKeywords:w["keyword.exclude_keywords"]||""});const T=S.configs;n({autoEnabled:T["seo.auto_enabled"]==="1",targetTypeId:T["seo.target_type_id"]||"",interval:T["seo.interval"]||"",batchSize:T["seo.batch_size"]||"",imgMapping:T["seo.img.mapping"]||""})}catch(_){Z.error("å è½½é
置失败",_.message)}a(!1)})()},[]);const m=async()=>{s(!0);const b={"keyword.enabled":r.enabled?"1":"0","keyword.interval":r.interval,"keyword.seed_words":r.seedWords,"keyword.film_keywords":r.filmKeywords,"keyword.exclude_keywords":r.excludeKeywords,"seo.auto_enabled":t.autoEnabled?"1":"0","seo.target_type_id":t.targetTypeId,"seo.interval":t.interval,"seo.batch_size":t.batchSize,"seo.img.mapping":t.imgMapping};try{const _=await De("/config",{configs:b});Z.success("ä¿åæå",_.message||"é
ç½®å·²æ´æ°")}catch(_){Z.error("ä¿å失败",_.message)}s(!1)},y=async()=>{if(await Dt({title:"æ¸
空 SEO æ°æ®",message:"ç¡®å®è¦æ¸
ç©ºææ SEO çæçæ°æ®åï¼æ¤æä½ä¸å¯æ¢å¤ï¼å
³é®è¯å°é置为æªä½¿ç¨ç¶æã",type:"danger",confirmText:"æ¸
空"})){u(!0);try{const b=await De("/seo/clear",{});Z.success("æ¸
空æå",b.message)}catch(b){Z.error("æ¸
空失败",b.message)}u(!1)}},g=async()=>{u(!0);try{const b=await De("/seo/regenerate-pic-tags",{});Z.success("çæå®æ",b.message)}catch(b){Z.error("çæå¤±è´¥",b.message)}u(!1)};return i?d("div",{class:"flex items-center justify-center py-12",children:d("div",{class:"flex flex-col items-center gap-3",children:[d("div",{class:"w-8 h-8 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"}),d("div",{class:"text-slate-400 text-sm",children:"å è½½é
ç½®ä¸..."})]})}):d("div",{class:"space-y-4",children:[[{id:"keyword",title:"å
³é®è¯ééé
ç½®",icon:"i-heroicons-magnifying-glass",iconBg:"bg-green-500/10",iconColor:"text-green-400",desc:"ä»ç¾åº¦åæçèªå¨ééå½±è§ç¸å
³å
³é®è¯"},{id:"seo",title:"SEO èªå¨ä¼åé
ç½®",icon:"i-heroicons-rocket-launch",iconBg:"bg-violet-500/10",iconColor:"text-violet-400",desc:"ç¨å
³é®è¯ä¸ºå½±ççæ SEO ä¼åçæ°è®°å½"}].map(b=>d("div",{class:"bg-slate-900/50 rounded-lg border border-slate-700 overflow-hidden",children:[d("button",{onClick:()=>f(b.id),class:"w-full flex items-center justify-between p-4 hover:bg-slate-700/20 transition-colors",children:[d("div",{class:"flex items-center gap-3",children:[d("div",{class:`w-10 h-10 ${b.iconBg} rounded-lg flex items-center justify-center flex-shrink-0`,children:d("span",{class:`${b.icon} w-5 h-5 ${b.iconColor}`})}),d("div",{class:"text-left",children:[d("div",{class:"text-slate-100 font-medium",children:b.title}),d("div",{class:"text-slate-500 text-xs mt-0.5",children:b.desc})]})]}),d("span",{class:`i-heroicons-chevron-down w-5 h-5 text-slate-400 transition-transform flex-shrink-0 ${c[b.id]?"rotate-180":""}`})]}),c[b.id]&&d("div",{class:"border-t border-slate-700/50 p-4 space-y-4",children:[b.id==="keyword"&&d(we,{children:[d(Br,{label:"å
³é®è¯ééå¼å
³",desc:"ä»ç¾åº¦åæç䏿è¯åæ¶ééå½±è§ç¸å
³å
³é®è¯",checked:r.enabled,onChange:_=>v("enabled",_)}),d(Zt,{label:"ééé´éï¼ç§ï¼",value:r.interval,onChange:_=>v("interval",_),placeholder:"30"}),d("div",{children:[d("label",{class:"text-slate-400 text-sm mb-2 block",children:"ç§åå
³é®è¯ï¼éå·åéï¼"}),d("textarea",{value:r.seedWords,onInput:_=>v("seedWords",_.target.value),placeholder:"çµå½±,çµè§å§,综èº,卿¼«,纪å½ç",rows:2,class:"w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-slate-200 text-sm placeholder-slate-500 focus:border-blue-500 focus:outline-none resize-none"}),d("p",{class:"text-slate-500 text-xs mt-1.5",children:"åå§ç§åè¯ï¼ééå°æ°è¯åä¼èªå¨æ»éªçæ©å±"})]}),d("div",{children:[d("label",{class:"text-slate-400 text-sm mb-2 block",children:"å½±è§è¿æ»¤å
³é®è¯ï¼éå·åéï¼"}),d("textarea",{value:r.filmKeywords,onInput:_=>
22v("filmKeywords",_.target.value),placeholder:"çµå½±,çµè§å§,综èº,卿¼«,å¨çº¿è§ç,å è´¹è§ç...",rows:3,class:"w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-slate-200 text-sm placeholder-slate-500 focus:border-blue-500 focus:outline-none resize-none"}),d("p",{class:"text-slate-500 text-xs mt-1.5",children:"ç¾åº¦å»ºè®®è¯ä¸å å«è¿äºå ³é®è¯æä¼è¢«ä¿çï¼ç¨äºè¿æ»¤éå½±è§å 容"})]}),d("div",{children:[d("label",{class:"text-slate-400 text-sm mb-2 block",children:"æé¤å ³é®è¯ï¼éå·åéï¼"}),d("textarea",{value:r.excludeKeywords,onInput:_=>v("excludeKeywords",_.target.value),placeholder:"æè,å¹è®,å ç,代ç,ä¸è½½,ç¾åº¦äº...",rows:3,class:"w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-slate-200 text-sm placeholder-slate-500 focus:border-blue-500 focus:outline-none resize-none"}),d("p",{class:"text-slate-500 text-xs mt-1.5",children:"å½ä¸å½±è§è¿æ»¤å ³é®è¯åï¼å¦æè¿å å«è¿äºè¯åæé¤ï¼ç¨äºè¿æ»¤åå¾å 容"})]})]}),b.id==="seo"&&d(we,{children:[d(Br,{label:"SEO èªå¨ä¼åå¼å ³",desc:"ç¨å ³é®è¯ä¸ºå½±ççæ SEO ä¼åçæ°è®°å½",checked:t.autoEnabled,onChange:_=>p("autoEnabled",_)}),d("div",{class:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[d(Zt,{label:"ç®æ åç±»åç§°",value:t.targetTypeId,onChange:_=>p("targetTypeId",_),placeholder:"伦ç"}),d(Zt,{label:"æ§è¡é´éï¼ç§ï¼",value:t.interval,onChange:_=>p("interval",_),placeholder:"60"}),d(Zt,{label:"æ¯æ¬¡çææ¡æ°",value:t.batchSize,onChange:_=>p("batchSize",_),placeholder:"10"})]}),d("div",{class:"bg-blue-500/5 border border-blue-500/20 rounded-lg p-3",children:d("div",{class:"flex items-start gap-2",children:[d("span",{class:"i-heroicons-information-circle w-4 h-4 text-blue-400 flex-shrink-0 mt-0.5"}),d("p",{class:"text-blue-400/80 text-xs leading-relaxed",children:"ä»ç®æ åç±»åæºå½±çï¼ç»åå ³é®è¯çææ°çå½±çè®°å½ï¼æ é¢+æè¿°ï¼ï¼å¤ç¨åçææ¾å°å"})]})}),d("div",{children:[d("label",{class:"text-slate-400 text-sm mb-2 block",children:"å¾çåç±»æ å°ï¼JSONï¼"}),d("textarea",{value:t.imgMapping,onInput:_=>p("imgMapping",_.target.value),placeholder:`{ 23 "卿¼«,å¨ç»,äºæ¬¡å ,çªå§": "https://img.example.com/anime/pic[1-1000].webp", 24 "é»è®¤": "https://img.example.com/default/cover[1-2000].webp" 25}`,rows:6,class:"w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-slate-200 text-xs font-mono placeholder-slate-500 focus:border-blue-500 focus:outline-none resize-none leading-relaxed"}),d("p",{class:"text-slate-500 text-xs mt-1.5",children:"å ³é®åéå·åé为ä¸ç»ï¼URL 模æ¿ä¸ [min-max] è¡¨ç¤ºéæºå¾çç¼å·èå´"})]}),d("div",{class:"flex flex-wrap items-center gap-2 pt-2",children:[d("button",{onClick:y,disabled:l,class:"inline-flex items-center gap-1.5 h-9 px-4 bg-red-600 hover:bg-red-500 disabled:bg-red-600/50 disabled:cursor-not-allowed text-white rounded-lg text-sm font-medium transition-colors",children:[d("span",{class:"i-heroicons-trash w-4 h-4"}),"æ¸ ç©º SEO æ°æ®"]}),d("button",{onClick:g,disabled:l,class:"inline-flex items-center gap-1.5 h-9 px-4 bg-violet-600 hover:bg-violet-500 disabled:bg-violet-600/50 disabled:cursor-not-allowed text-white rounded-lg text-sm font-medium transition-colors",children:[d("span",{class:"i-heroicons-arrow-path w-4 h-4"}),"éæ°çæå¾çæ è®°"]})]})]})]})]},b.id)),d("div",{class:"flex items-center gap-3 pt-2",children:d("button",{onClick:m,disabled:o,class:"inline-flex items-center gap-2 h-10 px-6 bg-blue-600 hover:bg-blue-500 disabled:bg-blue-600/50 disabled:cursor-not-allowed text-white rounded-lg text-sm font-medium transition-colors",children:o?d(we,{children:[d("span",{class:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"ä¿åä¸..."]}):d(we,{children:[d("span",{class:"i-heroicons-check w-4 h-4"}),"ä¿åé ç½®"]})})})]})},dI=()=>{const[r,e]=E([]),[t,n]=E(0),[i,a]=E(1),[o]=E(20),[s,l]=E(!1),[u,c]=E(""),[h,f]=E(null),[v,p]=E(""),[m,y]=E(null),[g,x]=E(null),[b,_]=E(!1),[S,w]=E(new Set),[T,D]=E(""),[L,M]=E("list"),C=Yr(async()=>
25{l(!0);try{const N=new URLSearchParams({page:String(i),pageSize:String(o)});u&&N.set("search",u),h!==null&&N.set("status",String(h)),v&&N.set("source",v);const G=await le(`/keywords?${N}`);e(G.keywords),n(G.total)}catch(N){console.error("å è½½å
³é®è¯å¤±è´¥",N.message)}l(!1)},[i,o,u,h,v]),I=Yr(async N=>{for(let G=0;G<5;G++){try{const oe=await le("/keywords/collector-status");if(x(oe),N===void 0||oe.running===N)return}catch{}await new Promise(oe=>setTimeout(oe,700))}},[]),k=async()=>{try{const[N,G]=await Promise.all([le("/keywords/stats"),le("/keywords/collector-status")]);y(N),x(G)}catch{}};he(()=>{C()},[C]),he(()=>{k()},[]);const R=async()=>{if(!b)try{const N=g?.running?"stop":"start",G=N==="start";_(!0),x(xe=>({ok:!0,enabled:xe?.enabled??!0,running:G}));const oe=await De("/keywords/collector",{action:N});Z.success(N==="start"?"ééå·²å¯å¨":"éé已忢",oe.message),await I(G)}catch(N){Z.error("æä½å¤±è´¥",N.message),await I()}finally{_(!1)}},O=async()=>{try{const N=await De("/keywords/collect-once",{});Z.success("éé宿",N.message),k(),C()}catch(N){Z.error("éé失败",N.message)}},z=async N=>{if(await Dt({title:"å é¤å
³é®è¯",message:`ç¡®å®å é¤ ${N.length} 个å
³é®è¯ï¼`,type:"warning",confirmText:"å é¤"}))try{const G=await Ts("/keywords",{ids:N});Z.success("å 餿å",G.message),w(new Set),C(),k()}catch(G){Z.error("å é¤å¤±è´¥",G.message)}},P=async()=>{if(!T.trim())return;const N=T.split(/[,ï¼]/).map(G=>G.trim()).filter(Boolean);if(N.length!==0)try{const G=await De("/keywords/batch",{keywords:N});Z.success("æ·»å æå",G.message),D(""),C(),k()}catch(G){Z.error("æ·»å 失败",G.message)}},B=async()=>{if(await Dt({title:"æ¸
空å
³é®è¯",message:"ç¡®å®æ¸
空ææå
³é®è¯ï¼æ¤æä½ä¸å¯æ¢å¤ï¼",type:"danger",confirmText:"æ¸
空"}))try{const N=await Ts("/keywords/all");Z.success("æ¸
空æå",N.message),a(1),C(),k()}catch(N){Z.error("æ¸
空失败",N.message)}},V=Math.ceil(t/o),U=N=>{const G=new Set(S);G.has(N)?G.delete(N):G.add(N),w(G)},Y=()=>{S.size===r.length?w(new Set):w(new Set(r.map(N=>N.id)))};return d("div",{class:"space-y-4 sm:space-y-6",children:[d(iI,{stats:m,collectorStatus:g,collectorPending:b}),d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[d("div",{class:"flex border-b border-slate-700",children:[d("button",{onClick:()=>M("list"),class:`flex-1 sm:flex-none px-4 sm:px-6 py-3 text-sm font-medium transition-colors relative ${L==="list"?"text-white":"text-slate-400 hover:text-white"}`,children:[d("span",{class:"flex items-center justify-center sm:justify-start gap-2",children:[d("span",{class:"i-heroicons-list-bullet w-4 h-4"}),d("span",{children:"å
³é®è¯å表"})]}),L==="list"&&d("div",{class:"absolute bottom-0 left-0 right-0 h-0.5 bg-blue-500"})]}),d("button",{onClick:()=>M("config"),class:`flex-1 sm:flex-none px-4 sm:px-6 py-3 text-sm font-medium transition-colors relative ${L==="config"?"text-white":"text-slate-400 hover:text-white"}`,children:[d("span",{class:"flex items-center justify-center sm:justify-start gap-2",children:[d("span",{class:"i-heroicons-cog-6-tooth w-4 h-4"}),d("span",{children:"ééé
ç½®"})]}),L==="config"&&d("div",{class:"absolute bottom-0 left-0 right-0 h-0.5 bg-blue-500"})]})]}),d("div",{class:"p-4 sm:p-6",children:L==="list"?d("div",{class:"space-y-4",children:[d("div",{class:"bg-slate-900/50 rounded-lg border border-slate-700/50 p-4",children:[d("div",{class:"flex items-center gap-2 mb-3",children:[d("span",{class:"i-heroicons-play-circle w-5 h-5 text-blue-400"}),d("h3",{class:"text-white font-medium",children:"ééæ§å¶"})]}),d("div",{class:"flex flex-wrap items-center gap-2",children:[d("button",{onClick:R,disabled:b||g===null,class:`inline-flex items-center gap-1.5 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${g?.running?"bg-red-600 hover:bg-red-500 text-white":"bg-green-600 hover:bg-green-500 text-white"} ${b||g===null?"opacity-70 cursor-not-allowed":""}`,children:[d("span",{class:`w-4 h-4 ${b?"i-heroicons-arrow-path animate-spin":g?.running?"i-heroicons-stop-circle":"i-heroicons-play-circle"}`}),b?"忢ä¸...":g?.running?"忢éé":"å¯å¨éé"]}),d("button",{onClick:O,disabled:b,class:`inline-flex items-center gap-1.5 px-4 py-2 bg-blue-600 hover:bg-blue-500 text-white rounded-lg text-sm font-medium transition-colors ${b?"opacity-70 cursor-not-allowed":""}`,children:[d("span",{class:"i-heroicons-arrow-path w-4 h-4"}),"ç«å³éé䏿¬¡"]})]})]}),d("div",{class:"bg-slate-900/50 rounded-lg border border-slate-700/50 p-4",children:[d("div",{class:"flex items-center gap-2 mb-3",children:[d("span",{class:"i-heroicons-plus-circle w-5 h-5 text-cyan-400"}),d("h3",{class:"text-white font-medium",children:"æ·»å å
³é®è¯"})]}),d("div",{class:"flex gap-2",children:[d("input",{type:"text",value:T,onInput:N=>D(N.target.value),onKeyDown:N=>N.key==="Enter"&&P(),placeholder:"è¾å
¥å
³é®è¯ï¼å¤ä¸ªç¨éå·åéï¼æ¯æä¸è±æéå·ï¼",class:"flex-1 h-9 px-3 bg-slate-800 border border-slate-600 rounded-lg text-white text-sm placeholder-slate-500 focus:outline-none focus:border-blue-500"}),d("button",{onClick:P,class:"px-4 h-9 bg-cyan-600 hover:bg-cyan-500 text-white rounded-lg text-sm font-medium transition-colors flex-shrink-0",children:"æ·»å "})]})]}),d("div",{class:"flex flex-col sm:flex-row gap-3",children:[d("input",{type:"text",value:u,onInput:N=>{c(N.target.value),a(1)},placeholder:"æç´¢å
³é®è¯...",class:"h-9 px-3 bg-slate-900/50 border border-slate-700 rounded-lg text-white text-sm placeholder-slate-500 focus:outline-none focus:border-blue-500 sm:w-64"}),d("div",{class:"flex flex-wrap gap-2",children:[d("button",{onClick:()=>{f(null),a(1)},class:`h-9 px-3 rounded-lg text-xs font-medium transition-colors ${h===null?"bg-blue-600 text-white":"bg-slate-700 text-slate-400 hover:text-white hover:bg-slate-600"}`,children:"å
¨é¨"}),d("button",{onClick:()=>{f(0),a(1)},class:`h-9 px-3 rounded-lg text-xs font-medium transition-colors ${h===0?"bg-green-600 text-white":"bg-slate-700 text-slate-400 hover:text-white hover:bg-slate-600"}`,children:"å¾
使ç¨"}),d("button",{onClick:()=>{f(1),a(1)},class:`h-9 px-3 rounded-lg text-xs font-medium transition-colors ${h===1?"bg-slate-600 text-white":"bg-slate-700 text-slate-400 hover:text-white hover:bg-slate-600"}`,children:"已使ç¨"}),d("div",{class:"w-px bg-slate-700"}),[{value:"",label:"å
¨é¨æ¥æº"},{value:"baidu",label:"ç¾åº¦"},{value:"sogou",label:"æç"},{value:"manual",label:"æå¨"}].map(N=>d("button",{onClick:()=>{p(N.value),a(1)},class:`h-9 px-3 rounded-lg text-xs font-medium transition-colors ${v===N.value?"bg-blue-600 text-white":"bg-slate-700 text-slate-400 hover:text-white hover:bg-slate-600"}`,children:N.label},N.value))]})]}),(S.size>0||t>0)&&d("div",{class:"flex items-center gap-2",children:[S.size>0&&d("button",{onClick:()=>z(Array.from(S)),class:"inline-flex items-center gap-1.5 h-8 px-3 bg-red-600 hover:bg-red-500 text-white rounded-lg text-xs font-medium transition-colors",children:[d("span",{class:"i-heroicons-trash w-3.5 h-3.5"}),"å é¤éä¸ (",S.size,")"]}),t>0&&d("button",{onClick:B,class:"inline-flex items-center gap-1.5 h-8 px-3 bg-red-600/20 hover:bg-red-600/30 text-red-400 rounded-lg text-xs font-medium transition-colors",children:[d("span",{class:"i-heroicons-trash w-3.5 h-3.5"}),"æ¸
空å
¨é¨"]})]}),d(lI,{keywords:r,loading:s,selected:S,onToggleSelect:U,onToggleSelectAll:Y,onDelete:z}),V>1&&d(Zh,{page:i,totalPages:V,total:t,onPageChange:a})]}):d(hI,{})})]})]})},fI=r=>r.startsWith("mac_")||r.startsWith("my_"),vI=()=>{const[r,e]=E([]),[t,n]=E(!1),i=async()=>{try{const h=((await le("/migrate/tables")).tables||[]).map(f=>({name:String(f.name||""),rows:Number(f.rows)||0,sizeMB:Number(f.sizeMB)||0}));e(h)}catch(c){Z.error("å 载失败",c.message)}};he(()=>{i()},[]);const a=async c=>{if(await Dt({title:"é建表",message:`ç¡®å®è¦é建表 ${c} åï¼è¡¨ä¸æ°æ®å°è¢«æ¸
空ï¼`,type:"danger",confirmText:"é建"})){n(!0);try{await De("/migrate/rebuild-table",{tableName:c}),Z.success("é建æå",`表 ${c} å·²é建`),i()}catch(h){Z.error("é建失败",h.message)}n(!1)}},o=async()=>
25{if(await Dt({title:"â ï¸ éå»ºæ°æ®åº",message:`è¿å°æ¸ 空ææä¸å¡è¡¨æ°æ®å¹¶éå»ºï¼ 26æ¤æä½ä¸å¯æ¢å¤ï¼`,type:"danger",confirmText:"确认é建"})&&await Dt({title:"忬¡ç¡®è®¤",message:"æææ°æ®å°è¢«æ¸ 空ï¼ç¡®å®ç»§ç»ï¼",type:"danger",confirmText:"æç¡®å®"})){n(!0);try{const c=await De("/migrate/rebuild-all",{});Z.success("éå»ºå®æ",c.message),i()}catch(c){Z.error("é建失败",c.message)}n(!1)}},s=r.filter(c=>fI(c.name)),l=s.reduce((c,h)=>c+(h.rows||0),0),u=s.reduce((c,h)=>c+(h.sizeMB||0),0);return d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[d("div",{class:"px-4 py-3 border-b border-slate-700 bg-slate-800/50",children:d("div",{class:"flex items-center gap-2",children:[d("span",{class:"i-heroicons-arrow-path w-5 h-5 text-purple-400"}),d("h3",{class:"font-semibold text-white",children:"æ°æ®åºé建"}),d("span",{class:"text-xs text-slate-500 ml-auto",children:"é«é£é©æä½"})]})}),d("div",{class:"p-4 space-y-4",children:[d("div",{class:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[d("div",{class:"bg-slate-900/50 rounded-lg border border-slate-700 p-3",children:[d("div",{class:"text-xs text-slate-400 mb-1",children:"æ»è¡¨æ°"}),d("div",{class:"text-xl font-bold text-slate-100",children:r.length})]}),d("div",{class:"bg-slate-900/50 rounded-lg border border-slate-700 p-3",children:[d("div",{class:"text-xs text-slate-400 mb-1",children:"ä¸å¡è¡¨"}),d("div",{class:"text-xl font-bold text-purple-400",children:s.length})]}),d("div",{class:"bg-slate-900/50 rounded-lg border border-slate-700 p-3",children:[d("div",{class:"text-xs text-slate-400 mb-1",children:"æ»è¡æ°"}),d("div",{class:"text-xl font-bold text-blue-400",children:l.toLocaleString()})]}),d("div",{class:"bg-slate-900/50 rounded-lg border border-slate-700 p-3",children:[d("div",{class:"text-xs text-slate-400 mb-1",children:"æ»å¤§å°"}),d("div",{class:"text-xl font-bold text-emerald-400",children:[u.toFixed(1),"MB"]})]})]}),d("div",{class:"flex items-center gap-2 flex-wrap",children:[d("button",{onClick:o,disabled:t,class:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-red-600 hover:bg-red-500 disabled:bg-red-600/50 disabled:cursor-not-allowed text-white rounded-lg text-xs font-medium transition-colors",children:[t?d("span",{class:"w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin"}):d("span",{class:"i-heroicons-arrow-path w-3.5 h-3.5"}),"é建ææè¡¨"]}),d("button",{onClick:i,disabled:t,class:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-slate-700 hover:bg-slate-600 disabled:bg-slate-700/50 disabled:cursor-not-allowed text-slate-300 rounded-lg text-xs transition-colors",children:[d("span",{class:"i-heroicons-arrow-path w-3.5 h-3.5"}),"å·æ°"]})]}),s.length>0&&d("div",{class:"bg-slate-900/50 rounded-lg border border-slate-700 overflow-hidden",children:[d("div",{class:"px-3 py-2 bg-slate-900/60 border-b border-slate-700",children:d("div",{class:"text-xs text-slate-400",children:"ä¸å¡è¡¨ï¼å¯é建ï¼"})}),d("div",{class:"max-h-64 overflow-y-auto",children:d("table",{class:"w-full text-xs",children:[d("thead",{class:"sticky top-0 bg-slate-900 text-slate-400",children:d("tr",{children:[d("th",{class:"text-left px-3 py-2 font-medium",children:"表å"}),d("th",{class:"text-right px-3 py-2 font-medium hidden sm:table-cell",children:"è¡æ°"}),d("th",{class:"text-right px-3 py-2 font-medium",children:"大å°"}),d("th",{class:"text-center px-3 py-2 font-medium w-16",children:"æä½"})]})}),d("tbody",{class:"text-slate-300 divide-y divide-slate-800",children:s.map(c=>d("tr",{class:"hover:bg-slate-800/50 transition-colors",children:[d("td",{class:"px-3 py-2 font-mono text-xs truncate max-w-[150px] sm:max-w-none",title:c.name,children:c.name}),d("td",{class:"px-3 py-2 text-right text-slate-400 hidden sm:table-cell",children:(c.rows||0).toLocaleString()}),d("td",{class:"px-3 py-2 text-right text-slate-400",children:[(c.sizeMB||0).toFixed(1),"MB"]}),d("td",{class:"px-3 py-2 text-center",children:d("button",{onClick:()=>a(c.name),disabled:t,class:"text-red-400 hover:text-red-300 disabled:text-red-400/50 disabled:cursor-not-allowed text-xs transition-colors",title:"é建æ¤è¡¨",children:"é建"})})]}))})]})})]}),d("div",{class:"bg-red-500/5 border border-red-500/20 rounded-lg p-3",children:d("div",{class:"flex items-start gap-2",children:[d("span",{class:"i-heroicons-exclamation-triangle w-4 h-4 text-red-400 flex-shrink-0 mt-0.5"}),d("div",{class:"flex-1 min-w-0",children:[d("div",{class:"text-red-400 text-xs font-medium",children:"æåº¦å±é©æä½"}),d("ul",{class:"text-red-400/80 text-xs mt-1.5 space-y-0.5",children:[d("li",{children:"⢠é建æä½ä¼æ¸ ç©ºè¡¨ä¸æææ°æ®ï¼æ¤æä½ä¸å¯æ¢å¤"}),d("li",{children:"⢠é建ææè¡¨ä¼æ¸ 空æ´ä¸ªæ°æ®åºï¼è¯·å¡å¿ å å¤ä»½"}),d("li",{children:"â¢ ä» å¨å¼åç¯å¢æéè¦éç½®æ°æ®æ¶ä½¿ç¨"}),d("li",{children:"⢠ç产ç¯å¢è¯·è°¨æ æä½ï¼å»ºè®®ä½¿ç¨å¤ä»½æ¢å¤åè½"})]})]})]})})]})]})},pI=4*1024*1024;function Cc(r){return r<1024?`${r}B`:r<1024*1024?`${(r/1024).toFixed(1)}KB`:`${(r/1024/1024).toFixed(1)}MB`}function v0(r){const e=[];return r.status?.stage&&e.push(`é¶æ®µï¼${r.status.stage}`),r.status?.message&&e.push(`说æï¼${r.status.message}`),r.status?.startedAt&&e.push(`å¼å§æ¶é´ï¼${new Date(r.status.startedAt).toLocaleStr
26ing("zh-CN")}`),r.status?.workerId!==void 0&&e.push(`Workerï¼${r.status.workerId}`),r.ttlSeconds>0&&e.push(`éå©ä½ï¼${r.ttlSeconds}s`),e.join(` 27`)}function os(r){return new Promise(e=>setTimeout(e,r))}const gI=()=>{const[r,e]=E(!1),[t,n]=E(""),[i,a]=E(!1),[o,s]=E(0),[l,u]=E(null),c=je(!1),h=async p=>{const g=Date.now();let x="";for(;Date.now()-g<18e5;){let b=null;try{b=await le("/db-backup/restore/status")}catch{await os(2e3);continue}const _=b.status?.stage||"idle",S=b.status?.uploadId||"",w=v0(b);w&&(x=w);const T=S===""||S===p;if(b.running){await os(2e3);continue}if(T&&_==="success")return b.status?.message||"æ°æ®åºæ¢å¤æå";if(T&&_==="failed")throw new Error(b.status?.message||"æ°æ®åºæ¢å¤å¤±è´¥");if(T&&_==="idle")return b.status?.message||"æ°æ®åºæ¢å¤ç»æ";await os(2e3)}throw new Error(`æ¢å¤ä»»å¡çå¾ è¶ æ¶ï¼è¯·ç¨åæ¥çç¶æã 28${x}`)},f=async()=>{e(!0),n("æ£å¨å¯å¨å¯¼åºä»»å¡...");try{const m=(await De("/db-backup/export-async",{})).exportId;n("æ£å¨å¯¼åºæ°æ®åºï¼è¯·ç¨å...");const y=300*1e3,g=2e3,x=Date.now();let b="";for(;Date.now()-x<y;){await os(g);try{const _=await le(`/db-backup/export-status/${m}`);if(b=_.status,n(_.message||"å¤çä¸..."),_.status==="completed"){const S=Pa(`/db-backup/export?file=${encodeURIComponent(_.fileName)}`),w=document.createElement("a");w.href=S,w.download=_.fileName,w.style.display="none",document.body.appendChild(w),w.click(),setTimeout(()=>w.remove(),1e3);const T=_.fileSize?` (${Cc(_.fileSize)})`:"";Lt.success({title:"å¤ä»½å¯¼åºæå",message:`æä»¶ ${_.fileName}${T} å·²å¼å§ä¸è½½`,duration:4e3});break}if(_.status==="failed")throw new Error(_.message||"导åºå¤±è´¥")}catch(_){if(_.message&&_.message.includes("ä»»å¡ä¸åå¨"))throw new Error("导åºä»»å¡å·²è¿æï¼è¯·éè¯");console.warn("è½®è¯¢ç¶æå¤±è´¥:",_.message)}}if(Date.now()-x>=y)throw new Error(`导åºä»»å¡è¶ æ¶ï¼æåç¶æ: ${b}ï¼ï¼è¯·ç¨åéè¯`)}catch(p){console.error("å¤ä»½å¯¼åºé误:",p),Lt.error({title:"å¤ä»½å¯¼åºå¤±è´¥",message:p.message||"æªç¥é误"})}finally{e(!1),n("")}},v=async()=>{if(c.current){Lt.warning({title:"æ¢å¤ä»»å¡å·²å¨å¤ç",message:"å½å页颿£å¨æ§è¡æ¢å¤æµç¨ï¼è¯·å¿éå¤ç¹å»ã",duration:3e3});return}if(c.current=!0,!l){Z.warning("è¯·éæ©ä¸ä¸ª SQL å¤ä»½æä»¶"),c.current=!1;return}try{const y=await le("/db-backup/restore/status");if(y.running){Lt.warning({title:"æ¢å¤ä»»å¡æ£å¨æ§è¡",message:v0(y)||"å½åæ£å¨æ§è¡æ¢å¤ä»»å¡ï¼è¯·ç¨ååè¯ã",duration:0}),c.current=!1;return}}catch{}if(!await Dt({title:"æ¢å¤æ°æ®åº",message:`å°ä»æä»¶æ¢å¤æ´åºï¼ 29${l.name} 30${Cc(l.size)} 31 32æ¤æä½ä¼è¦çå½åæ°æ®ï¼æ¯å¦ç»§ç»ï¼`,type:"danger",confirmText:"ç»§ç»æ¢å¤"})){c.current=!1;return}if(!await Dt({title:"忬¡ç¡®è®¤",message:`æ¢å¤è¿ç¨ä¸è¯·å¿å ³é页é¢ã 33ç¡®å®æ§è¡æ°æ®åºæ¢å¤åï¼`,type:"danger",confirmText:"确认æ¢å¤"})){c.current=!1;return}a(!0),s(0);let p="",m=!1;try{Lt.info({title:"æ¢å¤ä»»å¡å¼å§",message:"æ£å¨åçä¸ä¼ å¤ä»½æä»¶ï¼è¯·å¿å ³é页é¢ã",duration:2500});const y=await De("/db-backup/restore/init",{fileName:l.name,fileSize:l.size,chunkSize:pI});p=y.uploadId;for(let b=0;b<y.totalChunks;b++){const _=b*y.chunkSize,S=Math.min(_+y.chunkSize,l.size),w=l.slice(_,S),T=await m0(`${Pa("/db-backup/restore/chunk")}?uploadId=${encodeURIComponent(y.uploadId)}&index=${b}`,{method:"POST",headers:{"Content-Type":"application/octet-stream"},body:w});let D=null;try{D=await T.json()}catch{throw new Error(`åçä¸ä¼ 失败ï¼ç¬¬ ${b+1} çï¼`)}if(!T.ok||!D?.ok)throw new Error(D?.message||`åçä¸ä¼ 失败ï¼HTTP ${T.status}ï¼`);s(Math.round((b+1)/y.totalChunks*100))}m=!0;const g=await De("/db-backup/restore/complete",{uploadId:y.uploadId});if(g.running){Lt.info({title:"æ¢å¤ä»»å¡å·²æäº¤",message:g.message||"æ¢å¤ä»»å¡æ£å¨æ§è¡ï¼æ£å¨çå¾ å®æã",duration:3500});const b=await h(y.uploadId);s(100),Lt.success({title:"æ¢å¤å®æ",message:b,duration:5e3}),u(null);const _=document.getElementById("db-restore-file");_&&(_.value="");return}s(100),Lt.success({title:"æ¢å¤å®æ",message:g.message||"æ°æ®åºæ¢å¤æå",duration:5e3}),u(null);const x=document.getElementById("db-restore-file");x&&(x.value="")}catch(y){if(m&&p)try{const g=await le("/db-backup/restore/status");if(g.running&&g.status?.uploadId===p){Lt.info({title:"æ¢å¤ä»»å¡å·²æäº¤",message:"æ£æµå°æ¢å¤ä»»å¡ä»å¨æ§è¡ï¼æ£å¨çå¾ ç»æã",duration:3500});const x=await h(p);s(100),Lt.success({title:"æ¢å¤å®æ",message:x,duration:5e3}),u(null);const b=document.getElementById("db-restore-file");b&&(b.value="");return}}catch{}Lt.error({title:"æ¢å¤å¤±è´¥",message:y.message||"æªç¥é误"}),p&&!m&&await De("/db-backup/restore/cancel",{uploadId:p}).catch(()=>{})}finally{a(!1),s(0),c.current=!1}};
33return d("div",{class:"space-y-4 sm:space-y-6",children:[d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[d("div",{class:"px-4 py-3 border-b border-slate-700 bg-slate-800/50",children:d("div",{class:"flex items-center gap-2",children:[d("span",{class:"i-heroicons-circle-stack w-5 h-5 text-emerald-400"}),d("h3",{class:"font-semibold text-white",children:"æ°æ®åºå¤ä»½ä¸æ¢å¤"})]})}),d("div",{class:"p-4",children:[d("div",{class:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[d("div",{class:"bg-slate-900/50 rounded-lg border border-slate-700 p-4",children:d("div",{class:"flex items-start gap-3",children:[d("div",{class:"w-10 h-10 bg-emerald-500/10 rounded-lg flex items-center justify-center flex-shrink-0",children:d("span",{class:"i-heroicons-arrow-down-tray w-5 h-5 text-emerald-400"})}),d("div",{class:"flex-1 min-w-0",children:[d("h4",{class:"text-sm font-medium text-slate-100",children:"å¤ä»½å¯¼åº"}),d("p",{class:"text-xs text-slate-400 mt-1",children:"çæå¹¶ä¸è½½å½åæ´åºå¤ä»½æä»¶ï¼.sql.gz æ ¼å¼ï¼"}),r&&t&&d("div",{class:"mt-2 flex items-center gap-2 text-xs text-blue-400",children:[d("span",{class:"i-heroicons-arrow-path w-3.5 h-3.5 animate-spin"}),d("span",{children:t})]}),d("button",{type:"button",onClick:f,disabled:r||i,class:"mt-3 inline-flex items-center gap-1.5 px-3 py-1.5 bg-emerald-600 hover:bg-emerald-500 disabled:bg-emerald-600/50 disabled:cursor-not-allowed text-white rounded-lg text-xs font-medium transition-colors",children:r?d(we,{children:[d("span",{class:"w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"导åºä¸..."]}):d(we,{children:[d("span",{class:"i-heroicons-arrow-down-tray w-3.5 h-3.5"}),"导åºå¤ä»½"]})})]})]})}),d("div",{class:"bg-slate-900/50 rounded-lg border border-slate-700 p-4",children:d("div",{class:"flex items-start gap-3",children:[d("div",{class:"w-10 h-10 bg-red-500/10 rounded-lg flex items-center justify-center flex-shrink-0",children:d("span",{class:"i-heroicons-arrow-up-tray w-5 h-5 text-red-400"})}),d("div",{class:"flex-1 min-w-0",children:[d("h4",{class:"text-sm font-medium text-slate-100",children:"ä¸ä¼ æ¢å¤"}),d("p",{class:"text-xs text-slate-400 mt-1",children:"éæ©æ¬å° SQL å¤ä»½æä»¶å¹¶æ§è¡æ¢å¤"}),d("div",{class:"mt-3",children:[d("input",{id:"db-restore-file",type:"file",accept:".sql,.sql.gz",disabled:i||r,onChange:p=>{const m=p?.target?.files?.[0]||null;u(m)},class:"block w-full text-xs text-slate-300 file:mr-2 file:px-2.5 file:py-1 file:border-0 file:rounded file:bg-slate-700 file:text-slate-200 file:text-xs hover:file:bg-slate-600 file:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"}),l&&d("div",{class:"text-slate-400 text-xs mt-1.5 flex items-center gap-1",children:[d("span",{class:"i-heroicons-document-text w-3 h-3"}),d("span",{class:"truncate",children:l.name}),d("span",{class:"text-slate-500",children:["(",Cc(l.size),")"]})]})]}),d("button",{type:"button",onClick:v,disabled:!l||i||r,class:"mt-3 inline-flex items-center gap-1.5 px-3 py-1.5 bg-red-600 hover:bg-red-500 disabled:bg-red-600/50 disabled:cursor-not-allowed text-white rounded-lg text-xs font-medium transition-colors",children:i?d(we,{children:[d("span",{class:"w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"æ¢å¤ä¸..."]}):d(we,{children:[d("span",{class:"i-heroicons-arrow-up-tray w-3.5 h-3.5"}),"å¼å§æ¢å¤"]})}),i&&d("div",{class:"mt-3",children:[d("div",{class:"flex items-center justify-between text-xs text-slate-400 mb-1",children:[d("span",{children:"ä¸ä¼ è¿åº¦"}),d("span",{class:"font-mono",children:[o,"%"]})]}),d("div",{class:"h-1.5 bg-slate-700 rounded-full overflow-hidden",children:d("div",{class:"h-full bg-red-500 transition-all duration-200",style:{width:`${o}%`}})})]})]})]})})]}),d("div",{class:"mt-4 bg-red-500/5 border border-red-500/20 rounded-lg p-3",children:d("div",{class:"flex items-start gap-2",children:[d("span",{class:"i-heroicons-exclamation-triangle w-4 h-4 text-red-400 flex-shrink-0 mt-0.5"}),d("div",{class:"flex-1 min-w-0",children:[d("div",{class:"text-red-400 text-xs font-medium",children:"å±é©æä½è¦å"}),d("ul",{class:"text-red-400/80 text-xs mt-1.5 space-y-0.5",children:[d("li",{children:"⢠æ¢å¤ä¼è¦çå½åä¸å¡æ°æ®ï¼è¯·å
æ§è¡ä¸æ¬¡å¯¼åºå¤ä»½"}),d("li",{children:"⢠建议å¨ä½å³°ææ§è¡ï¼é¿å
å½±åå¨çº¿è¯·æ±"}),d("li",{children:"⢠æ¢å¤å®æåå»ºè®®å·æ°åå°å¹¶æ½æ ·æ£æ¥å
³é®é¡µé¢"})]})]})]})})]})]}),d(vI,{})]})},mI=()=>{const[r,e]=E(!1),[t,n]=E(null),[i,a]=E(!1),[o,s]=E(null),l=async()=>{e(!0),n(null);try{const c=await De("/clear-cache",{});n({ok:!0,text:c.message||"ç¼åå·²æ¸
空"})}catch(c){n({ok:!1,text:c.message})}e(!1)},u=async()=>{a(!0),s(null);try{const c=await De("/generate-sitemap",{});s({ok:!0,text:c.message||"Sitemap çæå®æ",domains:c.domains})}catch(c){s({ok:!1,text:c.message})}a(!1)};
33return d("div",{class:"space-y-4 sm:space-y-6",children:[d(gI,{}),d("div",{class:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[d("div",{class:"px-4 py-3 border-b border-slate-700 bg-slate-800/50",children:d("div",{class:"flex items-center gap-2",children:[d("span",{class:"i-heroicons-wrench-screwdriver w-5 h-5 text-blue-400"}),d("h3",{class:"font-semibold text-white",children:"ç³»ç»ç»´æ¤"})]})}),d("div",{class:"p-4 space-y-4",children:[d("div",{class:"bg-slate-900/50 rounded-lg border border-slate-700 p-4",children:d("div",{class:"flex items-start gap-3",children:[d("div",{class:"w-10 h-10 bg-red-500/10 rounded-lg flex items-center justify-center flex-shrink-0",children:d("span",{class:"i-heroicons-trash w-5 h-5 text-red-400"})}),d("div",{class:"flex-1 min-w-0",children:[d("h4",{class:"text-sm font-medium text-slate-100",children:"æ¸
空ç¼å"}),d("p",{class:"text-xs text-slate-400 mt-1",children:"æ¸
空 Redis ä¸çææç¼åæ°æ®ï¼å
æ¬é¡µé¢ç¼åãæ°æ®åºæ¥è¯¢ç¼åç"}),d("div",{class:"mt-3 flex items-center gap-3 flex-wrap",children:[d("button",{onClick:l,disabled:r,class:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-red-600 hover:bg-red-500 disabled:bg-red-600/50 disabled:cursor-not-allowed text-white rounded-lg text-xs font-medium transition-colors",children:r?d(we,{children:[d("span",{class:"w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"æ¸
空ä¸..."]}):d(we,{children:[d("span",{class:"i-heroicons-trash w-3.5 h-3.5"}),"æ¸
空ç¼å"]})}),t&&d("span",{class:`text-xs ${t.ok?"text-emerald-400":"text-red-400"}`,children:[t.ok&&d("span",{class:"i-heroicons-check-circle inline-block w-3.5 h-3.5 mr-1"}),t.text]})]})]})]})}),d("div",{class:"bg-slate-900/50 rounded-lg border border-slate-700 p-4",children:d("div",{class:"flex items-start gap-3",children:[d("div",{class:"w-10 h-10 bg-blue-500/10 rounded-lg flex items-center justify-center flex-shrink-0",children:d("span",{class:"i-heroicons-map w-5 h-5 text-blue-400"})}),d("div",{class:"flex-1 min-w-0",children:[d("h4",{class:"text-sm font-medium text-slate-100",children:"çæ Sitemap"}),d("p",{class:"text-xs text-slate-400 mt-1",children:"为ææç«ç¹éæ°çæ sitemap.xml æä»¶ï¼å
æ¬è§é¢åå类索å¼"}),d("div",{class:"mt-3 flex items-center gap-3 flex-wrap",children:[d("button",{onClick:u,disabled:i,class:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-blue-600 hover:bg-blue-500 disabled:bg-blue-600/50 disabled:cursor-not-allowed text-white rounded-lg text-xs font-medium transition-colors",children:i?d(we,{children:[d("span",{class:"w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"çæä¸..."]}):d(we,{children:[d("span",{class:"i-heroicons-arrow-path w-3.5 h-3.5"}),"çæ Sitemap"]})}),o&&d("span",{class:`text-xs ${o.ok?"text-emerald-400":"text-red-400"}`,children:[o.ok&&d("span",{class:"i-heroicons-check-circle inline-block w-3.5 h-3.5 mr-1"}),o.text]})]}),o?.domains&&o.domains.length>0&&d("div",{class:"mt-3 p-2.5 bg-slate-800/50 rounded-lg border border-slate-700/50",children:[d("div",{class:"text-slate-400 text-xs mb-1.5",children:"å·²çæç«ç¹ï¼"}),d("div",{class:"flex flex-wrap gap-1.5",children:o.domains.map(c=>d("span",{class:"px-2 py-0.5 bg-slate-700 text-slate-300 rounded text-xs font-mono",children:c}))})]})]})]})})]})]}),d("div",{class:"bg-yellow-500/5 border border-yellow-500/20 rounded-xl p-4",children:d("div",{class:"flex items-start gap-3",children:[d("span",{class:"i-heroicons-exclamation-triangle w-5 h-5 text-yellow-400 flex-shrink-0 mt-0.5"}),d("div",{class:"flex-1 min-w-0",children:[d("h4",{class:"text-yellow-400 font-medium text-sm",children:"注æäºé¡¹"}),d("ul",{class:"text-yellow-500/80 text-xs mt-2 space-y-1",children:[d("li",{children:"⢠æ¸
空ç¼ååï¼é¦æ¬¡è®¿é®é¡µé¢å¯è½ä¼åæ
¢ï¼ç³»ç»ä¼èªå¨é建ç¼å"}),d("li",{children:"⢠Sitemap çæå¯è½éè¦è¾é¿æ¶é´ï¼è¯·èå¿çå¾
宿"}),d("li",{children:"â¢ æ°æ®åºæ¢å¤ä¼è¦çå½åæ°æ®ï¼è¯·å¡å¿
å
å¤ä»½"}),d("li",{children:"⢠建议å¨ä½å³°ææ§è¡è¿äºç»´æ¤æä½ï¼é¿å
å½±åç¨æ·è®¿é®"})]})]})]})})]})},q={time:"text-slate-600",module:"text-slate-500",errorLv:"text-red-400",warnLv:"text-yellow-300",infoLv:"text-slate-500",added:"text-green-400",updated:"text-blue-400",skipped:"text-slate-400",filtered:"text-yellow-400",duplicate:"text-orange-400",failed:"text-red-400",count:"text-cyan-400",quoted:"text-amber-300",source:"text-emerald-400",seedWord:"text-cyan-300",titleList:"text-violet-400",divider:"text-slate-600",plain:"text-slate-300",url:"text-slate-500"},yI=[{pattern:/={3,}[^=]*={3,}/g,render:(r,e)=>d("span",{class:q.divider,children:r[0]},e)},{pattern:/\[([A-Za-z0-9_\-.]+)\]/g,render:(r,e)=>d("span",{class:q.source,children:["[",r[1],"]"]},e)},{pattern:/ã([^ã]+)ã/g,render:(r,e)=>d("span",{children:[d("span",{class:q.divider,children:"ã"}),d("span",{class:q.quoted,children:r[1]}),d("span",{class:q.divider,children:"ã"})]},e)},{pattern:/"([^"]+)"/g,render:(r,e)=>d("span",{children:[d("span",{class:q.divider,children:'"'}),d("span",{class:q.quoted,children:r[1]}),d("span",{class:q.divider,children:'"'})]},e)},{pattern:/ç§åè¯ã([^ã]+)ã/g,render:(r,e)=>d("span",{children:[d("span",{class:q.plain,children:"ç§åè¯"}),d("span",{class:q.divider,children:"ã"}),d("span",{class:q.seedWord,children:r[1]}),d("span",{class:q.divider,children:"ã"})]},e)},{pattern:/â/g,render:(r,e)=>d("span",{class:q.divider,children:" â "},e)},{pattern:/(æ°å¢|æ´æ°|è¿æ»¤|è·³è¿|éå¤|失败|å é¤|éç½®|çæ|éæ¾)\s+(\d+(?:\.\d+)?)\s*(个|æ¡|页|ç§|KB|MB|GB)?/g,render:(r,e)=>{const n={æ°å¢:q.added,çæ:q.added,æ´æ°:q.updated,éç½®:q.updated,è¿æ»¤:q.filtered,è·³è¿:q.skipped,éå¤:q.duplicate,失败:q.failed,å é¤:q.failed,éæ¾:q.count}[r[1]]||q.count;return d("span",{children:[d("span",{class:q.plain,children:[r[1]," "]}),d("span",{class:`${n} font-medium`,children:r[2]}),r[3]&&d("span",{class:q.plain,children:[" ",r[3]]})]},e)}},{pattern:/éé\s+(\d+)\s*(个|æ¡)?/g,render:(r,e)=>d("span",{children:[d("span",{class:q.plain,children:"éé "}),d("span",{class:`${q.count} font-medium`,children:r[1]}),r[2]&&d("span",{class:q.plain,children:[" ",r[2]]})]},e)},{pattern:/(æ°å¢|æ´æ°|è·³è¿|失败|累计)=(\d+)/g,render:(r,e)=>{const t={æ°å¢:q.added,æ´æ°:q.updated,è·³è¿:q.skipped,失败:q.failed,累计:q.count};return d("span",{children:[d("span",{class:q.plain,children:[r[1],"="]}),d("span",{class:`${t[r[1]]||q.count} font-medium`,children:r[2]})]},e)}},{pattern:/å
±\s*(\d+)\s*(页|æ¡|个)/g,render:(r,e)=>d("span",{children:[d("span",{class:q.plain,children:"å
± "}),d("span",{class:`${q.count} font-medium`,children:r[1]}),d("span",{class:q.plain,children:[" ",r[2]]})]},e)},{pattern:/第\s*(\d+)\/(\d+)\s*页/g,render:(r,e)=>d("span",{children:[d("span",{class:q.plain,children:"第 "}),d("span",{class:`${q.count} font-medium`,children:r[1]}),d("span",{class:q.divider,children:"/"}),d("span",{class:q.plain,children:[r[2]," 页"]})]},e)},{pattern:/(\d+(?:\.\d+)?)\s*(个|æ¡|页|ç§|åé|å°æ¶|KB|MB|GB|ms)/g,render:(r,e)=>d("span",{children:[d("span",{class:`${q.count} font-medium`,children:r[1]}),d("span",{class:q.plain,children:r[2]})]},e)},{pattern:/HTTP\s+(\d{3})/g,render:(r,e)=>d("span",{children:[d("span",{class:q.plain,children:"HTTP "}),d("span",{class:`${parseInt(r[1])>=400?q.failed:q.count} font-medium`,children:r[1]})]},e)},{pattern:/https?:\/\/[^\sï¼ã,]+/g,render:(r,e)=>d("span",{class:q.url,children:r[0]},e)}];function xI(r){const e=r.match(/^(\[\d{2}:\d{2}:\d{2}\])\s*(\[(?:INFO|WARN|ERROR|DEBUG)\])\s*(\[[^\]]+\])\s*/);if(!e)return{prefix:null,remaining:r,level:""};const[t,n,i,a]=e,o=i.slice(1,-1),s=o==="ERROR"?q.errorLv:o==="WARN"?q.warnLv:q.infoLv;return{prefix:d("span",{children:[d("span",{class:q.time,children:[n," "]}),d("span",{class:s,children:i}),d("span",{class:q.module,children:[" ",a," "]})]}),remaining:r.slice(t.length),level:o}}function p0(r,e){const t=[];let n=r,i=e;for(;n.length>0;){let a=null;for(const o of yI){o.pattern.lastIndex=0;const s=o.pattern.exec(n);s!==null&&(a===null||s.index<a.index)&&(a={rule:o,match:s,index:s.index})}if(!a){t.push(d("span",{class:q.plain,children:n},i++));break}a.index>0&&t.push(d("span",{class:q.plain,children:n.slice(0,a.index)}
33,i++)),"render"in a.rule?t.push(a.rule.render(a.match,i++)):t.push(d("span",{class:a.rule.color,children:a.match[0]},i++)),n=n.slice(a.index+a.match[0].length)}return t}function g0(r){if(!r.trim())return d("span",{class:q.plain,children:r});const e=[];let t=0;const{prefix:n,remaining:i,level:a}=xI(r);n&&e.push(d("span",{children:n},t++));const o=i.indexOf("ï½");return o>=0?(e.push(...p0(i.slice(0,o),t)),t+=300,e.push(d("span",{class:q.divider,children:" ï½ "},t++)),i.slice(o+1).split("ã").forEach((l,u,c)=>{e.push(d("span",{class:q.titleList,children:l},t++)),u<c.length-1&&e.push(d("span",{class:q.divider,children:"ã"},t++))})):e.push(...p0(i,t)),d("span",{class:a==="ERROR"?"bg-red-950/30 rounded px-1 -mx-1":a==="WARN"?"bg-yellow-950/20 rounded px-1 -mx-1":"",children:e})}const bI=async r=>{try{const e=await m0(Pa(`/logs/download/${r}`));if(!e.ok){Z.error("ä¸è½½å¤±è´¥",await e.text());return}const t=await e.blob(),n=URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.download=r,i.click(),URL.revokeObjectURL(n)}catch(e){Z.error("ä¸è½½å¤±è´¥",e.message)}},_I=()=>{const[r,e]=E([]),[t,n]=E(""),[i,a]=E([]),[o,s]=E([]),[l,u]=E(""),[c,h]=E("realtime"),[f,v]=E(!0),[p,m]=E(!1),[y,g]=E(null),[x,b]=E(null),_=je(null),S=je(null),w=je(null),T=je(0),D=je(""),L=ss(()=>l?l.split(` 34`):[],[l]),M=ss(()=>{const P=new Set(o.map(B=>B.task));return Array.from(P).sort()},[o]),C=ss(()=>x?o.filter(P=>P.task===x):o,[o,x]);he(()=>{le("/logs/tasks").then(P=>{P.tasks.length>0&&(e(P.tasks),n(P.tasks[0]))}).catch(()=>{}),le("/logs/files").then(P=>s(P.files)).catch(()=>{}),le("/logs/stats").then(P=>g(P)).catch(()=>{})},[]),he(()=>{T.current=0,D.current=t},[t]),he(()=>{if(c!=="realtime"||!t)return;a([]);const P=t,B=()=>{if(D.current!==P)return;const V=T.current;le(`/logs/recent/${encodeURIComponent(P)}?v=${V}`).then(U=>{D.current===P&&U.changed!==!1&&(T.current=U.version,a(U.logs))}).catch(()=>{})};return B(),w.current=setInterval(B,3e3),()=>{w.current&&clearInterval(w.current)}},[t,c]),he(()=>{f&&_.current&&(_.current.scrollTop=_.current.scrollHeight)},[i]),he(()=>{f&&S.current&&(S.current.scrollTop=S.current.scrollHeight)},[l]);const I=async P=>{m(!0);try{const B=await le(`/logs/file/${P}`);u(B.content)}catch{}m(!1)},k=P=>P<1024?`${P} B`:P<1024*1024?`${(P/1024).toFixed(1)} KB`:`${(P/1024/1024).toFixed(1)} MB`,R=async P=>{try{const B=await De("/logs/clean",{keepDays:P});Z.success("æ¸ ç宿",B.message),B.deleted>0&&(le("/logs/files").then(V=>s(V.files)).catch(()=>{}),le("/logs/stats").then(V=>g(V)).catch(()=>{}))}catch(B){Z.error("æ¸ ç失败",B.message)}},O=async()=>{if(await Dt({title:"æ¸ ç©ºæææ¥å¿",message:"ç¡®å®è¦æ¸ ç©ºæææ¥å¿åï¼æ¤æä½ä¸å¯æ¢å¤ã",type:"danger"}))try{const B=await De("/logs/clear-all",{});Z.success("æ¸ ç©ºå®æ",B.message),a([]),s([]),u(""),g({fileCount:0,totalSize:0})}catch(B){Z.error("æ¸ ç©ºå¤±è´¥",B.message)}},z=async P=>{try{await De("/logs/clear-buffer",{task:P}),P?a([]):(a([]),Z.success("æ¸ ç©ºæå","å 忥å¿å·²æ¸ 空"))}catch{}};return d("div",{class:"space-y-4",children:[d("div",{class:"flex items-center justify-between",children:[d("div",{class:"flex gap-2",children:[d("button",{onClick:()=>h("realtime"),class:`px-4 py-1.5 rounded-lg text-sm transition-colors ${c==="realtime"?"bg-blue-600 text-white":"bg-slate-700 text-slate-400 hover:text-white"}`,children:[d("span",{class:"i-heroicons-signal w-4 h-4 inline-block mr-1 align-text-bottom"}),"宿¶æ¥å¿"]}),d("button",{onClick:()=>h("files"),class:`px-4 py-1.5 rounded-lg text-sm transition-colors ${c==="files"?"bg-blue-600 text-white":"bg-slate-700 text-slate-400 hover:text-white"}`,children:[d("span",{class:"i-heroicons-document-text w-4 h-4 inline-block mr-1 align-text-bottom"}),"å岿件"]})]}),d("label",{class:"flex items-center gap-2 text-slate-400 text-sm cursor-pointer",children:[d("input",{type:"checkbox",checked:f,onChange:P=>v(P.target.checked),class:"w-3.5 h-3.5 rounded bg-slate-600 border-slate-500 text-blue-500"}),"èªå¨æ»å¨"]})]}),d("div",{class:"flex items-center justify-between bg-slate-800/50 rounded-lg px-3 py-2",children:[d("div",{class:"flex items-center gap-3 text-xs text-slate-500",children:y&&d("span",{children:[y.fileCount," 个æä»¶ · ",k(y.totalSize)]})}),d("div",{class:"flex items-center gap-2",children:[c==="realtime"&&t&&d("button",{onClick:()=>z(t),class:"px-2.5 py-1 bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-white rounded text-xs transition-colors",children:"æ¸ ç©ºå½åç¼å"}),d("button",{onClick:()=>R(7),class:"px-2.5 py-1 bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-white rounded text-xs transition-colors",children:"æ¸ ç7天å"}),d("button",{onClick:()=>R(3),class:"px-2.5 py-1 bg-red-600/20 hover:bg-red-600/40 text-red-400 rounded text-xs transition-colors",children:"æ¸ ç3天å"}),d("button",{onClick:O,class:"px-2.5 py-1 bg-red-600 hover:bg-red-700 text-white rounded text-xs transition-colors",children:"æ¸ ç©ºææ"})]})]}),c==="realtime"?d("div",{class:"space-y-3",children:[r.length>0&&d("div",{class:"flex gap-2 flex-wrap",children:r.map(P=>d("button",{onClick:()=>n(P),class:`px-3 py-1 rounded-lg text-xs transition-colors ${t===P?"bg-cyan-600 text-white":"bg-slate-700 text-slate-400 hover:text-white"}`,children:P}))}),d("div",{ref:_,class:"bg-slate-950 border border-slate-700 rounded-xl p-4 h-[500px] overflow-y-auto font-mono text-xs leading-relaxed scrollbar-thin scrollbar-thumb-slate-700 scrollbar-track-slate-900",children:i.length===0?d("div",{class:"text-slate-500 text-center py-10",children:"ææ æ¥å¿ï¼çå¾ ä»»å¡è¿è¡..."}):i.map((P,B)=>d("div",{class:"whitespace-pre-wrap break-all hover:bg-slate-900/50 px-1 -mx-1 rounded",children:g0(P)},B))})]}):d("div",{class:"space-y-3",children:[M.length>0&&d("div",{class:"flex gap-2 flex-wrap",children:[d("button",{onClick:()=>b(null),class:`px-3 py-1 rounded-lg text-xs transition-colors ${x===null?"bg-blue-600 text-white":"bg-slate-700 text-slate-400 hover:text-white"}`,children:"å ¨é¨"}),M.map(P=>d("button",{onClick:()=>b(P),class:`px-3 py-1 rounded-lg text-xs transition-colors ${x===P?"bg-blue-600 text-white":"bg-slate-700 text-slate-400 hover:text-white"}`,children:P}))]}),d("div",{class:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[d("div",{class:"bg-slate-800 border border-slate-700 rounded-xl p-3 space-y-1 max-h-[500px] overflow-y-auto",children:[d("div",{class:"text-slate-500 text-xs px-2 pb-2 border-b border-slate-700 mb-2",children:[C.length," 个æä»¶"]}),C.length===0?d("div",{class:"text-slate-500 text-sm text-center py-4",children:"ææ æ¥å¿æä»¶"}):C.map(P=>d("div",{class:"flex items-center gap-1",children:[d("button",{onClick:()=>I(P.filename),class:"flex-1 text-left px-3 py-2 rounded-lg hover:bg-slate-700 transition-colors group",children:[d("div",{class:"text-slate-200 text-xs font-medium group-hover:text-white",children:P.task}),d("div",{class:"text-slate-500 text-xs",children:[P.date," · ",k(P.size)]})]}),d("button",{onClick:()=>bI(P.filename),class:"w-8 h-8 flex items-center justify-center text-slate-500 hover:text-blue-400 hover:bg-slate-700 rounded transition-colors",title:"ä¸è½½",children:d("span",{class:"i-heroicons-arrow-down-tray w-4 h-4"})})]}))]}),d("div",{class:"md:col-span-2 bg-slate-950 border border-slate-700 rounded-xl p-4 h-[500px] overflow-y-auto font-mono text-xs leading-relaxed scrollbar-thin scrollbar-thumb-slate-700 scrollbar-track-slate-900",ref:S,children:p?d("div",{class:"text-slate-500 text-center py-10",children:"å è½½ä¸..."}):L.length>0?L.map((P,B)=>d("div",{class:"whitespace-pre-wrap break-all hover:bg-slate-900/50 px-1 -mx-1 rounded",children:g0(P)},B)):d("div",{class:"text-slate-500 text-center py-10",children:"鿩左侧æä»¶æ¥çå 容"})})]})]})]})},wI="1.3.3",SI={version:wI},TI={stats:()=>d(B5,{}),"system-info":()=>d(U5,{}),"sys-config":()=>d(j5,{}),content:()=>d(tI,{}),keywords:()=>d(dI,{}),"dev-settings":()=>d(mI,{}),logs:()=>d(_I,{})},CI=({initialTab:r="stats"})=>{const[e,t]=E(!1),[n,i]=E(!0),[a,o]=E(r),[s,l]=E(r),u=Yr(h=>{h!==a&&(l(null),o(h),requestAnimationFrame(()=>l(h)))},[a]);he(()=>{const h=Yh();if(!h){i(!1);return}y0(h).then(()=>t(!0)).catch(()=>{}).finally(()=>i(!1))},[]);const c=()=>{Mb(),t(!1)};return n?d("div",{class:"min-h-screen bg-slate-900 flex items-center justify-center",children:d("div",{class:"flex flex-col items-center gap-6",children:[d("div",{class:"relative",children:[d("div",{class:"w-16 h-16 border-4 border-blue-500/20 rounded-full"}),d("div",{class:"absolute inset-0 w-16 h-16 border-4 border-blue-500 border-t-transparent roun
34ded-full animate-spin"})]}),d("div",{class:"text-center",children:[d("div",{class:"text-slate-300 text-lg font-medium mb-1",children:"æ£å¨å 载管çåå°"}),d("div",{class:"text-slate-500 text-sm",children:"éªè¯èº«ä»½ä¸..."})]})]})}):e?d("div",{class:"min-h-screen bg-slate-900",children:[d(Eb,{}),d(Ob,{}),d(Hb,{}),d($b,{tab:a,onTabChange:u,onLogout:c}),d(Gb,{tab:a}),d("main",{class:"max-w-7xl mx-auto px-3 sm:px-6 py-4 sm:py-6 pb-16",children:s&&d("div",{class:"space-y-4 sm:space-y-6",children:TI[s]?.()})}),d("footer",{class:"fixed bottom-0 right-0 px-4 py-2 text-xs text-slate-600 bg-slate-900/80 backdrop-blur-sm rounded-tl-lg border-l border-t border-slate-700/50",children:["v",SI.version]})]}):d(Wb,{onSuccess:()=>t(!0)})},MI=r=>d(Ab,{fallback:d("div",{class:"min-h-screen bg-slate-900 flex items-center justify-center",children:d("div",{class:"flex flex-col items-center gap-6",children:[d("div",{class:"relative",children:[d("div",{class:"w-16 h-16 border-4 border-blue-500/20 rounded-full"}),d("div",{class:"absolute inset-0 w-16 h-16 border-4 border-blue-500 border-t-transparent rounded-full animate-spin"})]}),d("div",{class:"text-center",children:[d("div",{class:"text-slate-300 text-lg font-medium mb-1",children:"æ£å¨å 载管çåå°"}),d("div",{class:"text-slate-500 text-sm",children:"åå§åä¸..."})]})]})}),children:d(CI,{...r})}),LI=function(r){return d(MI,{...r})},kI=!0;export{LI as AdminApp,kI as __importing_islands};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.