agent-usage-all-in-one 0.2.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BUNDLED_DEPENDENCIES.json +4 -1
- package/BUNDLED_LICENSES.md +283 -0
- package/README.md +24 -12
- package/README.zh-CN.md +17 -10
- package/THIRD_PARTY_LICENSES.md +3 -1
- package/dist/cli.js +1125 -119
- package/dist/cli.js.map +1 -1
- package/dist/web/_app/immutable/assets/2.BWrFQDDF.css +1 -0
- package/dist/web/_app/immutable/chunks/3vuWay1s.js +3 -0
- package/dist/web/_app/immutable/chunks/CIxAYfti.js +1 -0
- package/dist/web/_app/immutable/chunks/DrMah8OK.js +1 -0
- package/dist/web/_app/immutable/entry/app.BJJ5ybn9.js +2 -0
- package/dist/web/_app/immutable/entry/start.C8pSj-JI.js +1 -0
- package/dist/web/_app/immutable/nodes/0.f03zL-fK.js +1 -0
- package/dist/web/_app/immutable/nodes/1.zxn5xzLP.js +1 -0
- package/dist/web/_app/immutable/nodes/2.CeZkCUZN.js +27 -0
- package/dist/web/_app/version.json +1 -1
- package/dist/web/brand/agent-usage-showcase.jpg +0 -0
- package/dist/web/brands/README.md +4 -4
- package/dist/web/index.html +30 -8
- package/docs/open-source.md +1 -1
- package/package.json +2 -1
- package/static/brand/agent-usage-showcase.jpg +0 -0
- package/static/brands/README.md +4 -4
- package/dist/web/_app/immutable/assets/2.Bb7EkOVL.css +0 -1
- package/dist/web/_app/immutable/chunks/Cui19qu3.js +0 -1
- package/dist/web/_app/immutable/chunks/DQaovcqE.js +0 -3
- package/dist/web/_app/immutable/entry/app.CpOB18I2.js +0 -2
- package/dist/web/_app/immutable/entry/start.Csw0voA2.js +0 -1
- package/dist/web/_app/immutable/nodes/0.Di1qFV6d.js +0 -1
- package/dist/web/_app/immutable/nodes/1.CVs4QxxY.js +0 -1
- package/dist/web/_app/immutable/nodes/2.ByyWXaMo.js +0 -31
- package/dist/web/brand/agent-usage-banner.svg +0 -27
- package/static/brand/agent-usage-banner.svg +0 -27
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import{$ as e,A as t,C as n,D as r,E as i,F as a,G as o,H as s,I as c,J as l,K as u,L as d,M as f,O as p,P as m,Q as h,R as g,S as _,T as v,U as y,W as b,X as x,Z as S,_ as C,a as w,at as T,c as E,d as D,et as O,f as k,g as A,h as j,j as M,k as N,l as P,m as F,n as I,nt as ee,o as te,ot as L,p as ne,q as R,r as re,rt as ie,s as ae,st as oe,u as z,v as B,w as V,y as se,z as H}from"../chunks/3vuWay1s.js";import"../chunks/CIxAYfti.js";import"../chunks/xihTtKlq.js";T();function ce(e,t){let n=`${e} ${t}`.toLowerCase();return/missing|binary|not[ -]?installed/.test(n)?`missing-binary`:/not[ -]?configured|credential.*missing|key.*missing/.test(n)?`not-configured`:/unauthori[sz]ed|permission|forbidden|\b401\b|\b403\b/.test(n)?`unauthorized`:/unsupported|capability/.test(n)?`unsupported`:/schema|shape|parse/.test(n)?`schema-mismatch`:/rate[ -]?limit|\b429\b/.test(n)?`rate-limited`:/timeout|timed out/.test(n)?`timeout`:/stale/.test(n)?`stale`:`unavailable`}var le=new Set([`stale`,`timeout`,`unavailable`]),ue=new Set([...le,`rate-limited`]);function de(e){return e!==null&&ue.has(e)}function fe(e){return e?ce(e,``):null}function pe(e,t){return`${e}:${t}`}function me(e,t,n){return!n&&(t===`stale`||t===`unavailable`)?[`${e}:freshness:${t}`]:[]}function he(e,t){let n=fe(t);return n&&le.has(n)?[`${e}:health:${n}`]:[]}function ge(e,t){let n=new Set((t?.connectors??[]).filter(e=>e.category===`rate-limited`&&e.billingDomainId===null).map(e=>e.providerId)),r=new Set((t?.connectors??[]).filter(e=>e.category===`rate-limited`&&e.billingDomainId!==null).map(e=>pe(e.providerId,e.billingDomainId??``)));for(let t of e.providers){fe(t.health.errorCode)===`rate-limited`&&(t.summaryBillingDomainId?r.add(pe(t.id,t.summaryBillingDomainId)):n.add(t.id));for(let e of t.billingDomains)e.health&&fe(e.health.errorCode)===`rate-limited`&&r.add(pe(t.id,e.id))}let i=e.providers.flatMap(e=>{let t=n.has(e.id)||(e.summaryBillingDomainId?r.has(pe(e.id,e.summaryBillingDomainId)):!1),i=[...me(`provider:${e.id}`,e.freshness.status,t)];t||i.push(...he(`provider:${e.id}`,e.health.errorCode));let a=e.billingDomains.flatMap(t=>{let i=t.freshness??e.freshness,a=t.health??e.health,o=n.has(e.id)||r.has(pe(e.id,t.id))||fe(a.errorCode)===`rate-limited`;return[...me(`domain:${e.id}:${t.id}`,i.status,o),...o?[]:he(`domain:${e.id}:${t.id}`,a.errorCode)]});return[...i,...a]}),a=(t?.connectors??[]).filter(e=>e.category!==null&&le.has(e.category)&&!n.has(e.providerId)&&!(e.billingDomainId&&r.has(pe(e.providerId,e.billingDomainId)))).map(e=>`diagnostic:${e.id}:${e.billingDomainId??`provider`}:${e.category}`),o=[...new Set([...i,...a])].sort();return o.length>0?o.join(`|`):null}function _e(e){let t=null,n=null,r=!1;return{schedule(i,a,o){if(r)return;let s=ge(i,a);if(!s){n=null,t&&clearTimeout(t),t=null;return}if(!t){if(o){n=s;return}s!==n&&(n=s,t=setTimeout(()=>{t=null,!r&&e()},0))}},dispose(){r=!0,t&&clearTimeout(t),t=null}}}var ve={en:{eyebrow:`LOCAL USAGE CENTER`,title:`Agent Usage`,bannerAlt:`Agent Usage — one local view for quota, tokens, and equivalent API cost`,metaDescription:`A private local dashboard for coding-agent quota, token, and cost usage.`,subtitle:`Quota, tokens, and freshness in one private local view.`,mainViews:`Main views`,agentUsageTab:`Agent usage`,tokenModelCostsTab:`Tokens & model costs`,refresh:`Refresh`,refreshing:`Refreshing…`,settings:`Settings`,closeSettings:`Close settings`,settingsSubtitle:`Connections, automation, diagnostics, and local data controls.`,themeSystem:`System`,themeLight:`Light`,themeDark:`Dark`,themeToggleAria:`Toggle color theme (system, light, dark)`,reviewInSettings:`Review in settings`,connectorsUnavailable:`Connection settings are unavailable.`,monitoringUnavailable:`Monitoring settings are unavailable.`,diagnosticsUnavailable:`Diagnostics are unavailable.`,retentionUnavailable:`Retention data is unavailable.`,privacyActionUnavailable:`The local data action could not be completed.`,refreshUnavailable:`Refresh failed. Existing usage is still shown.`,loading:`Loading provider usage…`,loadingAgentUsage:`Loading cached agent usage…`,loadingModelCosts:`Loading cached token and model cost data…`,updating:`Updating`,updatingModelCosts:`Updating token and model cost calculations in the background. Cached results remain available.`,error:`Usage data could not be loaded.`,updatedNow:`Updated just now`,updated:`Updated`,unavailable:`Never updated`,quota:`Quota windows`,quotaTimelineTitle:`Quota timeline`,quotaTimelineCurrentRange:`current`,quotaTimelineWeekly:`Weekly`,quotaTimelineFiveHour:`5 hour`,quotaTimelinePrevious:`Previous period`,quotaTimelineNext:`Next period`,quotaTimelineToday:`Today`,quotaTimelineModes:`Quota timeline range`,quotaTimelineElapsed:`Elapsed window`,quotaTimelineCurrent:`Current window`,quotaTimelineUpcoming:`Upcoming window`,quotaTimelineEmpty:`No provider reports a five-hour quota window.`,quotaTimelineData:`Quota timeline data`,quotaTimelineAccount:`Account / billing domain`,tokens:`Tokens`,total:`Total`,input:`Input`,output:`Output`,reasoning:`Reasoning`,cacheRead:`Cache read`,cacheWrite:`Cache write`,classified:`Classified`,unclassified:`Unclassified`,semantics:`Semantics`,includedInOutput:`Included in output`,includedInInput:`Included in input`,separateCategory:`Separate`,precisionHour:`Hour`,precisionDay:`Day`,aggregationTemporality:`Aggregation`,temporalityDelta:`Delta`,temporalityCumulative:`Cumulative`,temporalityUnknown:`Unknown`,used:`used`,resets:`Resets`,source:`Source`,scope:`Scope`,plan:`Plan`,accountWide:`Account-wide`,localOnly:`This Mac only`,limit:`Limit`,fallback:`Use balance`,unknown:`Unknown`,noProviders:`No providers have reported usage yet.`,providersLabel:`Providers`,billingDomainTabs:`billing domains`,connections:`Connections`,connectionsSubtitle:`Discover local clients, review access, and connect each provider independently.`,connect:`Connect`,skip:`Skip`,retry:`Retry`,experimental:`Experimental`,stable:`Stable`,officialClient:`Official client`,managedSecret:`Agent Usage Keychain`,noCredential:`No credential required`,installed:`Installed`,notInstalled:`Not installed`,notChecked:`Not checked`,discovered:`Ready to connect`,connected:`Connected`,manageConnection:`Manage connection`,connectionSetup:`Connection setup`,skipped:`Skipped`,connectionError:`Discovery failed`,coverageLabel:`Expected coverage`,managementKey:`Management API key`,replaceCredential:`Replace credential`,tokenBreakdown:`Token breakdown`,billing:`Billing`,actualCost:`Actual cost`,prepaid:`Prepaid balance`,spendingLimit:`Spending limit`,currentInvoice:`Current invoice`,invoices:`Invoices`,history:`History`,recordedTokens:`Recorded tokens`,unpricedTokens:`unpriced Tokens`,latestData:`Latest observed data`,generatedAt:`Summary generated`,noObservations:`No token observations in this window`,notAvailable:`Unavailable`,domainContributions:`Token contributions by billing domain`,separateFromHeadline:`Separate domain · not included in headline`,headlineShareNotApplicable:`Not applicable to headline`,topModels:`Top models`,topDays:`Top days`,nativeAmount:`Native`,comparison:`Comparison`,rateUnavailable:`Rate unavailable`,unknownAmount:`Unknown amount`,priceVersion:`Price version`,exchangeRate:`Exchange rate`,tokenMoneyWorkbench:`Tokens & model costs`,workbenchSubtitle:`Token consumption and API-equivalent cost by model for the selected time range.`,usage:`Usage`,usageOverview:`Usage overview`,providerShare:`Provider share`,providerShareSubtitle:`Distribution within the selected headline metric`,cost:`Cost`,model:`Model`,breakdown:`Breakdown`,breakdownView:`Breakdown view`,list:`List`,treemap:`Treemap`,trendStacked:`Stacked trend`,modelTrendStacked:`Stacked model trend`,usageTotals:`Totals`,costTrend:`Cost over time`,tokenTrend:`Tokens over time`,displayCurrency:`Display currency`,trendMetric:`Trend metric`,recordedTokenTrend:`Recorded Token trend`,retailEquivalentTrend:`API retail equivalent trend`,trendData:`Trend data`,trendSummary:`Selected window and Provider series, including gaps and time precision`,timeAxisControls:`Time axis controls`,zoomInTimeAxis:`Zoom in time axis`,zoomOutTimeAxis:`Zoom out time axis`,resetTimeAxis:`Reset time axis`,interactiveTrend:`Interactive usage trend`,trendInteractionHint:`Scroll to zoom · drag to pan`,interval:`Interval`,gap:`Gap`,amountCoverage:`Amount coverage`,conversionEvidence:`Conversion evidence`,noConversionNeeded:`Native currency; no conversion required`,modelRankingSubtitle:`Known models stay separate by Provider and billing domain. Select a row to audit its evidence.`,modelBreakdownTreemap:`Model breakdown treemap`,treemapHint:`Block area shows the share of the selected metric. Click a block to audit a model.`,sortByTokens:`Sort by recorded Tokens`,sortByRetailEquivalent:`Sort by API retail equivalent`,tokenShare:`Token share`,costShare:`Cost share`,modelDetail:`Model detail`,closeModelDetail:`Close model detail`,activityOverview:`Activity overview`,observations:`Observations`,evidenceSummary:`Evidence summary`,auditDetails:`Audit details`,priceSnapshot:`Price snapshot`,ratePerMillion:`Rate / 1M`,derivationSourceReported:`Source-reported`,derivationReconciledRemainder:`Reconciled remainder`,derivationCategorized:`Categorized fields`,derivationLegacyTotal:`Legacy total`,recordedTotal:`Recorded total`,sourceReportedTotal:`Source-reported total`,totalDerivation:`Total derivation`,priceLineItems:`Price line items`,priceEffective:`Price effective`,modelTrend:`Model trend`,calculatedAt:`Calculated`,noPriceEvidence:`No eligible retail price evidence`,mostConstrained:`Most constrained`,recommendation:`Recommended agent`,remaining:`remaining`,predictedExhaustion:`Predicted exhaustion`,lastsUntilReset:`Expected to last until reset`,exhaustsBeforeReset:`Expected to exhaust before reset`,readOnlyAdvice:`Advice only · never switches agents`,highestSafeCapacity:`Highest safe capacity among fresh providers`,forecastSupports:`Forecast lasts through the next reset`,samples:`samples`,monitoring:`Monitoring`,backgroundCollection:`Collect every 5 minutes`,notifications:`Local notifications`,startAtLogin:`Start at login`,monitoringSubtitle:`Opt-in local controls; provider backoff is always respected.`,diagnostics:`Diagnostics`,diagnosticsSubtitle:`Connector and billing-domain health with actionable recovery.`,healthy:`Healthy`,providerDegraded:`Provider data is degraded`,providerRecovery:`Run doctor, check this provider connection, and refresh.`,coverageComplete:`Complete`,coveragePartial:`Partial`,coverageUnavailable:`Unavailable`,authorityOfficialAccount:`Official account`,authorityOfficialClient:`Official client`,authorityLocalObservation:`Local observation`,authorityEstimate:`Estimate`,authorityUnavailable:`Unavailable`,authorityMixed:`Mixed sources`,confidenceHigh:`High confidence`,confidenceMedium:`Medium confidence`,costActual:`Actual`,costSubscription:`Subscription`,costReportedEstimate:`Reported estimate`,costRetailEquivalent:`API retail equivalent`,costLegacyUnknown:`Legacy purpose unknown`,enabled:`Enabled`,disabled:`Disabled`,onboardingEyebrow:`ONBOARDING`,automationEyebrow:`LOCAL AUTOMATION`,healthEyebrow:`LOCAL HEALTH`,privacyEyebrow:`LOCAL PRIVACY`,codexPermission:`Read quota and usage through the installed official Codex client.`,claudePermission:`Read opt-in telemetry and usage exposed by the official Claude client.`,openCodePermission:`Read account quota and local exports through official OpenCode surfaces.`,grokPermission:`Read opt-in Grok Build telemetry and official client billing capability.`,xaiPermission:`Store a dedicated management key for official xAI billing data.`,diagnosticMissingBinary:`Missing binary`,diagnosticNotConfigured:`Not configured`,diagnosticUnauthorized:`Unauthorized`,diagnosticUnsupported:`Unsupported`,diagnosticSchemaMismatch:`Schema mismatch`,diagnosticRateLimited:`Rate limited`,diagnosticTimeout:`Timeout`,diagnosticStale:`Automatic refresh pending`,diagnosticUnavailable:`Unavailable`,recoveryMissingBinary:`Install the official client, then retry discovery.`,recoveryNotConfigured:`Connect this provider in onboarding, then refresh.`,recoveryUnauthorized:`Sign in again or replace the credential, then refresh.`,recoveryUnsupported:`Upgrade the official client or disable this unsupported capability.`,recoverySchemaMismatch:`Upgrade Agent Usage or the official client, then retry.`,recoveryRateLimited:`Wait for the provider backoff, then retry.`,recoveryTimeout:`Check the client process and network, then retry.`,recoveryStale:`Agent Usage will retry this connector automatically.`,recoveryUnavailable:`Run doctor, check the connector, and retry refresh.`,planValue:`Subscription value`,planValueSubtitle:`What each plan costs for this window against the API retail equivalent of the Tokens it produced.`,planValueChartLabel:`Subscription value map`,planValueRankingLabel:`Value multiple ranking`,planValueRatio:`Value multiple`,planValueBreakEven:`Break-even 1x`,planValuePaid:`Prorated plan cost`,planValueWorth:`Retail equivalent`,planValueAtLeast:`at least`,planValueEffectiveUnitPrice:`Your unit price`,planValueRetailUnitPrice:`Market unit price`,planValueSavings:`Saved`,planValueOverpaid:`Overpaid`,planValuePerMillion:`per million Tokens`,planValueWindowNote:`Plan price prorated to the selected window`,planValuePartial:`Some Tokens are unpriced, so this multiple is a lower bound.`,planValueEmpty:`No plan price is set yet.`,planValueEmptyAction:`Set your plan price in settings`,planValueMetered:`Metered billing · no plan price`,planValueUnconfigured:`No plan price set`,planValueUnavailable:`Value multiple unavailable`,planPeriodLabel:`This billing period`,planPeriodDays:`days`,planPeriodEarnedBack:`Earned back`,planPeriodOnPace:`On pace to pay for itself`,planPeriodBehindPace:`Behind the pace to pay for itself`,planPeriodUnknown:`Add a renewal date to read this billing period`,planAnchorDate:`Renewal date`,planAnchorHint:`Any past or future renewal date. It sets the billing period boundaries.`,plans:`Subscription plans`,plansSubtitle:`Declare what each plan costs. The price stays on this Mac, is never collected, and is only compared with the API retail equivalent.`,plansUnavailable:`Subscription plan settings are unavailable.`,planPreset:`Plan`,planCustom:`Custom price`,planNone:`Not set`,planAmount:`Price`,planCurrency:`Currency`,planPeriod:`Billing period`,planPeriodMonthly:`Monthly`,planPeriodAnnual:`Annual`,planSave:`Save`,planClear:`Clear`,planPresetSource:`Preset price · confirm it against your invoice`,planUserEntered:`Price you entered`,privacy:`Privacy & data`,privacySubtitle:`Exports omit account identifiers and secrets. Raw data stays local.`,retentionDays:`day raw retention`,rawObservations:`raw observations`,dailyAggregates:`daily aggregates`,exportJson:`Export JSON`,exportCsv:`Export CSV`,includeAccountIdentifiers:`Include available account identifiers`,deleteProductSecrets:`Also delete product Keychain entries`,clearData:`Clear local usage`,clearing:`Clearing…`,clearConfirmation:`Clear all local usage history? Official-client credentials are preserved.`,hardRebuild:`Hard rebuild all data`,hardRebuilding:`Hard rebuild running…`,hardRebuildWarning:`High-cost operation: ignores scan and pricing caches. It can take a long time, but the dashboard remains usable.`,hardRebuildConfirmation:`Hard rebuild all local usage and cost data? This ignores caches, is resource-intensive, and may take a long time.`},"zh-CN":{eyebrow:`本地用量中心`,title:`Agent Usage`,bannerAlt:`Agent Usage——在一个本地视图中查看额度、Token 和 API 对等费用`,metaDescription:`在本地私密查看编程 Agent 的额度、Token 和费用用量。`,subtitle:`在一个私密的本地视图中查看额度、Token 与数据新鲜度。`,mainViews:`主要视图`,agentUsageTab:`Agent 用量`,tokenModelCostsTab:`Token 与模型费用`,refresh:`刷新`,refreshing:`刷新中…`,settings:`设置`,closeSettings:`关闭设置`,settingsSubtitle:`连接、自动化、诊断与本地数据控制。`,themeSystem:`跟随系统`,themeLight:`浅色`,themeDark:`深色`,themeToggleAria:`切换颜色主题(跟随系统、浅色、深色)`,reviewInSettings:`在设置中查看`,connectorsUnavailable:`连接设置暂不可用。`,monitoringUnavailable:`监控设置暂不可用。`,diagnosticsUnavailable:`诊断信息暂不可用。`,retentionUnavailable:`保留策略数据暂不可用。`,privacyActionUnavailable:`无法完成本地数据操作。`,refreshUnavailable:`刷新失败,继续显示已有用量。`,loading:`正在加载 provider 用量…`,loadingAgentUsage:`正在加载已缓存的 Agent 用量…`,loadingModelCosts:`正在加载已缓存的 Token 与模型费用…`,updating:`更新中`,updatingModelCosts:`正在后台更新 Token 与模型费用,已缓存的结果仍可查看。`,error:`无法加载用量数据。`,updatedNow:`刚刚更新`,updated:`更新于`,unavailable:`从未更新`,quota:`额度窗口`,quotaTimelineTitle:`额度时序`,quotaTimelineCurrentRange:`当前`,quotaTimelineWeekly:`按周`,quotaTimelineFiveHour:`5 小时`,quotaTimelinePrevious:`上一周期`,quotaTimelineNext:`下一周期`,quotaTimelineToday:`今天`,quotaTimelineModes:`额度时序范围`,quotaTimelineElapsed:`已结束窗口`,quotaTimelineCurrent:`当前窗口`,quotaTimelineUpcoming:`后续窗口`,quotaTimelineEmpty:`当前没有 Provider 提供 5 小时额度窗口。`,quotaTimelineData:`额度时序数据`,quotaTimelineAccount:`账户 / 计费域`,tokens:`Token`,total:`总计`,input:`输入`,output:`输出`,reasoning:`推理`,cacheRead:`缓存读取`,cacheWrite:`缓存写入`,classified:`已分类`,unclassified:`未分类`,semantics:`Token 语义`,includedInOutput:`包含在输出中`,includedInInput:`包含在输入中`,separateCategory:`独立计算`,precisionHour:`小时级`,precisionDay:`日级`,aggregationTemporality:`聚合方式`,temporalityDelta:`增量`,temporalityCumulative:`累计`,temporalityUnknown:`未知`,used:`已使用`,resets:`刷新于`,source:`来源`,scope:`范围`,plan:`计划`,accountWide:`账户全局`,localOnly:`仅此 Mac`,limit:`额度`,fallback:`超额使用余额`,unknown:`未知`,noProviders:`尚无 provider 上报用量。`,providersLabel:`Provider`,billingDomainTabs:`计费域`,connections:`连接`,connectionsSubtitle:`发现本地客户端、检查访问权限,并独立连接每个 provider。`,connect:`连接`,skip:`跳过`,retry:`重试`,experimental:`实验性`,stable:`稳定`,officialClient:`官方客户端`,managedSecret:`Agent Usage 钥匙串`,noCredential:`无需凭据`,installed:`已安装`,notInstalled:`未安装`,notChecked:`尚未检查`,discovered:`可以连接`,connected:`已连接`,manageConnection:`管理连接`,connectionSetup:`连接设置`,skipped:`已跳过`,connectionError:`发现失败`,coverageLabel:`预期覆盖`,managementKey:`Management API 密钥`,replaceCredential:`替换凭据`,tokenBreakdown:`Token 分类明细`,billing:`计费`,actualCost:`实际费用`,prepaid:`预付余额`,spendingLimit:`消费上限`,currentInvoice:`当前账单`,invoices:`历史账单`,history:`历史`,recordedTokens:`已记录 Token`,unpricedTokens:`未定价 Token`,latestData:`最新观测数据`,generatedAt:`摘要生成时间`,noObservations:`当前时间范围内没有 Token 观测`,notAvailable:`不可用`,domainContributions:`按计费域划分的 Token 贡献`,separateFromHeadline:`独立计费域 · 不计入摘要总量`,headlineShareNotApplicable:`不适用于摘要占比`,topModels:`模型排行`,topDays:`日期排行`,nativeAmount:`原币`,comparison:`对比币种`,rateUnavailable:`汇率不可用`,unknownAmount:`金额未知`,priceVersion:`价格版本`,exchangeRate:`汇率`,tokenMoneyWorkbench:`Token 与模型费用`,workbenchSubtitle:`按所选时间范围查看各模型的 Token 消耗与 API 对等费用。`,usage:`用量`,usageOverview:`用量总览`,providerShare:`Provider 占比`,providerShareSubtitle:`按当前摘要指标展示所选范围内的分布`,cost:`费用`,model:`模型`,breakdown:`明细`,breakdownView:`明细视图`,list:`列表`,treemap:`矩形树图`,trendStacked:`趋势堆叠`,modelTrendStacked:`模型趋势堆叠图`,usageTotals:`汇总`,costTrend:`费用趋势`,tokenTrend:`Token 趋势`,displayCurrency:`显示币种`,trendMetric:`趋势指标`,recordedTokenTrend:`已记录 Token 趋势`,retailEquivalentTrend:`API 等价零售价趋势`,trendData:`趋势数据`,trendSummary:`选中时间范围与 Provider 序列,包含数据缺口和时间精度`,timeAxisControls:`时间轴控制`,zoomInTimeAxis:`放大时间轴`,zoomOutTimeAxis:`缩小时间轴`,resetTimeAxis:`重置时间轴`,interactiveTrend:`交互式用量趋势`,trendInteractionHint:`滚轮缩放 · 拖拽平移`,interval:`区间`,gap:`数据缺口`,amountCoverage:`金额覆盖率`,conversionEvidence:`换算证据`,noConversionNeeded:`原币显示,无需换算`,modelRankingSubtitle:`已知模型按 Provider 与计费域分开;选择一行可审计完整证据。`,modelBreakdownTreemap:`模型明细矩形树图`,treemapHint:`色块面积表示所选指标的占比。点击色块可查看该模型的详情。`,sortByTokens:`按已记录 Token 排序`,sortByRetailEquivalent:`按 API 等价零售价排序`,tokenShare:`Token 占比`,costShare:`费用占比`,modelDetail:`模型详情`,closeModelDetail:`关闭模型详情`,activityOverview:`活动概览`,observations:`观测次数`,evidenceSummary:`证据摘要`,auditDetails:`审计详情`,priceSnapshot:`价格快照`,ratePerMillion:`每百万 Token 单价`,derivationSourceReported:`来源报告`,derivationReconciledRemainder:`对账余量`,derivationCategorized:`分类字段汇总`,derivationLegacyTotal:`旧版总量`,recordedTotal:`已记录总量`,sourceReportedTotal:`来源报告总量`,totalDerivation:`总量推导`,priceLineItems:`价格行项目`,priceEffective:`价格生效`,modelTrend:`模型趋势`,calculatedAt:`计算时间`,noPriceEvidence:`没有符合条件的零售价格证据`,mostConstrained:`最紧张额度`,recommendation:`推荐使用`,remaining:`剩余`,predictedExhaustion:`预计耗尽`,lastsUntilReset:`预计可坚持到刷新`,exhaustsBeforeReset:`预计会在刷新前耗尽`,readOnlyAdvice:`仅提供建议 · 永不自动切换 agent`,highestSafeCapacity:`新鲜数据中安全余量最高`,forecastSupports:`预测可坚持到下一次刷新`,samples:`个样本`,monitoring:`持续监控`,backgroundCollection:`每 5 分钟采集`,notifications:`本机通知`,startAtLogin:`登录时启动`,monitoringSubtitle:`本地显式控制;始终遵守 provider 退避。`,diagnostics:`诊断与恢复`,diagnosticsSubtitle:`连接器与计费域健康状态,以及可执行的恢复建议。`,healthy:`健康`,providerDegraded:`Provider 数据已降级`,providerRecovery:`运行 doctor、检查该 provider 连接,然后刷新。`,coverageComplete:`完整`,coveragePartial:`部分`,coverageUnavailable:`不可用`,authorityOfficialAccount:`官方账户`,authorityOfficialClient:`官方客户端`,authorityLocalObservation:`本机观测`,authorityEstimate:`估算`,authorityUnavailable:`不可用`,authorityMixed:`混合来源`,confidenceHigh:`高置信度`,confidenceMedium:`中等置信度`,costActual:`实际费用`,costSubscription:`订阅费用`,costReportedEstimate:`来源报告估算`,costRetailEquivalent:`API 等价零售价`,costLegacyUnknown:`旧数据用途未知`,enabled:`已启用`,disabled:`已停用`,onboardingEyebrow:`连接引导`,automationEyebrow:`本地自动化`,healthEyebrow:`本地健康状态`,privacyEyebrow:`本地隐私`,codexPermission:`通过已安装的官方 Codex 客户端读取额度与用量。`,claudePermission:`读取用户主动开启的 telemetry 与官方 Claude 客户端提供的用量。`,openCodePermission:`通过 OpenCode 官方入口读取账户额度与本机导出。`,grokPermission:`读取用户主动开启的 Grok Build telemetry 与官方客户端计费能力。`,xaiPermission:`保存独立 Management key,用于读取官方 xAI 计费数据。`,diagnosticMissingBinary:`缺少客户端`,diagnosticNotConfigured:`尚未配置`,diagnosticUnauthorized:`授权失效`,diagnosticUnsupported:`能力不支持`,diagnosticSchemaMismatch:`数据格式不兼容`,diagnosticRateLimited:`请求受限`,diagnosticTimeout:`请求超时`,diagnosticStale:`等待自动刷新`,diagnosticUnavailable:`不可用`,recoveryMissingBinary:`安装官方客户端,然后重新发现。`,recoveryNotConfigured:`在连接引导中连接该 provider,然后刷新。`,recoveryUnauthorized:`重新登录或替换凭据,然后刷新。`,recoveryUnsupported:`升级官方客户端,或停用当前不支持的能力。`,recoverySchemaMismatch:`升级 Agent Usage 或官方客户端,然后重试。`,recoveryRateLimited:`等待 provider 退避结束,然后重试。`,recoveryTimeout:`检查客户端进程与网络,然后重试。`,recoveryStale:`Agent Usage 将自动重试该连接。`,recoveryUnavailable:`运行 doctor、检查 connector,然后重试刷新。`,planValue:`订阅性价比`,planValueSubtitle:`本窗口内每个订阅摊销了多少钱,对比它产出的 Token 的 API 对等市场价。`,planValueChartLabel:`订阅性价比图谱`,planValueRankingLabel:`价值倍数排行`,planValueRatio:`价值倍数`,planValueBreakEven:`保本线 1x`,planValuePaid:`摊销订阅费`,planValueWorth:`对等市场价`,planValueAtLeast:`至少`,planValueEffectiveUnitPrice:`你的实际单价`,planValueRetailUnitPrice:`市场单价`,planValueSavings:`节省`,planValueOverpaid:`多付`,planValuePerMillion:`每百万 Token`,planValueWindowNote:`订阅价已按当前时间窗摊销`,planValuePartial:`部分 Token 未定价,因此该倍数是下限。`,planValueEmpty:`还没有设置订阅价格。`,planValueEmptyAction:`在设置中填写订阅价格`,planValueMetered:`按量计费 · 无订阅价`,planValueUnconfigured:`未设置订阅价`,planValueUnavailable:`无法计算价值倍数`,planPeriodLabel:`本计费周期`,planPeriodDays:`天`,planPeriodEarnedBack:`已回本`,planPeriodOnPace:`按当前进度可以回本`,planPeriodBehindPace:`按当前进度回不了本`,planPeriodUnknown:`填写续费日后可查看本计费周期`,planAnchorDate:`续费日`,planAnchorHint:`填任意一次续费日期,过去或将来都可以,用于确定计费周期的起止。`,plans:`订阅计划`,plansSubtitle:`填写每个订阅的价格。价格只保存在本机,不会被采集,只用于和 API 对等市场价做对比。`,plansUnavailable:`订阅计划设置不可用。`,planPreset:`档位`,planCustom:`自定义价格`,planNone:`未设置`,planAmount:`价格`,planCurrency:`币种`,planPeriod:`计费周期`,planPeriodMonthly:`按月`,planPeriodAnnual:`按年`,planSave:`保存`,planClear:`清除`,planPresetSource:`预置价格 · 请对照账单确认`,planUserEntered:`你填写的价格`,privacy:`隐私与数据`,privacySubtitle:`导出会移除账户标识与密钥;原始数据只保存在本机。`,retentionDays:`天原始数据保留期`,rawObservations:`条原始记录`,dailyAggregates:`条每日聚合`,exportJson:`导出 JSON`,exportCsv:`导出 CSV`,includeAccountIdentifiers:`导出可得的账户标识`,deleteProductSecrets:`同时删除产品 Keychain 条目`,clearData:`清除本地用量`,clearing:`清除中…`,clearConfirmation:`清除全部本地用量历史?官方客户端凭据会保留。`,hardRebuild:`硬重算全部数据`,hardRebuilding:`硬重算进行中…`,hardRebuildWarning:`高代价操作:忽略扫描与定价缓存,可能等待很久,但不会阻塞页面使用。`,hardRebuildConfirmation:`确定硬重算全部本地用量与费用数据吗?该操作会忽略缓存、消耗较多资源,并且可能需要等待很长时间。`}};function ye(e){return e.toLowerCase().startsWith(`zh`)?`zh-CN`:`en`}function be(e,t){return ve[e][t]}var xe=`agent-usage:theme-changed`,Se=`agent-usage:theme`,Ce=`(prefers-color-scheme: dark)`;function we(){if(typeof window>`u`)return`system`;try{let e=window.localStorage.getItem(Se);return e===`light`||e===`dark`||e===`system`?e:`system`}catch{return`system`}}function Te(){if(typeof window>`u`)return!1;try{return window.matchMedia(Ce).matches}catch{return!1}}function Ee(e){return e===`light`||e===`dark`?e:Te()?`dark`:`light`}var De=O(we()),Oe=O(`light`),ke=De,Ae=Oe,je=we(),Me=!1;function Ne(e){if(typeof window>`u`)return;let t=window.document.documentElement;t.dataset.theme=e;try{t.style.colorScheme=e}catch{}}function Pe(e){typeof window>`u`||window.dispatchEvent(new CustomEvent(xe,{detail:{theme:e}}))}function Fe(){let e=Ee(je);De.set(je),Oe.set(e),Ne(e)}function Ie(){Me||typeof window>`u`||(Me=!0,window.matchMedia(Ce).addEventListener(`change`,()=>{if(je!==`system`)return;let e=Ee(`system`);Oe.set(e),Ne(e),Pe(e)}))}function Le(){je=we(),Fe(),Ie()}function Re(e){if(je=e,typeof window<`u`)try{window.localStorage.setItem(Se,e)}catch{}Fe(),Pe(Ee(e))}var ze=function(e,t){return ze=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ze(e,t)};function U(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);ze(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Be=`12px sans-serif`,Ve=20,He=100,Ue=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function We(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-Ve)/He}return t}var Ge=We(Ue),Ke={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=Ke.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=Ge[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+new Date}},qe=gt([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),Je=gt([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),Ye=Object.prototype.toString,Xe=Array.prototype,Ze=Xe.forEach,Qe=Xe.filter,$e=Xe.slice,et=Xe.map,tt=function(){}.constructor,nt=tt?tt.prototype:null,rt=`__proto__`,it=2311,at=2**53-1;function ot(){return it>=at&&(it=0),it++}function st(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function ct(e){if(typeof e!=`object`||!e)return e;var t=e,n=Ye.call(e);if(n===`[object Array]`){if(!Bt(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=ct(e[r])}}else if(Je[n]){if(!Bt(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!qe[n]&&!Bt(e)&&!Ot(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==rt&&(t[o]=ct(e[o]));return t}function lt(e,t,n){if(!Y(t)||!Y(e))return n?ct(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==rt){var i=e[r],a=t[r];Y(a)&&Y(i)&&!q(a)&&!q(i)&&!Ot(a)&&!Ot(i)&&!Et(a)&&!Et(i)&&!Bt(a)&&!Bt(i)?lt(i,a,n):(n||!(r in e))&&(e[r]=ct(t[r]))}return e}function W(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==rt&&(e[n]=t[n]);return e}function ut(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function dt(e,t,n){for(var r=yt(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}Ke.createCanvas;function ft(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function pt(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function mt(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else dt(e,t,n)}function ht(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function G(e,t,n){if(e&&t){if(e.forEach&&e.forEach===Ze)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}}function K(e,t,n){if(!e)return[];if(!t)return Pt(e);if(e.map&&e.map===et)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function gt(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function _t(e,t,n){if(!e)return[];if(!t)return Pt(e);if(e.filter&&e.filter===Qe)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function vt(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function yt(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function bt(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat($e.call(arguments)))}}var xt=nt&&Ct(nt.bind)?nt.call.bind(nt.bind):bt;function St(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat($e.call(arguments)))}}function q(e){return Array.isArray?Array.isArray(e):Ye.call(e)===`[object Array]`}function Ct(e){return typeof e==`function`}function J(e){return typeof e==`string`}function wt(e){return Ye.call(e)===`[object String]`}function Tt(e){return typeof e==`number`}function Y(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function Et(e){return!!qe[Ye.call(e)]}function Dt(e){return!!Je[Ye.call(e)]}function Ot(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function kt(e){return e.colorStops!=null}function At(e){return e.image!=null}function jt(e){return e!==e}function Mt(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function X(e,t){return e??t}function Nt(e,t,n){return e??t??n}function Pt(e){var t=[...arguments].slice(1);return $e.apply(e,t)}function Ft(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function It(e,t){if(!e)throw Error(t)}function Lt(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var Rt=`__ec_primitive__`;function zt(e){e[Rt]=!0}function Bt(e){return e[Rt]}var Vt=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return yt(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Ht=typeof Map==`function`;function Ut(){return Ht?new Map:new Vt}var Wt=function(){function e(t){var n=q(t);this.data=Ut();var r=this;t instanceof e?t.each(i):t&&G(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return Ht?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function Gt(e){return new Wt(e)}function Kt(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function qt(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&W(n,t),n}function Jt(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function Z(e,t){return e.hasOwnProperty(t)}function Yt(){}var Xt=180/Math.PI,Zt=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),Qt=new(function(){function e(){this.browser=new Zt,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(Qt.wxa=!0,Qt.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?Qt.worker=!0:!Qt.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(Qt.node=!0,Qt.svgSupported=!0):$t(navigator.userAgent,Qt);function $t(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var en=`.`,tn=`___EC__COMPONENT__CONTAINER___`,nn=`___EC__EXTENDED_CLASS___`;function rn(e){var t={main:``,sub:``};if(e){var n=e.split(en);t.main=n[0]||``,t.sub=n[1]||``}return t}function an(e){It(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function on(e){return!!(e&&e[nn])}function sn(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return cn(t)?n=function(e){U(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},pt(n,this)),W(n.prototype,e),n[nn]=!0,n.extend=this.extend,n.superCall=fn,n.superApply=pn,n.superClass=t,n}}function cn(e){return Ct(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function ln(e,t){e.extend=t.extend}var un=Math.round(Math.random()*10);function dn(e){var t=[`__\0is_clz`,un++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function fn(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function pn(e,t,n){return this.superClass.prototype[t].apply(e,n)}function mn(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){an(r),e.prototype.type=r;var i=rn(r);if(!i.sub)t[i.main]=e;else if(i.sub!==tn){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[tn]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=rn(e),r=[],i=t[n.main];return i&&i[tn]?G(i,function(e,t){t!==tn&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[rn(e).main]},e.getAllClassMainTypes=function(){var e=[];return G(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[rn(e).main];return n&&n[tn]};function n(e){var n=t[e.main];return(!n||!n[tn])&&(n=t[e.main]={},n[tn]=!0),n}}function hn(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&ft(r,s)>=0||i&&ft(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var gn=hn([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),_n=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return gn(this,e,t)},e}(),vn=function(){function e(e){this.value=e}return e}(),yn=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new vn(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),bn=function(){function e(e){this._list=new yn,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new vn(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),xn=new bn(50);function Sn(e){if(typeof e==`string`){var t=xn.get(e);return t&&t.image}return e}function Cn(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=xn.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!Tn(t)&&a.pending.push(o)):(t=Ke.loadImage(e,wn,wn),t.__zrImageSrc=e,xn.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function wn(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function Tn(e){return e&&e.width&&e.height}function En(){return[1,0,0,1,0,0]}function Dn(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function On(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function kn(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function An(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function jn(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function Mn(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function Nn(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function Pn(e,t){return e??=0,t??=0,[e,t]}function Fn(e,t){return e[0]=t[0],e[1]=t[1],e}function In(e){return[e[0],e[1]]}function Ln(e,t,n){return e[0]=t,e[1]=n,e}function Rn(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function zn(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Bn(e){return Math.sqrt(Vn(e))}function Vn(e){return e[0]*e[0]+e[1]*e[1]}function Hn(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Un(e,t){var n=Bn(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Wn(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Gn=Wn;function Kn(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var qn=Kn;function Jn(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function Yn(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function Xn(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Zn(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Qn=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),$n=Math.min,er=Math.max,tr=Math.abs,nr=[`x`,`y`],rr=[`width`,`height`],ir=new Qn,ar=new Qn,or=new Qn,sr=new Qn,cr=Cr(),lr=cr.minTv,ur=cr.maxTv,dr=[0,0],fr=function(){function e(e,t,n,r){mr(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=$n(e.x,this.x),n=$n(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?er(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?er(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return gr(En(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&Qn.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=mr(yr,t.x,t.y,t.width,t.height)),n instanceof e||(n=mr(br,n.x,n.y,n.width,n.height));var s=!!r;cr.reset(i,s);var c=cr.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(dr[0]=1/0,dr[1]=0,Sr(l,u,p,m,0,s,a,o),Sr(d,f,h,g,1,s,a,o),s&&Qn.copy(r,_?cr.useDir?cr.dirMinTv:lr:ur)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){hr(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n){e!==t&&hr(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}ir.x=or.x=t.x,ir.y=sr.y=t.y,ar.x=sr.x=t.x+t.width,ar.y=or.y=t.y+t.height,ir.transform(n),sr.transform(n),ar.transform(n),or.transform(n),e.x=$n(ir.x,ar.x,or.x,sr.x),e.y=$n(ir.y,ar.y,or.y,sr.y);var s=er(ir.x,ar.x,or.x,sr.x),c=er(ir.y,ar.y,or.y,sr.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=Dn(e||[]),An(e,e,Ln(xr,-t.x,-t.y)),Mn(e,e,Ln(xr,r,i)),An(e,e,Ln(xr,n.x,n.y)),e},e}(),pr=fr.create,mr=fr.set,hr=fr.copy,gr=fr.calculateTransform,_r=fr.applyTransform,vr=fr.contain,yr=new fr(0,0,0,0),br=new fr(0,0,0,0),xr=[];function Sr(e,t,n,r,i,a,o,s){var c=tr(t-n),l=tr(r-e),u=$n(c,l),d=nr[i],f=nr[1-i],p=rr[i];t<n||r<e?c<l?(a&&(ur[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(ur[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=er(e,n),o[p]=$n(t,r)-o[d]),a&&(u<dr[0]||cr.useDir)&&(dr[0]=$n(u,dr[0]),(c<l||!cr.bidirectional)&&(lr[d]=c,lr[f]=0,cr.useDir&&cr.calcDirMTV()),(c>=l||!cr.bidirectional)&&(lr[d]=-l,lr[f]=0,cr.useDir&&cr.calcDirMTV())))}function Cr(){var e=0,t=new Qn,n=new Qn,r={minTv:new Qn,maxTv:new Qn,useDir:!1,dirMinTv:new Qn,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=er(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n)}};function i(e){return tr(e)<1e-10}return r}function wr(e){Tr||=new bn(100),e||=`12px sans-serif`;var t=Tr.get(e);return t||(t={font:e,strWidthCache:new bn(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Ke.measureText(`国`,e).width,asciiCharWidth:Ke.measureText(`a`,e).width},Tr.put(e,t)),t}var Tr;function Er(e){if(!(Dr>=Or)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=Ke.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?Dr=Or:i>2&&Dr++,t}}var Dr=0,Or=5;function kr(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=Er(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function Ar(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=Ke.measureText(t,e.font).width,n.put(t,r)),r}function jr(e,t,n,r){var i=Ar(wr(t),e),a=Fr(t);return new fr(Nr(0,i,n),Pr(0,a,r),i,a)}function Mr(e,t,n,r){var i=((e||``)+``).split(`
|
|
2
|
+
`);if(i.length===1)return jr(i[0],t,n,r);for(var a=new fr(0,0,0,0),o=0;o<i.length;o++){var s=jr(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function Nr(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function Pr(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function Fr(e){return wr(e).stWideCharWidth}function Ir(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function Lr(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=Ir(r[0],n.width),l+=Ir(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var Rr=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function zr(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(`
|
|
3
|
+
`);a=Br(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)Vr(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
|
|
4
|
+
`),e.isTruncated=s}function Br(e,t,n,r){r||={};var i=W({},r);n=X(n,`...`),i.maxIterations=X(r.maxIterations,2);var a=i.minChar=X(r.minChar,0),o=i.fontMeasureInfo=wr(t),s=o.asciiCharWidth;i.placeholder=X(r.placeholder,``);for(var c=e=Math.max(0,e-1),l=0;l<a&&c>=s;l++)c-=s;var u=Ar(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function Vr(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=Ar(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?Hr(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=Ar(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Hr(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=kr(n,e.charCodeAt(i));return i}function Ur(e,t,n,r){var i=ni(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,c=o?o[0]+o[2]:0,l=t.font,u=a===`truncate`,d=Fr(l),f=X(t.lineHeight,d),p=t.lineOverflow===`truncate`,m=!1,h=t.width;h==null&&n!=null&&(h=n-s);var g=t.height;g==null&&r!=null&&(g=r-c);var _=h!=null&&(a===`break`||a===`breakAll`)?i?Qr(i,t.font,h,a===`breakAll`,0).lines:[]:i?i.split(`
|
|
5
|
+
`):[],v=_.length*f;if(g??=v,v>g&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=Br(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)Vr(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=wr(l),S=0;S<_.length;S++)w=Math.max(Ar(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var Wr=function(){function e(){}return e}(),Gr=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Kr=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function qr(e,t,n,r,i){var a=new Kr,o=ni(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=Rr.lastIndex=0,h;(h=Rr.exec(o))!=null;){var g=h.index;g>m&&Jr(a,o.substring(m,g),t,p),Jr(a,h[2],t,p,h[1]),m=Rr.lastIndex}m<o.length&&Jr(a,o.substring(m,o.length),t,p);var _=[],v=0,y=0,b=f===`truncate`,x=t.lineOverflow===`truncate`,S={};function C(e,t,n){e.width=t,e.lineHeight=n,v+=n,y=Math.max(y,t)}outer:for(var w=0;w<a.lines.length;w++){for(var T=a.lines[w],E=0,D=0,O=0;O<T.tokens.length;O++){var k=T.tokens[O],A=k.styleName&&t.rich[k.styleName]||{},j=k.textPadding=A.padding,M=j?j[1]+j[3]:0,N=k.font=A.font||t.font;k.contentHeight=Fr(N);var P=X(A.height,k.contentHeight);if(k.innerHeight=P,j&&(P+=j[0]+j[2]),k.height=P,k.lineHeight=Nt(A.lineHeight,t.lineHeight,P),k.align=A&&A.align||i,k.verticalAlign=A&&A.verticalAlign||`middle`,x&&d!=null&&v+k.lineHeight>d){var F=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length<F;break outer}var I=A.width,ee=I==null||I===`auto`;if(typeof I==`string`&&I.charAt(I.length-1)===`%`)k.percentWidth=I,_.push(k),k.contentWidth=Ar(wr(N),k.text);else{if(ee){var te=A.backgroundColor,L=te&&te.image;L&&(L=Sn(L),Tn(L)&&(k.width=Math.max(k.width,L.width*P/L.height)))}var ne=b&&u!=null?u-D:null;ne!=null&&ne<k.width?!ee||ne<M?(k.text=``,k.width=k.contentWidth=0):(zr(S,k.text,ne-M,N,t.ellipsis,{minChar:t.truncateMinChar}),k.text=S.text,a.isTruncated=a.isTruncated||S.isTruncated,k.width=k.contentWidth=Ar(wr(N),k.text)):k.contentWidth=Ar(wr(N),k.text)}k.width+=M,D+=k.width,A&&(E=Math.max(E,k.lineHeight))}C(T,D,E)}a.outerWidth=a.width=X(u,y),a.outerHeight=a.height=X(d,v),a.contentHeight=v,a.contentWidth=y,a.outerWidth+=c,a.outerHeight+=l;for(var w=0;w<_.length;w++){var k=_[w],R=k.percentWidth;k.width=parseInt(R,10)/100*a.width}return a}function Jr(e,t,n,r,i){var a=t===``,o=i&&n.rich[i]||{},s=e.lines,c=o.font||n.font,l=!1,u,d;if(r){var f=o.padding,p=f?f[1]+f[3]:0;if(o.width!=null&&o.width!==`auto`){var m=Ir(o.width,r.width)+p;s.length>0&&m+r.accumWidth>r.width&&(u=t.split(`
|
|
6
|
+
`),l=!0),r.accumWidth=m}else{var h=Qr(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(`
|
|
7
|
+
`);for(var g=wr(c),_=0;_<u.length;_++){var v=u[_],y=new Wr;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!a,y.width=typeof o.width==`number`?o.width:d?d[_]:Ar(g,v),!_&&!l){var b=(s[s.length-1]||(s[0]=new Gr)).tokens,x=b.length;x===1&&b[0].isLineHolder?b[0]=y:(v||!x||a)&&b.push(y)}else s.push(new Gr([y]))}}function Yr(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Xr=gt(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Zr(e){return!Yr(e)||!!Xr[e]}function Qr(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=wr(t),f=0;f<e.length;f++){var p=e.charAt(f);if(p===`
|
|
8
|
+
`){c&&(s+=c,u+=l),a.push(s),o.push(u),s=``,c=``,l=0,u=0;continue}var m=kr(d,p.charCodeAt(0)),h=!r&&!Zr(p);if(a.length?u+m>n:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function $r(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;fr.set(ei,Nr(n,o,i),Pr(r,s,a),o,s),fr.intersect(t,ei,null,ti);var c=ti.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=Nr(c.x,c.width,i,!0),e.baseY=Pr(c.y,c.height,a,!0)}}var ei=new fr(0,0,0,0),ti={outIntersectRect:{},clamp:!0};function ni(e){return e==null?e=``:e+=``}function ri(e){var t=ni(e.text),n=e.font;return ii(e,Ar(wr(n),t),Fr(n),null)}function ii(e,t,n,r){var i=new fr(Nr(e.x||0,t,e.textAlign),Pr(e.y||0,n,e.textBaseline),t,n),a=r??(ai(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function ai(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var oi=Dn,si=5e-5;function ci(e){return e>si||e<-si}var li=[],ui=[],di=En(),fi=Math.abs,pi=function(){function e(){}return e.prototype.getLocalTransform=function(e){return mi(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return ci(this.rotation)||ci(this.x)||ci(this.y)||ci(this.scaleX-1)||ci(this.scaleY-1)||ci(this.skewX)||ci(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(oi(n),this.invTransform=null);return}n||=En(),t?this.getLocalTransform(n):oi(n),e&&(t?kn(n,e,n):On(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||En(),Nn(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(li);var n=li[0]<0?-1:1,r=li[1]<0?-1:1,i=((li[0]-n)*t+n)/li[0]||0,a=((li[1]-r)*t+r)/li[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||En(),kn(ui,e.invTransform,t),t=ui);var n=this.originX,r=this.originY;(n||r)&&(di[4]=n,di[5]=r,kn(ui,t,di),ui[4]-=n,ui[5]-=r,t=ui),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Yn(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Yn(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&fi(e[0]-1)>1e-10&&fi(e[3]-1)>1e-10?Math.sqrt(fi(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){_i(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&jn(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),mi=pi.getLocalTransform;function hi(){return new pi}var gi=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function _i(e,t){return ut(e,t,gi)}var vi={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-vi.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?vi.bounceIn(e*2)*.5:vi.bounceOut(e*2-1)*.5+.5}},yi=Math.pow,bi=Math.sqrt,xi=1e-8,Si=1e-4,Ci=bi(3),wi=1/3,Ti=Pn(),Ei=Pn(),Di=Pn();function Oi(e){return e>-xi&&e<xi}function ki(e){return e>xi||e<-xi}function Ai(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function ji(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function Mi(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(Oi(u)&&Oi(d)){if(Oi(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(Oi(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=bi(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-yi(-y,wi):yi(y,wi),b=b<0?-yi(-b,wi):yi(b,wi);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*bi(u*u*u)),S=Math.acos(x)/3,C=bi(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+Ci*Math.sin(S)))/(3*o),T=(-s+C*(w-Ci*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function Ni(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(Oi(o)){if(ki(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(Oi(u))i[0]=-a/(2*o);else if(u>0){var d=bi(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Pi(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function Fi(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;Ti[0]=c,Ti[1]=l;for(var v=0;v<1;v+=.05)Ei[0]=Ai(e,n,i,o,v),Ei[1]=Ai(t,r,a,s,v),g=qn(Ti,Ei),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<Si);y++)m=d-f,h=d+f,Ei[0]=Ai(e,n,i,o,m),Ei[1]=Ai(t,r,a,s,m),g=qn(Ei,Ti),m>=0&&g<p?(d=m,p=g):(Di[0]=Ai(e,n,i,o,h),Di[1]=Ai(t,r,a,s,h),_=qn(Di,Ti),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=Ai(e,n,i,o,d),u[1]=Ai(t,r,a,s,d)),bi(p)}function Ii(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=Ai(e,n,i,o,m),g=Ai(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function Li(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function Ri(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function zi(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(Oi(a)){if(ki(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(Oi(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=bi(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Bi(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Vi(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function Hi(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;Ti[0]=o,Ti[1]=s;for(var f=0;f<1;f+=.05){Ei[0]=Li(e,n,i,f),Ei[1]=Li(t,r,a,f);var p=qn(Ti,Ei);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<Si);m++){var h=l-u,g=l+u;Ei[0]=Li(e,n,i,h),Ei[1]=Li(t,r,a,h);var p=qn(Ei,Ti);if(h>=0&&p<d)l=h,d=p;else{Di[0]=Li(e,n,i,g),Di[1]=Li(t,r,a,g);var _=qn(Di,Ti);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=Li(e,n,i,l),c[1]=Li(t,r,a,l)),bi(d)}function Ui(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=Li(e,n,i,f),m=Li(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var Wi=/cubic-bezier\(([0-9,\.e ]+)\)/;function Gi(e){var t=e&&Wi.exec(e);if(t){var n=t[1].split(`,`),r=+Lt(n[0]),i=+Lt(n[1]),a=+Lt(n[2]),o=+Lt(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:Mi(0,r,a,1,e,s)&&Ai(0,i,o,1,s[0])}}}var Ki=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Yt,this.ondestroy=e.ondestroy||Yt,this.onrestart=e.onrestart||Yt,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Ct(e)?e:vi[e]||Gi(e)},e}(),qi={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 Ji(e){return e=Math.round(e),e<0?0:e>255?255:e}function Yi(e){return e=Math.round(e),e<0?0:e>360?360:e}function Xi(e){return e<0?0:e>1?1:e}function Zi(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ji(parseFloat(t)/100*255):Ji(parseInt(t,10))}function Qi(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Xi(parseFloat(t)/100):Xi(parseFloat(t))}function $i(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function ea(e,t,n){return e+(t-e)*n}function ta(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function na(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var ra=new bn(20),ia=null;function aa(e,t){ia&&na(ia,t),ia=ra.put(e,ia||t.slice())}function oa(e,t){if(e){t||=[];var n=ra.get(e);if(n)return na(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in qi)return na(t,qi[r]),aa(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){ta(t,0,0,0,1);return}return ta(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),aa(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){ta(t,0,0,0,1);return}return ta(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),aa(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?ta(t,+l[0],+l[1],+l[2],1):ta(t,0,0,0,1);u=Qi(l.pop());case`rgb`:if(l.length>=3)return ta(t,Zi(l[0]),Zi(l[1]),Zi(l[2]),l.length===3?u:Qi(l[3])),aa(e,t),t;ta(t,0,0,0,1);return;case`hsla`:if(l.length!==4){ta(t,0,0,0,1);return}return l[3]=Qi(l[3]),sa(l,t),aa(e,t),t;case`hsl`:if(l.length!==3){ta(t,0,0,0,1);return}return sa(l,t),aa(e,t),t;default:return}}ta(t,0,0,0,1)}}function sa(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Qi(e[1]),i=Qi(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],ta(t,Ji($i(o,a,n+1/3)*255),Ji($i(o,a,n)*255),Ji($i(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function ca(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function la(e,t){var n=oa(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return ma(n,n.length===4?`rgba`:`rgb`)}}function ua(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Ji(ea(o[0],s[0],c)),n[1]=Ji(ea(o[1],s[1],c)),n[2]=Ji(ea(o[2],s[2],c)),n[3]=Xi(ea(o[3],s[3],c)),n}}function da(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=oa(t[i]),s=oa(t[a]),c=r-i,l=ma([Ji(ea(o[0],s[0],c)),Ji(ea(o[1],s[1],c)),Ji(ea(o[2],s[2],c)),Xi(ea(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function fa(e,t,n,r){var i=oa(e);if(e)return i=ca(i),t!=null&&(i[0]=Yi(Ct(t)?t(i[0]):t)),n!=null&&(i[1]=Qi(Ct(n)?n(i[1]):n)),r!=null&&(i[2]=Qi(Ct(r)?r(i[2]):r)),ma(sa(i),`rgba`)}function pa(e,t){var n=oa(e);if(n&&t!=null)return n[3]=Xi(t),ma(n,`rgba`)}function ma(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function ha(e,t){var n=oa(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var ga=new bn(100);function _a(e){if(J(e)){var t=ga.get(e);return t||(t=la(e,-.1),ga.put(e,t)),t}if(kt(e)){var n=W({},e);return n.colorStops=K(e.colorStops,function(e){return{offset:e.offset,color:la(e.color,-.1)}}),n}return e}function va(e){return e.type===`linear`}function ya(e){return e.type===`radial`}(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})();var ba=Array.prototype.slice;function xa(e,t,n){return(t-e)*n+e}function Sa(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=xa(t[a],n[a],r);return e}function Ca(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=xa(t[o][s],n[o][s],r)}return e}function wa(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function Ta(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function Ea(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function Da(e,t,n){var r=e,i=t;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o){if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:ba.call(i[s]))}for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function Oa(e){if(ht(e)){var t=e.length;if(ht(e[0])){for(var n=[],r=0;r<t;r++)n.push(ba.call(e[r]));return n}return ba.call(e)}return e}function ka(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function Aa(e){return ht(e&&e[0])?2:1}var ja=0,Ma=1,Na=2,Pa=3,Fa=4,Ia=5,La=6;function Ra(e){return e===Fa||e===Ia}function za(e){return e===Ma||e===Na}var Ba=[0,0,0,0],Va=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=La,s=t;if(ht(t)){var c=Aa(t);o=c,(c===1&&!Tt(t[0])||c===2&&!Tt(t[0][0]))&&(a=!0)}else if(Tt(t)&&!jt(t))o=ja;else if(J(t)){if(!isNaN(+t))o=ja;else{var l=oa(t);l&&(s=l,o=Pa)}}else if(kt(t)){var u=W({},s);u.colorStops=K(t.colorStops,function(e){return{offset:e.offset,color:oa(e.color)}}),va(t)?o=Fa:ya(t)&&(o=Ia),s=u}i===0?this.valType=o:(o!==this.valType||o===La)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=Ct(n)?n:vi[n]||Gi(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=za(r),c=Ra(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?Da(d,f,r):c&&Ea(d.colorStops,f.colorStops))}if(!o&&r!==Ia&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===ja?n[l].additiveValue=n[l].value-p:r===Pa?n[l].additiveValue=wa([],n[l].value,p,-1):za(r)&&(n[l].additiveValue=r===Ma?wa([],n[l].value,p,-1):Ta([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===Pa,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Ba:e[s];if((za(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(za(i))i===Ma?Sa(g,f[r],p[r],h):Ca(g,f[r],p[r],h);else if(Ra(i)){var _=f[r],v=p[r],y=i===Fa;e[s]={type:y?`linear`:`radial`,x:xa(_.x,v.x,h),y:xa(_.y,v.y,h),colorStops:K(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:xa(e.offset,n.offset,h),color:ka(Sa([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=xa(_.x2,v.x2,h),e[s].y2=xa(_.y2,v.y2,h)):e[s].r=xa(_.r,v.r,h)}else if(c)Sa(g,f[r],p[r],h),n||(e[s]=ka(g));else{var b=xa(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===ja?e[n]=e[n]+r:t===Pa?(oa(e[n],Ba),wa(Ba,Ba,r,1),e[n]=ka(Ba)):t===Ma?wa(e[n],e[n],r,1):t===Na&&Ta(e[n],e[n],r,1)},e}(),Ha=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){st(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,yt(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new Va(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===Pa&&c&&(c=ka(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,Oa(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Oa(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.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)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate()){if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}}if(n.length||this._force){var d=new Ki({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return K(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(!(!a||a.isFinished())){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=Oa(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=yt(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Ua=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.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 r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=n.length,o=0;o<a;o++){var s=n[o];if(!(r&&r.filter&&s.query!=null&&!r.filter(e,s.query)))switch(i){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t)}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=t[i-1],o=n.length,s=0;s<o;s++){var c=n[s];if(!(r&&r.filter&&c.query!=null&&!r.filter(e,c.query)))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1))}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e}(),Wa=1;Qt.hasGlobalWindow&&(Wa=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Ga=Wa,Ka=.4,qa=`#333`,Ja=`#ccc`,Ya=`#eee`,Xa=`__zr_normal__`,Za=gi.concat([`ignore`]),Qa=gt(gi,function(e,t){return e[t]=!0,e},{ignore:!1}),$a={},eo=new fr(0,0,0,0),to=[],no=function(){function e(e){this.id=ot(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=eo,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition($a,n,d):Lr($a,n,d),i.x=$a.x,i.y=$a.y,a=$a.align,o=$a.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=Ir(f[0],d.width),m=Ir(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||={};if(u){var _=g.overflowRect=g.overflowRect||new fr(0,0,0,0);i.getLocalTransform(to),Nn(to,to),fr.copy(_,d),_.applyTransform(to)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Ja:qa},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&oa(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,ma(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},W(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(Y(e))for(var n=yt(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==`__zr_normal__`)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||=this._normalState={},e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Za)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Xa,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Xa;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(ft(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){st(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=uo(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,po(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}}if(o)return;for(var s=0;s<a;s++){var c=e[s],l=void 0;this.stateProxy&&(l=this.stateProxy(c,e)),l||=this.states[c],l&&r.push(l)}var u=r[a-1],d=this._textContent,f=uo(this,d,u,n);f&&!this.__inHover&&(this.__inHover=f);var p=this._mergeStates(r),m=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(`,`),p,this._normalState,!1,po(this,t,m),m);var h=this._textGuide;d&&d.useStates(e,t,!!f),h&&h.useStates(e,t,!!f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}},e.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},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=ft(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=ft(r,e),a=ft(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r<e.length;r++){var i=e[r];W(t,i),i.textConfig&&(n||={},W(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){if(this.__inHover!==1){var o=!(t&&r);t&&t.textConfig?(this.textConfig=W({},r?this.textConfig:n.textConfig),W(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<Za.length;l++){var u=Za[l],d=i&&Qa[u];t&&t[u]!=null?d?(c=!0,s[u]=t[u]):this[u]=t[u]:o&&n[u]!=null&&(d?(c=!0,s[u]=n[u]):this[u]=n[u])}if(!i)for(var l=0;l<this.animators.length;l++){var f=this.animators[l],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||n)[p]:t||n)}c&&this._transitionState(e,s,a)}},e.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}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new pi,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},W(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.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)}},e.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)}},e.prototype.animate=function(e,t,n){var r=new Ha(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=ft(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a<r;a++){var o=n[a];!e||e===o.scope?o.stop(t):i.push(o)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){ro(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){ro(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=ro(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type=`element`,t.name=``,t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=!1,t.__inHover=0,t.__dirty=1;function n(e,n,r,i){Object.defineProperty(t,e,{get:function(){if(!this[n]){var e=this[n]=[];a(this,e)}return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,a(this,e)}});function a(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}}Object.defineProperty&&(n(`position`,`_legacyPos`,`x`,`y`),n(`scale`,`_legacyScale`,`scaleX`,`scaleY`),n(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}();mt(no,Ua),mt(no,pi);function ro(e,t,n,r,i){n||={};var a=[];lo(e,``,e,t,n,r,a,i);var o=a.length,s=!1,c=n.done,l=n.aborted,u=function(){s=!0,o--,o<=0&&(s?c&&c():l&&l())},d=function(){o--,o<=0&&(s?c&&c():l&&l())};o||c&&c(),a.length>0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f<a.length;f++){var p=a[f];u&&p.done(u),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return a}function io(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function ao(e){return ht(e[0])}function oo(e,t,n){if(ht(t[n])){if(ht(e[n])||(e[n]=[]),Dt(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),io(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(ao(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?io(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else io(a,i,o);a.length=i.length}}else e[n]=t[n]}function so(e,t){return e===t||ht(e)&&ht(t)&&co(e,t)}function co(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function lo(e,t,n,r,i,a,o,s){for(var c=yt(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!Y(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_])){if(Y(v)&&!ht(v)&&!kt(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}lo(e,_,n[_],v,i,a&&a[_],o,s)}else h.push(_)}else s||(n[_]=v,e.updateDuringAnimation(t),h.push(_))}var y=h.length;if(!d&&y)for(var b=0;b<m.length;b++){var x=m[b];if(x.targetName===t&&x.stopTracks(h)){var S=ft(m,x);m.splice(S,1)}}if(i.force||(h=_t(h,function(e){return!so(r[e],n[e])}),y=h.length),y>0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b<y;b++){var _=h[b];w[_]=n[_],f?C[_]=r[_]:n[_]=r[_]}}else if(f){T={};for(var b=0;b<y;b++){var _=h[b];T[_]=Oa(n[_]),oo(n,r,_)}}var x=new Ha(n,!1,!1,d?_t(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}function uo(e,t,n,r){return!(n&&n.hoverLayer||r)||fo(e)||t&&fo(t)?0:1}function fo(e){return e.type===`text`||e.type===`tspan`}function po(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var mo=`__zr_style_`+Math.round(Math.random()*10),ho={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},go={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ho[mo]=!0;var _o=[`z`,`z2`,`invisible`],vo=[`invisible`],yo=function(e){U(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=yt(t),r=0;r<n.length;r++){var i=n[r];i===`style`?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(e){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,r){var i=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&So(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var a=0;a<this.__clipPaths.length;++a)if(this.__clipPaths[a].isZeroArea())return!1}if(r&&this.parent)for(var o=this.parent;o;){if(o.ignore)return!1;o=o.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,a=r.shadowOffsetX||0,o=r.shadowOffsetY||0;e=this._paintRect||=new fr(0,0,0,0),t?fr.applyTransform(e,n,t):e.copy(n),(i||a||o)&&(e.width+=i*2+Math.abs(a),e.height+=i*2+Math.abs(o),e.x=Math.min(e.x,e.x+a-i),e.y=Math.min(e.y,e.y+o-i));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+s*2),e.height=Math.ceil(e.height+1+s*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new fr(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate(`style`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`style`?this.style?this.setStyle(n):this.useStyle(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setStyle=function(e,t){return typeof e==`string`?this.style[e]=t:W(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&=null},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&2)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return qt(ho,e)},t.prototype.useStyle=function(e){e[mo]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()},t.prototype._useHoverStyle=function(e){this.__hoverStyle=e},t.prototype.isStyleObject=function(e){return e[mo]},t.prototype._innerSaveToNormal=function(t){e.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,_o)},t.prototype._applyStateObj=function(t,n,r,i,a,o){e.prototype._applyStateObj.call(this,t,n,r,i,a,o);var s=!(n&&i),c=this.__inHover===1,l;if(n&&n.style?a?i?l=n.style:(l=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(l,n.style)):s&&(l=r.style),l){if(a){var u=this.style;if(this.style=this.createStyle(s?{}:u),s)for(var d=yt(u),f=0;f<d.length;f++){var p=d[f];p in l&&(l[p]=l[p],this.style[p]=u[p])}for(var m=yt(l),f=0;f<m.length;f++){var p=m[f];this.style[p]=this.style[p]}this._transitionState(t,{style:l},o,this.getAnimationStyleProps())}else c?this._useHoverStyle(l):this.useStyle(l)}if(!c)for(var h=this.__inHover?vo:_o,f=0;f<h.length;f++){var p=h[f];n&&n[p]!=null?this[p]=n[p]:s&&r[p]!=null&&(this[p]=r[p])}},t.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.style&&(r||={},this._mergeStyle(r,a.style))}return r&&(n.style=r),n},t.prototype._mergeStyle=function(e,t){return W(e,t),e},t.prototype.getAnimationStyleProps=function(){return go},t.initDefaultProps=(function(){var e=t.prototype;e.type=`displayable`,e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor=`pointer`,e.rectHover=!1,e.incremental=0,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=3})(),t}(no),bo=new fr(0,0,0,0),xo=new fr(0,0,0,0);function So(e,t,n){return bo.copy(e.getBoundingRect()),e.transform&&bo.applyTransform(e.transform),xo.width=t,xo.height=n,!bo.intersect(xo)}var Co=Math.min,wo=Math.max,To=Math.sin,Eo=Math.cos,Do=Math.PI*2,Oo=Pn(),ko=Pn(),Ao=Pn();function jo(e,t,n,r,i,a){i[0]=Co(e,n),i[1]=Co(t,r),a[0]=wo(e,n),a[1]=wo(t,r)}var Mo=[],No=[];function Po(e,t,n,r,i,a,o,s,c,l){var u=Ni,d=Ai,f=u(e,n,i,o,Mo);c[0]=1/0,c[1]=1/0,l[0]=-1/0,l[1]=-1/0;for(var p=0;p<f;p++){var m=d(e,n,i,o,Mo[p]);c[0]=Co(m,c[0]),l[0]=wo(m,l[0])}f=u(t,r,a,s,No);for(var p=0;p<f;p++){var h=d(t,r,a,s,No[p]);c[1]=Co(h,c[1]),l[1]=wo(h,l[1])}c[0]=Co(e,c[0]),l[0]=wo(e,l[0]),c[0]=Co(o,c[0]),l[0]=wo(o,l[0]),c[1]=Co(t,c[1]),l[1]=wo(t,l[1]),c[1]=Co(s,c[1]),l[1]=wo(s,l[1])}function Fo(e,t,n,r,i,a,o,s){var c=Bi,l=Li,u=wo(Co(c(e,n,i),1),0),d=wo(Co(c(t,r,a),1),0),f=l(e,n,i,u),p=l(t,r,a,d);o[0]=Co(e,i,f),o[1]=Co(t,a,p),s[0]=wo(e,i,f),s[1]=wo(t,a,p)}function Io(e,t,n,r,i,a,o,s,c){var l=Xn,u=Zn,d=Math.abs(i-a);if(d%Do<1e-4&&d>1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(Oo[0]=Eo(i)*n+e,Oo[1]=To(i)*r+t,ko[0]=Eo(a)*n+e,ko[1]=To(a)*r+t,l(s,Oo,ko),u(c,Oo,ko),i%=Do,i<0&&(i+=Do),a%=Do,a<0&&(a+=Do),i>a&&!o?a+=Do:i<a&&o&&(i+=Do),o){var f=a;a=i,i=f}for(var p=0;p<a;p+=Math.PI/2)p>i&&(Ao[0]=Eo(p)*n+e,Ao[1]=To(p)*r+t,l(s,Ao,s),u(c,Ao,c))}var Lo={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ro=[],zo=[],Bo=[],Vo=[],Ho=[],Uo=[],Wo=Math.min,Go=Math.max,Ko=Math.cos,qo=Math.sin,Jo=Math.abs,Yo=Math.PI,Xo=Yo*2,Zo=typeof Float32Array<`u`,Qo=[];function $o(e){return Math.round(e/Yo*1e8)/1e8%2*Yo}function es(e,t){var n=$o(e[0]);n<0&&(n+=Xo);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Xo?i=n+Xo:t&&n-i>=Xo?i=n-Xo:!t&&n>i?i=n+(Xo-$o(n-i)):t&&n<i&&(i=n-(Xo-$o(i-n))),e[0]=n,e[1]=i}var ts=function(){function e(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 e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){n||=0,n>0&&(this._ux=Jo(n/Ga/e)||0,this._uy=Jo(n/Ga/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Lo.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Jo(e-this._xi),r=Jo(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Lo.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Lo.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Lo.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),Qo[0]=r,Qo[1]=i,es(Qo,a),r=Qo[0],i=Qo[1];var o=i-r;return this.addData(Lo.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Ko(i)*n+e,this._yi=qo(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Lo.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Lo.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Zo&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},e.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();var a=this.data;if(Zo&&(a instanceof Float32Array||!a)&&(this.data=new Float32Array(r+n),r>0&&a))for(var o=0;o<r;o++)this.data[o]=a[o];for(var i=0;i<t;i++)for(var s=e[i].data,o=0;o<s.length;o++)this.data[r++]=s[o];this._len=r}},e.prototype.addData=function(e,t,n,r,i,a,o,s,c){if(this._saveData){var l=this.data;this._len+arguments.length>l.length&&(this._expandData(),l=this.data);for(var u=0;u<arguments.length;u++)l[this._len++]=arguments[u]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,Zo&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Bo[0]=Bo[1]=Ho[0]=Ho[1]=Number.MAX_VALUE,Vo[0]=Vo[1]=Uo[0]=Uo[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,r=0,i=0,a;for(a=0;a<this._len;){var o=e[a++],s=a===1;switch(s&&(t=e[a],n=e[a+1],r=t,i=n),o){case Lo.M:t=r=e[a++],n=i=e[a++],Ho[0]=r,Ho[1]=i,Uo[0]=r,Uo[1]=i;break;case Lo.L:jo(t,n,e[a],e[a+1],Ho,Uo),t=e[a++],n=e[a++];break;case Lo.C:Po(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],Ho,Uo),t=e[a++],n=e[a++];break;case Lo.Q:Fo(t,n,e[a++],e[a++],e[a],e[a+1],Ho,Uo),t=e[a++],n=e[a++];break;case Lo.A:var c=e[a++],l=e[a++],u=e[a++],d=e[a++],f=e[a++],p=e[a++]+f;a+=1;var m=!e[a++];s&&(r=Ko(f)*u+c,i=qo(f)*d+l),Io(c,l,u,d,f,p,m,Ho,Uo),t=Ko(p)*u+c,n=qo(p)*d+l;break;case Lo.R:r=t=e[a++],i=n=e[a++];var h=e[a++],g=e[a++];jo(r,i,r+h,i+g,Ho,Uo);break;case Lo.Z:t=r,n=i}Xn(Bo,Bo,Ho),Zn(Vo,Vo,Uo)}return a===0&&(Bo[0]=Bo[1]=Vo[0]=Vo[1]=0),new fr(Bo[0],Bo[1],Vo[0]-Bo[0],Vo[1]-Bo[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,a=0,o=0,s=0;this._pathSegLen||=[];for(var c=this._pathSegLen,l=0,u=0,d=0;d<t;){var f=e[d++],p=d===1;p&&(i=e[d],a=e[d+1],o=i,s=a);var m=-1;switch(f){case Lo.M:i=o=e[d++],a=s=e[d++];break;case Lo.L:var h=e[d++],g=e[d++],_=h-i,v=g-a;(Jo(_)>n||Jo(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Lo.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=Ii(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Lo.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Ui(i,a,y,b,h,g,10),i=h,a=g;break;case Lo.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Ko(D)*T+C,s=qo(D)*E+w),m=Go(T,E)*Wo(Xo,Math.abs(O)),i=Ko(k)*T+C,a=qo(k)*E+w;break;case Lo.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Lo.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x<a;){var S=n[x++],C=x===1;switch(C&&(c=n[x],l=n[x+1],o=c,s=l),S!==Lo.L&&v>0&&(e.lineTo(y,b),v=0),S){case Lo.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Lo.L:u=n[x++],d=n[x++];var w=Jo(u-c),T=Jo(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Lo.C:var k=n[x++],A=n[x++],j=n[x++],M=n[x++],N=n[x++],P=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Pi(c,k,j,N,D,Ro),Pi(l,A,M,P,D,zo),e.bezierCurveTo(Ro[1],zo[1],Ro[2],zo[2],Ro[3],zo[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,N,P),c=N,l=P;break;case Lo.Q:var k=n[x++],A=n[x++],j=n[x++],M=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Vi(c,k,j,D,Ro),Vi(l,A,M,D,zo),e.quadraticCurveTo(Ro[1],zo[1],Ro[2],zo[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case Lo.A:var F=n[x++],I=n[x++],ee=n[x++],te=n[x++],L=n[x++],ne=n[x++],R=n[x++],re=!n[x++],ie=ee>te?ee:te,ae=Jo(ee-te)>.001,oe=L+ne,z=!1;if(f){var E=p[g++];h+E>_&&(oe=L+ne*(_-h)/E,z=!0),h+=E}if(ae&&e.ellipse?e.ellipse(F,I,ee,te,R,L,oe,re):e.arc(F,I,ie,L,oe,re),z)break lo;C&&(o=Ko(L)*ee+F,s=qo(L)*te+I),c=Ko(oe)*ee+F,l=qo(oe)*te+I;break;case Lo.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var B=n[x++],V=n[x++];if(f){var E=p[g++];if(h+E>_){var se=_-h;e.moveTo(u,d),e.lineTo(u+Wo(se,B),d),se-=B,se>0&&e.lineTo(u+B,d+Wo(se,V)),se-=V,se>0&&e.lineTo(u+Go(B-se,0),d+V),se-=B,se>0&&e.lineTo(u,d+Go(V-se,0));break lo}h+=E}e.rect(u,d,B,V);break;case Lo.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Lo,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function ns(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||o<t-s&&o<r-s||a>e+s&&a>n+s||a<e-s&&a<n-s)return!1;if(e!==n)c=(t-r)/(e-n),l=(e*r-n*t)/(e-n);else return Math.abs(a-e)<=s/2;var u=c*a-o+l;return u*u/(c*c+1)<=s/2*s/2}function rs(e,t,n,r,i,a,o,s,c,l,u){if(c===0)return!1;var d=c;return u>t+d&&u>r+d&&u>a+d&&u>s+d||u<t-d&&u<r-d&&u<a-d&&u<s-d||l>e+d&&l>n+d&&l>i+d&&l>o+d||l<e-d&&l<n-d&&l<i-d&&l<o-d?!1:Fi(e,t,n,r,i,a,o,s,l,u,null)<=d/2}function is(e,t,n,r,i,a,o,s,c){if(o===0)return!1;var l=o;return c>t+l&&c>r+l&&c>a+l||c<t-l&&c<r-l&&c<a-l||s>e+l&&s>n+l&&s>i+l||s<e-l&&s<n-l&&s<i-l?!1:Hi(e,t,n,r,i,a,s,c,null)<=l/2}var as=Math.PI*2;function os(e){return e%=as,e<0&&(e+=as),e}var ss=Math.PI*2;function cs(e,t,n,r,i,a,o,s,c){if(o===0)return!1;var l=o;s-=e,c-=t;var u=Math.sqrt(s*s+c*c);if(u-l>n||u+l<n)return!1;if(Math.abs(r-i)%ss<1e-4)return!0;if(a){var d=r;r=os(i),i=os(d)}else r=os(r),i=os(i);r>i&&(i+=ss);var f=Math.atan2(c,s);return f<0&&(f+=ss),f>=r&&f<=i||f+ss>=r&&f+ss<=i}function ls(e,t,n,r,i,a){if(a>t&&a>r||a<t&&a<r||r===t)return 0;var o=(a-t)/(r-t),s=r<t?1:-1;(o===1||o===0)&&(s=r<t?.5:-.5);var c=o*(n-e)+e;return c===i?1/0:c>i?s:0}var us=ts.CMD,ds=Math.PI*2,fs=1e-4;function ps(e,t){return Math.abs(e-t)<fs}var ms=[-1,-1,-1],hs=[-1,-1];function gs(){var e=hs[0];hs[0]=hs[1],hs[1]=e}function _s(e,t,n,r,i,a,o,s,c,l){if(l>t&&l>r&&l>a&&l>s||l<t&&l<r&&l<a&&l<s)return 0;var u=Mi(t,r,a,s,l,ms);if(u===0)return 0;for(var d=0,f=-1,p=void 0,m=void 0,h=0;h<u;h++){var g=ms[h],_=g===0||g===1?.5:1;Ai(e,n,i,o,g)<c||(f<0&&(f=Ni(t,r,a,s,hs),hs[1]<hs[0]&&f>1&&gs(),p=Ai(t,r,a,s,hs[0]),f>1&&(m=Ai(t,r,a,s,hs[1]))),f===2?g<hs[0]?d+=p<t?_:-_:g<hs[1]?d+=m<p?_:-_:d+=s<m?_:-_:g<hs[0]?d+=p<t?_:-_:d+=s<p?_:-_)}return d}function vs(e,t,n,r,i,a,o,s){if(s>t&&s>r&&s>a||s<t&&s<r&&s<a)return 0;var c=zi(t,r,a,s,ms);if(c===0)return 0;var l=Bi(t,r,a);if(l>=0&&l<=1){for(var u=0,d=Li(t,r,a,l),f=0;f<c;f++){var p=ms[f]===0||ms[f]===1?.5:1,m=Li(e,n,i,ms[f]);m<o||(ms[f]<l?u+=d<t?p:-p:u+=a<d?p:-p)}return u}var p=ms[0]===0||ms[0]===1?.5:1,m=Li(e,n,i,ms[0]);return m<o?0:a<t?p:-p}function ys(e,t,n,r,i,a,o,s){if(s-=t,s>n||s<-n)return 0;var c=Math.sqrt(n*n-s*s);ms[0]=-c,ms[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=ds-1e-4){r=0,i=ds;var u=a?1:-1;return o>=ms[0]+e&&o<=ms[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=ds,i+=ds);for(var f=0,p=0;p<2;p++){var m=ms[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=ds+h),(h>=r&&h<=i||h+ds>=r&&h+ds<=i)&&(h>Math.PI/2&&h<Math.PI*1.5&&(u=-u),f+=u)}}return f}function bs(e,t,n,r,i){for(var a=e.data,o=e.len(),s=0,c=0,l=0,u=0,d=0,f,p,m=0;m<o;){var h=a[m++],g=m===1;switch(h===us.M&&m>1&&(n||(s+=ls(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case us.M:u=a[m++],d=a[m++],c=u,l=d;break;case us.L:if(n){if(ns(c,l,a[m],a[m+1],t,r,i))return!0}else s+=ls(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case us.C:if(n){if(rs(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=_s(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case us.Q:if(n){if(is(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=vs(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case us.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=ls(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(cs(_,v,b,x,x+S,C,t,w,i))return!0}else s+=ys(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case us.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(ns(u,d,f,d,t,r,i)||ns(f,d,f,p,t,r,i)||ns(f,p,u,p,t,r,i)||ns(u,p,u,d,t,r,i))return!0}else s+=ls(f,d,f,p,r,i),s+=ls(u,p,u,d,r,i);break;case us.Z:if(n){if(ns(c,l,u,d,t,r,i))return!0}else s+=ls(c,l,u,d,r,i);c=u,l=d}}return!n&&!ps(l,d)&&(s+=ls(c,l,u,d,r,i)||0),s!==0}function xs(e,t,n){return bs(e,0,!1,t,n)}function Ss(e,t,n,r){return bs(e,t,!0,n,r)}var Cs=dt({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ho),ws={style:dt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},go.style)},Ts=gi.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),Es=function(e){U(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s<Ts.length;++s)i[Ts[s]]=this[Ts[s]];i.__dirty|=1}else this._decalEl&&=null},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=yt(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var a=n[i],o=t[a];a===`style`?this.style?W(this.style,o):this.useStyle(o):a===`shape`?W(this.shape,o):e.prototype.attrKV.call(this,a,o)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if(e!==`none`){if(J(e)){var t=ha(e,0);return t>.5?qa:t>.2?Ya:Ja}if(e)return Ja}return qa},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(J(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==ha(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new ts(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Ss(a,o/s,e,t)))return!0}if(this.hasFill())return xs(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:W(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return qt(Cs,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=W({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=W({},r.shape),W(c,n.shape)):(c=W({},i?this.shape:r.shape),W(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=W({},this.shape);for(var l={},u=yt(c),d=0;d<u.length;d++){var f=u[d];typeof c[f]==`object`?this.shape[f]=c[f]:l[f]=c[f]}this._transitionState(t,{shape:l},o)}else this.shape=c,this.dirtyShape()}}},t.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.shape&&(r||={},this._mergeStyle(r,a.shape))}return r&&(n.shape=r),n},t.prototype.getAnimationStyleProps=function(){return ws},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){U(n,t);function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return n.prototype.getDefaultStyle=function(){return ct(e.style)},n.prototype.getDefaultShape=function(){return ct(e.shape)},n}(t);for(var r in e)typeof e[r]==`function`&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=(function(){var e=t.prototype;e.type=`path`,e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=7})(),t}(yo),Ds=dt({strokeFirst:!0,font:Be,x:0,y:0,textAlign:`left`,textBaseline:`top`,miterLimit:2},Cs),Os=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return ai(this.style)},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.createStyle=function(e){return qt(Ds,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||=ri(this.style),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t}(yo);Os.prototype.type=`tspan`;var ks=dt({x:0,y:0},ho),As={style:dt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},go.style)};function js(e){return!!(e&&typeof e!=`string`&&e.width&&e.height)}var Ms=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return qt(ks,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(n!=null)return n;var r=js(t.image)?t.image:this.__image;if(!r)return 0;var i=e===`width`?`height`:`width`,a=t[i];return a==null?r[e]:r[e]/r[i]*a},t.prototype.getWidth=function(){return this._getSize(`width`)},t.prototype.getHeight=function(){return this._getSize(`height`)},t.prototype.getAnimationStyleProps=function(){return As},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||=new fr(e.x||0,e.y||0,this.getWidth(),this.getHeight()),this._rect},t}(yo);Ms.prototype.type=`image`;function Ns(e,t){var n=t.x,r=t.y,i=t.width,a=t.height,o=t.r,s,c,l,u;i<0&&(n+=i,i=-i),a<0&&(r+=a,a=-a),typeof o==`number`?s=c=l=u=o:o instanceof Array?o.length===1?s=c=l=u=o[0]:o.length===2?(s=l=o[0],c=u=o[1]):o.length===3?(s=o[0],c=u=o[1],l=o[2]):(s=o[0],c=o[1],l=o[2],u=o[3]):s=c=l=u=0;var d;s+c>i&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var Ps=Math.round;function Fs(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(Ps(r*2)===Ps(i*2)&&(e.x1=e.x2=Ls(r,s,!0)),Ps(a*2)===Ps(o*2)&&(e.y1=e.y2=Ls(a,s,!0)),e):e}}function Is(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=Ls(r,s,!0),e.y=Ls(i,s,!0),e.width=Math.max(Ls(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Ls(i+o,s,!1)-e.y,o===0?0:1),e):e}}function Ls(e,t,n){if(!t)return e;var r=Ps(e*2);return(r+Ps(t))%2==0?r/2:(r+(n?1:-1))/2}var Rs=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),zs={},Bs=function(e){U(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Rs},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Is(zs,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Ns(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Es);Bs.prototype.type=`rect`;var Vs={fill:`#000`},Hs=2,Us={},Ws={style:dt({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},go.style)},Gs=function(e){U(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Vs,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;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}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,Qs(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new fr(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var a=t[i],o=a.getBoundingRect(),s=a.getLocalTransform(n);s?(e.copy(o),e.applyTransform(s),r||=e.clone(),r.union(e)):(r||=o.clone(),r.union(o))}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||Vs},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return W(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=yt(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},W(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return Ws},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return(!t||!(t instanceof e))&&(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||`12px sans-serif`,n=e.padding,r=this._defaultStyle,i=e.x||0,a=e.y||0,o=e.align||r.align||`left`,s=e.verticalAlign||r.verticalAlign||`top`;$r(Us,r.overflowRect,i,a,o,s),i=Us.baseX,a=Us.baseY;var c=Ur(rc(e),e,Us.outerWidth,Us.outerHeight),l=ic(e),u=!!e.backgroundColor,d=c.outerHeight,f=c.outerWidth,p=c.lines,m=c.lineHeight;this.isTruncated=!!c.isTruncated;var h=i,g=Pr(a,c.contentHeight,s);if(l||n){var _=Nr(i,f,o),v=Pr(a,d,s);l&&this._renderBackground(e,e,_,v,f,d)}g+=m/2,n&&(h=nc(i,o,n),s===`top`?g+=n[0]:s===`bottom`&&(g-=n[2]));for(var y=0,b=!1,x=!1,S=tc(`fill`in e?e.fill:(x=!0,r.fill)),C=ec(`stroke`in e?e.stroke:!u&&(!r.autoStroke||x)?(y=Hs,b=!0,r.stroke):null),w=e.textShadowBlur>0,T=0;T<p.length;T++){var E=this._getOrCreateChild(Os),D=E.createStyle();E.useStyle(D),D.text=p[T],D.x=h,D.y=g,o&&(D.textAlign=o),D.textBaseline=`middle`,D.opacity=e.opacity,D.strokeFirst=!0,w&&(D.shadowBlur=e.textShadowBlur||0,D.shadowColor=e.textShadowColor||`transparent`,D.shadowOffsetX=e.textShadowOffsetX||0,D.shadowOffsetY=e.textShadowOffsetY||0),D.stroke=C,D.fill=S,C&&(D.lineWidth=e.lineWidth||y,D.lineDash=e.lineDash,D.lineDashOffset=e.lineDashOffset||0),D.font=t,Xs(D,e),g+=m,E.setBoundingRect(ii(D,c.contentWidth,c.calculatedLineHeight,b?0:null))}},t.prototype._updateRichTexts=function(){var e=this.style,t=this._defaultStyle,n=e.align||t.align,r=e.verticalAlign||t.verticalAlign,i=e.x||0,a=e.y||0;$r(Us,t.overflowRect,i,a,n,r),i=Us.baseX,a=Us.baseY;var o=qr(rc(e),e,Us.outerWidth,Us.outerHeight,n),s=o.width,c=o.outerWidth,l=o.outerHeight,u=e.padding;this.isTruncated=!!o.isTruncated;var d=Nr(i,c,n),f=Pr(a,l,r),p=d,m=f;u&&(p+=u[3],m+=u[0]);var h=p+s;ic(e)&&this._renderBackground(e,e,d,f,c,l);for(var g=!!e.backgroundColor,_=0;_<o.lines.length;_++){for(var v=o.lines[_],y=v.tokens,b=y.length,x=v.lineHeight,S=v.width,C=0,w=p,T=h,E=b-1,D=void 0;C<b&&(D=y[C],!D.align||D.align===`left`);)this._placeToken(D,e,x,m,w,`left`,g),S-=D.width,w+=D.width,C++;for(;E>=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&ic(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=nc(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Os),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=tc(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=ec(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Hs,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=Nt(s.opacity,t.opacity,1),Xs(p,s),y&&(p.lineWidth=Nt(s.lineWidth,t.lineWidth,g),p.lineDash=X(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(ii(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Bs),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=X(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Ms),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=X(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=Nt(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return Zs(e)&&(t=[e.fontStyle,e.fontWeight,Ys(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&Lt(t)||e.textFont||e.font},t}(yo),Ks={left:!0,right:1,center:1},qs={top:1,bottom:1,middle:1},Js=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Ys(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Xs(e,t){for(var n=0;n<Js.length;n++){var r=Js[n],i=t[r];i!=null&&(e[r]=i)}}function Zs(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function Qs(e){return $s(e),G(e.rich,$s),e}function $s(e){if(e){e.font=Gs.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||Ks[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||qs[n]?n:`top`,e.padding&&=Ft(e.padding)}}function ec(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function tc(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function nc(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function rc(e){var t=e.text;return t!=null&&(t+=``),t}function ic(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var ac=1e-4,oc=20;function sc(e){return e.replace(/^\s+|\s+$/g,``)}var cc=Math.min,lc=Math.max,uc=Math.abs,dc=Math.round,fc=Math.floor,pc=Math.ceil,mc=Math.pow,hc=Math.log,gc=Math.LN10,_c=Math.PI,vc=Math.random;function yc(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var bc=xc;function xc(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return Sc(e,t,n)}function Sc(e,t,n){return J(e)?Cc(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Cc(e){return!!sc(e).match(/%$/)}function wc(e,t,n){return isNaN(t)?n?``+e:+e:(t=cc(lc(0,t),oc),e=(+e).toFixed(t),n?e:+e)}function Tc(e){return e.sort(function(e,t){return e-t}),e}function Ec(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(dc(e*t)/t===e)return n}return Dc(e)}function Dc(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return lc(0,(a<0?0:i-1-a)-r)}function Oc(e,t,n){var r=uc(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=hc(2*uc(n||1)*uc(r))/gc,a=hc(uc(t))/gc,o=lc(0,pc(-i+a));return isFinite(o)||(o=NaN),o}function kc(e,t){var n=gt(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=mc(10,t),i=K(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=K(i,function(e){return fc(e)}),s=gt(o,function(e,t){return e+t},0),c=K(i,function(e,t){return e-o[t]});s<a;){for(var l=-1/0,u=null,d=0,f=c.length;d<f;++d)c[d]>l&&(l=c[d],u=d);++o[u],c[u]=0,++s}return K(o,function(e){return e/r})}function Ac(e,t){var n=lc(Ec(e),Ec(t)),r=e+t;return n>oc?r:wc(r,n)}var jc=mc(2,53)-1;function Mc(e){var t=_c*2;return(e%t+t)%t}function Nc(e){return e>-ac&&e<ac}var Pc=/^(?:(\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 Fc(e){if(e instanceof Date)return e;if(J(e)){var t=Pc.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return e==null?new Date(NaN):new Date(dc(e))}function Ic(e){return mc(10,Lc(e))}function Lc(e){if(e===0)return 0;var t=fc(hc(e)/gc);return e/mc(10,t)>=10&&t++,t}function Rc(e,t){var n=Lc(e),r=mc(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,wc(e,-n)}function zc(e){var t=parseFloat(e);return t==e&&(t!==0||!J(e)||e.indexOf(`x`)<=0)?t:NaN}function Bc(e){return!isNaN(zc(e))}function Vc(){return dc(vc()*9)}function Hc(e,t){return t===0?e:Hc(t,e%t)}function Uc(e,t){return e==null?t:t==null?e:e*t/Hc(e,t)}function Wc(e){return e!=null&&isFinite(e)}var Gc=`[ECharts] `,Kc={},qc=typeof console<`u`&&console.warn&&console.log;function Jc(e,t,n){if(qc){if(n){if(Kc[t])return;Kc[t]=!0}console[e](Gc+t)}}function Yc(e,t){Jc(`error`,e,t)}function Xc(e){throw Error(e)}function Zc(e,t,n){return(t-e)*n+e}var Qc=`series\0`,$c=`\0_ec_\0`;function el(e){return e instanceof Array?e:e==null?[]:[e]}function tl(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var nl=`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`.split(`.`);function rl(e){return Y(e)&&!q(e)&&!(e instanceof Date)?e.value:e}function il(e){return Y(e)&&!(e instanceof Array)}function al(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=Gt();G(t,function(e,n){if(!Y(e)){t[n]=null;return}});var s=ol(e,o,n);return(r||i)&&sl(s,e,o,t),r&&cl(s,t),r||i?ll(s,t,i):a&&ul(s,t),dl(s),s}function ol(e,t,n){var r=[];if(n===`replaceAll`)return r;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n===`replaceMerge`||gl(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function sl(e,t,n,r){G(r,function(i,a){if(!(!i||i.id==null)){var o=pl(i.id),s=n.get(o);if(s!=null){var c=e[s];It(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function cl(e,t){G(t,function(n,r){if(!(!n||n.name==null))for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!gl(n)&&!gl(a)&&fl(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function ll(e,t,n){G(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||gl(r.existing)||r.existing&&t.id!=null&&!fl(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function ul(e,t){G(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function dl(e){var t=Gt();G(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),G(e,function(e){var n=e.newOption;It(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,`id duplicates: `+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),G(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(Y(i)){if(a.name=i.name==null?r?r.name:Qc+n:pl(i.name),r)a.id=pl(r.id);else if(i.id!=null)a.id=pl(i.id);else{var o=0;do a.id=`\0`+a.name+`\0`+o++;while(t.get(a.id))}t.set(a.id,e)}})}function fl(e,t,n){var r=ml(t[e],null),i=ml(n[e],null);return r!=null&&i!=null&&r===i}function pl(e){return ml(e,``)}function ml(e,t){return e==null?t:J(e)?e:Tt(e)||wt(e)?e+``:t}function hl(e){var t=e.name;return!!(t&&t.indexOf(Qc))}function gl(e){return e&&e.id!=null&&pl(e.id).indexOf($c)===0}function _l(e,t,n){G(e,function(e){var r=e.newOption;Y(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=vl(t,r,e.existing,n))})}function vl(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function yl(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return q(t.dataIndex)?K(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return q(t.name)?K(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function bl(){var e=`__ec_inner_`+xl++;return function(t){return t[e]||(t[e]={})}}var xl=Vc();function Sl(e,t,n){var r=Cl(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(t,r){var i=Tl(e,r,t,{useDefault:s===r,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});o[r+`Models`]=i.models,o[r+`Model`]=i.models[0]}),o}function Cl(e,t){var n;if(J(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=Gt(),a={},o=!1;return G(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`){a[n]=e;return}var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],c=(r[2]||``).toLowerCase();if(!(!s||!c||t&&t.includeMainTypes&&ft(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var wl={useDefault:!0,enableAll:!1,enableNone:!1};function Tl(e,t,n,r){r||=wl;var i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var c=void 0;return s.models=r.useDefault&&(c=e.getComponent(t))?[c]:[],s}if(i===`none`||i===!1){if(r.enableNone)return s.models=[],s;i=-1}return i===`all`&&(i=r.enableAll?a=o=null:-1),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function El(e,t,n){var r={};r[t+`Id`]=e[t+`Id`],r[t+`Index`]=e[t+`Index`],r[t+`Name`]=e[t+`Name`];var i={mainType:t,query:r};return n&&(i.subType=n),i}function Dl(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Ol(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function kl(e){return e===`auto`?Qt.domSupported?`html`:`richText`:e||`html`}function Al(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(Tt(r)){var o=Zc(n||0,r,i);return wc(o,a?Math.max(Ec(n||0),Ec(r)):t)}if(J(r))return i<1?n:r;for(var s=[],c=n,l=r,u=Math.max(c?c.length:0,l.length),d=0;d<u;++d){var f=e.getDimensionInfo(d);if(f&&f.type===`ordinal`)s[d]=(i<1&&c?c:l)[d];else{var p=c&&c[d]?c[d]:0,m=l[d],o=Zc(p,m,i);s[d]=wc(o,a?Math.max(Ec(p),Ec(m)):t)}}return s}(function(){function e(){}return e.prototype.reset=function(e,t,n,r){return this._list=e,this._step=r||=1,this._idx=t,this._end=n??(r>0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function jl(){return[1/0,-1/0]}function Ml(e,t){Il(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function Nl(e,t){Il(t)&&t<e[0]&&(e[0]=t)}function Pl(e,t){Il(t)&&t>e[1]&&(e[1]=t)}function Fl(e,t){Ll(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function Il(e){return e!=null&&isFinite(e)}function Ll(e,t){return Il(e)&&Il(t)&&e<=t}function Rl(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function zl(e){Ll(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Bl(){var e=`__ec_once_`+Vl++;return function(t,n){Z(t,e)||(t[e]=1,n())}}var Vl=Vc();function Hl(e,t,n){var r=Gt(),i=0;G(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Ul(e){return e.value+``}function Wl(e){return e+``}function Gl(e,t){return X(t,!0)?e.seriesIndex+2:0}function Kl(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function ql(e,t){return{seriesType:e,overallReset:t}}function Jl(e){return{overallReset:e}}var Yl=bl(),Xl=function(e,t,n,r){if(r){var i=Yl(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=Yl(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},Zl=Gt([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),Ql=`original`,$l=`arrayRows`,eu=`objectRows`,tu=`keyedColumns`,nu=`typedArray`,ru=`unknown`,iu=`column`,au=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],ou=function(){function e(e){G(au,function(t){this[t]=xt(e[t],e)},this)}return e}();function su(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var cu=1,lu={},uu=bl(),du=bl(),fu=[`emphasis`,`blur`,`select`],pu=[`normal`,`emphasis`,`blur`,`select`],mu=`highlight`,hu=`downplay`,gu=`select`,_u=`unselect`,vu=`toggleSelect`,yu=`selectchanged`;function bu(e){return e!=null&&e!==`none`}function xu(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Su(e){xu(e,`emphasis`,2)}function Cu(e){e.hoverState===2&&xu(e,`normal`,0)}function wu(e){xu(e,`blur`,1)}function Tu(e){e.hoverState===1&&xu(e,`normal`,0)}function Eu(e){e.selected=!0}function Du(e){e.selected=!1}function Ou(e,t,n){t(e,n)}function ku(e,t,n){Ou(e,t,n),e.isGroup&&e.traverse(function(e){Ou(e,t,n)})}function Au(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function ju(e,t,n,r){for(var i=e.style,a={},o=0;o<t.length;o++){var s=t[o];a[s]=i[s]??(r&&r[s])}for(var o=0;o<e.animators.length;o++){var c=e.animators[o];c.__fromStateTransition&&c.__fromStateTransition.indexOf(n)<0&&c.targetName===`style`&&c.saveTo(a,t)}return a}function Mu(e,t,n,r){var i=n&&ft(n,`select`)>=0,a=!1;if(e instanceof Es){var o=uu(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(bu(s)||bu(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=W({},r),l=W({},l),l.fill=s):!bu(l.fill)&&bu(s)?(a=!0,r=W({},r),l=W({},l),l.fill=_a(s)):!bu(l.stroke)&&bu(c)&&(a||(r=W({},r),l=W({},l)),l.stroke=_a(c)),r.style=l}}if(r&&r.z2==null){a||(r=W({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Nu(e,t,n){if(n&&n.z2==null){n=W({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Pu(e,t,n){var r=ft(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:ju(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=W({},n),o=W({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Fu(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Mu(this,e,t,n);if(e===`blur`)return Pu(this,e,n);if(e===`select`)return Nu(this,e,n)}return n}function Iu(e){e.stateProxy=Fu;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Fu),n&&(n.stateProxy=Fu)}function Lu(e,t){!Gu(e,t)&&!e.__highByOuter&&ku(e,Su)}function Ru(e,t){!Gu(e,t)&&!e.__highByOuter&&ku(e,Cu)}function zu(e,t){e.__highByOuter|=1<<(t||0),ku(e,Su)}function Bu(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&ku(e,Cu)}function Vu(e){ku(e,wu)}function Hu(e){ku(e,Tu)}function Uu(e){ku(e,Eu)}function Wu(e){ku(e,Du)}function Gu(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Ku(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=du(i),o=su(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Tu(e)}),s&&n.push(i)),a.isBlured=!1}),G(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function qu(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&Hu(r)}}if(e!=null&&!(!t||t===`none`)){var o=i.getSeriesByIndex(e),s=o.coordinateSystem;s&&s.master&&(s=s.master);var c=[];i.eachSeries(function(e){var i=o===e,l=e.coordinateSystem;if(l&&l.master&&(l=l.master),!(n===`series`&&!i||n===`coordinateSystem`&&!(l&&s?l===s:i)||t===`series`&&i)){if(r.getViewOfSeriesModel(e).group.traverse(function(e){e.__highByOuter&&i&&t===`self`||wu(e)}),ht(t))a(e.getData(),t);else if(Y(t))for(var u=yt(t),d=0;d<u.length;d++)a(e.getData(u[d]),t[u[d]]);c.push(e),du(e).isBlured=!0}}),i.eachComponent(function(e,t){if(e!==`series`){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(c,!0,i)}})}}function Ju(e,t,n){if(e!=null&&t!=null){var r=n.getModel().getComponent(e,t);if(r){du(r).isBlured=!0;var i=n.getViewOfComponentModel(r);!i||!i.focusBlurEnabled||i.group.traverse(function(e){wu(e)})}}}function Yu(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=yl(i,t);a=(q(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),c=0;!o&&c<s;)o=i.getItemGraphicEl(c++);if(o){var l=Yl(o);qu(r,l.focus,l.blurScope,n)}else{var u=e.get([`emphasis`,`focus`]),d=e.get([`emphasis`,`blurScope`]);u!=null&&qu(r,u,d,n)}}}function Xu(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(e==null||e===`series`||t==null||n==null)return i;var a=r.getModel().getComponent(e,t);if(!a)return i;var o=r.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(n),c,l=0;l<s.length;l++)if(Yl(s[l]).focus===`self`){c=!0;break}return{focusSelf:c,dispatchers:s}}function Zu(e,t,n){var r=Yl(e),i=Xu(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&Ju(r.componentMainType,r.componentIndex,n),G(a,function(e){return Lu(e,t)})):(qu(r.seriesIndex,r.focus,r.blurScope,n),r.focus===`self`&&Ju(r.componentMainType,r.componentIndex,n),Lu(e,t))}function Qu(e,t,n){Ku(n);var r=Yl(e),i=Xu(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?G(i,function(e){return Ru(e,t)}):Ru(e,t)}function $u(e,t,n){if(fd(t)){var r=t.dataType,i=yl(e.getData(r),t);q(i)||(i=[i]),e[t.type===`toggleSelect`?`toggleSelect`:t.type===`select`?`select`:`unselect`](i,r)}}function ed(e){G(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?Uu(t):Wu(t)})})}function td(e){var t=[];return e.eachSeries(function(e){G(e.getAllData(),function(n){n.data;var r=n.type,i=e.getSelectedDataIndices();if(i.length>0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function nd(e,t,n){ld(e,!0),ku(e,Iu),ad(e,t,n)}function rd(e){ld(e,!1)}function id(e,t,n,r){r?rd(e):nd(e,t,n)}function ad(e,t,n){var r=Yl(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var od=[`emphasis`,`blur`,`select`],sd={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function cd(e,t,n,r){n||=`itemStyle`;for(var i=0;i<od.length;i++){var a=od[i],o=t.getModel([a,n]),s=e.ensureState(a);s.style=r?r(o):o[sd[n]]()}}function ld(e,t){var n=t===!1,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!n||r.__highDownDispatcher)&&(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function ud(e){return!!(e&&e.__highDownDispatcher)}function dd(e){var t=lu[e];return t==null&&cu<=32&&(t=lu[e]=cu++),t}function fd(e){var t=e.type;return t===`select`||t===`unselect`||t===`toggleSelect`}function pd(e){var t=e.type;return t===`highlight`||t===`downplay`}function md(e){var t=uu(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}var hd=ts.CMD,gd=[[],[],[]],_d=Math.sqrt,vd=Math.atan2;function yd(e,t){if(t){var n=e.data,r=e.len(),i,a,o,s,c,l,u=hd.M,d=hd.C,f=hd.L,p=hd.R,m=hd.A,h=hd.Q;for(o=0,s=0;o<r;){switch(i=n[o++],s=o,a=0,i){case u:a=1;break;case f:a=1;break;case d:a=3;break;case h:a=2;break;case m:var g=t[4],_=t[5],v=_d(t[0]*t[0]+t[1]*t[1]),y=_d(t[2]*t[2]+t[3]*t[3]),b=vd(-t[1]/y,t[0]/v);n[o]*=v,n[o++]+=g,n[o]*=y,n[o++]+=_,n[o++]*=v,n[o++]*=y,n[o++]+=b,n[o++]+=b,o+=2,s=o;break;case p:l[0]=n[o++],l[1]=n[o++],Yn(l,l,t),n[s++]=l[0],n[s++]=l[1],l[0]+=n[o++],l[1]+=n[o++],Yn(l,l,t),n[s++]=l[0],n[s++]=l[1]}for(c=0;c<a;c++){var x=gd[c];x[0]=n[o++],x[1]=n[o++],Yn(x,x,t),n[s++]=x[0],n[s++]=x[1]}}e.increaseVersion()}}var bd=Math.sqrt,xd=Math.sin,Sd=Math.cos,Cd=Math.PI;function wd(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Td(e,t){return(e[0]*t[0]+e[1]*t[1])/(wd(e)*wd(t))}function Ed(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Td(e,t))}function Dd(e,t,n,r,i,a,o,s,c,l,u){var d=Cd/180*c,f=Sd(d)*(e-n)/2+xd(d)*(t-r)/2,p=-1*xd(d)*(e-n)/2+Sd(d)*(t-r)/2,m=f*f/(o*o)+p*p/(s*s);m>1&&(o*=bd(m),s*=bd(m));var h=(i===a?-1:1)*bd((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Sd(d)*g-xd(d)*_,y=(t+r)/2+xd(d)*g+Sd(d)*_,b=Ed([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=Ed(x,S);if(Td(x,S)<=-1&&(C=Cd),Td(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Cd*1e6)/1e6;C=Cd*2+w%2*Cd}u.addData(l,v,y,o,s,b,C,d,a)}var Od=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,kd=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Ad(e){var t=new ts;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=ts.CMD,c=e.match(Od);if(!c)return t;for(var l=0;l<c.length;l++){for(var u=c[l],d=u.charAt(0),f=void 0,p=u.match(kd)||[],m=p.length,h=0;h<m;h++)p[h]=parseFloat(p[h]);for(var g=0;g<m;){var _=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=n,T=r,E=void 0,D=void 0;switch(d){case`l`:n+=p[g++],r+=p[g++],f=s.L,t.addData(f,n,r);break;case`L`:n=p[g++],r=p[g++],f=s.L,t.addData(f,n,r);break;case`m`:n+=p[g++],r+=p[g++],f=s.M,t.addData(f,n,r),i=n,a=r,d=`l`;break;case`M`:n=p[g++],r=p[g++],f=s.M,t.addData(f,n,r),i=n,a=r,d=`L`;break;case`h`:n+=p[g++],f=s.L,t.addData(f,n,r);break;case`H`:n=p[g++],f=s.L,t.addData(f,n,r);break;case`v`:r+=p[g++],f=s.L,t.addData(f,n,r);break;case`V`:r=p[g++],f=s.L,t.addData(f,n,r);break;case`C`:f=s.C,t.addData(f,p[g++],p[g++],p[g++],p[g++],p[g++],p[g++]),n=p[g-2],r=p[g-1];break;case`c`:f=s.C,t.addData(f,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r),n+=p[g-2],r+=p[g-1];break;case`S`:_=n,v=r,E=t.len(),D=t.data,o===s.C&&(_+=n-D[E-4],v+=r-D[E-3]),f=s.C,w=p[g++],T=p[g++],n=p[g++],r=p[g++],t.addData(f,_,v,w,T,n,r);break;case`s`:_=n,v=r,E=t.len(),D=t.data,o===s.C&&(_+=n-D[E-4],v+=r-D[E-3]),f=s.C,w=n+p[g++],T=r+p[g++],n+=p[g++],r+=p[g++],t.addData(f,_,v,w,T,n,r);break;case`Q`:w=p[g++],T=p[g++],n=p[g++],r=p[g++],f=s.Q,t.addData(f,w,T,n,r);break;case`q`:w=p[g++]+n,T=p[g++]+r,n+=p[g++],r+=p[g++],f=s.Q,t.addData(f,w,T,n,r);break;case`T`:_=n,v=r,E=t.len(),D=t.data,o===s.Q&&(_+=n-D[E-4],v+=r-D[E-3]),n=p[g++],r=p[g++],f=s.Q,t.addData(f,_,v,n,r);break;case`t`:_=n,v=r,E=t.len(),D=t.data,o===s.Q&&(_+=n-D[E-4],v+=r-D[E-3]),n+=p[g++],r+=p[g++],f=s.Q,t.addData(f,_,v,n,r);break;case`A`:y=p[g++],b=p[g++],x=p[g++],S=p[g++],C=p[g++],w=n,T=r,n=p[g++],r=p[g++],f=s.A,Dd(w,T,n,r,S,C,y,b,x,f,t);break;case`a`:y=p[g++],b=p[g++],x=p[g++],S=p[g++],C=p[g++],w=n,T=r,n+=p[g++],r+=p[g++],f=s.A,Dd(w,T,n,r,S,C,y,b,x,f,t)}}(d===`z`||d===`Z`)&&(f=s.Z,t.addData(f),n=i,r=a),o=f}return t.toStatic(),t}var jd=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(Es);function Md(e){return e.setData!=null}function Nd(e,t){var n=Ad(e),r=W({},t);return r.buildPath=function(e){var t=Md(e);if(t&&e.canSave()){e.appendPath(n);var r=e.getContext();r&&e.rebuildPath(r,1)}else{var r=t?e.getContext():e;r&&n.rebuildPath(r,1)}},r.applyTransform=function(e){yd(n,e),this.dirtyShape()},r}function Pd(e,t){return new jd(Nd(e,t))}function Fd(e,t){var n=Nd(e,t);return function(e){U(t,e);function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return t}(jd)}function Id(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var a=e[i];n.push(a.getUpdatedPathProxy(!0))}var o=new Es(t);return o.createPathProxy(),o.buildPath=function(e){if(Md(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},o}var Ld=function(e){U(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=ft(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=ft(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new fr(0,0,0,0),n=e||this._children,r=[],i=null,a=0;a<n.length;a++){var o=n[a];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),c=o.getLocalTransform(r);c?(fr.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(no);Ld.prototype.type=`group`;var Rd=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),zd=function(e){U(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Rd},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,Math.PI*2)},t}(Es);zd.prototype.type=`circle`;var Bd=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),Vd=function(e){U(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Bd},t.prototype.buildPath=function(e,t){var n=.5522848,r=t.cx,i=t.cy,a=t.rx,o=t.ry,s=a*n,c=o*n;e.moveTo(r-a,i),e.bezierCurveTo(r-a,i-c,r-s,i-o,r,i-o),e.bezierCurveTo(r+s,i-o,r+a,i-c,r+a,i),e.bezierCurveTo(r+a,i+c,r+s,i+o,r,i+o),e.bezierCurveTo(r-s,i+o,r-a,i+c,r-a,i),e.closePath()},t}(Es);Vd.prototype.type=`ellipse`;var Hd=Math.PI,Ud=Hd*2,Wd=Math.sin,Gd=Math.cos,Kd=Math.acos,qd=Math.atan2,Jd=Math.abs,Yd=Math.sqrt,Xd=Math.max,Zd=Math.min,Qd=1e-4;function $d(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<Qd))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function ef(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/Yd(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*Yd(Xd(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function tf(e){var t;if(q(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function nf(e,t){var n,r=Xd(t.r,0),i=Xd(t.r0||0,0),a=r>0;if(!(!a&&!(i>0))){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=Jd(c-s),p=f>Ud&&f%Ud;if(p>Qd&&(f=p),!(r>Qd))e.moveTo(l,u);else if(f>Ud-Qd)e.moveTo(l+r*Gd(s),u+r*Wd(s)),e.arc(l,u,r,s,c,!d),i>Qd&&(e.moveTo(l+i*Gd(c),u+i*Wd(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Gd(s),j=r*Wd(s),M=i*Gd(c),N=i*Wd(c),P=f>Qd;if(P){var F=t.cornerRadius;F&&(n=tf(F),m=n[0],h=n[1],g=n[2],_=n[3]);var I=Jd(r-i)/2;if(v=Zd(I,g),y=Zd(I,_),b=Zd(I,m),x=Zd(I,h),w=S=Xd(v,y),T=C=Xd(b,x),(S>Qd||C>Qd)&&(E=r*Gd(c),D=r*Wd(c),O=i*Gd(s),k=i*Wd(s),f<Hd)){var ee=$d(A,j,O,k,E,D,M,N);if(ee){var te=A-ee[0],L=j-ee[1],ne=E-ee[0],R=D-ee[1],re=1/Wd(Kd((te*ne+L*R)/(Yd(te*te+L*L)*Yd(ne*ne+R*R)))/2),ie=Yd(ee[0]*ee[0]+ee[1]*ee[1]);w=Zd(S,(r-ie)/(re+1)),T=Zd(C,(i-ie)/(re-1))}}}if(!P)e.moveTo(l+A,u+j);else if(w>Qd){var ae=Zd(g,w),oe=Zd(_,w),z=ef(O,k,A,j,r,ae,d),B=ef(E,D,M,N,r,oe,d);e.moveTo(l+z.cx+z.x0,u+z.cy+z.y0),w<S&&ae===oe?e.arc(l+z.cx,u+z.cy,w,qd(z.y0,z.x0),qd(B.y0,B.x0),!d):(ae>0&&e.arc(l+z.cx,u+z.cy,ae,qd(z.y0,z.x0),qd(z.y1,z.x1),!d),e.arc(l,u,r,qd(z.cy+z.y1,z.cx+z.x1),qd(B.cy+B.y1,B.cx+B.x1),!d),oe>0&&e.arc(l+B.cx,u+B.cy,oe,qd(B.y1,B.x1),qd(B.y0,B.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>Qd)||!P)e.lineTo(l+M,u+N);else if(T>Qd){var ae=Zd(m,T),oe=Zd(h,T),z=ef(M,N,E,D,i,-oe,d),B=ef(A,j,O,k,i,-ae,d);e.lineTo(l+z.cx+z.x0,u+z.cy+z.y0),T<C&&ae===oe?e.arc(l+z.cx,u+z.cy,T,qd(z.y0,z.x0),qd(B.y0,B.x0),!d):(oe>0&&e.arc(l+z.cx,u+z.cy,oe,qd(z.y0,z.x0),qd(z.y1,z.x1),!d),e.arc(l,u,i,qd(z.cy+z.y1,z.cx+z.x1),qd(B.cy+B.y1,B.cx+B.x1),d),ae>0&&e.arc(l+B.cx,u+B.cy,ae,qd(B.y1,B.x1),qd(B.y0,B.x0),!d))}else e.lineTo(l+M,u+N),e.arc(l,u,i,c,s,d)}e.closePath()}}}var rf=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),af=function(e){U(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new rf},t.prototype.buildPath=function(e,t){nf(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Es);af.prototype.type=`sector`;var of=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),sf=function(e){U(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new of},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(Es);sf.prototype.type=`ring`;function cf(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f<p;f++)Xn(u,u,e[f]),Zn(d,d,e[f]);Xn(u,u,r[0]),Zn(d,d,r[1])}for(var f=0,p=e.length;f<p;f++){var m=e[f];if(n)c=e[f?f-1:p-1],l=e[(f+1)%p];else if(f===0||f===p-1){i.push(In(e[f]));continue}else c=e[f-1],l=e[f+1];zn(a,l,c),Hn(a,a,t);var h=Wn(m,c),g=Wn(m,l),_=h+g;_!==0&&(h/=_,g/=_),Hn(o,a,-h),Hn(s,a,g);var v=Rn([],m,o),y=Rn([],m,s);r&&(Zn(v,v,u),Xn(v,v,d),Zn(y,y,u),Xn(y,y,d)),i.push(v),i.push(y)}return n&&i.push(i.shift()),i}function lf(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=cf(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var uf=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),df=function(e){U(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new uf},t.prototype.buildPath=function(e,t){lf(e,t,!0)},t}(Es);df.prototype.type=`polygon`;var ff=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),pf=function(e){U(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new ff},t.prototype.buildPath=function(e,t){lf(e,t,!1)},t}(Es);pf.prototype.type=`polyline`;var mf={},hf=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),gf=function(e){U(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new hf},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Fs(mf,t,this.style);n=o.x1,r=o.y1,i=o.x2,a=o.y2}else n=t.x1,r=t.y1,i=t.x2,a=t.y2;var s=t.percent;s!==0&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,a=r*(1-s)+a*s),e.lineTo(i,a))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(Es);gf.prototype.type=`line`;var _f=[],vf=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return e}();function yf(e,t,n){var r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?ji:Ai)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?ji:Ai)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?Ri:Li)(e.x1,e.cpx1,e.x2,t),(n?Ri:Li)(e.y1,e.cpy1,e.y2,t)]}var bf=function(e){U(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new vf},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2,o=t.cpx1,s=t.cpy1,c=t.cpx2,l=t.cpy2,u=t.percent;u!==0&&(e.moveTo(n,r),c==null||l==null?(u<1&&(Vi(n,o,i,u,_f),o=_f[1],i=_f[2],Vi(r,s,a,u,_f),s=_f[1],a=_f[2]),e.quadraticCurveTo(o,s,i,a)):(u<1&&(Pi(n,o,c,i,u,_f),o=_f[1],c=_f[2],i=_f[3],Pi(r,s,l,a,u,_f),s=_f[1],l=_f[2],a=_f[3]),e.bezierCurveTo(o,s,c,l,i,a)))},t.prototype.pointAt=function(e){return yf(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=yf(this.shape,e,!0);return Un(t,t)},t}(Es);bf.prototype.type=`bezier-curve`;var xf=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),Sf=function(e){U(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new xf},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),a=t.startAngle,o=t.endAngle,s=t.clockwise,c=Math.cos(a),l=Math.sin(a);e.moveTo(c*i+n,l*i+r),e.arc(n,r,i,a,o,!s)},t}(Es);Sf.prototype.type=`arc`;var Cf=function(e){U(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`compound`,t}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t||=e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Es.prototype.getBoundingRect.call(this)},t}(Es),wf=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),Tf=function(e){U(t,e);function t(t,n,r,i,a,o){var s=e.call(this,a)||this;return s.x=t??0,s.y=n??0,s.x2=r??1,s.y2=i??0,s.type=`linear`,s.global=o||!1,s}return t}(wf),Ef=function(e){U(t,e);function t(t,n,r,i,a){var o=e.call(this,i)||this;return o.x=t??.5,o.y=n??.5,o.r=r??.5,o.type=`radial`,o.global=a||!1,o}return t}(wf),Df=Math.min,Of=Math.max,kf=Math.abs,Af=[0,0],jf=[0,0],Mf=Cr(),Nf=Mf.minTv,Pf=Mf.maxTv,Ff=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Qn;for(var n=0;n<2;n++)this._axes[n]=new Qn;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,a=e.y,o=i+e.width,s=a+e.height;if(n[0].set(i,a),n[1].set(o,a),n[2].set(o,s),n[3].set(i,s),t)for(var c=0;c<4;c++)n[c].transform(t);Qn.sub(r[0],n[1],n[0]),Qn.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(var c=0;c<2;c++)this._origin[c]=r[c].dot(n[0])},e.prototype.intersect=function(e,t,n){var r=!0,i=!t;return t&&Qn.set(t,0,0),Mf.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(r=!1,i)||!i&&!Mf.negativeSize&&Qn.copy(t,r?Mf.useDir?Mf.dirMinTv:Nf:Pf),r},e.prototype._intersectCheckOneSide=function(e,t,n,r){for(var i=!0,a=0;a<2;a++){var o=e._axes[a];if(e._getProjMinMaxOnAxis(a,e._corners,Af),e._getProjMinMaxOnAxis(a,t._corners,jf),Mf.negativeSize||Af[1]<jf[0]||Af[0]>jf[1]){if(i=!1,Mf.negativeSize||n)return i;var s=kf(jf[0]-Af[1]),c=kf(Af[0]-jf[1]);Df(s,c)>Pf.len()&&(s<c?Qn.scale(Pf,o,-s*r):Qn.scale(Pf,o,c*r))}else if(!n){var s=kf(jf[0]-Af[1]),c=kf(Af[0]-jf[1]);(Mf.useDir||Df(s,c)<Nf.len())&&((s<c||!Mf.bidirectional)&&(Qn.scale(Nf,o,s*r),Mf.useDir&&Mf.calcDirMTV()),(s>=c||!Mf.bidirectional)&&(Qn.scale(Nf,o,-c*r),Mf.useDir&&Mf.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c<t.length;c++){var l=t[c].dot(r)+i[e];o=Df(l,o),s=Of(l,s)}n[0]=o+Mf.touchThreshold,n[1]=s-Mf.touchThreshold,Mf.negativeSize=n[1]<n[0]},e}(),If=[],Lf=function(e){U(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=1,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype._useHoverStyle=function(){this.__hoverStyle=null},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t||=!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var t=this._displayables[e];t.parent=this,t.update(),t.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var t=this._temporaryDisplayables[e];t.parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new fr(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(If)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1])){for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(e,t))return!0}return!1},t}(yo),Rf=bl();function zf(e,t,n,r,i){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),c=e===`update`;if(s){var l=void 0,u=void 0,d=void 0;return r?(l=X(r.duration,200),u=X(r.easing,`cubicOut`),d=0):(l=t.getShallow(c?`animationDurationUpdate`:`animationDuration`),u=t.getShallow(c?`animationEasingUpdate`:`animationEasing`),d=t.getShallow(c?`animationDelayUpdate`:`animationDelay`)),a&&(a.duration!=null&&(l=a.duration),a.easing!=null&&(u=a.easing),a.delay!=null&&(d=a.delay)),Ct(d)&&(d=d(n,i)),Ct(l)&&(l=l(n)),{duration:l||0,delay:d,easing:u}}return null}function Bf(e,t,n,r,i,a,o){var s=!1,c;Ct(i)?(o=a,a=i,i=null):Y(i)&&(a=i.cb,o=i.during,s=i.isFrom,c=i.removeOpt,i=i.dataIndex);var l=e===`leave`;l||t.stopAnimation(`leave`);var u=zf(e,r,i,l?c||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(u&&u.duration>0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function Vf(e,t,n,r,i,a){Bf(`update`,e,t,n,r,i,a)}function Hf(e,t,n,r,i,a){Bf(`enter`,e,t,n,r,i,a)}function Uf(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++)if(e.animators[t].scope===`leave`)return!0;return!1}function Wf(e,t,n,r,i,a){Uf(e)||Bf(`leave`,e,t,n,r,i,a)}function Gf(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),Wf(e,{style:{opacity:0}},t,n,r)}function Kf(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||Gf(e,t,n,r)}):Gf(e,t,n,r)}function qf(e){Rf(e).oldStyle=e.style}var Jf=oe({Arc:()=>Sf,BezierCurve:()=>bf,BoundingRect:()=>fr,Circle:()=>zd,CompoundPath:()=>Cf,Ellipse:()=>Vd,Group:()=>Ld,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Ms,IncrementalDisplayable:()=>Lf,Line:()=>gf,LinearGradient:()=>Tf,OrientedBoundingRect:()=>Ff,Path:()=>Es,Point:()=>Qn,Polygon:()=>df,Polyline:()=>pf,RadialGradient:()=>Ef,Rect:()=>Bs,Ring:()=>sf,Sector:()=>af,Text:()=>Gs,WH:()=>Zf,XY:()=>Xf,applyTransform:()=>fp,calcZ2Range:()=>Fp,clipPointsByRect:()=>_p,clipRectByRect:()=>vp,createIcon:()=>yp,decomposeTransform:()=>zp,ensureCopyRect:()=>Mp,ensureCopyTransform:()=>Np,expandOrShrinkRect:()=>wp,extendPath:()=>ep,extendShape:()=>Qf,getCurrentCanvasPainter:()=>Vp,getShapeClass:()=>np,getTransform:()=>dp,groupTransition:()=>gp,initProps:()=>Hf,isBoundingRectAxisAligned:()=>Ap,isElementRemoved:()=>Uf,lineLineIntersect:()=>xp,linePolygonIntersect:()=>bp,makeImage:()=>ip,makePath:()=>rp,mergePath:()=>op,payloadDisableAnimation:()=>Rp,registerShape:()=>tp,removeElement:()=>Wf,removeElementWithFadeOut:()=>Kf,resizePath:()=>sp,retrieveZInfo:()=>Pp,setTooltipConfig:()=>Dp,subPixelOptimize:()=>up,subPixelOptimizeLine:()=>cp,subPixelOptimizeRect:()=>lp,transformDirection:()=>pp,traverseElements:()=>kp,traverseUpdateZ:()=>Ip,updateProps:()=>Vf}),Yf={},Xf=[`x`,`y`],Zf=[`width`,`height`];function Qf(e){return Es.extend(e)}var $f=Fd;function ep(e,t){return $f(e,t)}function tp(e,t){Yf[e]=t}function np(e){if(Yf.hasOwnProperty(e))return Yf[e]}function rp(e,t,n,r){var i=Pd(e,t);return n&&(r===`center`&&(n=ap(n,i.getBoundingRect())),sp(i,n)),i}function ip(e,t,n){var r=new Ms({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(ap(t,i))}}});return r}function ap(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var op=Id;function sp(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function cp(e,t){return Fs(e,e,{lineWidth:t}),e}function lp(e,t){return Is(e,e,t),e}var up=Ls;function dp(e,t){for(var n=Dn([]);e&&e!==t;)kn(n,e.getLocalTransform(),n),e=e.parent;return n}function fp(e,t,n){return t&&!ht(t)&&(t=pi.getLocalTransform(t)),n&&(t=Nn([],t)),Yn([],e,t)}function pp(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:uc(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:uc(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=fp(a,t,n),uc(a[0])>uc(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function mp(e){return!e.isGroup}function hp(e){return e.shape!=null}function gp(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){mp(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return hp(e)&&(t.shape=ct(e.shape)),t}var a=r(e);t.traverse(function(e){if(mp(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Vf(e,r,n,Yl(e).dataIndex)}}})}function _p(e,t){return K(e,function(e){var n=e[0];n=lc(n,t.x),n=cc(n,t.x+t.width);var r=e[1];return r=lc(r,t.y),r=cc(r,t.y+t.height),[n,r]})}function vp(e,t){var n=lc(e.x,t.x),r=cc(e.x+e.width,t.x+t.width),i=lc(e.y,t.y),a=cc(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function yp(e,t,n){var r=W({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),dt(i,n),new Ms(r)):rp(e.replace(`path://`,``),r,n,`center`)}function bp(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(xp(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function xp(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=Sp(u,d,c,l);if(Cp(f))return!1;var p=e-i,m=t-a,h=Sp(p,m,c,l)/f;if(h<0||h>1)return!1;var g=Sp(p,m,u,d)/f;return!(g<0||g>1)}function Sp(e,t,n,r){return e*r-n*t}function Cp(e){return e<=1e-6&&e>=-1e-6}function wp(e,t,n,r,i){return t==null?e:(Tt(t)?Tp[0]=Tp[1]=Tp[2]=Tp[3]=t:(Tp[0]=t[0],Tp[1]=t[1],Tp[2]=t[2],Tp[3]=t[3]),r&&(Tp[0]=lc(0,Tp[0]),Tp[1]=lc(0,Tp[1]),Tp[2]=lc(0,Tp[2]),Tp[3]=lc(0,Tp[3])),n&&(Tp[0]=-Tp[0],Tp[1]=-Tp[1],Tp[2]=-Tp[2],Tp[3]=-Tp[3]),Ep(e,Tp,`x`,`width`,3,1,i&&i[0]||0),Ep(e,Tp,`y`,`height`,0,2,i&&i[1]||0),e)}var Tp=[0,0,0,0];function Ep(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=lc(0,cc(o,c)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?c+t[a]:uc(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Dp(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=J(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&G(yt(c),function(e){Z(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Yl(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:dt({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Op(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function kp(e,t){if(e){if(q(e))for(var n=0;n<e.length;n++)Op(e[n],t);else Op(e,t)}}function Ap(e){return!e||uc(e[1])<jp&&uc(e[2])<jp||uc(e[0])<jp&&uc(e[3])<jp}var jp=1e-5;function Mp(e,t){return e?fr.copy(e,t):t.clone()}function Np(e,t){return t?On(e||En(),t):void 0}function Pp(e){return{z:e.get(`z`)||0,zlevel:e.get(`zlevel`)||0}}function Fp(e){var t=-1/0,n=1/0;Op(e,function(e){r(e),r(e.getTextContent()),r(e.getTextGuideLine())});function r(e){if(!(!e||e.isGroup)){var t=e.currentStates;if(t.length)for(var n=0;n<t.length;n++)i(e.states[t[n]]);i(e)}}function i(e){if(e){var r=e.z2;r>t&&(t=r),r<n&&(n=r)}}return n>t&&(n=t=0),{min:n,max:t}}function Ip(e,t,n){Lp(e,t,n,-1/0)}function Lp(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s<o.length;s++)r=lc(Lp(o[s],t,n,r),r);else e.z=t,e.zlevel=n,r=lc(e.z2||0,r);if(i&&(i.z=t,i.zlevel=n,isFinite(r)&&(i.z2=r+2)),a){var c=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(r)&&(a.z2=r+(c&&c.showAbove?1:-1))}return r}function Rp(e){return e.animation={duration:0},e}function zp(e,t){return t?On(Bp.transform,t):Dn(Bp.transform),Bp.decomposeTransform(),_i(e,Bp),e}var Bp=new pi;Bp.transform=En();function Vp(e){var t=e.getZr().painter;return t.getType()===`canvas`?t:null}tp(`circle`,zd),tp(`ellipse`,Vd),tp(`sector`,af),tp(`ring`,sf),tp(`polygon`,df),tp(`polyline`,pf),tp(`rect`,Bs),tp(`line`,gf),tp(`bezierCurve`,bf),tp(`arc`,Sf);var Hp={};function Up(e,t){for(var n=0;n<fu.length;n++){var r=fu[n],i=t[r],a=e.ensureState(r);a.style=a.style||{},a.style.text=i}var o=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(o,!0)}function Wp(e,t,n){var r=e.labelFetcher,i=e.labelDataIndex,a=e.labelDimIndex,o=t.normal,s;r&&(s=r.getFormattedLabel(i,`normal`,null,a,o&&o.get(`formatter`),n==null?null:{interpolatedValue:n})),s??=Ct(e.defaultText)?e.defaultText(i,e,n):e.defaultText;for(var c={normal:s},l=0;l<fu.length;l++){var u=fu[l],d=t[u];c[u]=X(r?r.getFormattedLabel(i,u,null,a,d&&d.get(`formatter`)):null,s)}return c}function Gp(e,t,n,r){n||=Hp;for(var i=e instanceof Gs,a=!1,o=0;o<pu.length;o++){var s=t[pu[o]];if(s&&s.getShallow(`show`)){a=!0;break}}var c=i?e:e.getTextContent();if(a){i||(c||(c=new Gs,e.setTextContent(c)),e.stateProxy&&(c.stateProxy=e.stateProxy));var l=Wp(n,t),u=t.normal,d=!!u.getShallow(`show`),f=qp(u,r&&r.normal,n,!1,!i);f.text=l.normal,i||e.setTextConfig(Jp(u,n,!1));for(var o=0;o<fu.length;o++){var p=fu[o],s=t[p];if(s){var m=c.ensureState(p),h=!!X(s.getShallow(`show`),d);if(h!==d&&(m.ignore=!h),m.style=qp(s,r&&r[p],n,!0,!i),m.style.text=l[p],!i){var g=e.ensureState(p);g.textConfig=Jp(s,n,!0)}}}c.silent=!!u.getShallow(`silent`),c.style.x!=null&&(f.x=c.style.x),c.style.y!=null&&(f.y=c.style.y),c.ignore=!d,c.useStyle(f),c.dirty(),n.enableTextSetter&&(nm(c).setLabelText=function(e){var r=Wp(n,t,e);Up(c,r)})}else c&&(c.ignore=!0);e.dirty()}function Kp(e,t){t||=`label`;for(var n={normal:e.getModel(t)},r=0;r<fu.length;r++){var i=fu[r];n[i]=e.getModel([i,t])}return n}function qp(e,t,n,r,i){var a={};return Yp(a,e,n,r,i),t&&W(a,t),a}function Jp(e,t,n){t||={};var r={},i,a=e.getShallow(`rotate`),o=X(e.getShallow(`distance`),n?null:5),s=e.getShallow(`offset`);return i=e.getShallow(`position`)||(n?null:`inside`),i===`outside`&&(i=t.defaultOutsidePosition||`top`),i!=null&&(r.position=i),s!=null&&(r.offset=s),a!=null&&(a*=Math.PI/180,r.rotation=a),o!=null&&(r.distance=o),r.outsideFill=e.get(`color`)===`inherit`?t.inheritColor||null:`auto`,t.autoOverflowArea!=null&&(r.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(r.layoutRect=t.layoutRect),r}function Yp(e,t,n,r,i){n||=Hp;var a=t.ecModel,o=a&&a.option.textStyle,s=Xp(t),c;if(s){c={};var l=`richInheritPlainLabel`,u=X(t.get(l),a?a.get(l):void 0);for(var d in s)if(s.hasOwnProperty(d)){var f=t.getModel([`rich`,d]);em(c[d]={},f,o,t,u,n,r,i,!1,!0)}}c&&(e.rich=c);var p=t.get(`overflow`);p&&(e.overflow=p);var m=t.get(`lineOverflow`);m&&(e.lineOverflow=m);var h=e,g=t.get(`minMargin`);if(g!=null)g=Tt(g)?g/2:0,h.margin=[g,g,g,g],h.__marginType=im.minMargin;else{var _=t.get(`textMargin`);_!=null&&(h.margin=Ft(_),h.__marginType=im.textMargin)}em(e,t,o,null,null,n,r,i,!0,!1)}function Xp(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||Hp).rich;if(n){t||={};for(var r=yt(n),i=0;i<r.length;i++){var a=r[i];t[a]=1}}e=e.parentModel}return t}var Zp=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`textShadowColor`,`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],Qp=[`align`,`lineHeight`,`width`,`height`,`tag`,`verticalAlign`,`ellipsis`],$p=[`padding`,`borderWidth`,`borderRadius`,`borderDashOffset`,`backgroundColor`,`borderColor`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`];function em(e,t,n,r,i,a,o,s,c,l){n=!o&&n||Hp;var u=a&&a.inheritColor,d=t.getShallow(`color`),f=t.getShallow(`textBorderColor`),p=X(t.getShallow(`opacity`),n.opacity);(d===`inherit`||d===`auto`)&&(d=u||null),(f===`inherit`||f===`auto`)&&(f=u||null),s||(d||=n.color,f||=n.textBorderColor),d!=null&&(e.fill=d),f!=null&&(e.stroke=f);var m=X(t.getShallow(`textBorderWidth`),n.textBorderWidth);m!=null&&(e.lineWidth=m);var h=X(t.getShallow(`textBorderType`),n.textBorderType);h!=null&&(e.lineDash=h);var g=X(t.getShallow(`textBorderDashOffset`),n.textBorderDashOffset);g!=null&&(e.lineDashOffset=g),!o&&p==null&&!l&&(p=a&&a.defaultOpacity),p!=null&&(e.opacity=p),!o&&!s&&e.fill==null&&a.inheritColor&&(e.fill=a.inheritColor);for(var _=0;_<Zp.length;_++){var v=Zp[_],y=i!==!1&&r?Nt(t.getShallow(v),r.getShallow(v),n[v]):X(t.getShallow(v),n[v]);y!=null&&(e[v]=y)}for(var _=0;_<Qp.length;_++){var v=Qp[_],y=t.getShallow(v);y!=null&&(e[v]=y)}if(e.verticalAlign==null){var b=t.getShallow(`baseline`);b!=null&&(e.verticalAlign=b)}if(!c||!a.disableBox){for(var _=0;_<$p.length;_++){var v=$p[_],y=t.getShallow(v);y!=null&&(e[v]=y)}var x=t.getShallow(`borderType`);x!=null&&(e.borderDash=x),(e.backgroundColor===`auto`||e.backgroundColor===`inherit`)&&u&&(e.backgroundColor=u),(e.borderColor===`auto`||e.borderColor===`inherit`)&&u&&(e.borderColor=u)}}function tm(e,t){var n=t&&t.getModel(`textStyle`);return Lt([e.fontStyle||n&&n.getShallow(`fontStyle`)||``,e.fontWeight||n&&n.getShallow(`fontWeight`)||``,(e.fontSize||n&&n.getShallow(`fontSize`)||12)+`px`,e.fontFamily||n&&n.getShallow(`fontFamily`)||`sans-serif`].join(` `))}var nm=bl();function rm(e,t,n,r){if(e){var i=nm(e);i.prevValue=i.value,i.value=n;var a=t.normal;i.valueAnimation=a.get(`valueAnimation`),i.valueAnimation&&(i.precision=a.get(`precision`),i.defaultInterpolatedText=r,i.statesModels=t)}}var im={minMargin:1,textMargin:2},am=[`textStyle`,`color`],om=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`padding`,`lineHeight`,`rich`,`width`,`height`,`overflow`],sm=new Gs,cm=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow(`color`)||(!e&&t?t.get(am):null)},e.prototype.getFont=function(){return tm({fontStyle:this.getShallow(`fontStyle`),fontWeight:this.getShallow(`fontWeight`),fontSize:this.getShallow(`fontSize`),fontFamily:this.getShallow(`fontFamily`)},this.ecModel)},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow(`verticalAlign`)||this.getShallow(`baseline`)},n=0;n<om.length;n++)t[om[n]]=this.getShallow(om[n]);return sm.useStyle(t),sm.update(),sm.getBoundingRect()},e}(),lm=[[`lineWidth`,`width`],[`stroke`,`color`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`type`],[`lineDashOffset`,`dashOffset`],[`lineCap`,`cap`],[`lineJoin`,`join`],[`miterLimit`]],um=hn(lm),dm=function(){function e(){}return e.prototype.getLineStyle=function(e){return um(this,e)},e}(),fm=[[`fill`,`color`],[`stroke`,`borderColor`],[`lineWidth`,`borderWidth`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`borderType`],[`lineDashOffset`,`borderDashOffset`],[`lineCap`,`borderCap`],[`lineJoin`,`borderJoin`],[`miterLimit`,`borderMiterLimit`]],pm=hn(fm),mm=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return pm(this,e,t)},e}(),hm=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){lt(this.option,e,!0)},e.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=n==null?n:n[e];if(r==null&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=t!=null,i=r?this.parsePath(t):null,a=r?this._doGet(i):this.option;return n||=this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new e(a,n,this.ecModel)},e.prototype.isEmpty=function(){return this.option==null},e.prototype.restoreData=function(){},e.prototype.clone=function(){var e=this.constructor;return new e(ct(this.option))},e.prototype.parsePath=function(e){return typeof e==`string`?e.split(`.`):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!Qt.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&!(e[r]&&(n=n&&typeof n==`object`?n[e[r]]:null,n==null));r++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();sn(hm),dn(hm),mt(hm,dm),mt(hm,mm),mt(hm,_n),mt(hm,cm);function gm(e){return e==null?0:e.length||1}function _m(e){return e}var vm=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||_m,this._newKeyGetter=r||_m,this.context=i,this._diffModeMultiple=a===`multiple`}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?`_executeMultiple`:`_executeOneToOne`]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=Array(e.length),i=Array(t.length);this._initIndexMap(e,null,r,`_oldKeyGetter`),this._initIndexMap(t,n,i,`_newKeyGetter`);for(var a=0;a<e.length;a++){var o=r[a],s=n[o],c=gm(s);if(c>1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o<i.length;o++){var s=i[o],c=n[s],l=r[s],u=gm(c),d=gm(l);if(u>1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f<u;f++)this._remove&&this._remove(c[f]);else this._remove&&this._remove(c)}this._performRestAdd(a,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],a=gm(i);if(a>1)for(var o=0;o<a;o++)this._add&&this._add(i[o]);else a===1&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,a=0;a<e.length;a++){var o=`_ec_`+this[r](e[a],a);if(i||(n[a]=o),t){var s=t[o],c=gm(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},e}(),ym={Must:1,Might:2,Not:3},bm=bl();function xm(e){bm(e).datasetMap=Gt()}function Sm(e,t,n){var r={},i=wm(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=bm(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),G(e,function(t,n){var i=Y(t)?t:e[n]={name:t};i.type===`ordinal`&&u==null&&(u=n,d=m(i)),r[i.name]=[]});var f=c.get(l)||c.set(l,{categoryWayDim:d,valueWayDim:0});G(e,function(e,t){var n=e.name,i=m(e);if(u==null){var s=f.valueWayDim;p(r[n],s,i),p(o,s,i),f.valueWayDim+=i}else if(u===t)p(r[n],0,i),p(a,0,i);else{var s=f.categoryWayDim;p(r[n],s,i),p(o,s,i),f.categoryWayDim+=i}});function p(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function m(e){var t=e.dimsDef;return t?t.length:1}return a.length&&(r.itemName=a),o.length&&(r.seriesName=o),r}function Cm(e,t,n){var r={};if(!wm(e))return r;var i=t.sourceFormat,a=t.dimensionsDefine,o;(i===`objectRows`||i===`keyedColumns`)&&G(a,function(e,t){(Y(e)?e.name:e)===`name`&&(o=t)});var s=function(){for(var e={},r={},s=[],c=0,l=Math.min(5,n);c<l;c++){var u=Dm(t.data,i,t.seriesLayoutBy,a,t.startIndex,c);s.push(u);var d=u===ym.Not;if(d&&e.v==null&&c!==o&&(e.v=c),(e.n==null||e.n===e.v||!d&&s[e.n]===ym.Not)&&(e.n=c),f(e)&&s[e.n]!==ym.Not)return e;d||(u===ym.Might&&r.v==null&&c!==o&&(r.v=c),(r.n==null||r.n===r.v)&&(r.n=c))}function f(e){return e.v!=null&&e.n!=null}return f(e)?e:f(r)?r:null}();if(s){r.value=[s.v];var c=o??s.n;r.itemName=[c],r.seriesName=[c]}return r}function wm(e){if(!e.get(`data`,!0))return Tl(e.ecModel,`dataset`,{index:e.get(`datasetIndex`,!0),id:e.get(`datasetId`,!0)},wl).models[0]}function Tm(e){return!e.get(`transform`,!0)&&!e.get(`fromTransformResult`,!0)?[]:Tl(e.ecModel,`dataset`,{index:e.get(`fromDatasetIndex`,!0),id:e.get(`fromDatasetId`,!0)},wl).models}function Em(e,t){return Dm(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function Dm(e,t,n,r,i,a){var o,s=5;if(Dt(e))return ym.Not;var c,l;if(r){var u=r[a];Y(u)?(c=u.name,l=u.type):J(u)&&(c=u)}if(l!=null)return l===`ordinal`?ym.Must:ym.Not;if(t===`arrayRows`){var d=e;if(n===`row`){for(var f=d[a],p=0;p<(f||[]).length&&p<s;p++)if((o=b(f[i+p]))!=null)return o}else for(var p=0;p<d.length&&p<s;p++){var m=d[i+p];if(m&&(o=b(m[a]))!=null)return o}}else if(t===`objectRows`){var h=e;if(!c)return ym.Not;for(var p=0;p<h.length&&p<s;p++){var g=h[p];if(g&&(o=b(g[c]))!=null)return o}}else if(t===`keyedColumns`){var _=e;if(!c)return ym.Not;var f=_[c];if(!f||Dt(f))return ym.Not;for(var p=0;p<f.length&&p<s;p++)if((o=b(f[p]))!=null)return o}else if(t===`original`)for(var v=e,p=0;p<v.length&&p<s;p++){var g=v[p],y=rl(g);if(!q(y))return ym.Not;if((o=b(y[a]))!=null)return o}function b(e){var t=J(e);if(e!=null&&isFinite(Number(e))&&e!==``)return t?ym.Might:ym.Not;if(t&&e!==`-`)return ym.Must}return ym.Not}var Om=function(){function e(e){this.data=e.data||(e.sourceFormat===`keyedColumns`?{}:[]),this.sourceFormat=e.sourceFormat||`unknown`,this.seriesLayoutBy=e.seriesLayoutBy||`column`,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];r.type==null&&Em(this,n)===ym.Must&&(r.type=`ordinal`)}}return e}();function km(e){return e instanceof Om}function Am(e,t,n){n||=Nm(e);var r=t.seriesLayoutBy,i=Pm(e,n,r,t.sourceHeader,t.dimensions);return new Om({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:ct(t)})}function jm(e){return new Om({data:e,sourceFormat:Dt(e)?nu:Ql})}function Mm(e){return new Om({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:ct(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function Nm(e){var t=ru;if(Dt(e))t=nu;else if(q(e)){e.length===0&&(t=$l);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){if(q(i)||Dt(i)){t=$l;break}if(Y(i)){t=eu;break}}}}else if(Y(e)){for(var a in e)if(Z(e,a)&&ht(e[a])){t=tu;break}}return t}function Pm(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:Im(i),startIndex:o,dimensionsDetectedCount:a};if(t===`arrayRows`){var s=e;r===`auto`||r==null?Lm(function(e){e!=null&&e!==`-`&&(J(e)?o??=1:o=0)},n,s,10):o=Tt(r)?r:+!!r,!i&&o===1&&(i=[],Lm(function(e,t){i[t]=e==null?``:e+``},n,s,1/0)),a=i?i.length:n===`row`?s.length:s[0]?s[0].length:null}else if(t===`objectRows`)i||=Fm(e);else if(t===`keyedColumns`)i||(i=[],G(e,function(e,t){i.push(t)}));else if(t===`original`){var c=rl(e[0]);a=q(c)&&c.length||1}return{startIndex:o,dimensionsDefine:Im(i),dimensionsDetectedCount:a}}function Fm(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return yt(n)}function Im(e){if(e){var t=Gt();return K(e,function(e,n){e=Y(e)?e:{name:e};var r={name:e.name,displayName:e.displayName,type:e.type};if(r.name==null)return r;r.name+=``,r.displayName??=r.name;var i=t.get(r.name);return i?r.name+=`-`+i.count++:t.set(r.name,{count:1}),r})}}function Lm(e,t,n,r){if(t===`row`)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else for(var a=n[0]||[],i=0;i<a.length&&i<r;i++)e(a[i],i)}function Rm(e){var t=e.sourceFormat;return t===`objectRows`||t===`keyedColumns`}var zm,Bm,Vm,Hm,Um,Wm,Gm=function(){function e(e,t){var n=km(e)?e:jm(e);this._source=n;var r=this._data=n.data,i=n.sourceFormat;n.seriesLayoutBy,i===`typedArray`&&(this._offset=0,this._dimSize=t,this._data=r),Wm(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;Wm=function(e,i,a){var o=a.sourceFormat,s=a.seriesLayoutBy,c=a.startIndex,l=a.dimensionsDefine,u=Um[nh(o,s)];W(e,u),o===`typedArray`?(e.getItem=t,e.count=r,e.fillStorage=n):(e.getItem=xt(Ym(o,s),null,i,c,l),e.count=xt(Qm(o,s),null,i,c,l))};var t=function(e,t){e-=this._offset,t||=[];for(var n=this._data,r=this._dimSize,i=r*e,a=0;a<r;a++)t[a]=n[i+a];return t},n=function(e,t,n,r){for(var i=this._data,a=this._dimSize,o=0;o<a;o++){for(var s=r[o],c=s[0]==null?1/0:s[0],l=s[1]==null?-1/0:s[1],u=t-e,d=n[o],f=0;f<u;f++){var p=i[f*a+o];d[e+f]=p,p<c&&(c=p),p>l&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Um=(e={},e[$l+`_`+iu]={pure:!0,appendData:i},e[$l+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[eu]={pure:!0,appendData:i},e[tu]={pure:!0,appendData:function(e){var t=this._data;G(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[Ql]={appendData:i},e[nu]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}}(),e}(),Km=function(e){q(e)||Yc(`series.data or dataset.source must be an array.`)};zm={},zm[$l+`_`+iu]=Km,zm[$l+`_row`]=Km,zm[eu]=Km,zm[tu]=function(e,t){for(var n=0;n<t.length;n++)t[n].name??Yc(`dimension name must not be null/undefined.`)},zm[Ql]=Km;var qm=function(e,t,n,r){return e[r]},Jm=(Bm={},Bm[$l+`_`+iu]=function(e,t,n,r){return e[r+t]},Bm[$l+`_row`]=function(e,t,n,r,i){r+=t;for(var a=i||[],o=e,s=0;s<o.length;s++){var c=o[s];a[s]=c?c[r]:null}return a},Bm[eu]=qm,Bm[tu]=function(e,t,n,r,i){for(var a=i||[],o=0;o<n.length;o++){var s=n[o].name,c=s==null?null:e[s];a[o]=c?c[r]:null}return a},Bm[Ql]=qm,Bm);function Ym(e,t){return Jm[nh(e,t)]}var Xm=function(e,t,n){return e.length},Zm=(Vm={},Vm[$l+`_`+iu]=function(e,t,n){return Math.max(0,e.length-t)},Vm[$l+`_row`]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},Vm[eu]=Xm,Vm[tu]=function(e,t,n){var r=n[0].name,i=r==null?null:e[r];return i?i.length:0},Vm[Ql]=Xm,Vm);function Qm(e,t){return Zm[nh(e,t)]}var $m=function(e,t,n){return e[t]},eh=(Hm={},Hm[$l]=$m,Hm[eu]=function(e,t,n){return e[n]},Hm[tu]=$m,Hm[Ql]=function(e,t,n){var r=rl(e);return r instanceof Array?r[t]:r},Hm[nu]=$m,Hm);function th(e){return eh[e]}function nh(e,t){return e===`arrayRows`?e+`_`+t:e}function rh(e,t,n){if(e){var r=e.getRawDataItem(t);if(r!=null){var i=e.getStore(),a=i.getSource().sourceFormat;if(n!=null){var o=e.getDimensionIndex(n),s=i.getDimensionProperty(o);return th(a)(r,o,s)}var c=r;return a===`original`&&(c=rl(r)),c}}}var ih=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||=this._schema?this._schema.makeOutputDimensionNames():[],this._cachedDimNames},e}();function ah(e,t){var n={},r=n.encode={},i=Gt(),a=[],o=[],s={};G(e.dimensions,function(t){var n=e.getDimensionInfo(t),c=n.coordDim;if(c){var l=n.coordDimIndex;oh(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),ch(n.type)&&(a[0]=t),oh(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}Zl.each(function(e,t){var i=oh(r,t),a=n.otherDims[t];a!=null&&a!==!1&&(i[a]=n.name)})});var c=[],l={};i.each(function(e,t){var n=r[t];l[t]=n[0],c=c.concat(n)}),n.dataDimsOnCoord=c,n.dataDimIndicesOnCoord=K(c,function(t){return e.getDimensionInfo(t).storeDimIndex}),n.encodeFirstDimNotExtra=l;var u=r.label;u&&u.length&&(a=u.slice());var d=r.tooltip;return d&&d.length?o=d.slice():o.length||(o=a.slice()),r.defaultedLabel=a,r.defaultedTooltip=o,n.userOutput=new ih(s,t),n}function oh(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function sh(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function ch(e){return e!==`ordinal`&&e!==`time`}var lh=function(){function e(e){this.otherDims={},e!=null&&W(this,e)}return e}();function uh(e,t){var n=t&&t.type;return n===`ordinal`?e:(n===`time`&&!Tt(e)&&e!=null&&e!==`-`&&(e=+Fc(e)),e==null||e===``?NaN:Number(e))}Gt({number:function(e){return parseFloat(e)},time:function(e){return+Fc(e)},trim:function(e){return J(e)?Lt(e):e}});var dh={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}};(function(){function e(e,t){Tt(t)||Xc(``),this._opFn=dh[e],this._rvalFloat=zc(t)}return e.prototype.evaluate=function(e){return Tt(e)?this._opFn(e,this._rvalFloat):this._opFn(zc(e),this._rvalFloat)},e})();var fh=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=Tt(e)?e:zc(e),r=Tt(t)?t:zc(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=J(e),s=J(t);o&&(n=s?e:0),s&&(r=o?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=zc(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=zc(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function ph(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function mh(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}var hh=typeof Uint32Array>`u`?Array:Uint32Array,gh=typeof Uint16Array>`u`?Array:Uint16Array,_h=typeof Int32Array>`u`?Array:Int32Array,vh=typeof Float64Array>`u`?Array:Float64Array,yh={float:vh,int:_h,ordinal:Array,number:Array,time:vh},bh;function xh(e){return e>65535?hh:gh}function Sh(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Ch(e,t,n,r,i){var a=yh[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;l<s;l++)c[l]=o[l];e[t]=c}}else e[t]=new a(r)}var wh=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Gt()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=bh[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],Rm(r),this._dimensions=K(t,function(e){return{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(i!=null){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new yh[t||`float`](this._rawCount),this._rawExtent[i]=jl(),i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,a=r.ordinalOffset||0,o=n.length;a===0&&(i[e]=jl());for(var s=i[e],c=a;c<o;c++){var l=n[c]=t.parseAndCollect(n[c]);isNaN(l)||(s[0]=Math.min(l,s[0]),s[1]=Math.max(l,s[1]))}r.ordinalMeta=t,r.ordinalOffset=o,r.type=`ordinal`},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,a=this._rawExtent,o=this.count(),s=o+Math.max(e.length,t||0),c=0;c<i;c++){var l=r[c];Ch(n,c,l.type,s,!0)}for(var u=[],d=o;d<s;d++)for(var f=d-o,p=0;p<i;p++){var l=r[p],m=bh.arrayRows.call(this,e[f]||u,l.property,f,p);n[p][d]=m;var h=a[p];m<h[0]&&(h[0]=m),m>h[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=K(a,function(e){return e.property}),l=0;l<o;l++){var u=a[l];s[l]||(s[l]=jl()),Ch(i,l,u.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],f=e;f<t;f++){d=r.getItem(f,d);for(var p=0;p<o;p++){var m=i[p],h=this._dimValueGetter(d,c[p],f,p);m[f]=h;var g=s[p];h<g[0]&&(g[0]=h),h>g[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(t==null){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;for(var i=0,a=r.length;i<a;i++)n.push(this.get(r[i],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var r=0,i=this.count();r<i;r++){var a=this.get(e,r);isNaN(a)||(n+=a)}return n},e.prototype.getMedian=function(e){var t=[];this.each([e],function(e){isNaN(e)||t.push(e)}),Tc(t);var n=this.count();return n===0?0:n%2==1?t[(n-1)/2]:(t[n/2]+t[n/2-1])/2},e.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 r=0,i=this._count-1;r<=i;){var a=(r+i)/2|0;if(t[a]<e)r=a+1;else if(t[a]>e)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{var n=xh(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(xh(n._rawCount))(r),a=[],o=e.length,s=0,c=e[0],l=n._chunks,u=0;u<r;u++){var d=void 0,f=n.getRawIndex(u);if(o===0)d=t(u);else if(o===1){var p=l[c][f];d=t(p,u)}else{for(var m=0;m<o;m++)a[m]=l[e[m]][f];a[m]=u,d=t.apply(null,a)}d&&(i[s++]=f)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=yt(e),i=r.length;if(!i)return this;var a=t.count(),o=new(xh(t._rawCount))(a),s=0,c=r[0],l=e[c][0],u=e[c][1],d=t._chunks,f=!1;if(!t._indices){var p=0;if(i===1){for(var m=d[r[0]],h=0;h<n;h++){var g=m[h];(g>=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h<n;h++){var g=m[h],b=_[h];(g>=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h<a;h++){var x=t.getRawIndex(h),g=d[r[0]][x];(g>=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;h<a;h++){for(var S=!0,x=t.getRawIndex(h),C=0;C<i;C++){var w=r[C],g=d[w][x];(g<e[w][0]||g>e[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return s<a&&(t._indices=o),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],a=t.length,o=e.count(),s=[],c=e._rawExtent,l=0;l<t.length;l++)c[t[l]]=jl();for(var u=0;u<o;u++){for(var d=e.getRawIndex(u),f=0;f<a;f++)s[f]=r[t[f]][d];s[a]=u;var p=n&&n.apply(null,s);if(p!=null){typeof p!=`object`&&(i[0]=p,p=i);for(var l=0;l<p.length;l++){var m=t[l],h=p[l],g=c[m],_=r[m];_&&(_[d]=h),h<g[0]&&(g[0]=h),h>g[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(xh(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;f<i-1;f+=o){for(var p=Math.min(f+o,i-1),m=Math.min(f+o*2,i),h=(m+p)/2,g=0,_=p;_<m;_++){var v=this.getRawIndex(_),y=r[v];isNaN(y)||(g+=y)}g/=m-p;var b=f,x=Math.min(f+o,i),S=f-1,C=r[s];c=-1,u=b;for(var w=-1,T=0,_=b;_<x;_++){var v=this.getRawIndex(_),y=r[v];if(isNaN(y)){T++,w<0&&(w=v);continue}l=Math.abs((S-h)*(y-C)-(S-_)*(g-C)),l>c&&(c=l,u=v)}T>0&&T<x-b&&(d[a++]=Math.min(w,u),u=Math.max(w,u)),d[a++]=u,s=u}return d[a++]=this.getRawIndex(i-1),n._count=a,n._indices=d,n.getRawIndex=this._getRawIdx,n},e.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),r=n._chunks,i=Math.floor(1/t),a=r[e],o=this.count(),s=new(xh(this._rawCount))(Math.ceil(o/i)*2),c=0,l=0;l<o;l+=i){var u=l,d=a[this.getRawIndex(u)],f=l,p=a[this.getRawIndex(f)],m=i;l+i>o&&(m=o-l);for(var h=0;h<m;h++){var g=a[this.getRawIndex(l+h)];g<d&&(d=g,u=l+h),g>p&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);u<f?(s[c++]=_,s[c++]=v):(s[c++]=v,s[c++]=_)}return n._count=c,n._indices=s,n._updateGetRawIdx(),n},e.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),a=i._chunks,o=[],s=Math.floor(1/t),c=a[e],l=this.count(),u=i._rawExtent[e]=jl(),d=new(xh(this._rawCount))(Math.ceil(l/s)),f=0,p=0;p<l;p+=s){s>l-p&&(s=l-p,o.length=s);for(var m=0;m<s;m++){var h=this.getRawIndex(p+m);o[m]=c[h]}var g=n(o),_=this.getRawIndex(Math.min(p+r(o,g)||0,l-1));c[_]=g,g<u[0]&&(u[0]=g),g>u[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();i<a;i++){var o=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][o],i);break;case 2:t(r[e[0]][o],r[e[1]][o],i);break;default:for(var s=0,c=[];s<n;s++)c[s]=r[e[s]][o];c[s]=i,t.apply(null,c)}}},e.prototype.getDataExtent=function(e,t){var n=this._chunks[e],r=jl();if(!n)return r;var i=this.count();if(!this._indices&&!t)return this._rawExtent[e].slice();var a=this._extent,o=a[e]||(a[e]={}),s=ph(t),c=s.key,l=o[c];if(l)return l.slice();for(var u=r[0],d=r[1],f=0;f<i;f++){var p=n[this.getRawIndex(f)];(!t||mh(s,p))&&(p<u&&(u=p),p>d&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r=new e,i=this._chunks,a=t&>(t,function(e,t){return e[t]=!0,e},{});if(a)for(var o=0;o<i.length;o++)r._chunks[o]=a[o]?Sh(i[o]):i[o];else r._chunks=i;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=ct(this._extent),e._rawExtent=ct(this._rawExtent)},e.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 r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return uh(e[r],this._dimensions[r])}bh={arrayRows:e,objectRows:function(e,t,n,r){return uh(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return uh(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),Th=bl(),Eh={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Dh=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=Ah(this.source))},e.prototype.getSourceDimensionIndex=function(e){return X(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Rm(this.source),n=!jh(e),r=``,i=[],a=0,o=0;a<e;a++){var s=void 0,c=void 0,l=void 0,u=this.dimensions[o];if(u&&u.storeDimIndex===a)s=t?u.name:null,c=u.type,l=u.ordinalMeta,o++;else{var d=this.getSourceDimension(a);d&&(s=t?d.name:null,c=d.type)}i.push({property:s,type:c,ordinalMeta:l}),t&&s!=null&&(!u||!u.isCalculationCoord)&&(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+=`$`,r+=Eh[c]||`f`,l&&(r+=l.uid),r+=`$`}var f=this.source;return{dimensions:i,hash:[f.seriesLayoutBy,f.startIndex,r].join(`$$`)}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var a=this.getSourceDimension(t);a&&(r=a.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function Oh(e){return e instanceof Dh}function kh(e){for(var t=Gt(),n=0;n<(e||[]).length;n++){var r=e[n],i=Y(r)?r.name:r;i!=null&&t.get(i)==null&&t.set(i,n)}return t}function Ah(e){var t=Th(e);return t.dimNameMap||=kh(e.dimensionsDefine)}function jh(e){return e>30}var Mh=Y,Nh=K,Ph=typeof Int32Array>`u`?Array:Int32Array,Fh=`e\0\0`,Ih=-1,Lh=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Rh=[`_approximateExtent`],zh,Bh,Vh,Hh,Uh,Wh,Gh,Kh=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;Oh(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l<n.length;l++){var u=n[l],d=J(u)?new lh({name:u}):u instanceof lh?u:new lh(u),f=d.name;d.type=d.type||`float`,d.coordDim||(d.coordDim=f,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};a.push(f),i[f]=d,c[f]!=null&&(s=!0),d.createInvertedIndices&&(o[f]=[]),r&&(d.storeDimIndex=l),p.itemName===0&&(this._nameDimIdx=d.storeDimIndex),p.itemId===0&&(this._idDimIdx=d.storeDimIndex)}if(this.dimensions=a,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var m=this._dimIdxToName=Gt();G(a,function(e){m.set(i[e].storeDimIndex,e)})}}return e.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 r=this._schema.getSourceDimension(t);if(r)return r.name},e.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},e.prototype._recognizeDimIndex=function(e){if(Tt(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r=this,i;if(e instanceof wh&&(i=e),!i){var a=this.dimensions,o=km(e)||ht(e)?new Gm(e,a.length):e;i=new wh;var s=Nh(a,function(e){return{type:r._dimInfos[e].type,property:e}});i.initData(o,s,n)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=ah(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),r=n.start,i=n.end,a=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var o=r;o<i;o++){var s=o-r;this._nameList[o]=t[s],a&&Gh(this,o)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==`typedArray`&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o<t;o++){var s=n.getItem(o,a);if(!this.hasItemOption&&il(s)&&(this.hasItemOption=!0),s){var c=s.name;r[o]==null&&c!=null&&(r[o]=ml(c,null));var l=s.id;i[o]==null&&l!=null&&(i[o]=ml(l,null))}}if(this._shouldMakeIdFromName())for(var o=e;o<t;o++)Gh(this,o);zh(this)}},e.prototype.getApproximateExtent=function(e,t){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e),t)},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){Mh(e)?W(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=Vh(this,this._nameDimIdx,t)),n??=``,n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return Bh(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e),null)},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return q(e)?r.getValues(Nh(e,function(e){return n._getStoreDimIndex(e)}),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],r=n&&n[t];return r==null||isNaN(r)?Ih:r},e.prototype.each=function(e,t,n){Ct(e)&&(n=t,t=e,e=[]);var r=n||this,i=Nh(Hh(e),this._getStoreDimIndex,this);this._store.each(i,r?xt(t,r):t)},e.prototype.filterSelf=function(e,t,n){Ct(e)&&(n=t,t=e,e=[]);var r=n||this,i=Nh(Hh(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?xt(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={},r=yt(e),i=[];return G(r,function(r){var a=t._getStoreDimIndex(r);n[a]=e[r],i.push(a)}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){Ct(e)&&(n=t,t=e,e=[]),n||=this;var r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,a=Nh(Hh(e),this._getStoreDimIndex,this),o=Wh(this);return o._store=this._store.map(a,i?xt(t,i):t),o},e.prototype.modify=function(e,t,n,r){var i=n||r||this,a=Nh(Hh(e),this._getStoreDimIndex,this);this._store.modify(a,i?xt(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=Wh(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.minmaxDownSample=function(e,t){var n=Wh(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=Wh(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel;return new hm(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new vm(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return Bh(e,t)},function(e){return Bh(t,e)})},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},Mh(e)?W(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e];return(n&&n[t])??this.getVisual(t)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),q(i)?i=i.slice():Mh(i)&&(i=W({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Mh(t)?W(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Mh(e)?W(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?W(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){Xl(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){G(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:Nh(this.dimensions,this._getDimInfo,this),this.hostModel),Uh(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];Ct(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Pt(arguments)))})},e.internalField=function(){zh=function(e){var t=e._invertedIndicesMap;G(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Ph(a.categories.length);for(var s=0;s<n.length;s++)n[s]=Ih;for(var s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},Vh=function(e,t,n){return ml(e._getCategory(t,n),null)},Bh=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Vh(e,e._idDimIdx,t)),n??=Fh+t,n},Hh=function(e){return q(e)||(e=e==null?[]:[e]),e},Wh=function(t){var n=new e(t._schema?t._schema:Nh(t.dimensions,t._getDimInfo,t),t.hostModel);return Uh(n,t),n},Uh=function(e,t){G(Lh.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,G(Rh,function(n){e[n]=ct(t[n])}),e._calculationInfo=W({},t._calculationInfo)},Gh=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,a=e._idDimIdx,o=n[t],s=r[t];if(o==null&&i!=null&&(n[t]=o=Vh(e,i,t)),s==null&&a!=null&&(r[t]=s=Vh(e,a,t)),s==null&&o!=null){var c=e._nameRepeatCount,l=c[o]=(c[o]||0)+1;s=o,l>1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function qh(e,t){km(e)||(e=jm(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Gt(),a=[],o=Jh(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&jh(o),c=r===e.dimensionsDefine,l=c?Ah(e):kh(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=Gt(u),f=new _h(o),p=0;p<f.length;p++)f[p]=-1;function m(e){var t=f[e];if(t<0){var n=r[e],i=Y(n)?n:{name:n},o=new lh,s=i.name;return s!=null&&l.get(s)!=null&&(o.name=o.displayName=s),i.type!=null&&(o.type=i.type),i.displayName!=null&&(o.displayName=i.displayName),f[e]=a.length,o.storeDimIndex=e,a.push(o),o}return a[t]}if(!s)for(var p=0;p<o;p++)m(p);d.each(function(e,t){var n=el(e).slice();if(n.length===1&&!J(n[0])&&n[0]<0){d.set(t,!1);return}var r=d.set(t,[]);G(n,function(e,n){var i=J(e)?l.get(e):e;i!=null&&i<o&&(r[n]=i,g(m(i),t,n))})});var h=0;G(n,function(e){var t,n,r,i;if(J(e))t=e,i={};else{i=e,t=i.name;var a=i.ordinalMeta;i.ordinalMeta=null,i=W({},i),i.ordinalMeta=a,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=d.get(t);if(s!==!1){if(s=el(s),!s.length)for(var l=0;l<(n&&n.length||1);l++){for(;h<o&&m(h).coordDim!=null;)h++;h<o&&s.push(h++)}G(s,function(e,a){var o=m(e);if(c&&i.type!=null&&(o.type=i.type),g(dt(o,i),t,a),o.name==null&&n){var s=n[a];!Y(s)&&(s={name:s}),o.name=o.displayName=s.name,o.defaultTooltip=s.defaultTooltip}r&&dt(o.otherDims,r)})}});function g(e,t,n){Zl.get(t)==null?(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0)):e.otherDims[t]=n}var _=t.generateCoord,v=t.generateCoordCount,y=v!=null;v=_?v||1:0;var b=_||`value`;function x(e){e.name??=e.coordDim}if(s)G(a,function(e){x(e)}),a.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var S=0;S<o;S++){var C=m(S);C.coordDim??(C.coordDim=Yh(b,i,y),C.coordDimIndex=0,(!_||v<=0)&&(C.isExtraCoord=!0),v--),x(C),C.type==null&&(Em(e,S)===ym.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type=`ordinal`)}return Hl(a,function(e){return e.name},function(e,t){t>0&&(e.name+=t-1)}),new Dh({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Jh(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return G(t,function(e){var t;Y(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function Yh(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var Xh={},Zh={},Qh=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Xh,!0),this._normalMasterList=n(Zh,!1);function n(n,r){var i=[];return G(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){G(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){Xh[e]=t;return}Zh[e]=t},e.get=function(e){return Zh[e]||Xh[e]},e}();function $h(e){return!!Xh[e]}function eg(e){tg.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var tg=Gt();function ng(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=tg.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function rg(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!$h(n)&&(i=0))}return{coordSysType:n,kind:i}}function ig(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=rg(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var ag=function(){function e(e){this.coordSysDims=[],this.axisMap=Gt(),this.categoryAxisMap=Gt(),this.coordSysName=e}return e}();function og(e){var t=e.get(`coordinateSystem`),n=new ag(t),r=sg[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var sg={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,wl).models[0],a=e.getReferringComponents(`yAxis`,wl).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),cg(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),cg(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,wl).models[0];t.coordSysDims=[`single`],n.set(`single`,i),cg(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,wl).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),cg(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),cg(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();G(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),cg(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,wl).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function cg(e){return e.get(`type`)===`category`}function lg(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;ug(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(G(a,function(e,t){J(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),G(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;G(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function ug(e){return!Oh(e.schema)}function dg(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function fg(e,t){return dg(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function pg(e,t){var n=e.get(`coordinateSystem`),r=Qh.get(n),i;return t&&t.coordSysDims&&(i=K(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=sh(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function mg(e,t,n){var r,i;return n&&G(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function hg(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=jm(e)):(i=r.getSource(),a=i.sourceFormat===Ql);var o=og(t),s=pg(t,o),c=n.useEncodeDefaulter,l=Ct(c)?c:c?St(Sm,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=qh(i,u),f=mg(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=lg(t,{schema:d,store:p}),h=new Kh(d,t);h.setCalculationInfo(m);var g=f!=null&&gg(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function gg(e){if(e.sourceFormat===`original`)return!q(rl(_g(e.data||[])))}function _g(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var vg=Math.round(Math.random()*10);function yg(e){return[e||``,vg++].join(`_`)}function bg(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=rn(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var a=rn(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}function xg(e,t){e.topologicalTravel=function(e,t,r,i){if(!e.length)return;var a=n(t),o=a.graph,s=a.noEntryList,c={};for(G(e,function(e){c[e]=!0});s.length;){var l=s.pop(),u=o[l],d=!!c[l];d&&(r.call(i,l,u.originalDeps.slice()),delete c[l]),G(u.successor,d?p:f)}G(c,function(){throw Error(``)});function f(e){o[e].entryCount--,o[e].entryCount===0&&s.push(e)}function p(e){c[e]=!0,f(e)}};function n(e){var n={},a=[];return G(e,function(o){var s=r(n,o),c=i(s.originalDeps=t(o),e);s.entryCount=c.length,s.entryCount===0&&a.push(o),G(c,function(e){ft(s.predecessor,e)<0&&s.predecessor.push(e);var t=r(n,e);ft(t.successor,e)<0&&t.successor.push(o)})}),{graph:n,noEntryList:a}}function r(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}function i(e,t){var n=[];return G(e,function(e){ft(t,e)>=0&&n.push(e)}),n}}function Sg(e,t){return lt(lt({},e,!0),t,!0)}var Cg=Math.log(2);function wg(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/Cg);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*wg(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function Tg(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=wg(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*wg(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var Eg=`___zrEVENTSAVED`,Dg=[];function Og(e,t,n,r,i){return Ag(Dg,t,r,i,!0)&&Ag(e,n,Dg[0],Dg[1])}function kg(e,t){e&&n(e),t&&n(t);function n(e){var t=e[Eg];t&&(t.clearMarkers&&t.clearMarkers(),delete e[Eg])}}function Ag(e,t,n,r,i){if(t.getBoundingClientRect&&Qt.domSupported&&!Ng(t)){var a=t[Eg]||(t[Eg]={}),o=Mg(jg(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function jg(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){G(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Mg(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Tg(s,o):Tg(o,s))}function Ng(e){return e.nodeName.toUpperCase()===`CANVAS`}var Pg=/([&<>"'])/g,Fg={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Ig(e){return e==null?``:(e+``).replace(Pg,function(e,t){return Fg[t]})}var Lg={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},Rg={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},zg=`ZH`,Bg=`EN`,Vg=Bg,Hg={},Ug={},Wg=Qt.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Vg).toUpperCase().indexOf(zg)>-1?zg:Vg}():Vg;function Gg(e,t){e=e.toUpperCase(),Ug[e]=new hm(t),Hg[e]=t}function Kg(e){if(J(e)){var t=Hg[e.toUpperCase()]||{};return e===zg||e===Bg?ct(t):lt(ct(t),ct(Hg[Vg]),!1)}return lt(ct(e),ct(Hg[Vg]),!1)}function qg(e){return Ug[e]}function Jg(){return Ug[Vg]}Gg(Bg,Lg),Gg(zg,Rg);var Yg=null;function Xg(){return Yg}function Zg(e,t){var n=Xg(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function Qg(e){var t=e.brk;return t?t.breaks:[]}function $g(e){var t=e.brk;return t?t.hasBreaks():!1}var e_=1e3,t_=e_*60,n_=t_*60,r_=n_*24,i_=r_*365,a_={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})/},o_={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},s_=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,c_=`{yyyy}-{MM}-{dd}`,l_={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:c_,hour:c_+` `+o_.hour,minute:c_+` `+o_.minute,second:c_+` `+o_.second,millisecond:s_},u_=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],d_=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function f_(e){return!J(e)&&!Ct(e)?p_(e):e}function p_(e){e||={};var t={},n=!0;return G(u_,function(t){n&&=e[t]==null}),G(u_,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=u_[s],l=Y(a)&&!q(a)?a[c]:a,u=void 0;q(l)?(u=l.slice(),o=u[0]||``):J(l)?(o=l,u=[o]):(o==null?o=o_[r]:a_[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function m_(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function h_(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function g_(e){return e===h_(e)}function __(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function v_(e,t,n,r){var i=Fc(e),a=i[S_(n)](),o=i[C_(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[w_(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[T_(n)](),d=(u-1)%12+1,f=i[E_(n)](),p=i[D_(n)](),m=i[O_(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof hm?r:qg(r||Wg)||Jg()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,m_(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,m_(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,m_(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,m_(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,m_(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,m_(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,m_(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,m_(m,3)).replace(/{S}/g,m+``)}function y_(e,t,n,r,i){var a=null;if(J(n))a=n;else if(Ct(n)){var o={time:e.time,level:e.time?e.time.level:0},s=Xg();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=b_(e.value,i);a=n[u][u][0]}}return v_(new Date(e.value),a,i,r)}function b_(e,t){var n=Fc(e),r=n[C_(t)]()+1,i=n[w_(t)](),a=n[T_(t)](),o=n[E_(t)](),s=n[D_(t)](),c=n[O_(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function x_(e,t,n){switch(t){case`year`:e[A_(n)](0);case`month`:e[j_(n)](1);case`day`:e[M_(n)](0);case`hour`:e[N_(n)](0);case`minute`:e[P_(n)](0);case`second`:e[F_(n)](0)}return e}function S_(e){return e?`getUTCFullYear`:`getFullYear`}function C_(e){return e?`getUTCMonth`:`getMonth`}function w_(e){return e?`getUTCDate`:`getDate`}function T_(e){return e?`getUTCHours`:`getHours`}function E_(e){return e?`getUTCMinutes`:`getMinutes`}function D_(e){return e?`getUTCSeconds`:`getSeconds`}function O_(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function k_(e){return e?`setUTCFullYear`:`setFullYear`}function A_(e){return e?`setUTCMonth`:`setMonth`}function j_(e){return e?`setUTCDate`:`setDate`}function M_(e){return e?`setUTCHours`:`setHours`}function N_(e){return e?`setUTCMinutes`:`setMinutes`}function P_(e){return e?`setUTCSeconds`:`setSeconds`}function F_(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function I_(e){if(!Bc(e))return J(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function L_(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var R_=Ft;function z_(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&Lt(e)?e:`-`}function a(e){return Wc(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Fc(e):e;if(!isNaN(+c))return v_(c,r,n);if(s)return`-`}if(t===`ordinal`)return wt(e)?i(e):Tt(e)&&a(e)?e+``:`-`;var l=zc(e);return a(l)?I_(l):wt(e)?i(e):typeof e==`boolean`?e+``:`-`}var B_=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],V_=function(e,t){return`{`+e+(t??``)+`}`};function H_(e,t,n){q(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=B_[a];e=e.replace(V_(o),V_(o,0))}for(var s=0;s<r;s++)for(var c=0;c<i.length;c++){var l=t[s][i[c]];e=e.replace(V_(B_[c],s),n?Ig(l):l)}return e}function U_(e,t){var n=J(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var a=n.renderMode||`html`;return r?a===`html`?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:`+Ig(r)+`;`+(t||``)+`"></span>`:`<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:`+Ig(r)+`;`+(t||``)+`"></span>`:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function W_(e,t){return t||=`transparent`,J(e)?e:Y(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function G_(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var K_=G,q_=[`left`,`right`,`top`,`bottom`,`width`,`height`],J_=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function Y_(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var X_=Y_;St(Y_,`vertical`),St(Y_,`horizontal`);function Z_(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function Q_(e,t){var n=nv(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===tv.point)a=n.refPoint,i=ev(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=q(o)?o:[o,o];i=ev(r,n.refContainer),a=n.boxCoordFrom===2?n.refPoint:[bc(s[0],i.width)+i.x,bc(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function $_(e,t){var n=Q_(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);q(a)||(a=[0,a]);var o=bc(r.width,t.getWidth()),s=bc(r.height,t.getHeight()),c=Math.min(o,s),l=bc(a[0],c/2),u=bc(a[1],c/2);return{cx:i[0],cy:i[1],r0:l,r:u,viewRect:r}}function ev(e,t,n){n=R_(n||0);var r=t.width,i=t.height,a=bc(e.left,r),o=bc(e.top,i),s=bc(e.right,r),c=bc(e.bottom,i),l=bc(e.width,r),u=bc(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new fr((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var tv={rect:1,point:2};function nv(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=ng(e),l=c.coord,u=c.from;if(o.dataToLayout){a=tv.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=tv.point,s=u,i=o.dataToPoint(l))}return a??=tv.rect,a===tv.rect&&(r||={x:0,y:0,width:t.getWidth(),height:t.getHeight()},i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function rv(e,t,n,r,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a||=e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(c===`raw`)l=e.type===`group`?new fr(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();l=l.clone(),l.applyTransform(u)}var d=ev(dt({width:l.width,height:l.height},t),n,r),f=o?d.x-l.x:0,p=s?d.y-l.y:0;return c===`raw`?(a.x=f,a.y=p):(a.x+=f,a.y+=p),a===e&&e.markRedraw(),!0}function iv(e){var t=e.layoutMode||e.constructor.layoutMode;return Y(t)?t:t?{type:t}:null}function av(e,t,n){var r=n&&n.ignoreSize;!q(r)&&(r=[r,r]);var i=o(J_[0],0),a=o(J_[1],1);c(J_[0],e,i),c(J_[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(K_(n,function(t){c[t]=e[t]}),K_(n,function(e){Z(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d<n.length;d++){var f=n[d];if(!Z(a,f)&&Z(e,f)){a[f]=e[f];break}}return a}function s(e,t){return e[t]!=null&&e[t]!==`auto`}function c(e,t,n){K_(e,function(e){t[e]=n[e]})}}function ov(e){return sv({},e)}function sv(e,t){return t&&e&&K_(q_,function(n){Z(t,n)&&(e[n]=t[n])}),e}var cv=bl(),lv=function(e){U(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=yg(`ec_cpt_model`),i}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=iv(this),r=n?ov(e):{};lt(e,t.getTheme().get(this.mainType)),lt(e,this.getDefaultOption()),n&&av(e,r,n)},t.prototype.mergeOption=function(e,t){lt(this.option,e,!0);var n=iv(this);n&&av(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!on(e))return e.defaultOption;var t=cv(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var a={},o=n.length-1;o>=0;o--)a=lt(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return Tl(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return Z_(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(hm);ln(lv,hm),mn(lv),bg(lv),xg(lv,uv);function uv(e){var t=[];return G(lv.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=K(t,function(e){return rn(e).main}),e!==`dataset`&&ft(t,`dataset`)<=0&&t.unshift(`dataset`),t}var dv=bl(),fv=bl(),pv=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=el(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return gv(this,dv,r,i,e,t,n)},e.prototype.clearColorPalette=function(){_v(this,dv)},e}();function mv(e,t,n,r){return gv(e,fv,el(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function hv(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}function gv(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:hv(r,o);if(u||=n,!(!u||!u.length)){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function _v(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var vv=/\{@(.+?)\}/g,yv=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&q(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),Ct(i))return s.status=t,s.dimensionIndex=r,i(s);if(J(i))return H_(i,s).replace(vv,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=rh(o,e,i);if(a&&q(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return rh(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function bv(e){var t,n;return Y(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function xv(e){return new Sv(e)}var Sv=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f<p)){var m=this._progress;if(q(m))for(var h=0;h<m.length;h++)this._doProgress(m[h],f,p,s,c);else this._doProgress(m,f,p,s,c)}this._dueIndex=p;var g=this._settedOutputEnd==null?p:this._settedOutputEnd;this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd==null?this._dueEnd:this._settedOutputEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){Cv.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:Cv.next},this.context)},e.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),q(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||=(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),Cv=function(){var e,t,n,r,i,a={reset:function(c,l,u,d){t=c,e=l,n=u,r=d,i=Math.ceil(r/n),a.next=n>1&&r>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var a=t%i*n+Math.ceil(t/i),o=t>=e?null:a<r?a:t;return t++,o}}(),wv=function(){function e(){}return e.prototype.getRawData=function(){throw Error(`not supported`)},e.prototype.getRawDataItem=function(e){throw Error(`not supported`)},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return uh(e,t)},e}();function Tv(e,t){var n=new wv,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex;e.seriesLayoutBy!==`column`&&Xc(``);var o=[],s={},c=e.dimensionsDefine;if(c)G(c,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};o.push(r),n!=null&&(Z(s,n)&&Xc(``),s[n]=r)});else for(var l=0;l<e.dimensionsDetectedCount;l++)o.push({index:l});var u=Ym(i,iu);t.__isBuiltIn&&(n.getRawDataItem=function(e){return u(r,a,o,e)},n.getRawData=xt(Ev,null,e)),n.cloneRawData=xt(Dv,null,e),n.count=xt(Qm(i,iu),null,r,a,o);var d=th(i);n.retrieveValue=function(e,t){return f(u(r,a,o,e),t)};var f=n.retrieveValueFromItem=function(e,t){if(e!=null){var n=o[t];if(n)return d(e,t,n.name)}};return n.getDimensionInfo=xt(Ov,null,o,s),n.cloneAllDimensionInfo=xt(kv,null,o),n}function Ev(e){var t=e.sourceFormat;return Pv(t)||Xc(``),e.data}function Dv(e){var t=e.sourceFormat,n=e.data;if(Pv(t)||Xc(``),t===`arrayRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(n[i].slice());return r}if(t===`objectRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(W({},n[i]));return r}}function Ov(e,t,n){if(n!=null){if(Tt(n)||!isNaN(n)&&!Z(t,n))return e[n];if(Z(t,n))return t[n]}}function kv(e){return ct(e)}var Av=Gt();function jv(e){e=ct(e);var t=e.type,n=``;t||Xc(n);var r=t.split(`:`);r.length!==2&&Xc(n);var i=!1;r[0]===`echarts`&&(t=r[1],i=!0),e.__isBuiltIn=i,Av.set(t,e)}function Mv(e,t,n){var r=el(e),i=r.length;i||Xc(``);for(var a=0,o=i;a<o;a++){var s=r[a];t=Nv(s,t,n,i===1?null:a),a!==o-1&&(t.length=Math.max(t.length,1))}return t}function Nv(e,t,n,r){var i=``;t.length||Xc(i),Y(e)||Xc(i);var a=e.type,o=Av.get(a);o||Xc(i);var s=K(t,function(e){return Tv(e,o)});return K(el(o.transform({upstream:s[0],upstreamList:s,config:ct(e.config)})),function(e,n){var r=``;Y(e)||Xc(r),e.data||Xc(r),Pv(Nm(e.data))||Xc(r);var i,a=t[0];if(a&&n===0&&!e.dimensions){var o=a.startIndex;o&&(e.data=a.data.slice(0,o).concat(e.data)),i={seriesLayoutBy:iu,sourceHeader:o,dimensions:a.metaRawOption.dimensions}}else i={seriesLayoutBy:iu,sourceHeader:0,dimensions:e.dimensions};return Am(e.data,i,null)})}function Pv(e){return e===`arrayRows`||e===`objectRows`}var Fv=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(Iv(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=Dt(o)?nu:Ql,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=X(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=X(u.sourceHeader,d.sourceHeader),m=X(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Am(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Am(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&Lv(``);var i,a=[],o=[];return G(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&Lv(``),a.push(t),o.push(e._getVersionSign())}),n?i=Mv(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Mm(a[0])]),{sourceList:i,upstreamSignList:o}},e.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}},e.prototype.getSource=function(e){e||=0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=0,i=this._storeList,a=i[r];a||=i[r]={};var o=a[n];if(!o){var s=this._getUpstreamSourceManagers()[0];Iv(this._sourceHost)&&s?o=s._innerGetDataStore(e,t,n):(o=new wh,o.initData(new Gm(t,e.length),e)),a[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Iv(e)){var t=wm(e);return t?[t.getSourceManager()]:[]}return K(Tm(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,r;if(Iv(e))t=e.get(`seriesLayoutBy`,!0),n=e.get(`sourceHeader`,!0),r=e.get(`dimensions`,!0);else if(!this._getUpstreamSourceManagers().length){var i=e;t=i.get(`seriesLayoutBy`,!0),n=i.get(`sourceHeader`,!0),r=i.get(`dimensions`,!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:r}},e}();function Iv(e){return e.mainType===`series`}function Lv(e){throw Error(e)}var Q={color:{},darkColor:{},size:{}},Rv=Q.color={theme:[`#5070dd`,`#b6d634`,`#505372`,`#ff994d`,`#0ca8df`,`#ffd10a`,`#fb628b`,`#785db0`,`#3fbe95`],neutral00:`#fff`,neutral05:`#f4f7fd`,neutral10:`#e8ebf0`,neutral15:`#dbdee4`,neutral20:`#cfd2d7`,neutral25:`#c3c5cb`,neutral30:`#b7b9be`,neutral35:`#aaacb2`,neutral40:`#9ea0a5`,neutral45:`#929399`,neutral50:`#86878c`,neutral55:`#797b7f`,neutral60:`#6d6e73`,neutral65:`#616266`,neutral70:`#54555a`,neutral75:`#48494d`,neutral80:`#3c3c41`,neutral85:`#303034`,neutral90:`#232328`,neutral95:`#17171b`,neutral99:`#000`,accent05:`#eff1f9`,accent10:`#e0e4f2`,accent15:`#d0d6ec`,accent20:`#c0c9e6`,accent25:`#b1bbdf`,accent30:`#a1aed9`,accent35:`#91a0d3`,accent40:`#8292cc`,accent45:`#7285c6`,accent50:`#6578ba`,accent55:`#5c6da9`,accent60:`#536298`,accent65:`#4a5787`,accent70:`#404c76`,accent75:`#374165`,accent80:`#2e3654`,accent85:`#252b43`,accent90:`#1b2032`,accent95:`#121521`,transparent:`rgba(0,0,0,0)`,highlight:`rgba(255,231,130,0.8)`};for(var zv in W(Rv,{primary:Rv.neutral80,secondary:Rv.neutral70,tertiary:Rv.neutral60,quaternary:Rv.neutral50,disabled:Rv.neutral20,border:Rv.neutral30,borderTint:Rv.neutral20,borderShade:Rv.neutral40,background:Rv.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:Rv.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:Rv.neutral70,axisLineTint:Rv.neutral40,axisTick:Rv.neutral70,axisTickMinor:Rv.neutral60,axisLabel:Rv.neutral70,axisSplitLine:Rv.neutral15,axisMinorSplitLine:Rv.neutral05}),Rv)if(Rv.hasOwnProperty(zv)){var Bv=Rv[zv];zv===`theme`?Q.darkColor.theme=Rv.theme.slice():zv===`highlight`?Q.darkColor.highlight=`rgba(255,231,130,0.4)`:zv.indexOf(`accent`)===0?Q.darkColor[zv]=fa(Bv,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Q.darkColor[zv]=fa(Bv,null,function(e){return e*.9},function(e){return 1-e**1.5})}Q.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Vv=`line-height:1`;function Hv(e){var t=e.lineHeight;return t==null?Vv:`line-height:`+Ig(t+``)+`px`}function Uv(e,t){var n=e.color||Q.color.tertiary,r=e.fontSize||12,i=e.fontWeight||`400`,a=e.color||Q.color.secondary,o=e.fontSize||14,s=e.fontWeight||`900`;return t===`html`?{nameStyle:`font-size:`+Ig(r+``)+`px;color:`+Ig(n)+`;font-weight:`+Ig(i+``),valueStyle:`font-size:`+Ig(o+``)+`px;color:`+Ig(a)+`;font-weight:`+Ig(s+``)}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var Wv=[0,10,20,30],Gv=[``,`
|
|
9
|
+
`,`
|
|
10
|
+
|
|
11
|
+
`,`
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
`];function Kv(e,t){return t.type=e,t}function qv(e){return e.type===`section`}function Jv(e){return qv(e)?Xv:Zv}function Yv(e){if(qv(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return G(e.blocks,function(e){var n=Yv(e);n>=t&&(t=n+ +(r&&(!n||qv(e)&&!e.noHeader)))}),t}return 0}function Xv(e,t,n,r){var i=t.noHeader,a=$v(Yv(t)),o=[],s=t.blocks||[];It(!s||q(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Z(l,c)){var u=new fh(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}G(s,function(n,i){var s=t.valueFormatter,c=Jv(n)(s?W(W({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):ey(r,o.join(``),i?n:a.html);if(i)return d;var f=z_(t.header,`ordinal`,e.useUTC),p=Uv(r,e.renderMode).nameStyle,m=Hv(r);return e.renderMode===`richText`?ry(e,f,p)+a.richText+d:ey(r,`<div style="`+p+`;`+m+`;">`+Ig(f)+`</div>`+d,n)}function Zv(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=q(e)?e:[e],K(e,function(e,t){return z_(e,q(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Q.color.secondary,i),f=a?``:z_(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=Uv(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:ry(e,f,v))+(o?``:iy(e,m,h,g,y)):ey(r,(s?``:d)+(a?``:ty(f,!s,v))+(o?``:ny(m,h,g,y)),n)}}function Qv(e,t,n,r,i,a){if(e)return Jv(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function $v(e){return{html:Wv[e],richText:Gv[e]}}function ey(e,t,n){var r=`<div style="clear:both"></div>`,i=`margin: `+n+`px 0 0`,a=Hv(e);return`<div style="`+i+`;`+a+`;">`+t+r+`</div>`}function ty(e,t,n){var r=t?`margin-left:2px`:``;return`<span style="`+n+`;`+r+`">`+Ig(e)+`</span>`}function ny(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=q(e)?e:[e],`<span style="`+i+`;`+r+`">`+K(e,function(e){return Ig(e)}).join(` `)+`</span>`}function ry(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function iy(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(q(t)?t.join(` `):t,a)}function ay(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return W_(n)}function oy(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var sy=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Vc()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=U_({color:t,type:e,renderMode:n,markerId:r});return J(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};q(t)?G(t,function(e){return W(n,e)}):W(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function cy(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=q(s),l=ay(t,n),u,d,f,p;if(o>1||c&&!o){var m=ly(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=rh(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=hl(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return Kv(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[Kv(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!Lt(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function ly(e,t,n,r,i){var a=t.getData(),o=gt(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?G(r,function(e){u(rh(a,n,e),e)}):G(e,u);function u(e,t){var n=a.getDimensionInfo(t);!n||n.otherDims.tooltip===!1||(o?l.push(Kv(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var uy=bl();function dy(e,t){return e.getName(t)||e.getId(t)}var fy=function(e){U(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=xv({count:hy,reset:gy}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(uy(this).sourceManager=new Fv(this)).prepareSource();var r=this.getInitialData(e,n);vy(r,this),this.dataTask.context.data=r,uy(this).dataBeforeProcessed=r,py(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=iv(this),r=n?ov(e):{},i=this.subType;lv.hasClass(i)&&(i+=`Series`),lt(e,t.getTheme().get(this.subType)),lt(e,this.getDefaultOption()),tl(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&av(e,r,n)},t.prototype.mergeOption=function(e,t){e=lt(this.option,e,!0),this.fillDataTextStyle(e.data);var n=iv(this);n&&av(this.option,e,n);var r=uy(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);vy(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,uy(this).dataBeforeProcessed=i,py(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Dt(e))for(var t=[`show`],n=0;n<e.length;n++)e[n]&&e[n].label&&tl(e[n],`label`,t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=by(this);if(t){var n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}return uy(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=by(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}uy(this).data=e},t.prototype.getEncode=function(){var e=this.get(`encode`,!0);if(e)return Gt(e)},t.prototype.getSourceManager=function(){return uy(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return uy(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get(`colorBy`)||`series`},t.prototype.isColorBySeries=function(){return this.getColorBy()===`series`},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.indicesOfNearest=function(e,t,n,r){var i=this.getData(),a=this.coordinateSystem,o=a&&a.getAxis(e);if(!a||!o)return[];var s=o.dataToCoord(n);r??=1/0;for(var c=[],l=1/0,u=-1,d=0,f=i.getDimensionIndex(t),p=i.getStore(),m=0,h=p.count();m<h;m++){var g=p.get(f,m),_=s-o.dataToCoord(g),v=Math.abs(_);v<=r&&((v<l||v===l&&_>=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return cy({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Qt.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=pv.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a<e.length;a++){var o=e[a],s=dy(i,o);n[s]=!1,this._selectedDataIndicesMap[s]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap===`all`)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=yt(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[dy(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(!(!a||!o)){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){Y(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c<o;c++){var l=t[c],u=dy(e,l);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(l)}}else if(a===`single`||a===!0){var d=t[o-1],u=dy(e,d);i.selectedMap=(n={},n[u]=!0,n),this._selectedDataIndicesMap=(r={},r[u]=e.getRawIndex(d),r)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return lv.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(lv);mt(fy,yv),mt(fy,pv),ln(fy,lv);function py(e){var t=e.name;hl(e)||(e.name=my(e)||t)}function my(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return G(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function hy(e){return e.model.getRawData().count()}function gy(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),_y}function _y(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function vy(e,t){G(Kt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,St(yy,t))})}function yy(e,t){var n=by(e);return n&&n.setOutputEnd((t||this).count()),t}function by(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var xy=Es.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),Sy={line:gf,rect:Bs,roundRect:Bs,square:Bs,circle:zd,diamond:Es.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:Es.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:Es.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:xy},Cy={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},wy={};G(Sy,function(e,t){wy[t]=new e});var Ty=Es.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=Lr(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=wy[r];i||=(r=`rect`,wy[r]),Cy[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Ey(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Q.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function Dy(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?ip(e.slice(8),new fr(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?rp(e.slice(7),{},new fr(t,n,r,i),o?`center`:`cover`):new Ty({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Ey,a&&c.setColor(a),c}function Oy(e){return q(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function ky(e,t){if(e!=null)return q(e)||(e=[e,e]),[bc(e[0],t[0])||0,bc(X(e[1],e[0]),t[1])||0]}var Ay=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return hg(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Ld,n=Dy(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=Dy(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Q.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(fy);function jy(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=rh(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o<n.length;o++)a.push(rh(e,t,n[o]));return a.join(` `)}}function My(e,t){var n=e.mapDimensionsAll(`defaultedLabel`);if(!q(t))return t+``;for(var r=[],i=0;i<n.length;i++){var a=e.getDimensionIndex(n[i]);a>=0&&r.push(t[a])}return r.join(` `)}var Ny=function(e){U(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=Dy(e,-1,-1,2,2,null,a);o.attr({z2:X(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Py,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){zu(this.childAt(0))},t.prototype.downplay=function(){Bu(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):Vf(f,p,o,n),qf(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Hf(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Kp(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=ky(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof Ms){var S=a.style;a.useStyle(W({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(W({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Gp(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):jy(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),id(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=Yl(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Wf(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Wf(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Oy(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Ld);function Py(e,t){this.parent.drift(e,t)}function Fy(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function Iy(e){return e!=null&&!Y(e)&&(e={isIgnore:e}),e||{}}function Ly(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Kp(t),cursorStyle:t.get(`cursor`)}}function Ry(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var zy=function(){function e(e){this.group=new Ld,this._SymbolCtor=e||Ny}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Iy(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=Ly(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);Fy(e,i,r,t)&&Ry(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!Fy(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):Vf(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i<a;i++){var o=t.getItemGraphicEl(i),s=n._getSymbolPoint(i);Fy(t,s,i,e)?(o||=Ry(n._SymbolCtor,t,i,n._seriesScope,{disableAnimation:!0},s,n.group),o.stopAnimation(),o.setPosition(s),o.markRedraw()):o&&(n.group.remove(o),t.setItemGraphicEl(i,null))}},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Ly(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n,r){this._progressiveEls=[],r=Iy(r);function i(e){e.isGroup||(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var a=e.start;a<e.end;a++){var o=t.getItemLayout(a);if(Fy(t,o,a,r)){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)}}},e.prototype.eachRendered=function(e){kp(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(e){e.fadeOut(function(){t.remove(e)},n.hostModel)}):t.removeAll()},e}();function By(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=Vy(i,n),o=r.dim,s=i.dim,c=t.mapDimension(s),l=t.mapDimension(o),u=+(s===`x`||s===`radius`),d=K(e.dimensions,function(e){return t.mapDimension(e)}),f=!1,p=t.getCalculationInfo(`stackResultDimension`);return dg(t,d[0])&&(f=!0,d[0]=p),dg(t,d[1])&&(f=!0,d[1]=p),{dataDimsForPoint:d,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:c,baseDim:l,baseDataOffset:u,stackedOverDimension:t.getCalculationInfo(`stackedOverDimension`)}}function Vy(e,t){var n=0,r=e.scale.getExtent();return t===`start`?n=r[0]:t===`end`?n=r[1]:Tt(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function Hy(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function Uy(e,t){return!isFinite(e)||!isFinite(t)}var Wy=typeof Float32Array<`u`?Float32Array:void 0,Gy=typeof Float64Array<`u`?Float64Array:void 0;function Ky(e){return qy({ctor:Wy},e).arr}function qy(e,t){var n=e.arr,r=e.ctor;if(t>jc&&(t=jc),!n||e.typed&&n.length<t){var i=void 0;if(r)try{i=new r(t),e.typed=!0,n&&i.set(n)}catch{}if(!i&&(i=[],e.typed=!1,n))for(var a=0,o=n.length;a<o;a++)i[a]=n[a];e.arr=i}return e}function Jy(e,t){var n=[];return t.diff(e).add(function(e){n.push({cmd:`+`,idx:e})}).update(function(e,t){n.push({cmd:`=`,idx:t,idx1:e})}).remove(function(e){n.push({cmd:`-`,idx:e})}).execute(),n}function Yy(e,t,n,r,i,a,o,s){for(var c=Jy(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=By(i,t,o),_=e.getLayout(`points`)||[],v=t.getLayout(`points`)||[],y=0;y<c.length;y++){var b=c[y],x=!0,S=void 0,C=void 0;switch(b.cmd){case`=`:S=b.idx*2,C=b.idx1*2;var w=_[S],T=_[S+1],E=v[C],D=v[C+1];(isNaN(w)||isNaN(T))&&(w=E,T=D),l.push(w,T),u.push(E,D),d.push(n[S],n[S+1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(b.idx1));break;case`+`:var O=b.idx,k=g.dataDimsForPoint,A=i.dataToPoint([t.get(k[0],O),t.get(k[1],O)]);C=O*2,l.push(A[0],A[1]),u.push(v[C],v[C+1]);var j=Hy(g,i,t,O);d.push(j[0],j[1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(O));break;case`-`:x=!1}x&&(p.push(b),m.push(m.length))}m.sort(function(e,t){return h[e]-h[t]});for(var M=l.length,N=Ky(M),P=Ky(M),F=Ky(M),I=Ky(M),ee=[],y=0;y<m.length;y++){var te=m[y],L=y*2,ne=te*2;N[L]=l[ne],N[L+1]=l[ne+1],P[L]=u[ne],P[L+1]=u[ne+1],F[L]=d[ne],F[L+1]=d[ne+1],I[L]=f[ne],I[L+1]=f[ne+1],ee[y]=p[te]}return{current:N,next:P,stackedOnCurrent:F,stackedOnNext:I,status:ee}}var Xy=Math.min,Zy=Math.max;function Qy(e,t,n,r,i,a,o,s,c){for(var l,u,d,f,p,m,h=n,g=0;g<r;g++){var _=t[h*2],v=t[h*2+1];if(h>=i||h<0)break;if(Uy(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g<r;)g++,x+=a,h+=a,S=t[x*2],C=t[x*2+1],_=t[h*2],v=t[h*2+1],y=_-l,b=v-u;var w=g+1;if(c)for(;Uy(S,C)&&w<r;)w++,x+=a,S=t[x*2],C=t[x*2+1];var T=.5,E=0,D=0,O=void 0,k=void 0;if(w>=r||Uy(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,N=C-v,P=void 0,F=void 0;if(s===`x`){P=Math.abs(A),F=Math.abs(j);var I=E>0?1:-1;p=_-I*P*o,m=v,O=_+I*F*o,k=v}else if(s===`y`){P=Math.abs(M),F=Math.abs(N);var ee=D>0?1:-1;p=_,m=v-ee*P*o,O=_,k=v+ee*F*o}else P=Math.sqrt(A*A+M*M),F=Math.sqrt(j*j+N*N),T=F/(F+P),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=Xy(O,Zy(S,_)),k=Xy(k,Zy(C,v)),O=Zy(O,Xy(S,_)),k=Zy(k,Xy(C,v)),E=O-_,D=k-v,p=_-E*P/F,m=v-D*P/F,p=Xy(p,Zy(l,_)),m=Xy(m,Zy(u,v)),p=Zy(p,Xy(l,_)),m=Zy(m,Xy(u,v)),E=_-p,D=v-m,O=_+E*F/P,k=v+D*F/P}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var $y=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),eb=function(e){U(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new $y},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&Uy(n[i*2-2],n[i*2-1]);i--);for(;r<i&&Uy(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=Qy(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path.data,r=ts.CMD,i,a,o=t===`x`,s=[],c=0;c<n.length;){var l=n[c++],u=void 0,d=void 0,f=void 0,p=void 0,m=void 0,h=void 0,g=void 0;switch(l){case r.M:i=n[c++],a=n[c++];break;case r.L:if(u=n[c++],d=n[c++],g=o?(e-i)/(u-i):(e-a)/(d-a),g<=1&&g>=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?Mi(i,u,f,m,e,s):Mi(a,d,p,h,e,s);if(v>0)for(var y=0;y<v;y++){var b=s[y];if(b<=1&&b>=0){var _=o?Ai(a,d,p,h,b):Ai(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(Es),tb=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}($y),nb=function(e){U(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new tb},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&Uy(n[a*2-2],n[a*2-1]);a--);for(;i<a&&Uy(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=Qy(e,n,i,a,a,1,t.smooth,o,t.connectNulls);Qy(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(Es);function rb(){var e=bl();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==o||a!==s)&&`reset`}}var ib=bl(),ab=rb(),ob=function(){function e(){this.group=new Ld,this.uid=yg(`viewChart`),this.renderTask=xv({plan:lb,reset:ub}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&cb(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&cb(i,r,`normal`)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){kp(this.group,e)},e.markUpdateMethod=function(e,t){ib(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function sb(e,t,n){e&&ud(e)&&(t===`emphasis`?zu:Bu)(e,n)}function cb(e,t,n){var r=yl(e,t),i=t&&t.highlightKey!=null?dd(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){sb(e,n,i)}):G(el(r),function(t){sb(e.getItemGraphicEl(t),n,i)})}sn(ob,[`dispose`]),mn(ob);function lb(e){return ab(e.model)}function ub(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&ib(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),db[c]}var db={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};function fb(e,t,n,r,i){var a=e.getArea(),o=a.x,s=a.y,c=a.width,l=a.height,u=n.get([`lineStyle`,`width`])||0;o-=u/2,s-=u/2,c+=u,l+=u,c=Math.ceil(c),o!==Math.floor(o)&&(o=Math.floor(o),c++);var d=new Bs({shape:{x:o,y:s,width:c,height:l}});if(t){var f=e.getBaseAxis(),p=f.isHorizontal(),m=f.inverse;p?(m&&(d.shape.x+=c),d.shape.width=0):(m||(d.shape.y+=l),d.shape.height=0);var h=Ct(i)?function(e){i(e,d)}:null;Hf(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function pb(e,t,n){var r=e.getArea(),i=wc(r.r0,1),a=wc(r.r,1),o=new af({shape:{cx:wc(e.cx,1),cy:wc(e.cy,1),r0:i,r:a,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return t&&(e.getBaseAxis().dim===`angle`?o.shape.endAngle=r.startAngle:o.shape.r=i,Hf(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function mb(e,t,n,r,i){return e?e.type===`polar`?pb(e,t,n):e.type===`cartesian2d`?fb(e,t,n,r,i):null:null}function hb(e){var t=e.coordinateSystem;if(e.get(`clip`,!0)&&t&&(!t.shouldClip||t.shouldClip()))return t.getArea&&t.getArea(.1)}function gb(e,t){return e.type===t}function _b(e,t,n,r){return e&&(e.legacy||e.legacy!==!1&&!n&&!r&&t!==`tspan`&&(t===`text`||Z(e,`text`)))}function vb(e,t,n){var r=e,i,a,o;if(t===`text`)o=r;else{o={},Z(r,`text`)&&(o.text=r.text),Z(r,`rich`)&&(o.rich=r.rich),Z(r,`textFill`)&&(o.fill=r.textFill),Z(r,`textStroke`)&&(o.stroke=r.textStroke),Z(r,`fontFamily`)&&(o.fontFamily=r.fontFamily),Z(r,`fontSize`)&&(o.fontSize=r.fontSize),Z(r,`fontStyle`)&&(o.fontStyle=r.fontStyle),Z(r,`fontWeight`)&&(o.fontWeight=r.fontWeight),a={type:`text`,style:o,silent:!0},i={};var s=Z(r,`textPosition`);n?i.position=s?r.textPosition:`inside`:s&&(i.position=r.textPosition),Z(r,`textPosition`)&&(i.position=r.textPosition),Z(r,`textOffset`)&&(i.offset=r.textOffset),Z(r,`textRotation`)&&(i.rotation=r.textRotation),Z(r,`textDistance`)&&(i.distance=r.textDistance)}return yb(o,e),G(o.rich,function(e){yb(e,e)}),{textConfig:i,textContent:a}}function yb(e,t){t&&(t.font=t.textFont||t.font,Z(t,`textStrokeWidth`)&&(e.lineWidth=t.textStrokeWidth),Z(t,`textAlign`)&&(e.align=t.textAlign),Z(t,`textVerticalAlign`)&&(e.verticalAlign=t.textVerticalAlign),Z(t,`textLineHeight`)&&(e.lineHeight=t.textLineHeight),Z(t,`textWidth`)&&(e.width=t.textWidth),Z(t,`textHeight`)&&(e.height=t.textHeight),Z(t,`textBackgroundColor`)&&(e.backgroundColor=t.textBackgroundColor),Z(t,`textPadding`)&&(e.padding=t.textPadding),Z(t,`textBorderColor`)&&(e.borderColor=t.textBorderColor),Z(t,`textBorderWidth`)&&(e.borderWidth=t.textBorderWidth),Z(t,`textBorderRadius`)&&(e.borderRadius=t.textBorderRadius),Z(t,`textBoxShadowColor`)&&(e.shadowColor=t.textBoxShadowColor),Z(t,`textBoxShadowBlur`)&&(e.shadowBlur=t.textBoxShadowBlur),Z(t,`textBoxShadowOffsetX`)&&(e.shadowOffsetX=t.textBoxShadowOffsetX),Z(t,`textBoxShadowOffsetY`)&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function bb(e,t,n){var r=e;r.textPosition=r.textPosition||n.position||`inside`,n.offset!=null&&(r.textOffset=n.offset),n.rotation!=null&&(r.textRotation=n.rotation),n.distance!=null&&(r.textDistance=n.distance);var i=r.textPosition.indexOf(`inside`)>=0,a=e.fill||Q.color.neutral99;xb(r,t);var o=r.textFill==null;return i?o&&(r.textFill=n.insideFill||Q.color.neutral00,!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=a),r.textStrokeWidth??=2):(o&&(r.textFill=e.fill||n.outsideFill||Q.color.neutral00),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,G(t.rich,function(e){xb(e,e)}),r}function xb(e,t){t&&(Z(t,`fill`)&&(e.textFill=t.fill),Z(t,`stroke`)&&(e.textStroke=t.fill),Z(t,`lineWidth`)&&(e.textStrokeWidth=t.lineWidth),Z(t,`font`)&&(e.font=t.font),Z(t,`fontStyle`)&&(e.fontStyle=t.fontStyle),Z(t,`fontWeight`)&&(e.fontWeight=t.fontWeight),Z(t,`fontSize`)&&(e.fontSize=t.fontSize),Z(t,`fontFamily`)&&(e.fontFamily=t.fontFamily),Z(t,`align`)&&(e.textAlign=t.align),Z(t,`verticalAlign`)&&(e.textVerticalAlign=t.verticalAlign),Z(t,`lineHeight`)&&(e.textLineHeight=t.lineHeight),Z(t,`width`)&&(e.textWidth=t.width),Z(t,`height`)&&(e.textHeight=t.height),Z(t,`backgroundColor`)&&(e.textBackgroundColor=t.backgroundColor),Z(t,`padding`)&&(e.textPadding=t.padding),Z(t,`borderColor`)&&(e.textBorderColor=t.borderColor),Z(t,`borderWidth`)&&(e.textBorderWidth=t.borderWidth),Z(t,`borderRadius`)&&(e.textBorderRadius=t.borderRadius),Z(t,`shadowColor`)&&(e.textBoxShadowColor=t.shadowColor),Z(t,`shadowBlur`)&&(e.textBoxShadowBlur=t.shadowBlur),Z(t,`shadowOffsetX`)&&(e.textBoxShadowOffsetX=t.shadowOffsetX),Z(t,`shadowOffsetY`)&&(e.textBoxShadowOffsetY=t.shadowOffsetY),Z(t,`textShadowColor`)&&(e.textShadowColor=t.textShadowColor),Z(t,`textShadowBlur`)&&(e.textShadowBlur=t.textShadowBlur),Z(t,`textShadowOffsetX`)&&(e.textShadowOffsetX=t.textShadowOffsetX),Z(t,`textShadowOffsetY`)&&(e.textShadowOffsetY=t.textShadowOffsetY))}var Sb=function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();mn(Sb);var Cb=0,wb=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Cb,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&K(r,Tb);return new e({categories:i,needCollect:!i,deduplication:n.dedplication!==!1})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!J(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 r=this._getOrCreateMap();return t=r.get(e),t??(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||=Gt(this.categories)},e}();function Tb(e){return Y(e)&&e.value!=null?e.value:e+``}var Eb=yt({needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1});function Db(e,t,n){var r;e||={};var i=Xg();if(i){var a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(G(Eb,function(t){a[t]&&(e[t]=xt(a[t],a))}),r=a)}return r??Pb(e,n),{brk:r,mapper:e}}function Ob(e,t){G(Eb,function(n){e[n]=t[n]})}function kb(e,t){e.freeze=Yt}function Ab(e){return e.getExtentUnsafe(0,2)}function jb(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function Mb(e){var t=jb(e,3);return t[1]-t[0]}function Nb(e){var t=e.getExtentUnsafe(0,3);return t[1]-t[0]}function Pb(e,t){var n=e||{},r=[];return n._extents=r,r[0]=t?t.slice():jl(),W(n,Fb),n}var Fb={needTransform:function(){return!1},normalize:function(e){var t=this._extents[1]||this._extents[0];return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},scale:function(e){var t=this._extents[1]||this._extents[0];return e*(t[1]-t[0])+t[0]},transformIn:function(e){return e},transformOut:function(e){return e},contain:function(e){var t=jb(this,null);return e>=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){Ib(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),Ib(r,e,t,n)},freeze:function(){}};function Ib(e,t,n,r){Ll(n,r)&&(e[t][0]=n,e[t][1]=r)}function Lb(e){return Rb(e)||Bb(e)}function Rb(e){return e.type===`interval`}function zb(e){return e.type===`time`}function Bb(e){return e.type===`log`}function Vb(e){return e.type===`ordinal`}function Hb(e){var t=Lc(e),n=mc(10,t),r=dc(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,wc(r*n,-t)}function Ub(e){return Ec(e)+2}function Wb(e,t){return hc(e)/hc(t)}function Gb(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i<r.from.length;i++)if(e===r.from[i])return r.to[i]}return mc(t,e)}function Kb(e,t,n){var r=e.slice();if(r[0]===r[1]){var i=n&&n.ctnShp;if(r[0]!==0){var a=uc(r[0]);t[1]||(r[1]+=a/2),r[0]-=a/2}else i&&(r[0]=-1),r[1]=1}return(!Il(r[0])||!Il(r[1]))&&(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function qb(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function Jb(e,t){return e||=t,dc(lc(e,1))}function Yb(e,t,n){var r=Ab(e),i=r[0],a=e.count(),o=Math.max((t||0)+1,1);i!==0&&o>1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var Xb=function(e){U(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,Ob(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new wb({}),q(i)&&(i=new wb({categories:K(i,function(e){return Y(e)?e.value:e})})),r._ordinalMeta=i;var a=Db(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,kb(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:J(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=dc(e),e},t.prototype.getTicks=function(){var e=[];return Yb(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=cc(a,t.length);i<o;++i){var s=n[i]=t[i];r[s]=i}for(var c=0;i<a;++i){for(;r[c]!=null;)c++;n[i]=c,r[c]=i}},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return n==null?``:n+``}},t.prototype.count=function(){var e=Ab(this._mapper);return e[1]-e[0]+1},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.type=`ordinal`,t.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(e){return this._mapper.contain(this._getTickNumber(e))&&e>=0&&e<this._ordinalMeta.categories.length},normalize:function(e){return this._mapper.normalize(this._getTickNumber(e))},scale:function(e){return this.getRawOrdinalNumber(dc(this._mapper.scale(e)))},transformIn:function(e,t){return this._mapper.transformIn(this._getTickNumber(e),t)},transformOut:function(e,t){return this.getRawOrdinalNumber(this._mapper.transformOut(e,t))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(e,t){return this._mapper.getExtentUnsafe(e,t)},setExtent:function(e,t){return this._mapper.setExtent(e,t)},setExtent2:function(e,t,n){return this._mapper.setExtent2(e,t,n)}},t}(Sb);Sb.registerClass(Xb);function Zb(e,t,n,r){for(var i=e.getTicks({expandToNicedExtent:!0}),a=[],o=e.getExtent(),s=1;s<i.length;s++){var c=i[s],l=i[s-1];if(!(l.break||c.break)){for(var u=0,d=[],f=(c.value-l.value)/t,p=Ub(f);u<t-1;){var m=wc(l.value+(u+1)*f,p);m>o[0]&&m<o[1]&&d.push(m),u++}var h=Xg();h&&h.pruneTicksByBreak(`auto`,d,n,function(e){return e},r,o),a.push(d)}}return a}var Qb=function(e){U(t,e);function t(n){var r=e.call(this)||this;return r.type=`interval`,r.parse=t.parse,n||={},r.brk=Db(r,Zg(r,n),null).brk,r._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},r}return t.parse=function(e){return e==null||e===``?NaN:Number(e)},t.prototype.getConfig=function(){return ct(this._cfg)},t.prototype.setConfig=function(e){var t=Ab(this);this._cfg=e=ct(e),e.niceExtent??(e.niceExtent=t.slice()),e.intervalPrecision??(e.intervalPrecision=Ub(e.interval))},t.prototype.getTicks=function(e){e||={};var t=this._cfg,n=t.interval,r=Ab(this),i=t.niceExtent,a=t.intervalPrecision,o=Xg(),s=this.brk,c=o&&s,l=[];if(!n)return l;if(e.breakTicks===`only_break`&&c)return o.addBreaksToTicks(l,s.breaks,r),l;var u=3e3;r[0]<i[0]&&l.push({value:e.expandToNicedExtent?wc(i[0]-n,a):r[0]});for(var d=function(e,t){return dc((t-e)/n)},f=t.intervalCount,p=i[0],m=0;;m++){if(f==null){if(p>i[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=cc(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=wc(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=wc(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?wc(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return Zb(this,e,Qg(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=Ec(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),I_(wc(e.value,n,!0))},t.type=`interval`,t}(Sb);Sb.registerClass(Qb);var $b=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},ex=function(e){U(t,e);function t(n){var r=e.call(this)||this;return r.type=`time`,r.parse=t.parse,r._locale=n.locale,r._useUTC=n.useUTC,r._interval=0,r.brk=Db(r,Zg(r,n),null).brk,r}return t.prototype.getLabel=function(e){return v_(e.value,l_[__(h_(this._minLevelUnit))]||l_.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,t,n){return y_(e,t,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=Ab(this),r=Xg(),i=this.brk,a=r&&i,o=[];if(!t)return o;var s=this._useUTC;if(a&&e.breakTicks===`only_break`)return Xg().addBreaksToTicks(o,i.breaks,n),o;o=ux(this._minLevelUnit,this._approxInterval,s,n,Nb(this),i);var c=u_.length-1,l=0;return G(o,function(e){e.time&&(c=Math.min(c,ft(u_,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a&&Xg().pruneTicksByBreak(e.pruneByBreak,o,i.breaks,function(e){return e.value},this._approxInterval,n),a&&e.breakTicks!==`none`&&Xg().addBreaksToTicks(o,i.breaks,n,function(e){for(var t=Math.max(ft(u_,b_(e.vmin,s)),ft(u_,b_(e.vmax,s))),n=0,r=0;r<u_.length;r++)if(!nx(u_[r],e.vmin,e.vmax,s)){n=r;break}var i=Math.min(n,c);return{level:l,lowerTimeUnit:u_[Math.max(i,t)],upperTimeUnit:u_[i]}}),o},t.prototype.getMinorTicks=function(e){return Zb(this,e,Qg(this),this._interval)},t.prototype.setTimeInterval=function(e){this._interval=e.interval,this._approxInterval=e.approxInterval,this._minLevelUnit=e.minLevelUnit},t.parse=function(e){return Tt(e)?Math.round(e):+Fc(e)},t.type=`time`,t}(Sb),tx=[[`second`,e_],[`minute`,t_],[`hour`,n_],[`quarter-day`,n_*6],[`half-day`,n_*12],[`day`,r_*1.2],[`half-week`,r_*3.5],[`week`,r_*7],[`month`,r_*31],[`quarter`,r_*95],[`half-year`,i_/2],[`year`,i_]];function nx(e,t,n,r){return x_(new Date(t),e,r).getTime()===x_(new Date(n),e,r).getTime()}function rx(e,t){return e/=r_,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function ix(e){var t=30*r_;return e/=t,e>6?6:e>3?3:e>2?2:1}function ax(e){return e/=n_,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function ox(e,t){return e/=t?t_:e_,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function sx(e){return lc(Rc(e,!0),1)}function cx(e,t,n){var r=Math.max(0,ft(u_,t)-1);return x_(new Date(e),u_[r],n).getTime()}function lx(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function ux(e,t,n,r,i,a){var o=d_,s=0;function c(e,t,n,i,o,c,l){for(var u=lx(o,e),d=t,f=new Date(d);d<n&&d<=r[1]&&(l.push({value:d}),!(s++>3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!nx(h_(e),r[0],r[1],n)){s&&(i=[{value:cx(r[0],e,n)},{value:r[1]}]);for(var l=0;l<i.length-1;l++){var u=i[l].value,d=i[l+1].value;if(u!==d){var f=void 0,p=void 0,m=void 0,h=!1;switch(e){case`year`:f=Math.max(1,Math.round(t/r_/365)),p=S_(n),m=k_(n);break;case`half-year`:case`quarter`:case`month`:f=ix(t),p=C_(n),m=A_(n);break;case`week`:case`half-week`:case`day`:f=rx(t,31),p=w_(n),m=j_(n),h=!0;break;case`half-day`:case`quarter-day`:case`hour`:f=ax(t),p=T_(n),m=M_(n);break;case`minute`:f=ox(t,!0),p=E_(n),m=N_(n);break;case`second`:f=ox(t,!1),p=D_(n),m=P_(n);break;case`millisecond`:f=sx(t),p=O_(n),m=F_(n)}d>=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l<o.length;l++)a.push(o[l])}}for(var u=[],d=[],f=0,p=0,m=0;m<o.length;++m){var h=h_(o[m]);if(g_(o[m])&&(l(o[m],u[u.length-1]||[],d),h!==(o[m+1]?h_(o[m+1]):null))){if(d.length){p=f,d.sort(function(e,t){return e.value-t.value});for(var g=[],_=0;_<d.length;++_){var v=d[_].value;(_===0||d[_-1].value!==v)&&(g.push(d[_]),v>=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=_t(K(u,function(e){return _t(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;m<b.length;++m)for(var C=b[m],w=0;w<C.length;++w){var T=b_(C[w].value,n);S.push({value:C[w].value,time:{level:x-m,upperTimeUnit:T,lowerTimeUnit:T}})}Hl(S,Ul,null),S.sort(function(e,t){return e.value-t.value});var E=S[0],D=S[S.length-1],O=b_(r[0],n),k=b_(r[1],n);return(!E||E.value>r[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.value<r[1])&&S.push({value:r[1],time:{level:0,upperTimeUnit:k,lowerTimeUnit:k},notNice:!0}),S}var dx=function(e,t){var n=e.getExtent();if(n[0]===n[1]&&(n[0]-=r_,n[1]+=r_),n[1]===-1/0&&n[0]===1/0){var r=new Date;n[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),n[0]=n[1]-r_}e.setExtent(n[0],n[1]);var i=Jb(t.splitNumber,10),a=Nb(e)/i,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var c=tx.length,l=Math.min($b(tx,a,0,c),c-1),u=tx[l][1],d=tx[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};Sb.registerClass(ex);var fx=0,px=1,mx=2,hx=function(e){U(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=Qb.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[fx]=i[px]=a[fx]=a[px]=NaN,Ob(r,t.mapperMethods);var s=Xg(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},mx,l),r.powStub=new Qb({breakParsed:l.original}),r.intervalStub=new Qb({breakParsed:l.transformed}),kb(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Xg(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return K(i.getTicks(e||{}),function(e){var i=e.value,o=Gb(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,Qg(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return Zb(this,e,Qg(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(Wb(e,this.base))},scale:function(e){return Gb(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=Wb(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return gx.depth=n,_x.lookup=this._lookup,Gb(n===2?e:this.intervalStub.transformOut(e,gx),this.base,_x)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Ll(t,n)||t<=0||n<=0)){var r=vx,i=vx;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[fx]=t,r[px]=n);var o=this.base;this.intervalStub.setExtent2(e,i[fx]=Wb(t,o),i[px]=Wb(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Ll(t[0],t[1])&&Wc(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(Sb);Sb.registerClass(hx);var gx={},_x={},vx=[],yx={value:1,category:1,time:1,log:1},bx=bl();function xx(e){var t=e.get(`type`);return(t==null||!Z(yx,t)&&!Sb.getClass(t))&&(t=`value`),t}function Sx(e,t,n){var r=Xg(),i;switch(r&&(i=Px(e,t,n)),t){case`category`:return new Xb({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:jl()});case`time`:return new ex({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new hx({logBase:e.get(`logBase`),breakOption:i});case`value`:return new Qb({breakOption:i});default:return new((Sb.getClass(t))||Qb)({})}}function Cx(e,t,n){var r=n?jb(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Ll(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}function Tx(e){bx(e).noOnMyZero=!0}function Ex(e){return bx(e).noOnMyZero}function Dx(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=f_(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(J(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(Ct(t)){if(e.type===`category`)return function(n,r){return t(Ox(e,n),n.value-e.scale.getExtent()[0],null)};var r=Xg();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Ox(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function Ox(e,t){var n=e.scale;return Vb(n)?n.getLabel(t):t.value}function kx(e){return e.get(`interval`)??`auto`}function Ax(e){return e.type===`category`&&kx(e.getLabelModel())===0}function jx(e,t){var n={};return G(e.mapDimensionsAll(t),function(t){n[fg(e,t)]=!0}),yt(n)}function Mx(e){return e===`middle`||e===`center`}function Nx(e){return e.getShallow(`show`)}function Px(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Xg()||!n||!Fx(t)?void 0:r}function Fx(e){return e!==`category`}function Ix(e,t,n,r,i,a){var o=Bb(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=qb(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Lx(e,t){return Vb(e)?e.getRawOrdinalNumber(t.value):t.value}function Rx(e,t){return Vb(e)&&!!t.get(`boundaryGap`)}function zx(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function Bx(e){for(var t=jl(),n=jl(),r=0;r<e.length;){var i=e[r++],a=e[r++];Uy(i,a)||(Ml(t,i),Ml(n,a))}return[t,n]}function Vx(e,t){var n=Bx(e),r=n[0],i=n[1],a=Bx(t),o=a[0],s=a[1];return Math.max(Math.abs(r[0]-o[0]),Math.abs(i[0]-s[0]),Math.abs(r[1]-o[1]),Math.abs(i[1]-s[1]))}function Hx(e){return Tt(e)?e:e?.5:0}function Ux(e,t,n){if(n.valueDim==null)return[];for(var r=t.count(),i=Ky(r*2),a=0;a<r;a++){var o=Hy(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Wx(e,t,n,r,i){var a=n.getBaseAxis(),o=a.dim===`x`||a.dim===`radius`?0:1,s=[],c=0,l=[],u=[],d=[],f=[];if(i){for(c=0;c<e.length;c+=2){var p=t||e;Uy(p[c],p[c+1])||f.push(e[c],e[c+1])}e=f}for(c=0;c<e.length-2;c+=2)switch(d[0]=e[c+2],d[1]=e[c+3],u[0]=e[c],u[1]=e[c+1],s.push(u[0],u[1]),r){case`end`:l[o]=d[o],l[1-o]=u[1-o],s.push(l[0],l[1]);break;case`middle`:var m=(u[o]+d[o])/2,h=[];l[o]=h[o]=m,l[1-o]=u[1-o],h[1-o]=d[1-o],s.push(l[0],l[1]),s.push(h[0],h[1]);break;default:l[o]=u[o],l[1-o]=d[1-o],s.push(l[0],l[1])}return s.push(e[c++],e[c++]),s}function Gx(e,t){var n=[],r=e.length,i,a;function o(e,t,n){var r=e.coord;return{coord:n,color:da((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<r;s++){var c=e[s],l=c.coord;if(l<0)i=c;else if(l>t){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function Kx(e,t,n){var r=e.getVisual(`visualMeta`);if(!(!r||!r.length||!e.count())&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=K(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=Gx(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;G(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new Tf(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function qx(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&Jx(a,t))){var o=t.mapDimension(a.dim),s={};return G(a.getViewLabels(),function(e){e.tick.offInterval||(s[Lx(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function Jx(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(Ny.getSymbolSize(t,o)[+!!e.isHorizontal()]*1.5>r)return!1;return!0}function Yx(e){for(var t=e.length/2;t>0&&Uy(e[t*2-2],e[t*2-1]);t--);return t-1}function Xx(e,t){return[e[t*2],e[t*2+1]]}function Zx(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l<r;l++)if(o=e[l*2+i],!Uy(o,e[l*2+1-i])){if(l===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function Qx(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<fu.length;t++)if(e.get([fu[t],`endLabel`,`show`]))return!0;return!1}function $x(e,t,n,r){if(gb(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=Qx(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=fb(t,n,r,function(){var t=e._endLabel;t&&n&&s.originalX!=null&&t.attr({x:s.originalX,y:s.originalY})},c);if(!r.get(`clip`,!0)){var d=u.shape,f=Math.max(d.width,d.height);l?(d.y-=f,d.height+=f*2):(d.x-=f,d.width+=f*2)}return c&&c(1,u),u}return pb(t,n,r)}function eS(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,a=r?i?`right`:`left`:`center`,o=r?`middle`:i?`top`:`bottom`;return{normal:{align:e.get(`align`)||a,verticalAlign:e.get(`verticalAlign`)||o}}}var tS=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Ld,t=new zy;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=xt(this._changePolyState,this)},t.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,a=e.getData(),o=e.getModel(`lineStyle`),s=e.getModel(`areaStyle`),c=a.getLayout(`points`)||[],l=r.type===`polar`,u=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,m=this._lineGroup,h=!t.ssr&&e.get(`animation`),g=!s.isEmpty(),_=s.get(`origin`),v=By(r,a,_),y=g&&Ux(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&qx(e,a,r),C=this._data;C&&C.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),C.setItemGraphicEl(t,null))}),b||d.remove(),i.add(m);var w=!l&&e.get(`step`),T;r&&r.getArea&&e.get(`clip`,!0)&&(T=r.getArea(),T.width==null?T.r0&&(T.r0-=.5,T.r+=.5):(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2)),this._clipShapeForSymbol=T;var E=Kx(a,r,n)||a.getVisual(`style`)[a.getVisual(`drawType`)];if(!(f&&u.type===r.type&&w===this._step))b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),h&&this._initSymbolLabelAnimation(a,r,T),w&&(y&&=Wx(y,c,r,w,x),c=Wx(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&=(m.remove(p),this._polygon=null),l||this._initOrUpdateEndLabel(e,r,W_(E)),m.setClipPath($x(this,r,!0,e));else{g&&!p?p=this._newPolygon(c,y):p&&!g&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,W_(E));var D=m.getClipPath();D?Hf(D,{shape:$x(this,r,!1,e).shape},e):m.setClipPath($x(this,r,!0,e)),b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),(!zx(this._stackedOnPoints,y)||!zx(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=Wx(y,c,r,w,x),c=Wx(c,null,r,w,x)),f.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:y})))}var O=e.getModel(`emphasis`),k=O.get(`focus`),A=O.get(`blurScope`),j=O.get(`disabled`);if(f.useStyle(dt(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),cd(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var M=f.getState(`emphasis`).style;M.lineWidth=+f.style.lineWidth+1}Yl(f).seriesIndex=e.seriesIndex,id(f,k,A,j);var N=Hx(e.get(`smooth`)),P=e.get(`smoothMonotone`);if(f.setShape({smooth:N,smoothMonotone:P,connectNulls:x}),p){var F=a.getCalculationInfo(`stackedOnSeries`),I=0;p.useStyle(dt(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),F&&(I=Hx(F.get(`smooth`))),p.setShape({smooth:N,stackedOnSmooth:I,smoothMonotone:P,connectNulls:x}),cd(p,e,`areaStyle`),Yl(p).seriesIndex=e.seriesIndex,id(p,k,A,j)}var ee=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=ee)}),this._polyline.onHoverStateChange=ee,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var te=e.get(`triggerEvent`),L=e.get(`triggerLineEvent`),ne=L===!0||te===!0||te===`line`,R=L===!0||te===!0||te===`area`;this.packEventData(e,f,ne),p&&this.packEventData(e,p,R)},t.prototype.packEventData=function(e,t,n){Yl(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=yl(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(Uy(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Ny(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else ob.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=yl(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else ob.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Au(this._polyline,e),t&&Au(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new eb({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new nb({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);Ct(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=Ct(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=Ct(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(Qx(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Gs({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=Yx(o);c>=0&&(Gp(a,Kp(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?jy(i,e):My(i,n)},enableTextSetter:!0},eS(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=Zx(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=Xx(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Al(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=Xx(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=nm(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=Yy(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=Wx(u.stackedOnCurrent,u.current,n,i,o),d=Wx(u.current,null,n,i,o),m=Wx(u.stackedOnNext,u.next,n,i,o),p=Wx(u.next,null,n,i,o)),Vx(d,p)>3e3||c&&Vx(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),Vf(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Vf(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;t<g.length;t++){var n=g[t].el,r=g[t].ptIdx*2;n.x=e[r],n.y=e[r+1],n.markRedraw()}})},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type=`line`,t}(ob);function nS(e,t){return{seriesType:e,plan:rb(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,a=t||i.large;if(r){var o=K(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=o.length,c=n.getCalculationInfo(`stackResultDimension`);dg(n,o[0])&&(o[0]=c),dg(n,o[1])&&(o[1]=c);var l=n.getStore(),u=n.getDimensionIndex(o[0]),d=n.getDimensionIndex(o[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=a&&Ky(n*s),o=[],c=[],f=e.start,p=0;f<e.end;f++){var m=void 0;if(s===1){var h=l.get(u,f);m=r.dataToPoint(h,null,c)}else o[0]=l.get(u,f),o[1]=l.get(d,f),m=r.dataToPoint(o,null,c);a?(i[p++]=m[0],i[p++]=m[1]):t.setItemLayout(f,m.slice())}a&&(t.setLayout(`points`,i),t.setLayout(`pointsRange`,{start:e.start,end:e.end}))}}}}}}var rS={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return n===0?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},iS=function(e){return Math.round(e.length/2)};function aS(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get(`sampling`),a=e.coordinateSystem,o=r.count();if(o>10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;J(i)?p=rS[i]:Ct(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,iS))}}}}}function oS(e){e.registerChartView(tS),e.registerSeriesModel(Ay),e.registerLayout(nS(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,aS(`line`))}var sS=bl(),cS=bl(),lS={estimate:1,determine:2};function uS(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function dS(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:K(pS(n,r),function(t,n){return{formattedLabel:Dx(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?mS(e,t):_S(e)}function fS(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:pS(i,r)}:e.type===`category`?gS(e,t):{ticks:r.getTicks(n)}}function pS(e,t){var n=t.getExtent(),r=[];return G(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Hl(r,Wl,null),Tc(r),K(r,function(e){return{value:e}})}function mS(e,t){var n=e.getLabelModel(),r=hS(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function hS(e,t,n){var r=yS(e),i=kx(t),a=n.kind===lS.estimate;if(!a){var o=xS(r,i);if(o)return o}var s,c;Ct(i)?s=OS(e,i,!1):(c=i===`auto`?CS(e,n):i,s=OS(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return SS(r,i,l),!0}):SS(r,i,l),l}function gS(e,t){var n=vS(e),r=kx(t),i=xS(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),Ct(r))a=OS(e,r,!0);else if(r===`auto`){var s=hS(e,e.getLabelModel(),uS(lS.determine));o=s.labelCategoryInterval,a=K(s.labels,function(e){return e.tick})}else o=r,a=OS(e,o,!0);return SS(n,r,{ticks:a,tickCategoryInterval:o})}function _S(e){var t=e.scale.getTicks(),n=Dx(e);return{labels:K(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var vS=bS(`axisTick`),yS=bS(`axisLabel`);function bS(e){return function(t){return cS(t)[e]||(cS(t)[e]={list:[]})}}function xS(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function SS(e,t,n){return e.list.push({key:t,value:n}),n}function CS(e,t){if(t.kind===lS.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return cS(e).autoInterval=n,!0}),n}return cS(e).autoInterval??(cS(e).autoInterval=e.calculateCategoryInterval(t))}function wS(e,t){var n=t.kind,r=DS(e),i=Dx(e),a=(r.axisRotate-r.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),c=o.count();if(s[1]-s[0]<1)return 0;var l=1,u=40;c>u&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=Mr(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===lS.estimate?(t.out.noPxChangeTryDetermine.push(xt(TS,null,e,S,c)),S):ES(e,S,c)??S}function TS(e,t,n){return ES(e,t,n)==null}function ES(e,t,n){var r=sS(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function DS(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function OS(e,t,n){var r=Dx(e),i=e.scale,a=[],o=Ct(t);return Yb(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var kS=bl();function AS(e){kS(e).prepare={}}function jS(e){kS(e).fullUpdate={}}function MS(e){return kS(e).prepare}function NS(e){return kS(e).fullUpdate}var PS=Bl(),FS=bl(),IS=bl();function LS(e,t){var n=e.model,r=FS(NS(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function RS(e,t){return VS(LS(e,t))}function zS(e,t){var n=[];return BS(e.model.ecModel,function(e){for(var r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(VS(e))}),n}function BS(e,t){var n=FS(NS(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function VS(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function HS(e,t){var n=e.model.ecModel,r=FS(NS(n)).axSer;r&&WS(n,r.get(e.model.uid),t)}function US(e,t,n){var r=LS(e,t);r&&WS(e.model.ecModel,r.sers,n)}function WS(e,t,n){if(t)for(var r=0;r<t.length;r++){var i=t[r];e.isSeriesFiltered(i)||n(i)}}function GS(e,t,n){var r=FS(NS(e)).keyed,i=r&&r.get(t);i&&i.each(function(e){n(e.axis)})}function KS(e,t){var n=e.model,r=FS(NS(n.ecModel)).keys;r&&G(r.get(n.uid),function(e){t(e)})}function qS(e){var t=IS(MS(e)),n=t.keyed||=Gt();BS(e,function(t,r,i){var a=n.get(r)||n.set(r,Gt()),o=a.get(i)||a.set(i,{});t.metrics.liPosMinGap&&YS.liPosMinGap(e,t,o)})}function JS(e,t){YS[e]=t}var YS={};function XS(e,t,n){if(e){var r=t.ecModel,i=FS(NS(r)),a=e.model.uid,o=i.axSer||=Gt();(o.get(a)||o.set(a,[])).push(t);var s=t.subType,c=t.getBaseAxis()===e,l=$S.get(ZS(s,c,n))||$S.get(ZS(s,c,null));if(l){var u=i.keyed||=Gt(),d=i.keys||=Gt(),f=l.key,p=u.get(f)||u.set(f,Gt()),m=p.get(a);m||(m=p.set(a,{axis:e,sers:[],serByIdx:[]}),m.metrics=l.getMetrics(e),(d.get(a)||d.set(a,[])).push(f)),m.sers.push(t),m.serByIdx[t.seriesIndex]=t}}}function ZS(e,t,n){return e+`|&`+X(t,!0)+`|&`+(n||``)}function QS(e,t){var n=ZS(t.seriesType,t.baseAxis,t.coordSysType);$S.set(n,t),PS(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:qS})})}var $S=Gt(),eC=.8;function tC(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=Mb(r);Wc(o)||(o=NaN);var s=e.getExtent(),c=uc(s[1]-s[0]);return Vb(r)?nC(n,e,o,c):i&&rC(n,e,o,c,i),a!=null&&(n.w=Wc(n.w)?lc(a,n.w):a),n}function nC(e,t,n,r){var i=t.onBand,a=n+ +!!i;a===0&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}function rC(e,t,n,r,i){var a=!1,o=-1/0;G(i.key?[RS(t,i.key)]:zS(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Wc(n)&&n>0&&Wc(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*eC,e.w2=e.w*n/r)}var iC=[0,1],aC=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),yc(e,iC,oC(this),t)},e.prototype.coordToData=function(e,t){var n=yc(e,oC(this),iC,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=K(fS(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Lx(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=sC(this,n,r);return K(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(Vb(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),K(this.scale.getMinorTicks(e),function(e){return K(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=uS(lS.determine),dS(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return tC(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=uS(lS.determine),wS(this,e)},e}();function oC(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function sC(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=tC(e).w;if(!i)return!1;G(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var cC=function(e){U(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(aC),lC=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],uC=1,dC=2,fC=uC|dC;function pC(e,t,n){n||=fC,t?e.dirty|=n:e.dirty&=~n}function mC(e,t){return t||=fC,e.dirty==null||!!(e.dirty&t)}function hC(e){if(e)return mC(e)&&gC(e,e.label,e),e}function gC(e,t,n){var r=t.getComputedTransform();e.transform=Np(e.transform,r);var i=e.localRect=Mp(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=im.textMargin);for(var d=0;d<4;d++)_C[d]=u===im.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===im.textMargin&&wp(i,_C,!1,!1);var f=e.rect=Mp(e.rect,i);return r&&f.applyTransform(r),u===im.minMargin&&wp(f,_C,!1,!1),e.axisAligned=Ap(r),(e.label=e.label||{}).ignore=t.ignore,pC(e,!1),pC(e,!0,dC),e}var _C=[0,0,0,0];function vC(e,t,n){return e.transform=Np(e.transform,n),e.localRect=Mp(e.localRect,t),e.rect=Mp(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Ap(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function yC(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function bC(e,t){for(var n=0;n<lC.length;n++){var r=lC[n];e[r]??(e[r]=t[r])}return hC(e)}function xC(e){var t=e.obb;return(!t||mC(e,dC))&&(e.obb=t||=new Ff,t.fromBoundingRect(e.localRect,e.transform),pC(e,!1,dC)),t}function SC(e,t,n,r,i){var a=e.length,o=Xf[t],s=Zf[t];if(a<2)return!1;e.sort(function(e,t){return e.rect[o]-t.rect[o]});for(var c=0,l,u=!1,d=0,f=0;f<a;f++){var p=e[f],m=p.rect;l=m[o]-c,l<0&&(m[o]-=l,p.label[o]-=l,u=!0);var h=Math.max(-l,0);d+=h,c=m[o]+m[s]}d>0&&i&&S(-d/a,0,a);var g=e[0],_=e[a-1],v,y;b(),v<0&&C(-v,.8),y<0&&C(y,.8),b(),x(v,y,1),x(y,v,-1),b(),v<0&&w(-v),y<0&&w(y);function b(){v=g.rect[o]-n,y=r-_.rect[o]-_.rect[s]}function x(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var i=r+e;i<0&&C(-i*n,1)}else C(-e*n,1)}}function S(t,n,r){t!==0&&(u=!0);for(var i=n;i<r;i++){var a=e[i],s=a.rect;s[o]+=t,a.label[o]+=t}}function C(t,n){for(var r=[],i=0,c=1;c<a;c++){var l=e[c-1].rect,u=Math.max(e[c].rect[o]-l[o]-l[s],0);r.push(u),i+=u}if(i){var d=Math.min(Math.abs(t)/i,n);if(t>0)for(var c=0;c<a-1;c++){var f=r[c]*d;S(f,0,c+1)}else for(var c=a-1;c>0;c--){var f=r[c-1]*d;S(-f,c,a)}}}function w(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r<a-1;r++)if(t>0?S(n,0,r+1):S(-n,a-r-1,a),e-=n,e<=0)return}return u}function CC(e){var t=[];e.sort(function(e,t){return+!!t.suggestIgnore-!!e.suggestIgnore||t.priority-e.priority});function n(e){if(!e.ignore){var t=e.ensureState(`emphasis`);t.ignore??=!1}e.ignore=!0}for(var r=0;r<e.length;r++){var i=hC(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,c=0;c<t.length;c++)if(wC(i,t[c],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}}function wC(e,t,n,r){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,n,r)?!1:e.axisAligned&&t.axisAligned?!0:xC(e).intersect(xC(t),n,r)}var TC=null;function EC(){return TC}var DC=`expandAxisBreak`,OC=Math.PI,kC=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],AC=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],jC=bl(),MC=bl(),NC=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}();function PC(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=iw(e.axisName)&&Mx(e.nameLocation);G(r,function(e){var t=hC(e);if(!(!t||t.label.ignore)){o.push(t);var n=a.transGroup;c&&(n.transform?Nn(FC,n.transform):Dn(FC),t.transform&&kn(FC,FC,t.transform),fr.copy(IC,t.localRect),IC.applyTransform(FC),s?s.union(IC):fr.copy(s=new fr(0,0,0,0),IC))}});var l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new fr(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var FC=En(),IC=new fr(0,0,0,0),LC=function(e,t,n,r,i,a){if(Mx(e.nameLocation)){var o=a.stOccupiedRect;o&&RC(vC({},o,a.transGroup.transform),r,i)}else zC(a.labelInfoList,a.dirVec,r,i)};function RC(e,t,n){var r=new Qn;wC(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&yC(t,r)}function zC(e,t,n,r){for(var i=Qn.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||RC(s,n,r)}}var BC=function(){function e(e,t,n,r){this.group=new Ld,this._axisModel=e,this._api=t,this._local={},this._shared=r||new NC(LC),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},r=X(e.axisName,t.get(`name`)),i=t.get(`nameMoveOverlap`);(i==null||i===`auto`)&&(i=X(e.defaultNameMoveOverlap,!0));var a={raw:e,position:e.position,rotation:e.rotation,nameDirection:X(e.nameDirection,1),tickDirection:X(e.tickDirection,1),labelDirection:X(e.labelDirection,1),labelOffset:X(e.labelOffset,0),silent:X(e.silent,!0),axisName:r,nameLocation:Nt(t.get(`nameLocation`),n.nameLocation,`end`),shouldNameMoveOverlap:iw(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};this._cfg=a;var o=new Ld({x:a.position[0],y:a.position[1],rotation:a.rotation});o.updateTransform(),this._transformGroup=o;var s=this._shared.ensureRecord(t);s.transGroup=this._transformGroup,s.dirVec=new Qn(Math.cos(-a.rotation),Math.sin(-a.rotation))},e.prototype.build=function(e,t){var n=this;return e||={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0},G(VC,function(r){e[r]&&HC[r](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},e.innerTextLayout=function(e,t,n){var r=Mc(t-e),i,a;return Nc(r)?(a=n>0?`top`:`bottom`,i=`center`):Nc(r-OC)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<OC?n>0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),VC=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],HC={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Yn(u,u,l),Yn(d,d,l));var p=W({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&$g(r.axis.scale))EC().buildAxisBreakLine(r,i,a,m);else{var h=new gf(W({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));cp(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);J(g)&&(g=[g,g]),(J(_)||Tt(_))&&(_=[_,_]);var v=ky(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];G([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=Dy(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){ZC(t,i,s)&&UC(e,t,n,r,i,a,o,lS.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){ZC(t,i,s)&&UC(e,t,n,r,i,a,o,lS.determine);var c=YC(e,i,a,r);KC(e,t.labelLayoutList,c),XC(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(iw(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Qn(0,0),_=new Qn(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=En();_.transform(jn(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*OC/180);var b,x;Mx(u)?b=BC.innerTextLayout(e.rotation,y??e.rotation,d):(b=WC(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=Mt(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Gs({x:g.x,y:g.y,rotation:b.rotation,silent:BC.isLabelSilent(r),style:qp(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Dp({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=BC.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Yl(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=hC({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Mx(u)?kC[E]:AC[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function UC(e,t,n,r,i,a,o,s){$C(t)||QC(e,t,i,s,r,o);var c=t.labelLayoutList;tw(e,r,c,a),ow(r,e.rotation,c);var l=e.optionHideOverlap;GC(r,c,l),l&&CC(_t(c,function(e){return e&&!e.label.ignore})),PC(e,n,r,c)}function WC(e,t,n,r){var i=Mc(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Nc(i-OC/2)?(o=c?`bottom`:`top`,a=`center`):Nc(i-OC*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<OC*1.5&&i>OC/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function GC(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Ax(r))return;function a(e,a,o){var s=hC(t[a]),c=hC(t[o]),l=r.scale;if(!(!s||!c)){if(e==null){if(!n&&i)return;var u=jC(s.label).labelInfo.tick;if(zb(l)&&u.notNice||Vb(l)&&u.offInterval){qC(s.label);return}}if(e===!1||s.suggestIgnore){qC(s.label);return}if(c.suggestIgnore){qC(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=bC({marginForce:f},s),c=bC({marginForce:f},c)}wC(s,c,null,{touchThreshold:d})&&qC(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function KC(e,t,n){e.showMinorTicks||G(t,function(e){if(e&&e.label.ignore)for(var t=0;t<n.length;t++){var r=n[t],i=MC(r),a=jC(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.labelInfo.tick.value){qC(r);return}}})}function qC(e){e&&(e.ignore=!0)}function JC(e,t,n,r,i){for(var a=[],o=[],s=[],c=0;c<e.length;c++){var l=e[c].coord;o[0]=l,o[1]=0,s[0]=l,s[1]=n,t&&(Yn(o,o,t),Yn(s,s,t));var u=new gf({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});cp(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);var d=MC(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function YC(e,t,n,r){var i=r.axis,a=r.getModel(`axisTick`),o=a.get(`show`);if(o===`auto`&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel(`lineStyle`),c=e.tickDirection*a.get(`length`),l=JC(i.getTicksCoords(),n.transform,c,dt(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)t.add(l[u]);return l}function XC(e,t,n,r,i){var a=r.axis,o=r.getModel(`minorTick`);if(!(!e.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var c=o.getModel(`lineStyle`),l=i*o.get(`length`),u=dt(c.getLineStyle(),dt(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])})),d=0;d<s.length;d++)for(var f=JC(s[d],n.transform,l,u,`minorticks_`+d),p=0;p<f.length;p++)t.add(f[p])}}function ZC(e,t,n){if($C(e)){var r=e.axisLabelsCreationContext.out.noPxChangeTryDetermine;if(n.noPxChange){for(var i=!0,a=0;a<r.length;a++)i&&=r[a]();if(i)return!1}r.length&&(t.remove(e.labelGroup),ew(e,null,null,null))}return!0}function QC(e,t,n,r,i,a){var o=i.axis,s=Mt(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new Ld;n.add(c);var l=uS(r);if(!s||o.scale.isBlank()){ew(t,[],c,l);return}var u=i.getModel(`axisLabel`),d=o.getViewLabels(l),f=(Mt(e.raw.labelRotate,u.get(`rotate`))||0)*OC/180,p=BC.innerTextLayout(e.rotation,f,e.labelDirection),m=i.getCategories&&i.getCategories(!0),h=[],g=i.get(`triggerEvent`),_=1/0,v=-1/0;G(d,function(e,t){var n=e.tick,r=e.formattedLabel,s=e.rawLabel,l=u,f=Lx(o.scale,n);if(m&&m[f]){var y=m[f];Y(y)&&y.textStyle&&(l=new hm(y.textStyle,u,i.ecModel))}var b=l.getTextColor()||i.get([`axisLine`,`lineStyle`,`color`]),x=l.getShallow(`align`,!0)||p.textAlign,S=X(l.getShallow(`alignMinLabel`,!0),x),C=X(l.getShallow(`alignMaxLabel`,!0),x),w=l.getShallow(`verticalAlign`,!0)||l.getShallow(`baseline`,!0)||p.textVerticalAlign,T=X(l.getShallow(`verticalAlignMinLabel`,!0),w),E=X(l.getShallow(`verticalAlignMaxLabel`,!0),w),D=10+(n.time?.level||0);_=Math.min(_,D),v=Math.max(v,D);var O=new Gs({x:0,y:0,rotation:0,silent:BC.isLabelSilent(i),z2:D,style:qp(l,{text:r,align:t===0?S:t===d.length-1?C:x,verticalAlign:t===0?T:t===d.length-1?E:w,fill:Ct(b)?b(o.type===`category`?s:o.type===`value`?f+``:f,t):b})});O.anid=`label_`+f;var k=jC(O);if(k.labelInfo=e,k.layoutRotation=p.rotation,Dp({el:O,componentModel:i,itemName:r,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:s,tickIndex:t}}),g){var A=BC.makeAxisEventDataBase(i);A.targetType=`axisLabel`,A.value=s,A.tickIndex=t;var j=e.tick.break;if(j){var M=j.parsedBreak;A.break={start:M.vmin,end:M.vmax}}o.type===`category`&&(A.dataIndex=f),Yl(O).eventData=A,j&&aw(i,a,O,j)}h.push(O),c.add(O)}),ew(t,K(h,function(e){return{label:e,priority:jC(e).labelInfo.tick.break?e.z2+(v-_+1):e.z2,defaultAttr:{ignore:e.ignore}}}),c,l)}function $C(e){return!!e.labelLayoutList}function ew(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function tw(e,t,n,r){var i=t.get([`axisLabel`,`margin`]);G(n,function(n,a){var o=hC(n);if(o){var s=o.label,c=jC(s);o.suggestIgnore=s.ignore,s.ignore=!1,_i(nw,rw);var l=t.axis;nw.x=l.dataToCoord(Lx(l.scale,c.labelInfo.tick)),nw.y=e.labelOffset+e.labelDirection*i,nw.rotation=c.layoutRotation,r.add(nw),nw.updateTransform(),r.remove(nw),nw.decomposeTransform(),_i(s,nw),s.markRedraw(),pC(o,!0),hC(o)}})}var nw=new Bs,rw=new Bs;function iw(e){return!!e}function aw(e,t,n,r){n.on(`click`,function(n){var i={type:DC,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+`AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function ow(e,t,n){var r=Xg();if(r){var i=r.retrieveAxisBreakPairs(n,function(e){return e&&jC(e.label).labelInfo.tick.break},!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&G(i,function(r){EC().adjustBreakLabelPair(e.axis.inverse,t,[hC(n[r[0]]),hC(n[r[1]])])})}}function sw(e,t,n){n||={};var r=t.axis,i={},a=r.getAxesOnZeroOf()[0],o=r.position,s=a?`onZero`:o,c=r.dim,l=[e.x,e.x+e.width,e.y,e.y+e.height],u={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get(`offset`)||0,f=c===`x`?[l[2]-d,l[3]+d]:[l[0]-d,l[1]+d];if(a){var p=a.toGlobalCoord(a.dataToCoord(0));f[u.onZero]=Math.max(Math.min(p,f[1]),f[0])}i.position=[c===`y`?f[u[s]]:l[0],c===`x`?f[u[s]]:l[3]],i.rotation=Math.PI/2*(c===`x`?0:1),i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[o],i.labelOffset=a?f[u[o]]-f[u.onZero]:0,t.get([`axisTick`,`inside`])&&(i.tickDirection=-i.tickDirection),Mt(n.labelInside,t.get([`axisLabel`,`inside`]))&&(i.labelDirection=-i.labelDirection);var m=t.get([`axisLabel`,`rotate`]);return i.labelRotate=s===`top`?-m:m,i.z2=1,i}function cw(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function lw(e){var t={xAxisModel:null,yAxisModel:null};return G(t,function(n,r){var i=r.replace(/Model$/,``);t[r]=e.getReferringComponents(i,wl).models[0]}),t}function uw(e,t,n,r,i,a){for(var o=sw(e,n),s=!1,c=!1,l=0;l<t.length;l++)Lb(t[l].getOtherAxis(n.axis).scale)&&(s=c=!0,n.axis.type===`category`&&n.axis.onBand&&(c=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=c,o.defaultNameMoveOverlap=a,new BC(n,r,o,i)}function dw(e,t,n){var r=sw(t,n);e.updateCfg(r)}var fw=bl(),pw=3,mw=function(){function e(e,t,n,r,i){var a=Vb(e),o=a?t.getCategories().length:null,s;if(a){var c=t.getCategories(!0);s=c&&!c.length}var l=n.slice();(Rb(e)||Bb(e)||zb(e))&&(Nl(l,gw(e,t.get(`dataMin`,!0))),Pl(l,gw(e,t.get(`dataMax`,!0)))),Rl(l)||(l[0]=l[1]=NaN);var u=[],d=[!1,!1],f=t.get(`min`,!0);f===`dataMin`?(u[0]=l[0],d[0]=!0):(u[0]=gw(e,Ct(f)?f({min:l[0],max:l[1]}):f),d[0]=u[0]!=null);var p=t.get(`max`,!0);p===`dataMax`?(u[1]=l[1],d[1]=!0):(u[1]=gw(e,Ct(p)?p({min:l[0],max:l[1]}):p),d[1]=u[1]!=null);var m=_w(e,t),h=a?null:l[1]-l[0]||Math.abs(l[0]);u[0]??=a?s?l[0]:o?0:NaN:l[0]-m[0]*h,u[1]??=a?s?l[1]:o?o-1:NaN:l[1]+m[1]*h,!Il(u[0])&&(u[0]=NaN),!Il(u[1])&&(u[1]=NaN);var g=s||jt(u[0])||jt(u[1])||a&&!o,_=Rb(e),v=_&&t.needIncludeZero&&t.needIncludeZero();v&&(u[0]>0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=gw(e,t.get(`startValue`,!0)),x=b!=null;!Wc(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Wc(b)&&(x||!_||v)&&(b<u[0]&&!d[0]?(u[0]=b,d[0]=!0):b>u[1]&&!d[1]&&(u[1]=b,d[1]=!0)),hw(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),hw(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function hw(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),zl(t))}function gw(e,t){return t==null?null:jt(t)?NaN:e.parse(t)}function _w(e,t){var n;if(Vb(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=q(r)?r:[r,r]}return[vw(n[0]),vw(n[1])]}function vw(e){return Ir(typeof e==`boolean`?0:e,1)||0}function yw(e){var t=fw(e.scale);return t.extent||=jl(),t}function bw(e,t){yw(e).dimIdxInCoord=t.get(e.dim)}function xw(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||Sw(n,e,i,r,t)}function Sw(e,t,n,r,i){var a=yw(t),o=a.extent,s=!1;HS(t,function(r){if(r.boxCoordinateSystem){var i=ng(r).coord,c=a.dimIdxInCoord;if(c>=0&&q(i)){var l=i[c];l!=null&&!q(l)&&Ml(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;G(jx(u,n),function(e){Fl(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=Ow(e,t,r);ww(e,new mw(e,r,o,s,c),i),a.extent=null}function Cw(e,t){var n=e.scale;ww(n,new mw(n,e.model,t,!1,!1),pw)}function ww(e,t,n){e.rawExtentInfo=t,t.from=n}function Tw(e,t){Ew.set(e,t)}var Ew=Gt();function Dw(e,t,n,r,i){e.rawExtentInfo||Cw({scale:e,model:t},i||jl());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function Ow(e,t,n){var r=Rx(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return KS(t,function(e){a=!!Ew.get(e)||a}),a}function kw(e,t,n,r){if(n.ctnShp){var i;if(KS(e,function(t){var n=Ew.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Nl(i,a[0]),Pl(i,a[1]),Tx(e))}}),i){var a=t.getExtent();if(Vb(t))e.onBand||t.setExtent2(1,cc(a[0],a[0]+i[0]),lc(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=cc(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=lc(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]<a[0]||o[1]>a[1])&&t.setExtent2(1,o[0],o[1])}}}}function Aw(){JS(`liPosMinGap`,jw)}function jw(e,t,n){var r=Gt(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=ph(u);function f(n){WS(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}qy(Mw,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r<i;++r){var a=n.get(e,r);isFinite(a)&&(!u||mh(d,a))&&(l&&(a=c.transformIn(a,null)),Mw.arr[m++]=a)}});var h=Mw.typed?Mw.arr.subarray(0,m):(Mw.arr.length=m,Mw.arr);Mw.typed?h.sort():Tc(h);for(var g=1/0,_=1;_<m;++_){var v=h[_]-h[_-1];v>0&&v<g&&(g=v)}n.liPosMinGap=t.liPosMinGap=Wc(g)?g:m>0?-2:-1,n.serUids=r}var Mw=qy({ctor:Gy},50);function Nw(e){return function(t,n){var r=tC(t,{fromStat:{key:e}});if(Wc(r.w2))return[-r.w2/2,r.w2/2]}}function Pw(e,t){return e+`|&`+t}function Fw(e){return Aw(),{liPosMinGap:!Vb(e.scale)}}function Iw(e,t,n,r){QS(e,{key:t,seriesType:n,coordSysType:r,getMetrics:Fw})}function Lw(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var Rw={left:0,right:0,top:0,bottom:0},zw=[`25%`,`25%`],Bw=`cartesian2d`,Vw=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=ov(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&av(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&av(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:Rw,outerBoundsContain:`all`,outerBoundsClampWidth:zw[0],outerBoundsClampHeight:zw[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30},t}(lv),Hw=Bl(),Uw=`__ec_stack_`;function Ww(e){return e.get(`stack`)||Uw+e.seriesIndex}function Gw(e){if(Vb(e.axis.scale)){for(var t=tC(e.axis),n=[],r=0;r<e.count;r++)n.push(dt({stackId:Uw+r},e));for(var i=Jw({bandWidthResult:t,seriesInfo:n}),a=[],r=0;r<e.count;r++){var o=i[Uw+r];o.offsetCenter=o.offset+o.width/2,a.push(o)}return a}}function Kw(e,t){var n=qw(e,t);return n.columnMap=Jw(n),n}function qw(e,t){var n=Pw(t,Bw),r=[],i=tC(e,{fromStat:{key:n},min:1});return US(e,n,function(e){r.push({barWidth:bc(e.get(`barWidth`),i.w),barMaxWidth:bc(e.get(`barMaxWidth`),i.w),barMinWidth:bc(e.get(`barMinWidth`)||(Zw(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:Ww(e)})}),{bandWidthResult:i,seriesInfo:r}}function Jw(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};G(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;Z(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=cc(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=lc(35-o.length*4,15)+`%`;var c=bc(i,t),l=bc(a,1),u=(n-c)/(r+(r-1)*l);u=lc(u,0),G(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=cc(o,i)),a&&(o=lc(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&i<o&&(o=cc(i,n)),a&&a>o&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=lc(u,0);var d=0,f;G(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return G(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function Yw(e){return{seriesType:e,overallReset:function(t){var n=Pw(e,Bw);GS(t,n,function(t){var r=Kw(t,e);US(t,n,function(e){var t=r.columnMap[Ww(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function Xw(e){return{seriesType:e,plan:rb(),reset:function(e){if(cw(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=dg(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(Lw(i))),p=Zw(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&Ky(r*3),c=p&&s&&Ky(r*3),l=p&&Ky(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,uc(k)<m&&(k=(k<0?-1:1)*m)}else{var j=n.dataToPoint([w,C]);u&&(T=n.dataToPoint([w,E])[1]),D=j[0]+_,O=T,k=g,A=j[1]-T,uc(A)<m&&(A=(A<=0?-1:1)*m)}p?(i[S]=D,i[S+1]=O,i[S+2]=d?k:A,c&&(c[S]=d?v.x:D,c[S+1]=d?O:v.y,c[S+2]=y),l[b]=b):t.setItemLayout(b,{x:D,y:O,width:k,height:A}),S+=3}p&&t.setLayout({largePoints:i,largeDataIndices:l,largeBackgroundPoints:c,valueAxisHorizontal:d})}}}}}}function Zw(e){return e.pipelineContext&&e.pipelineContext.large}function Qw(e){return Nw(Pw(e,Bw))}function $w(e){Hw(e,function(){function t(t){var n=Pw(t,Bw);Iw(e,n,t,Bw),Tw(n,Qw(t))}t(`bar`),t(`pictorialBar`)})}var eT=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return hg(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),a=r.dataToPoint(i);if(n)G(r.getAxes(),function(e,n){if(e.type===`category`&&t!=null){var r=e.getTicksCoords(),o=e.getTickModel().get(`alignWithLabel`),s=i[n],c=t[n]===`x1`||t[n]===`y1`;if(c&&!o&&(s+=1),r.length<2)return;if(r.length===2){a[n]=e.toGlobalCoord(e.getExtent()[+!!c]);return}for(var l=void 0,u=void 0,d=1,f=0;f<r.length;f++){var p=r[f].coord,m=f===r.length-1?r[f-1].tickValue+d:r[f].tickValue;if(m===s){u=p;break}if(m<s)l=p;else if(l!=null&&m>s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(fy);fy.registerClass(eT);var tT=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return hg(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=Kl(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=Sg(eT.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(eT),nT=`\0__throttleOriginMethod`,rT=`\0__throttleRate`,iT=`\0__throttleType`;function aT(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function oT(e,t,n,r){var i=e[t];if(i){var a=i[nT]||i,o=i[iT];if(i[rT]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=aT(a,n,r===`debounce`),i[nT]=a,i[iT]=r,i[rT]=n}return i}}function sT(e,t){var n=e[t];n&&n[nT]&&(n.clear&&n.clear(),e[t]=n[nT])}var cT=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),lT=function(e){U(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new cT},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-c<d:c-l<d;f||(c=l-(u?d:-d));var p=Math.cos(c),m=Math.sin(c),h=Math.cos(l),g=Math.sin(l);f?(e.moveTo(p*i+n,m*i+r),e.arc(p*s+n,m*s+r,o,-Math.PI+c,c,!u)):e.moveTo(p*a+n,m*a+r),e.arc(n,r,a,c,l,!u),e.arc(h*s+n,g*s+r,o,l-Math.PI*2,l-Math.PI,!u),i!==0&&e.arc(n,r,i,l,c,u)},t}(Es);function uT(e,t){t||={};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return Lr(t,r,i);var o=e(a),s=r.distance==null?5:r.distance,c=this.shape,l=c.cx,u=c.cy,d=c.r,f=c.r0,p=(d+f)/2,m=c.startAngle,h=c.endAngle,g=(m+h)/2,_=n?Math.abs(d-f)/2:0,v=Math.cos,y=Math.sin,b=l+d*v(m),x=u+d*y(m),S=`left`,C=`top`;switch(o){case`startArc`:b=l+(f-s)*v(g),x=u+(f-s)*y(g),S=`center`,C=`top`;break;case`insideStartArc`:b=l+(f+s)*v(g),x=u+(f+s)*y(g),S=`center`,C=`bottom`;break;case`startAngle`:b=l+p*v(m)+fT(m,s+_,!1),x=u+p*y(m)+pT(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+fT(m,-s+_,!1),x=u+p*y(m)+pT(m,-s+_,!1),S=`left`,C=`middle`;break;case`middle`:b=l+p*v(g),x=u+p*y(g),S=`center`,C=`middle`;break;case`endArc`:b=l+(d+s)*v(g),x=u+(d+s)*y(g),S=`center`,C=`bottom`;break;case`insideEndArc`:b=l+(d-s)*v(g),x=u+(d-s)*y(g),S=`center`,C=`top`;break;case`endAngle`:b=l+p*v(h)+fT(h,s+_,!0),x=u+p*y(h)+pT(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+fT(h,-s+_,!0),x=u+p*y(h)+pT(h,-s+_,!0),S=`right`,C=`middle`;break;default:return Lr(t,r,i)}return t||={},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function dT(e,t,n,r){if(Tt(r)){e.setTextConfig({rotation:r});return}if(q(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,c,l=n(t);switch(l){case`startArc`:case`insideStartArc`:case`middle`:case`insideEndArc`:case`endArc`:c=s;break;case`startAngle`:case`insideStartAngle`:c=a;break;case`endAngle`:case`insideEndAngle`:c=o;break;default:e.setTextConfig({rotation:0});return}var u=Math.PI*1.5-c;l===`middle`&&u>Math.PI/2&&u<Math.PI*1.5&&(u-=Math.PI),e.setTextConfig({rotation:u})}function fT(e,t,n){return t*Math.sin(e)*(n?-1:1)}function pT(e,t,n){return t*Math.cos(e)*(n?1:-1)}function mT(e,t,n){var r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;q(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:K(r,function(e){return Ir(e,i)})}}var hT=Math.max,gT=Math.min,_T=function(e){U(t,e);function t(){var t=e.call(this)||this;return t.type=`bar`,t._isFirstFrame=!0,t}return t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get(`coordinateSystem`);(i===`cartesian2d`||i===`polar`)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){kp(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i=this.group,a=e.getData(),o=this._data,s=e.coordinateSystem,c=s.getBaseAxis(),l;s.type===`cartesian2d`?l=c.isHorizontal():s.type===`polar`&&(l=c.dim===`angle`);var u=e.isAnimationEnabled()?e:null,d=bT(e,s);d&&this._enableRealtimeSort(d,a,n);var f=e.get(`clip`,!0)||d,p=s.getArea();i.removeClipPath();var m=e.get(`roundCap`,!0),h=e.get(`showBackground`,!0),g=e.getModel(`backgroundStyle`),_=g.get(`borderRadius`)||0,v=[],y=this._backgroundEls,b=r&&r.isInitSort,x=r&&r.type===`changeAxisOrder`;function S(e){var t=ET[s.type](a,e);if(!t)return null;var n=LT(s,l,t);return n.useStyle(g.getItemStyle()),s.type===`cartesian2d`?n.setShape(`r`,_):n.setShape(`cornerRadius`,_),v[e]=n,n}a.diff(o).add(function(t){var n=a.getItemModel(t),r=ET[s.type](a,t,n);if(r&&(h&&S(t),!(!a.hasValue(t)||!TT[s.type](r)))){var o=!1;f&&(o=vT[s.type](p,r));var g=yT[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),kT(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?xT(d,u,g,r,t,l,!1,!1):Hf(g,{shape:r},e,t),a.setItemGraphicEl(t,g),i.add(g),g.ignore=o}}).update(function(t,n){var r=a.getItemModel(t),C=ET[s.type](a,t,r);if(C){if(h){var w=void 0;y.length===0?w=S(n):(w=y[n],w.useStyle(g.getItemStyle()),s.type===`cartesian2d`?w.setShape(`r`,_):w.setShape(`cornerRadius`,_),v[t]=w);var T=ET[s.type](a,t),E=IT(l,T,s);Vf(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!TT[s.type](C)){i.remove(D);return}var O=!1;if(f&&(O=vT[s.type](p,C),O&&i.remove(D)),D&&(D.type===`sector`&&m||D.type===`sausage`&&!m)&&(D&&Kf(D,e,n),D=null),D?qf(D):D=yT[s.type](e,a,t,C,l,u,c.model,!0,m),d&&(D.forceLabelAnimation=!0),x){var k=D.getTextContent();if(k){var A=nm(k);A.prevValue!=null&&(A.prevValue=A.value)}}else kT(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?xT(d,u,D,C,t,l,!0,x):Vf(D,{shape:C},e,t,null),a.setItemGraphicEl(t,D),D.ignore=O,i.add(D)}}).remove(function(t){var n=o.getItemGraphicEl(t);n&&Kf(n,e,t)}).execute();var C=this._backgroundGroup||=new Ld;C.removeAll();for(var w=0;w<v.length;++w)C.add(v[w]);i.add(C),this._backgroundEls=v,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),NT(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),NT(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&mb(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var a=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,a,i,n)},n.getZr().on(`rendered`,this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i??=NaN,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:K(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),a=Number.MAX_VALUE,o=0,s=r.getOrdinalMeta().categories.length;o<s;++o){var c=e.rawIndexOf(i,r.getRawOrdinalNumber(o)),l=c<0?Number.MIN_VALUE:t(e.indexOfRawIndex(c));if(l>a)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Kf(t,e,Yl(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(ob),vT={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=hT(t.x,e.x),s=gT(t.x+t.width,i),c=hT(t.y,e.y),l=gT(t.y+t.height,a),u=s<o,d=l<c;return t.x=u&&o>i?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=gT(t.r,e.r),a=hT(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},yT={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new Bs({shape:W({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?lT:af,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=uT(OT(i),{isRoundCap:l===lT}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Vf:Hf)(u,{shape:p},a)}return u}};function bT(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function xT(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?Vf:Hf)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Vf:Hf)(n,{shape:l},u,i)}function ST(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var CT=[`x`,`y`,`width`,`height`],wT=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],TT={cartesian2d:function(e){return!ST(e,CT)},polar:function(e){return!ST(e,wT)}},ET={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?AT(n,r):0,a=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function DT(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function OT(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function kT(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;W(u,mT(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?RT(i,a.coordinateSystem):zT(i,a.coordinateSystem),p=Kp(r);Gp(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:jy(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,dT(e,h===`outside`?f:h,OT(o),r.get([`label`,`rotate`]))}rm(m,p,a.getRawValue(n),function(e){return My(t,e)});var g=r.getModel([`emphasis`]);id(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),cd(e,r),DT(i)&&(e.style.fill=`none`,e.style.stroke=`none`,G(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function AT(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var jT=function(){function e(){}return e}(),MT=function(e){U(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new jT},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c<n.length;c+=3)o[r]=s,o[i]=n[c+2],a[r]=n[c+r],a[i]=n[c+i],e.rect(a[0],a[1],o[0],o[1])},t}(Es);function NT(e,t,n,r){var i=e.getData(),a=+!!i.getLayout(`valueAxisHorizontal`),o=i.getLayout(`largeDataIndices`),s=i.getLayout(`size`),c=e.getModel(`backgroundStyle`),l=i.getLayout(`largeBackgroundPoints`),u=r?Gl(e):0;if(l){var d=new MT({shape:{points:l},incremental:u,silent:!0,z2:0});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,d.useStyle(c.getItemStyle()),t.add(d),n&&n.push(d)}var f=new MT({shape:{points:i.getLayout(`largePoints`)},incremental:u,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual(`style`)),f.style.stroke=null,Yl(f).seriesIndex=e.seriesIndex,e.get(`silent`)||(f.on(`mousedown`,PT),f.on(`mousemove`,PT)),n&&n.push(f)}var PT=aT(function(e){var t=this,n=FT(t,e.offsetX,e.offsetY);Yl(t).dataIndex=n>=0?n:null},30,!1);function FT(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u<d;u++){var f=u*3;if(c[r]=l,c[i]=a[f+2],s[r]=a[f+r],s[i]=a[f+i],c[i]<0&&(s[i]+=c[i],c[i]=-c[i]),t>=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function IT(e,t,n){if(gb(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function LT(e,t,n){return new(e.type===`polar`?af:Bs)({shape:IT(t,n,e),silent:!0,z2:0})}function RT(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function zT(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function BT(e){e.registerChartView(_T),e.registerSeriesModel(tT),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Yw(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Xw(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,aS(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),$w(e)}function VT(e,t){function n(t,n){var r=[];return t.eachComponent({mainType:`series`,subType:e,query:n},function(e){r.push(e.seriesIndex)}),r}G([[e+`ToggleSelect`,`toggleSelect`],[e+`Select`,`select`],[e+`UnSelect`,`unselect`]],function(e){t(e[0],function(t,r,i){t=W({},t),i.dispatchAction(W(t,{type:e[1],seriesIndex:n(r,t)}))})})}function HT(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s<o.length;s++)if(o[s].seriesIndex===t){var c=e.getData(),l=yl(c,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:q(l)?c.getName(l[0]):c.getName(l),selected:J(r)?r:W({},r)})}})}function UT(e,t,n){e.on(`selectchanged`,function(e){var r=n.getModel();e.isFromClick?(HT(`map`,`selectchanged`,t,r,e),HT(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?(HT(`map`,`selected`,t,r,e),HT(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&(HT(`map`,`unselected`,t,r,e),HT(`pie`,`unselected`,t,r,e))})}function WT(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:`legend`});if(!(!n||!n.length)){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i<n.length;i++)if(!n[i].isSelected(t))return!1;return!0})}}}}function GT(e,t,n){t=q(t)&&{coordDimensions:t}||W({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=qh(r,t).dimensions,a=new Kh(i,e);return a.initData(r,n),a}var KT=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),qT=bl(),JT=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new KT(xt(this.getData,this),xt(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return GT(this,{coordDimensions:[`value`],encodeDefaulter:St(Cm,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=qT(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=kc(a,n.hostModel.get(`percentPrecision`))}var o=e.prototype.getDataParams.call(this,t);return o.percent=i[t]||0,o.$vars.push(`percent`),o},t.prototype._defaultLabelLine=function(e){tl(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type=`series.pie`,t.defaultOption={z:2,legendHoverLink:!0,colorBy:`data`,center:[`50%`,`50%`],radius:[0,`50%`],clockwise:!0,startAngle:90,endAngle:`auto`,padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:`box`,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:`truncate`,position:`outer`,alignTo:`none`,edgeDistance:`25%`,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:`solid`}},itemStyle:{borderWidth:1,borderJoin:`round`},showEmptyCircle:!0,emptyCircleStyle:{color:`lightgray`,opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:`expansion`,animationDuration:1e3,animationTypeUpdate:`transition`,animationEasingUpdate:`cubicInOut`,animationDurationUpdate:500,animationEasing:`cubicInOut`},t}(fy);eg({fullType:JT.type,getCoord2:function(e){return e.getShallow(`center`)}}),Math.PI*2,ts.CMD;function YT(e,t,n,r,i,a,o,s){var c=i-e,l=a-t,u=n-e,d=r-t,f=Math.sqrt(u*u+d*d);u/=f,d/=f;var p=(c*u+l*d)/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var m=o[0]=e+p*u,h=o[1]=t+p*d;return Math.sqrt((m-i)*(m-i)+(h-a)*(h-a))}var XT=new Qn,ZT=new Qn,QT=new Qn,$T=new Qn,eE=new Qn,tE=[],nE=new Qn;function rE(e,t){if(t<=180&&t>0){t=t/180*Math.PI,XT.fromArray(e[0]),ZT.fromArray(e[1]),QT.fromArray(e[2]),Qn.sub($T,XT,ZT),Qn.sub(eE,QT,ZT);var n=$T.len(),r=eE.len();if(!(n<.001||r<.001)){$T.scale(1/n),eE.scale(1/r);var i=$T.dot(eE);if(Math.cos(t)<i){var a=YT(ZT.x,ZT.y,QT.x,QT.y,XT.x,XT.y,tE,!1);nE.fromArray(tE),nE.scaleAndAdd(eE,a/Math.tan(Math.PI-t));var o=QT.x===ZT.x?(nE.y-ZT.y)/(QT.y-ZT.y):(nE.x-ZT.x)/(QT.x-ZT.x);if(isNaN(o))return;o<0?Qn.copy(nE,ZT):o>1&&Qn.copy(nE,QT),nE.toArray(e[1])}}}}function iE(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,XT.fromArray(e[0]),ZT.fromArray(e[1]),QT.fromArray(e[2]),Qn.sub($T,ZT,XT),Qn.sub(eE,QT,ZT);var r=$T.len(),i=eE.len();if(!(r<.001||i<.001)&&($T.scale(1/r),eE.scale(1/i),$T.dot(t)<Math.cos(n))){var a=YT(ZT.x,ZT.y,QT.x,QT.y,XT.x,XT.y,tE,!1);nE.fromArray(tE);var o=Math.PI/2,s=o+Math.acos(eE.dot(t))-n;if(s>=o)Qn.copy(nE,QT);else{nE.scaleAndAdd(eE,a/Math.tan(Math.PI/2-s));var c=QT.x===ZT.x?(nE.y-ZT.y)/(QT.y-ZT.y):(nE.x-ZT.x)/(QT.x-ZT.x);if(isNaN(c))return;c<0?Qn.copy(nE,ZT):c>1&&Qn.copy(nE,QT)}nE.toArray(e[1])}}}function aE(e,t,n,r){var i=n===`normal`,a=i?e:e.ensureState(n);a.ignore=t;var o=r.get(`smooth`);o=o===!0?.3:Math.max(+o,0)||0,a.shape=a.shape||{},a.shape.smooth=o;var s=r.getModel(`lineStyle`).getLineStyle();i?e.useStyle(s):a.style=s}function oE(e,t){var n=t.smooth,r=t.points;if(r){if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=Gn(r[0],r[1]),a=Gn(r[1],r[2]);if(!i||!a){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(i,a)*n,s=Jn([],r[1],r[0],o/i),c=Jn([],r[1],r[2],o/a),l=Jn([],s,c,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(c[0],c[1],c[0],c[1],r[2][0],r[2][1])}else for(var u=1;u<r.length;u++)e.lineTo(r[u][0],r[u][1])}}function sE(e,t,n){var r=e.getTextGuideLine(),i=e.getTextContent();if(!i){r&&e.removeTextGuideLine();return}for(var a=t.normal,o=a.get(`show`),s=i.ignore,c=0;c<pu.length;c++){var l=pu[c],u=t[l],d=l===`normal`;if(u){var f=u.get(`show`);if((d?s:X(i.states[l]&&i.states[l].ignore,s))||!X(f,o)){var p=d?r:r&&r.states[l];p&&(p.ignore=!0),r&&aE(r,!0,l,u);continue}r||(r=new pf,e.setTextGuideLine(r),!d&&(s||!o)&&aE(r,!0,`normal`,t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),aE(r,!1,l,u)}}if(r){dt(r.style,n),r.style.fill=null;var m=a.get(`showAbove`),h=e.textGuideLineConfig=e.textGuideLineConfig||{};h.showAbove=m||!1,r.buildPath=oE}}function cE(e,t){t||=`labelLine`;for(var n={normal:e.getModel(t)},r=0;r<fu.length;r++){var i=fu[r];n[i]=e.getModel([i,t])}return n}var lE=Math.PI/180;function uE(e,t,n,r,i,a,o,s,c,l){if(e.length<2)return;function u(e){for(var a=e.rB,o=a*a,s=0;s<e.list.length;s++){var c=e.list[s],l=Math.abs(c.label.y-n),u=r+c.len,d=u*u,f=t+(Math.sqrt(Math.abs((1-l*l/o)*d))+c.len2)*i,p=f-c.label.x;fE(c,c.targetTextWidth-p*i,!0),c.label.x=f}}function d(e){for(var a={list:[],maxY:0},o={list:[],maxY:0},s=0;s<e.length;s++)if(e[s].labelAlignTo===`none`){var c=e[s],l=c.label.y>n?o:a,d=Math.abs(c.label.y-n);if(d>=l.maxY){var f=c.label.x-t-c.len2*i,p=r+c.len;l.rB=Math.abs(f)<p?Math.sqrt(d*d/(1-f*f/p/p)):p,l.maxY=d}l.list.push(c)}u(a),u(o)}for(var f=e.length,p=0;p<f;p++)if(e[p].position===`outer`&&e[p].labelAlignTo===`labelLine`){var m=e[p].label.x-l;e[p].linePoints[1][0]+=m,e[p].label.x=l}SC(e,1,c,c+o)&&d(e)}function dE(e,t,n,r,i,a,o,s){for(var c=[],l=[],u=Number.MAX_VALUE,d=-Number.MAX_VALUE,f=0;f<e.length;f++){var p=e[f].label;gE(e[f])||(p.x<t?(u=Math.min(u,p.x),c.push(e[f])):(d=Math.max(d,p.x),l.push(e[f])))}for(var f=0;f<e.length;f++){var m=e[f];if(!gE(m)&&m.linePoints){if(m.labelStyleWidth!=null)continue;var p=m.label,h=m.linePoints,g=void 0;g=m.labelAlignTo===`edge`?p.x<t?h[2][0]-m.labelDistance-o-m.edgeDistance:o+i-m.edgeDistance-h[2][0]-m.labelDistance:m.labelAlignTo===`labelLine`?p.x<t?u-o-m.bleedMargin:o+i-d-m.bleedMargin:p.x<t?p.x-o-m.bleedMargin:o+i-p.x-m.bleedMargin,m.targetTextWidth=g,fE(m,g,!1)}}uE(l,t,n,r,1,i,a,o,s,d),uE(c,t,n,r,-1,i,a,o,s,u);for(var f=0;f<e.length;f++){var m=e[f];if(!gE(m)&&m.linePoints){var p=m.label,h=m.linePoints,_=m.labelAlignTo===`edge`,v=p.style.padding,y=v?v[1]+v[3]:0,b=p.style.backgroundColor?0:y,x=m.rect.width+b,S=h[1][0]-h[2][0];_?p.x<t?h[2][0]=o+m.edgeDistance+x+m.labelDistance:h[2][0]=o+i-m.edgeDistance-x-m.labelDistance:(p.x<t?h[2][0]=p.x+m.labelDistance:h[2][0]=p.x-m.labelDistance,h[1][0]=h[2][0]+S),h[1][1]=h[2][1]=p.y}}}function fE(e,t,n){if(e.labelStyleWidth==null){var r=e.label,i=r.style,a=e.rect,o=i.backgroundColor,s=i.padding,c=s?s[1]+s[3]:0,l=i.overflow,u=a.width+(o?0:c);if(t<u||n){if(l&&l.match(`break`)){r.setStyle(`backgroundColor`,null),r.setStyle(`width`,t-c);var d=r.getBoundingRect();r.setStyle(`width`,Math.ceil(d.width)),r.setStyle(`backgroundColor`,o)}else{var f=t-c,p=t<u?f:n?f>e.unconstrainedWidth?null:f:null;r.setStyle(`width`,p)}pE(a,r)}}}function pE(e,t){hE.rect=e,gC(hE,t,mE)}var mE={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},hE={};function gE(e){return e.position===`center`}function _E(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*lE,s=t.getLayout(`viewRect`),c=t.getLayout(`r`),l=s.width,u=s.x,d=s.y,f=s.height;function p(e){e.ignore=!0}function m(e){if(!e.ignore)return!0;for(var t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){var s=t.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),g=s.getTextGuideLine(),_=t.getItemModel(e),v=_.getModel(`label`),y=v.get(`position`)||_.get([`emphasis`,`label`,`position`]),b=v.get(`distanceToLabelLine`),x=v.get(`alignTo`),S=bc(v.get(`edgeDistance`),l),C=v.get(`bleedMargin`);C??=Math.min(l,f)>200?10:2;var w=_.getModel(`labelLine`),T=w.get(`length`);T=bc(T,l);var E=w.get(`length2`);if(E=bc(E,l),Math.abs(d.endAngle-d.startAngle)<o){G(h.states,p),h.ignore=!0,g&&(G(g.states,p),g.ignore=!0);return}if(m(h)){var D=(d.startAngle+d.endAngle)/2,O=Math.cos(D),k=Math.sin(D),A,j,M,N;r=d.cx,i=d.cy;var P=y===`inside`||y===`inner`;if(y===`center`)A=d.cx,j=d.cy,N=`center`;else{var F=(P?(d.r+d.r0)/2*O:d.r*O)+r,I=(P?(d.r+d.r0)/2*k:d.r*k)+i;if(A=F+O*3,j=I+k*3,!P){var ee=F+O*(T+c-d.r),te=I+k*(T+c-d.r),L=ee+(O<0?-1:1)*E,ne=te;A=x===`edge`?O<0?u+S:u+l-S:L+(O<0?-b:b),j=ne,M=[[F,I],[ee,te],[L,ne]]}N=P?`center`:x===`edge`?O>0?`right`:`left`:O>0?`left`:`right`}var R=Math.PI,re=0,ie=v.get(`rotate`);if(Tt(ie))re=R/180*ie;else if(y===`center`)re=0;else if(ie===`radial`||ie===!0)re=O<0?-D+R:-D;else if(ie===`tangential`||ie===`tangential-noflip`&&y!==`outside`&&y!==`outer`){var ae=Math.atan2(O,k);ae<0&&(ae=R*2+ae),k>0&&ie!==`tangential-noflip`&&(ae=R+ae),re=ae-R}if(a=!!re,h.x=A,h.y=j,h.rotation=re,h.setStyle({verticalAlign:`middle`}),P){h.setStyle({align:N});var oe=h.states.select;oe&&(oe.x+=h.x,oe.y+=h.y)}else{var z=new fr(0,0,0,0);pE(z,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new Qn(O,k),linePoints:M,textAlign:N,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:z,unconstrainedWidth:z.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:P})}}),!a&&e.get(`avoidLabelOverlap`)&&dE(n,r,i,c,l,f,u,d);for(var h=0;h<n.length;h++){var g=n[h],_=g.label,v=g.labelLine,y=isNaN(_.x)||isNaN(_.y);if(_){_.setStyle({align:g.textAlign}),y&&(G(_.states,p),_.ignore=!0);var b=_.states.select;b&&(b.x+=_.x,b.y+=_.y)}if(v){var x=g.linePoints;y||!x?(G(v.states,p),v.ignore=!0):(rE(x,g.minTurnAngle),iE(x,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:x}),_.__hostTarget.textGuideLineConfig={anchor:new Qn(x[0][0],x[0][1])})}}}var vE=Math.PI*2,yE=Math.PI/180,bE=ql(`pie`,xE);function xE(e,t){e.eachSeriesByType(`pie`,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=$_(e,t),a=i.cx,o=i.cy,s=i.r,c=i.r0,l=i.viewRect,u=-e.get(`startAngle`)*yE,d=e.get(`endAngle`),f=e.get(`padAngle`)*yE;d=d===`auto`?u-vE:-d*yE;var p=e.get(`minAngle`)*yE+f,m=0;n.each(r,function(e){!isNaN(e)&&m++});var h=n.getSum(r),g=Math.PI/(h||m)*2,_=e.get(`clockwise`),v=e.get(`roseType`),y=e.get(`stillShowZeroSum`),b=n.getDataExtent(r);b[0]=0;var x=_?1:-1,S=[u,d],C=x*f/2;es(S,!_),u=S[0],d=S[1];var w=SE(e);w.startAngle=u,w.endAngle=d,w.clockwise=_,w.cx=a,w.cy=o,w.r=s,w.r0=c;var T=Math.abs(d-u),E=T,D=0,O=u;if(n.setLayout({viewRect:l,r:s}),n.each(r,function(e,t){var r;if(isNaN(e)){n.setItemLayout(t,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:a,cy:o,r0:c,r:v?NaN:s});return}r=v===`area`?T/m:h===0&&y?g:e*g,r<p?(r=p,E-=p):D+=e;var i=O+x*r,l=0,u=0;f>r?(l=O+x*r/2,u=l):(l=O+C,u=i-C),n.setItemLayout(t,{angle:r,startAngle:l,endAngle:u,clockwise:_,cx:a,cy:o,r0:c,r:v?yc(e,b,[c,s]):s}),O=i}),E<vE&&m){if(E<=.001){var k=T/m;n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t);r.angle=k;var i=0,a=0;k<f?(i=u+x*(t+1/2)*k,a=i):(i=u+x*t*k+C,a=u+x*(t+1)*k-C),r.startAngle=i,r.endAngle=a}})}else g=E/D,O=u,n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t),i=r.angle===p?p:e*g,a=0,o=0;i<f?(a=O+x*i/2,o=a):(a=O+C,o=O+x*i-C),r.startAngle=a,r.endAngle=o,O+=x*i}})}})}var SE=bl(),CE=function(e){U(t,e);function t(t,n,r){var i=e.call(this)||this;i.z2=2;var a=new Gs;return i.setTextContent(a),i.updateData(t,n,r,!0),i}return t.prototype.updateData=function(e,t,n,r){var i=this,a=e.hostModel,o=e.getItemModel(t),s=o.getModel(`emphasis`),c=e.getItemLayout(t),l=W(mT(o.getModel(`itemStyle`),c,!0),c);if(isNaN(l.startAngle)){i.setShape(l);return}if(r){i.setShape(l);var u=a.getShallow(`animationType`);a.ecModel.ssr?(Hf(i,{scaleX:0,scaleY:0},a,{dataIndex:t,isFrom:!0}),i.originX=l.cx,i.originY=l.cy):u===`scale`?(i.shape.r=c.r0,Hf(i,{shape:{r:c.r}},a,t)):n==null?(i.shape.endAngle=c.startAngle,Vf(i,{shape:{endAngle:c.endAngle}},a,t)):(i.setShape({startAngle:n,endAngle:n}),Hf(i,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},a,t))}else qf(i),Vf(i,{shape:l},a,t);i.useStyle(e.getItemVisual(t,`style`)),cd(i,o);var d=(c.startAngle+c.endAngle)/2,f=a.get(`selectedOffset`),p=Math.cos(d)*f,m=Math.sin(d)*f,h=o.getShallow(`cursor`);h&&i.attr(`cursor`,h),this._updateLabel(a,e,t),i.ensureState(`emphasis`).shape=W({r:c.r+(s.get(`scale`)&&s.get(`scaleSize`)||0)},mT(s.getModel(`itemStyle`),c)),W(i.ensureState(`select`),{x:p,y:m,shape:mT(o.getModel([`select`,`itemStyle`]),c)}),W(i.ensureState(`blur`),{shape:mT(o.getModel([`blur`,`itemStyle`]),c)});var g=i.getTextGuideLine(),_=i.getTextContent();g&&W(g.ensureState(`select`),{x:p,y:m}),W(_.ensureState(`select`),{x:p,y:m}),id(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e,t,n){var r=this,i=t.getItemModel(n),a=i.getModel(`labelLine`),o=t.getItemVisual(n,`style`),s=o&&o.fill,c=o&&o.opacity;Gp(r,Kp(i),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:c,defaultText:e.getFormattedLabel(n,`normal`)||t.getName(n)});var l=r.getTextContent();r.setTextConfig({position:null,rotation:null}),l.attr({z2:10});var u=i.get([`label`,`position`]);if(u!==`outside`&&u!==`outer`)r.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new pf,this.setTextGuideLine(d)),sE(this,cE(i),{stroke:s,opacity:Nt(a.get([`lineStyle`,`opacity`]),c,1)})}},t}(af),wE=function(e){U(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`pie`,t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n,r){var i=e.getData(),a=this._data,o=this.group,s;if(!a&&i.count()>0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l<i.count();++l)c=i.getItemLayout(l);c&&(s=c.startAngle)}if(this._emptyCircleSector&&o.remove(this._emptyCircleSector),i.count()===0&&e.get(`showEmptyCircle`)){var u=new af({shape:ct(SE(e))});u.useStyle(e.getModel(`emptyCircleStyle`).getItemStyle()),this._emptyCircleSector=u,o.add(u)}i.diff(a).add(function(e){var t=new CE(i,e,s);i.setItemGraphicEl(e,t),o.add(t)}).update(function(e,t){var n=a.getItemGraphicEl(t);n.updateData(i,e,s),n.off(`click`),o.add(n),i.setItemGraphicEl(e,n)}).remove(function(t){Kf(a.getItemGraphicEl(t),e,t)}).execute(),_E(e),e.get(`animationTypeUpdate`)!==`expansion`&&(this._data=i)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}},t.type=`pie`,t}(ob);function TE(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension(`value`),r=n.get(t,e);return!(Tt(r)&&!isNaN(r)&&r<0)})}}}function EE(e){e.registerChartView(wE),e.registerSeriesModel(JT),VT(`pie`,e.registerAction),e.registerLayout(bE),e.registerProcessor(WT(`pie`)),e.registerProcessor(TE(`pie`))}var DE=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),OE=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new DE(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new DE(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new DE(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new DE(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new DE(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new DE(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),kE=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,AE=[],jE=Qt.browser.firefox&&+Qt.browser.version.split(`.`)[0]<39;function ME(e,t,n,r){return n||={},r?NE(e,t,n):jE&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?NE(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function NE(e,t,n){if(Qt.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Ng(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Ag(AE,e,r,i)){n.zrX=AE[0],n.zrY=AE[1];return}}n.zrX=n.zrY=0}function PE(e){return e||window.event}function FE(e,t,n){if(t=PE(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&ME(e,i,t,n)}else{ME(e,t,t,n);var a=IE(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&kE.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function IE(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function LE(e,t,n,r){e.addEventListener(t,n,r)}function RE(e,t,n,r){e.removeEventListener(t,n,r)}var zE=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function BE(e){return e.which===2||e.which===3}var VE=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=ME(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in WE)if(WE.hasOwnProperty(t)){var n=WE[t](this._track,e);if(n)return n}},e}();function HE(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function UE(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var WE={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=HE(r)/HE(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=UE(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},GE=`silent`;function KE(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:qE}}function qE(){zE(this.event)}var JE=function(e){U(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Ua),YE=function(){function e(e,t){this.x=e,this.y=t}return e}(),XE=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],ZE=new fr(0,0,0,0),QE=function(e){U(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new YE(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new JE,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new OE(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(G(XE,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=tD(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new YE(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new YE(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=KE(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new YE(e,t);if(eD(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new fr(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(ZE.copy(u.getBoundingRect()),u.transform&&ZE.applyTransform(u.transform),ZE.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(eD(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new VE;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new YE;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(Ua);G([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){QE.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=tD(this,n,r),a,o;if((e!==`mouseup`||!i)&&(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||Gn(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function $E(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||GE}return!1}function eD(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=$E(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==GE)){t.target=o;break}}}function tD(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var nD=32,rD=7;function iD(e){for(var t=0;e>=nD;)t|=e&1,e>>=1;return e+t}function aD(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;oD(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function oD(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function sD(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function cD(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function lD(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function uD(e,t){var n=rD,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=lD(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=cD(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0){for(c=0;c<i;c++)e[d+c]=o[l+c];return}if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l];return}for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=lD(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=cD(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=rD||m>=rD);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0){for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];return}if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-lD(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-cD(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=rD||g>=rD);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function dD(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<nD){a=aD(e,n,r,t),sD(e,n,r,n+a,t);return}var o=uD(e,t),s=iD(i);do{if(a=aD(e,n,r,t),a<s){var c=i;c>s&&(c=s),sD(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var fD=!1;function pD(){fD||(fD=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function mD(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var hD=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=mD}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,dD(n,mD)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||=e.__clipPaths=[],i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var c=r,l=e;c;)c.parent=l,c.updateTransform(),o[a++]=c,l=c,c=c.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var u=e.childrenRef(),d=0;d<u.length;d++){var f=u[d];e.__dirty&&(f.__dirty|=1),this._updateAndAddDisplayable(f,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(pD(),p.z=0),isNaN(p.z2)&&(pD(),p.z2=0),isNaN(p.zlevel)&&(pD(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,o,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=ft(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),gD=Qt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function _D(){return new Date().getTime()}var vD=function(e){U(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=_D()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(gD(t),!e._paused&&e.update())}gD(t)},t.prototype.start=function(){this._running||(this._time=_D(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=_D(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=_D()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Ha(e,t.loop);return this.addAnimator(n),n},t}(Ua),yD=300,bD=Qt.domSupported,xD=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:K(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),SD={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},CD=!1;function wD(e){var t=e.pointerType;return t===`pen`||t===`touch`}function TD(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function ED(e){e&&(e.zrByTouch=!0)}function DD(e,t){return FE(e.dom,new kD(e,t),!0)}function OD(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var kD=function(){function e(e,t){this.stopPropagation=Yt,this.stopImmediatePropagation=Yt,this.preventDefault=Yt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),AD={mousedown:function(e){e=FE(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=FE(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=FE(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=FE(this.dom,e);var t=e.toElement||e.relatedTarget;OD(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){CD=!0,e=FE(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){CD||(e=FE(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=FE(this.dom,e),ED(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),AD.mousemove.call(this,e),AD.mousedown.call(this,e)},touchmove:function(e){e=FE(this.dom,e),ED(e),this.handler.processGesture(e,`change`),AD.mousemove.call(this,e)},touchend:function(e){e=FE(this.dom,e),ED(e),this.handler.processGesture(e,`end`),AD.mouseup.call(this,e),+new Date-this.__lastTouchMoment<yD&&AD.click.call(this,e)},pointerdown:function(e){AD.mousedown.call(this,e)},pointermove:function(e){wD(e)||AD.mousemove.call(this,e)},pointerup:function(e){AD.mouseup.call(this,e)},pointerout:function(e){wD(e)||AD.mouseout.call(this,e)}};G([`click`,`dblclick`,`contextmenu`],function(e){AD[e]=function(t){t=FE(this.dom,t),this.trigger(e,t)}});var jD={pointermove:function(e){wD(e)||jD.mousemove.call(this,e)},pointerup:function(e){jD.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function MD(e,t){var n=t.domHandlers;Qt.pointerEventsSupported?G(xD.pointer,function(r){PD(t,r,function(t){n[r].call(e,t)})}):(Qt.touchEventsSupported&&G(xD.touch,function(r){PD(t,r,function(i){n[r].call(e,i),TD(t)})}),G(xD.mouse,function(r){PD(t,r,function(i){i=PE(i),t.touching||n[r].call(e,i)})}))}function ND(e,t){Qt.pointerEventsSupported?G(SD.pointer,n):Qt.touchEventsSupported||G(SD.mouse,n);function n(n){function r(r){r=PE(r),OD(e,r.target)||(r=DD(e,r),t.domHandlers[n].call(e,r))}PD(t,n,r,{capture:!0})}}function PD(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,LE(e.domTarget,t,n,r)}function FD(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&RE(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var ID=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),LD=function(e){U(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new ID(t,AD),bD&&(r._globalHandlerScope=new ID(document,jD)),MD(r,r._localHandlerScope),r}return t.prototype.dispose=function(){FD(this._localHandlerScope),bD&&FD(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,bD&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?ND(this,t):FD(t)}},t}(Ua),RD={},zD={};function BD(e){delete zD[e]}function VD(e){if(!e)return!1;if(typeof e==`string`)return ha(e,1)<Ka;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=ha(t[i].color,1);return n/=r,n<Ka}return!1}var HD=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new hD,a=n.renderer||`canvas`;RD[a]||(a=yt(RD)[0]),n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new RD[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!Qt.node&&!Qt.worker&&!s?new LD(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?Qt.touchEventsSupported:!!l,d=44,f;u&&(f=X(n.pointerSize,d)),this.handler=new QE(i,o,c,o.root,f),this.animation=new vD({stage:{update:s?null:function(){return r._flush(!1)}}}),s||this.animation.start()}return e.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=VD(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||this._refresh({animUpdate:!e,refresh:!0,refreshHover:!1})},e.prototype._refresh=function(e){e.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:e.refresh,refreshHover:e.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!0)},e.prototype._flush=function(e){var t,n=_D(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=_D();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Ld&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.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,BD(this.id))},e}();function UD(e,t){var n=new HD(ot(),e,t);return zD[n.id]=n,n}function WD(e,t){RD[e]=t}var GD=``;typeof navigator<`u`&&(GD=navigator.platform||``);var KD=`rgba(0, 0, 0, 0.2)`,qD=Q.color.theme[0],JD=fa(qD,null,null,.9),YD={darkMode:`auto`,colorBy:`series`,color:Q.color.theme,gradientColor:[JD,qD],aria:{decal:{decals:[{color:KD,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:KD,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:KD,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:KD,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:KD,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:KD,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:GD.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},XD=Gt();function ZD(e,t,n){var r=XD.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}var QD,$D,eO,tO=`\0_ec_inner`,nO=1,rO=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(e,t,n,r,i,a){r||={},this.option=null,this._theme=new hm(r),this._locale=new hm(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=cO(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,cO(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);!this.option||e===`recreate`?eO(this,i):(this.restoreData(),this._mergeOption(i,t)),n=!0}if((e===`timeline`||e===`media`)&&this.restoreData(),!e||e===`recreate`||e===`timeline`){var a=r.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,t))}if(!e||e===`recreate`||e===`media`){var o=r.getMediaOption(this);o.length&&G(o,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=Gt(),s=t&&t.replaceMergeMainTypeMap;xm(this),G(e,function(e,t){e!=null&&(lv.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?ct(e):lt(n[t],e,!0))}),s&&s.each(function(e,t){lv.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),lv.topologicalTravel(a,lv.getAllClassMainTypes(),c,this);function c(t){var a=ZD(this,t,el(e[t])),o=r.get(t),c=al(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);_l(c,t,lv),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;G(c,function(e,n){var r=e.existing,i=e.newOption;if(!i)r&&(r.mergeOption({},this),r.optionUpdated({},!1));else{var a=t===`series`,o=lv.getClass(t,e.keyInfo.subType,!a);if(!o)return;if(t===`tooltip`){if(f)return;f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=W({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),W(r,s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}r?(l.push(r.option),u.push(r),d++):(l.push(void 0),u.push(void 0))},this),n[t]=l,r.set(t,u),i.set(t,d),t===`series`&&QD(this)}this._seriesIndices||QD(this)},t.prototype.getOption=function(){var e=ct(this.option);return G(e,function(t,n){if(lv.hasClass(n)){for(var r=el(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!gl(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[tO],e},t.prototype.setTheme=function(e){this._theme=new hm(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i<n.length;i++)if(n[i])return n[i]}}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n=e.index,r=e.id,i=e.name,a=this._componentsMap.get(t);if(!a||!a.length)return[];var o;return n==null?o=r==null?i==null?_t(a,function(e){return!!e}):oO(`name`,i,a):oO(`id`,r,a):(o=[],G(el(n),function(e){a[e]&&o.push(a[e])})),sO(o,e)},t.prototype.findComponents=function(e){var t=e.query,n=e.mainType,r=i(t);return a(sO(r?this.queryComponents(r):_t(this._componentsMap.get(n),function(e){return!!e}),e));function i(e){var t=n+`Index`,r=n+`Id`,i=n+`Name`;return e&&(e[t]!=null||e[r]!=null||e[i]!=null)?{mainType:n,index:e[t],id:e[r],name:e[i]}:null}function a(t){return e.filter?_t(t,e.filter):t}},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(Ct(e)){var i=t,a=e;r.each(function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&a.call(i,t,r,r.componentIndex)}})}else for(var o=J(e)?r.get(e):Y(e)?this.findComponents(e):null,s=0;o&&s<o.length;s++){var c=o[s];c&&t.call(n,c,c.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=ml(e,null);return _t(this._componentsMap.get(`series`),function(e){return!!e&&t!=null&&e.name===t})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get(`series`)[e]},t.prototype.getSeriesByType=function(e){return _t(this._componentsMap.get(`series`),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return _t(this._componentsMap.get(`series`),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get(`series`)},t.prototype.eachSeries=function(e,t){$D(this),G(this._seriesIndices,function(n){var r=this._componentsMap.get(`series`)[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){G(this._componentsMap.get(`series`),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){$D(this),G(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];i.subType===e&&t.call(n,i,r)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return G(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return $D(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){$D(this);var n=[];G(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];e.call(t,i,r)&&n.push(r)},this),this._seriesIndices=n,this._seriesIndicesMap=Gt(n)},t.prototype.restoreData=function(e){QD(this);var t=this._componentsMap,n=[];t.each(function(e,t){lv.hasClass(t)&&n.push(t)}),lv.topologicalTravel(n,lv.getAllClassMainTypes(),function(n){G(t.get(n),function(t){t&&(n!==`series`||!iO(t,e))&&t.restoreData()})})},t.internalField=function(){QD=function(e){var t=e._seriesIndices=[];G(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=Gt(t)},$D=function(e){},eO=function(e,t){e.option={},e.option[tO]=nO,e._componentsMap=Gt({series:[]}),e._componentsCount=Gt();var n=t.aria;Y(n)&&n.enabled==null&&(n.enabled=!0),aO(t,e._theme.option),lt(t,YD,!1),e._mergeOption(t,null)}}(),t}(hm);function iO(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return n!=null&&e.componentIndex!==n||r!=null&&e.id!==r||i!=null&&e.name!==i}}function aO(e,t){var n=e.color&&!e.colorLayer;G(t,function(t,r){r===`colorLayer`&&n||r===`color`&&e.color||lv.hasClass(r)||(typeof t==`object`?e[r]=e[r]?lt(e[r],t,!1):ct(t):e[r]??(e[r]=t))})}function oO(e,t,n){if(q(t)){var r=Gt();return G(t,function(e){e!=null&&ml(e,null)!=null&&r.set(e,!0)}),_t(n,function(t){return t&&r.get(t[e])})}var i=ml(t,null);return _t(n,function(t){return t&&i!=null&&t[e]===i})}function sO(e,t){return t.hasOwnProperty(`subType`)?_t(e,function(e){return e&&e.subType===t.subType}):e}function cO(e){var t=Gt();return e&&G(el(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}mt(rO,pv);var lO=/^(min|max)?(.+)$/,uO=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(G(el(e.series),function(e){e&&e.data&&Dt(e.data)&&zt(e.data)}),G(el(e.dataset),function(e){e&&e.source&&Dt(e.source)&&zt(e.source)})),e=ct(e);var r=this._optionBackup,i=dO(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],ct(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent(`timeline`);r&&(t=ct(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),r=this._mediaList,i=this._mediaDefault,a=[],o=[];if(!r.length&&!i)return o;for(var s=0,c=r.length;s<c;s++)fO(r[s].query,t,n)&&a.push(s);return!a.length&&i&&(a=[-1]),a.length&&!mO(a,this._currentMediaIndices)&&(o=K(a,function(e){return ct(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o},e}();function dO(e,t,n){var r=[],i,a,o=e.baseOption,s=e.timeline,c=e.options,l=e.media,u=!!e.media,d=!!(c||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((d||u)&&(e.options=e.media=null),a=e),u&&q(l)&&G(l,function(e){e&&e.option&&(e.query?r.push(e):i||=e)}),f(a),G(c,function(e){return f(e)}),G(r,function(e){return f(e.option)});function f(e){G(t,function(t){t(e,n)})}return{baseOption:a,timelineOptions:c||[],mediaDefault:i,mediaList:r}}function fO(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return G(e,function(e,t){var n=t.match(lO);if(!(!n||!n[1]||!n[2])){var a=n[1];pO(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}function pO(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function mO(e,t){return e.join(`,`)===t.join(`,`)}var hO=G,gO=Y,_O=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function vO(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=_O.length;n<r;n++){var i=_O[n],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?lt(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?lt(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function yO(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,dt(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function bO(e){yO(e,`itemStyle`),yO(e,`lineStyle`),yO(e,`areaStyle`),yO(e,`label`),yO(e,`labelLine`),yO(e,`upperLabel`),yO(e,`edgeLabel`)}function xO(e,t){var n=gO(e)&&e[t],r=gO(n)&&n.textStyle;if(r)for(var i=0,a=nl.length;i<a;i++){var o=nl[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}function SO(e){e&&(bO(e),xO(e,`label`),e.emphasis&&xO(e.emphasis,`label`))}function CO(e){if(gO(e)){vO(e),bO(e),xO(e,`label`),xO(e,`upperLabel`),xO(e,`edgeLabel`),e.emphasis&&(xO(e.emphasis,`label`),xO(e.emphasis,`upperLabel`),xO(e.emphasis,`edgeLabel`));var t=e.markPoint;t&&(vO(t),SO(t));var n=e.markLine;n&&(vO(n),SO(n));var r=e.markArea;r&&SO(r);var i=e.data;if(e.type===`graph`){i||=e.nodes;var a=e.links||e.edges;if(a&&!Dt(a))for(var o=0;o<a.length;o++)SO(a[o]);G(e.categories,function(e){bO(e)})}if(i&&!Dt(i))for(var o=0;o<i.length;o++)SO(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)SO(s[o]);if(n=e.markLine,n&&n.data)for(var c=n.data,o=0;o<c.length;o++)q(c[o])?(SO(c[o][0]),SO(c[o][1])):SO(c[o]);e.type===`gauge`?(xO(e,`axisLabel`),xO(e,`title`),xO(e,`detail`)):e.type===`treemap`?(yO(e.breadcrumb,`itemStyle`),G(e.levels,function(e){bO(e)})):e.type===`tree`&&bO(e.leaves)}}function wO(e){return q(e)?e:e?[e]:[]}function TO(e){return(q(e)?e[0]:e)||{}}function EO(e,t){hO(wO(e.series),function(e){gO(e)&&CO(e)});var n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),hO(n,function(t){hO(wO(e[t]),function(e){e&&(xO(e,`axisLabel`),xO(e.axisPointer,`label`))})}),hO(wO(e.parallel),function(e){var t=e&&e.parallelAxisDefault;xO(t,`axisLabel`),xO(t&&t.axisPointer,`label`)}),hO(wO(e.calendar),function(e){yO(e,`itemStyle`),xO(e,`dayLabel`),xO(e,`monthLabel`),xO(e,`yearLabel`)}),hO(wO(e.radar),function(e){xO(e,`name`),e.name&&e.axisName==null&&(e.axisName=e.name,delete e.name),e.nameGap!=null&&e.axisNameGap==null&&(e.axisNameGap=e.nameGap,delete e.nameGap)}),hO(wO(e.geo),function(e){gO(e)&&(SO(e),hO(wO(e.regions),function(e){SO(e)}))}),hO(wO(e.timeline),function(e){SO(e),yO(e,`label`),yO(e,`itemStyle`),yO(e,`controlStyle`,!0);var t=e.data;q(t)&&G(t,function(e){Y(e)&&(yO(e,`label`),yO(e,`itemStyle`))})}),hO(wO(e.toolbox),function(e){yO(e,`iconStyle`),hO(e.feature,function(e){yO(e,`iconStyle`)})}),xO(TO(e.axisPointer),`label`),xO(TO(e.tooltip).axisPointer,`label`)}function DO(e,t){for(var n=t.split(`,`),r=e,i=0;i<n.length&&(r&&=r[n[i]],r!=null);i++);return r}function OO(e,t,n,r){for(var i=t.split(`,`),a=e,o,s=0;s<i.length-1;s++)o=i[s],a[o]??(a[o]={}),a=a[o];(r||a[i[s]]==null)&&(a[i[s]]=n)}function kO(e){e&&G(AO,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var AO=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],jO=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],MO=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]];function NO(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<MO.length;n++){var r=MO[n][1],i=MO[n][0];t[r]!=null&&(t[i]=t[r])}}function PO(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function FO(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function IO(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus??(e.emphasis.focus=`adjacency`))}function LO(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&LO(e[n].children,t)}function RO(e,t){EO(e,t),e.series=el(e.series),G(e.series,function(e){if(Y(e)){var t=e.type;if(t===`line`)e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(t===`pie`||t===`gauge`){e.clockWise!=null&&(e.clockwise=e.clockWise),PO(e.label);var n=e.data;if(n&&!Dt(n))for(var r=0;r<n.length;r++)PO(n[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){var i=DO(e,`pointer.color`);i!=null&&OO(e,`itemStyle.color`,i)}else if(t===`bar`){NO(e),NO(e.backgroundStyle),NO(e.emphasis);var n=e.data;if(n&&!Dt(n))for(var r=0;r<n.length;r++)typeof n[r]==`object`&&(NO(n[r]),NO(n[r]&&n[r].emphasis))}else if(t===`sunburst`){var a=e.highlightPolicy;a&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=a)),FO(e),LO(e.data,FO)}else t===`graph`||t===`sankey`?IO(e):t===`map`&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&dt(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),kO(e)}}),e.dataRange&&(e.visualMap=e.dataRange),G(jO,function(t){var n=e[t];n&&(q(n)||(n=[n]),G(n,function(e){kO(e)}))})}var zO=Jl(BO);function BO(e){var t=Gt();e.eachSeries(function(e){var n=e.get(`stack`);if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),a={stackResultDimension:i.getCalculationInfo(`stackResultDimension`),stackedOverDimension:i.getCalculationInfo(`stackedOverDimension`),stackedDimension:i.getCalculationInfo(`stackedDimension`),stackedByDimension:i.getCalculationInfo(`stackedByDimension`),isStackedByIndex:i.getCalculationInfo(`isStackedByIndex`),data:i,seriesModel:e};if(!a.stackedDimension||!(a.isStackedByIndex||a.stackedByDimension))return;r.push(a)}}),t.each(function(e){e.length!==0&&((e[0].seriesModel.get(`stackOrder`)||`seriesAsc`)===`seriesDesc`&&e.reverse(),G(e,function(t,n){t.data.setCalculationInfo(`stackedOnSeries`,n>0?e[n-1].seriesModel:null)}),VO(e))})}function VO(e){G(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Ac(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var HO=function(){function e(){this.group=new Ld,this.uid=yg(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();sn(HO),mn(HO);var UO=bl(),WO={itemStyle:hn(fm,!0),lineStyle:hn(lm,!0)},GO={lineStyle:`stroke`,itemStyle:`fill`};function KO(e,t){return e.visualStyleMapper||WO[t]||(console.warn(`Unknown style type '`+t+`'.`),WO.itemStyle)}function qO(e,t){return e.visualDrawType||GO[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var JO={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=KO(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=qO(e,r),c=a[s],l=Ct(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||Ct(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||Ct(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=W({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},YO=new hm,XO={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=KO(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){YO.option=n[r];var o=i(YO);W(e.ensureUniqueItemVisual(t,`style`),o),YO.option.decal&&(e.setItemVisual(t,`decal`,YO.option.decal),YO.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},ZO={performRawSeries:!0,overallReset:function(e){var t=Gt();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();UO(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=UO(e).scope,a=qO(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},QO=Math.PI;function $O(e,t){t||={},dt(t,{text:`loading`,textColor:Q.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Ld,r=new Bs({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Gs({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Bs({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new Sf({shape:{startAngle:-QO/2,endAngle:-QO/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:QO*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:QO*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var ek=function(){function e(e,t,n,r){this._stageTaskMap=Gt(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):Kl(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=Gt();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;G(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});It(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;G(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=Gt(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||xv({plan:ak,reset:ok,count:lk}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||xv({reset:tk});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=Gt(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;It(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):G(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,xv({reset:nk,onDirty:ik})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return Ct(e)&&(e={overallReset:e,seriesType:uk(e)}),e.uid=yg(`stageHandler`),t&&(e.visualType=t),e},e}();function tk(e){e.overallReset(e.ecModel,e.api,e.payload)}function nk(e){return e.dirtyOnOverallProgress&&rk}function rk(){this.agent.dirty(),this.getDownstream().dirty()}function ik(){this.agent&&this.agent.dirty()}function ak(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function ok(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=el(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?K(t,function(e,t){return ck(t)}):sk}var sk=ck(0);function ck(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(r,a);else i&&i.progress&&i.progress(t,r)}}function lk(e){return e.data.count()}function uk(e){pk=null;try{e(dk,fk)}catch{}return pk}var dk={},fk={},pk;mk(dk,rO),mk(fk,ou),dk.eachSeriesByType=dk.eachRawSeriesByType=function(e){pk=e},dk.eachComponent=function(e){e.mainType===`series`&&e.subType&&(pk=e.subType)};function mk(e,t){for(var n in t.prototype)e[n]=Yt}var $=Q.darkColor,hk=$.background,gk=function(){return{axisLine:{lineStyle:{color:$.axisLine}},splitLine:{lineStyle:{color:$.axisSplitLine}},splitArea:{areaStyle:{color:[$.backgroundTint,$.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:$.axisMinorSplitLine}},axisLabel:{color:$.axisLabel},axisName:{}}},_k={label:{color:$.secondary},itemStyle:{borderColor:$.borderTint},dividerLineStyle:{color:$.border}},vk={darkMode:!0,color:$.theme,backgroundColor:hk,axisPointer:{lineStyle:{color:$.border},crossStyle:{color:$.borderShade},label:{color:$.tertiary}},legend:{textStyle:{color:$.secondary},pageTextStyle:{color:$.tertiary}},textStyle:{color:$.secondary},title:{textStyle:{color:$.primary},subtextStyle:{color:$.quaternary}},toolbox:{iconStyle:{borderColor:$.accent50},feature:{dataView:{backgroundColor:hk,textColor:$.primary,textareaColor:$.background,textareaBorderColor:$.border,buttonColor:$.accent50,buttonTextColor:$.neutral00}}},tooltip:{backgroundColor:$.neutral20,defaultBorderColor:$.border,textStyle:{color:$.tertiary}},dataZoom:{borderColor:$.accent10,textStyle:{color:$.tertiary},brushStyle:{color:$.backgroundTint},handleStyle:{color:$.neutral00,borderColor:$.accent20},moveHandleStyle:{color:$.accent40},emphasis:{handleStyle:{borderColor:$.accent50}},dataBackground:{lineStyle:{color:$.accent30},areaStyle:{color:$.accent20}},selectedDataBackground:{lineStyle:{color:$.accent50},areaStyle:{color:$.accent30}}},visualMap:{textStyle:{color:$.secondary},handleStyle:{borderColor:$.neutral30}},timeline:{lineStyle:{color:$.accent10},label:{color:$.tertiary},controlStyle:{color:$.accent30,borderColor:$.accent30}},calendar:{itemStyle:{color:$.neutral00,borderColor:$.neutral20},dayLabel:{color:$.tertiary},monthLabel:{color:$.secondary},yearLabel:{color:$.secondary}},matrix:{x:_k,y:_k,backgroundColor:{borderColor:$.axisLine},body:{itemStyle:{borderColor:$.borderTint}}},timeAxis:gk(),logAxis:gk(),valueAxis:gk(),categoryAxis:gk(),line:{symbol:`circle`},graph:{color:$.theme},gauge:{title:{color:$.secondary},axisLine:{lineStyle:{color:[[1,$.neutral05]]}},axisLabel:{color:$.axisLabel},detail:{color:$.primary}},candlestick:{itemStyle:{color:`#f64e56`,color0:`#54ea92`,borderColor:`#f64e56`,borderColor0:`#54ea92`}},funnel:{itemStyle:{borderColor:$.background}},radar:function(){var e=gk();return e.axisName={color:$.axisLabel},e.axisLine.lineStyle.color=$.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:$.neutral20,textStyle:{color:$.secondary}},emphasis:{itemStyle:{color:$.neutral30}}}},sunburst:{itemStyle:{borderColor:$.background}},map:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},label:{color:$.tertiary},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}}},geo:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{color:$.highlight}}}};vk.categoryAxis.splitLine.show=!1;var yk=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(J(e)){var i=rn(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var a=[`Index`,`Name`,`Id`],o={name:1,dataIndex:1,dataType:1};G(e,function(e,i){for(var s=!1,c=0;c<a.length;c++){var l=a[c],u=i.lastIndexOf(l);if(u>0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),bk=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],xk=bk.concat([`symbolKeepAspect`]),Sk={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o<bk.length;o++){var s=bk[o],c=e.get(s);Ct(c)?(a=!0,i[s]=c):r[s]=c}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(W({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get(`symbolKeepAspect`)},r)),t.isSeriesFiltered(e))return;var l=yt(i);function u(t,n){for(var r=e.getRawValue(n),a=e.getDataParams(n),o=0;o<l.length;o++){var s=l[o];t.setItemVisual(n,s,i[s](r,a))}}return{dataEach:a?u:null}}},Ck={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var n=e.getData();function r(e,t){for(var n=e.getItemModel(t),r=0;r<xk.length;r++){var i=xk[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?r:null}}};function wk(e,t,n){switch(n){case`color`:return e.getItemVisual(t,`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getItemVisual(t,`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getItemVisual(t,n)}}function Tk(e,t){switch(t){case`color`:return e.getVisual(`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getVisual(`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getVisual(t)}}function Ek(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var Dk=new Ua,Ok={};function kk(e,t){Ok[e]=t}function Ak(e){return Ok[e]}var jk={};function Mk(e,t){jk[e]=t}function Nk(e){return jk[e]}var Pk=Math.round(Math.random()*9),Fk=typeof Object.defineProperty==`function`,Ik=function(){function e(){this._id=`__ec_inner_`+Pk++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return Fk?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError(`Value of WeakMap is not a non-null object.`);return e},e}();function Lk(e){return isFinite(e)}function Rk(e,t,n){var r=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),r=Lk(r)?r:0,i=Lk(i)?i:1,a=Lk(a)?a:0,o=Lk(o)?o:0,e.createLinearGradient(r,a,i,o)}function zk(e,t,n){var r=n.width,i=n.height,a=Math.min(r,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,c=t.r==null?.5:t.r;return t.global||(o=o*r+n.x,s=s*i+n.y,c*=a),o=Lk(o)?o:.5,s=Lk(s)?s:.5,c=c>=0&&Lk(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function Bk(e,t,n){for(var r=t.type===`radial`?zk(e,t,n):Rk(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function Vk(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function Hk(e){return parseInt(e,10)}function Uk(e,t,n){var r=[`width`,`height`][t],i=[`clientWidth`,`clientHeight`][t],a=[`paddingLeft`,`paddingTop`][t],o=[`paddingRight`,`paddingBottom`][t];if(n[r]!=null&&n[r]!==`auto`)return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||Hk(s[r])||Hk(e.style[r]))-(Hk(s[a])||0)-(Hk(s[o])||0)||0}function Wk(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:Tt(e)?[e]:q(e)?e:null}function Gk(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&Wk(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=K(n,function(e){return e/i}),r/=i)}return[n,r]}var Kk=new ts(!0);function qk(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function Jk(e){return typeof e==`string`&&e!==`none`}function Yk(e){var t=e.fill;return t!=null&&t!==`none`}function Xk(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function Zk(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function Qk(e,t,n){var r=Cn(t.image,t.__image,n);if(Tn(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Xt),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function $k(e,t,n,r,i){var a,o=qk(n),s=Yk(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||Kk,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?Bk(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?Bk(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?Qk(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?Qk(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=Gk(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&Zk(e,n),s&&Xk(e,n)):(s&&Xk(e,n),o&&Zk(e,n)),T&&e.setLineDash([])}function eA(e,t,n){var r=t.__image=Cn(n.image,t.__image,t,t.onload);if(!(!r||!Tn(r))){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function tA(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=Gk(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(qk(n)&&e.strokeText(i,n.x,n.y),Yk(n)&&e.fillText(i,n.x,n.y)):(Yk(n)&&e.fillText(i,n.x,n.y),qk(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var nA=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],rA=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function iA(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){hA(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?ho.opacity:o}(r||t.blend!==n.blend)&&(a||=(hA(e,i),!0),e.globalCompositeOperation=t.blend||ho.blend);for(var s=0;s<nA.length;s++){var c=nA[s];(r||t[c]!==n[c])&&(a||=(hA(e,i),!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||=(hA(e,i),!0),e.shadowColor=t.shadowColor||ho.shadowColor),a}function aA(e,t,n,r,i){var a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;var s=iA(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||=(hA(e,i),!0),Jk(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||=(hA(e,i),!0),Jk(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||=(hA(e,i),!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var c=a.lineWidth/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==c&&(s||=(hA(e,i),!0),e.lineWidth=c)}for(var l=0;l<rA.length;l++){var u=rA[l],d=u[0];(r||a[d]!==o[d])&&(s||=(hA(e,i),!0),e[d]=a[d]||u[1])}return s}function oA(e,t,n,r,i){return iA(e,t.style,n&&n.style,r,i)}function sA(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function cA(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r||=a.isZeroArea(),sA(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function lA(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var uA=1,dA=2,fA=3,pA=4;function mA(e){var t=Yk(e),n=qk(e);return!(e.lineDash||!(+t^n)||t&&typeof e.fill!=`string`||n&&typeof e.stroke!=`string`||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function hA(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function gA(e,t){var n={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};_A(e,t,n),vA(e,n)}function _A(e,t,n){var r=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){t.__dirty&=-2,t.__isRendered=!1;return}var i=t.__clipPaths,a=n.prevElClipPaths,o=t.style,s=!1,c=!1;if((!a||Vk(i,a))&&(a&&(hA(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(hA(e,n),e.save(),cA(i,e,n),s=!0,n.prevElClipPaths=i)),n.allClipped){t.__dirty&=-2,t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(n.beforeBrushParam),t.innerBeforeBrush();var l=n.prevEl;l||(c=s=!0);var u=t instanceof Es&&t.autoBatch&&mA(o);s||lA(r,l.transform)?(hA(e,n),sA(e,t)):u||hA(e,n),t instanceof Es?(n.lastDrawType!==uA&&(c=!0,n.lastDrawType=uA),aA(e,t,l,c,n),(!u||!n.batchFill&&!n.batchStroke)&&e.beginPath(),$k(e,t,o,u,n)):t instanceof Os?(n.lastDrawType!==fA&&(c=!0,n.lastDrawType=fA),aA(e,t,l,c,n),tA(e,t,o)):t instanceof Ms?(n.lastDrawType!==dA&&(c=!0,n.lastDrawType=dA),oA(e,t,l,c,n),eA(e,t,o)):t.getTemporalDisplayables&&(n.lastDrawType!==pA&&(c=!0,n.lastDrawType=pA),yA(e,t,n)),t.innerAfterBrush(),t.afterBrush&&(u&&hA(e,n),t.afterBrush()),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}function vA(e,t){hA(e,t),t.prevElClipPaths&&e.restore()}function yA(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover,beforeBrushParam:{}},o,s;for(o=t.getCursor(),s=r.length;o<s;o++){var c=r[o];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),_A(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}vA(e,a);for(var l=0,u=i.length;l<u;l++){var c=i[l];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),_A(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}vA(e,a),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var bA=new Ik,xA=new bn(100),SA=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`];function CA(e,t){if(e===`none`)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&bA.delete(e);var a=bA.get(e);if(a)return a;var o=dt(e,{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 c(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/n,bA.set(e,s),e.dirty=!1,s;function c(e){for(var t=[n],a=!0,s=0;s<SA.length;++s){var c=o[SA[s]];if(c!=null&&!q(c)&&!J(c)&&!Tt(c)&&typeof c!=`boolean`){a=!1;break}t.push(c)}var l;if(a){l=t.join(`,`)+(i?`-svg`:``);var u=xA.get(l);u&&(i?e.svgElement=u:e.image=u)}var d=TA(o.dashArrayX),f=EA(o.dashArrayY),p=wA(o.symbol),m=DA(d),h=OA(f),g=!i&&Ke.createCanvas(),_=i&&{tag:`g`,attrs:{},key:`dcl`,children:[]},v=b(),y;g&&(g.width=v.width*n,g.height=v.height*n,y=g.getContext(`2d`)),x(),a&&xA.put(l,g||_),e.image=g,e.svgElement=_,e.svgWidth=v.width,e.svgHeight=v.height;function b(){for(var e=1,t=0,n=m.length;t<n;++t)e=Uc(e,m[t]);for(var r=1,t=0,n=p.length;t<n;++t)r=Uc(r,p[t].length);e*=r;var i=h*m.length*p.length;return{width:Math.max(1,Math.min(e,o.maxTileWidth)),height:Math.max(1,Math.min(i,o.maxTileHeight))}}function x(){y&&(y.clearRect(0,0,g.width,g.height),o.backgroundColor&&(y.fillStyle=o.backgroundColor,y.fillRect(0,0,g.width,g.height)));for(var e=0,t=0;t<f.length;++t)e+=f[t];if(e<=0)return;for(var a=-h,s=0,c=0,l=0;a<v.height;){if(s%2==0){for(var u=c/2%p.length,m=0,b=0,x=0;m<v.width*2;){for(var S=0,t=0;t<d[l].length;++t)S+=d[l][t];if(S<=0)break;if(b%2==0){var C=(1-o.symbolSize)*.5,w=m+d[l][b]*C,T=a+f[s]*C,E=d[l][b]*o.symbolSize,D=f[s]*o.symbolSize,O=x/2%p[u].length;k(w,T,E,D,p[u][O])}m+=d[l][b],++x,++b,b===d[l].length&&(b=0)}++l,l===d.length&&(l=0)}a+=f[s],++c,++s,s===f.length&&(s=0)}function k(e,t,a,s,c){var l=i?1:n,u=Dy(c,e*l,t*l,a*l,s*l,o.color,o.symbolKeepAspect);if(i){var d=r.painter.renderOneToVNode(u);d&&_.children.push(d)}else gA(y,u)}}}}function wA(e){if(!e||e.length===0)return[[`rect`]];if(J(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!J(e[n])){t=!1;break}if(t)return wA([e]);for(var r=[],n=0;n<e.length;++n)J(e[n])?r.push([e[n]]):r.push(e[n]);return r}function TA(e){if(!e||e.length===0)return[[0,0]];if(Tt(e)){var t=Math.ceil(e);return[[t,t]]}for(var n=!0,r=0;r<e.length;++r)if(!Tt(e[r])){n=!1;break}if(n)return TA([e]);for(var i=[],r=0;r<e.length;++r)if(Tt(e[r])){var t=Math.ceil(e[r]);i.push([t,t])}else{var t=K(e[r],function(e){return Math.ceil(e)});t.length%2==1?i.push(t.concat(t)):i.push(t)}return i}function EA(e){if(!e||typeof e==`object`&&e.length===0)return[0,0];if(Tt(e)){var t=Math.ceil(e);return[t,t]}var n=K(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}function DA(e){return K(e,function(e){return OA(e)})}function OA(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}var kA=Jl(AA);function AA(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each(function(e){var n=r.getItemVisual(e,`decal`);if(n){var i=r.ensureUniqueItemVisual(e,`style`);i.decal=CA(n,t)}});var i=r.getVisual(`decal`);if(i){var a=r.getVisual(`style`);a.decal=CA(i,t)}}})}var jA=1,MA=800,NA=900,PA=920,FA=1e3,IA=2e3,LA=5e3,RA=1e3,zA=1100,BA=2e3,VA=3e3,HA=4e3,UA=4500,WA=4600,GA=5e3,KA=6e3,qA=7e3,JA={PROCESSOR:{SERIES_FILTER:MA,AXIS_STATISTICS:PA,FILTER:FA,STATISTIC:LA,STATISTICS:LA},VISUAL:{LAYOUT:RA,PROGRESSIVE_LAYOUT:zA,GLOBAL:BA,CHART:VA,POST_CHART_LAYOUT:WA,COMPONENT:HA,BRUSH:GA,CHART_ITEM:UA,ARIA:KA,DECAL:qA}},YA=`__flagInMainProcess`,XA=`__mainProcessVersion`,ZA=`__pendingUpdate`,QA=`__needsUpdateStatus`,$A=/^[a-zA-Z0-9_]+$/,ej=`__connectUpdateStatus`,tj=0,nj=1,rj=2;function ij(e){return function(){var t=[...arguments];if(this.isDisposed()){this.id;return}return oj(this,e,t)}}function aj(e){return function(){var t=[...arguments];return oj(this,e,t)}}function oj(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),Ua.prototype[t].apply(e,n)}var sj=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ua),cj=sj.prototype;cj.on=aj(`on`),cj.off=aj(`off`);var lj,uj,dj,fj,pj,mj,hj,gj,_j,vj,yj,bj,xj,Sj,Cj,wj,Tj,Ej,Dj,Oj=function(e){U(t,e);function t(t,n,r){var i=e.call(this,new yk)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r||={},i.__v_skip=!0,i._dom=t;var a=`canvas`,o=`auto`,s=!1;i[XA]=1,r.ssr;var c=i._zr=UD(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:X(r.useDirtyRect,s),useCoarsePointer:X(r.useCoarsePointer,o),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=aT(xt(c.flush,c),17),i._updateTheme(n),i._locale=Kg(r.locale||Wg),i._coordSysMgr=new Qh;var l=i._api=Cj(i);function u(e,t){return e.__prio-t.__prio}return dD(Ij,u),dD(Pj,u),i._scheduler=new ek(i,l,Pj,Ij),i._messageCenter=new sj,i._initEvents(),i.resize=xt(i.resize,i),c.animation.on(`frame`,i._onframe,i),vj(c,i),yj(c,i),zt(i),i}return t.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,t=this._model,n=this._api;if(Ej(this),this[ZA]){var r=this[ZA].silent;this[YA]=!0,Dj(this);try{lj(this),fj.update.call(this,null,this[ZA].updateParams)}catch(e){throw this[YA]=!1,this[ZA]=null,e}this._zr.flush(),this[YA]=!1,this[ZA]=null,gj.call(this,r),_j.call(this,r)}else if(e.unfinished){var i=jA;do{e.unfinished=!1;var a=Ke.getTime();e.performSeriesTasks(t),e.performDataProcessorTasks(t),mj(this,t),e.performVisualTasks(t),Sj(this,this._model,n,`remain`,{}),i-=Ke.getTime()-a}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[YA]){if(this._disposed){this.id;return}var r,i,a;if(Y(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[YA]=!0,Dj(this),!this._model||t){var o=new uO(this._api),s=this._theme,c=this._model=new rO;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},Fj);var l={seriesTransition:a,optionChanged:!0};if(n)this[ZA]={silent:r,updateParams:l},this[YA]=!1,this.getZr().wakeUp();else{try{lj(this),fj.update.call(this,null,l)}catch(e){throw this[ZA]=null,this[YA]=!1,e}this._ssr||this._zr.flush(),this[ZA]=null,this[YA]=!1,gj.call(this,r),_j.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[YA]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[ZA]&&(r??=this[ZA].silent,i=this[ZA].updateParams,this[ZA]=null),this[YA]=!0,Dj(this);try{this._updateTheme(e),n.setTheme(this._theme),lj(this),fj.update.call(this,{type:`setTheme`},i)}catch(e){throw this[YA]=!1,e}this[YA]=!1,gj.call(this,r),_j.call(this,r)}}},t.prototype._updateTheme=function(e){J(e)&&(e=Lj[e]),e&&(e=ct(e),e&&RO(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Qt.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return G(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;G(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return G(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(Bj[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();G(zj,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(ct(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=Ke.createCanvas(),h=UD(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return G(u,function(e){var t=e.left-o,n=e.top-s;g+=`<g transform="translate(`+t+`,`+n+`)">`+e.dom+`</g>`}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new Bs({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),G(u,function(e){var t=new Ms({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return pj(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return pj(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return pj(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return G(Sl(n,e),function(e,n){n.indexOf(`Models`)>=0&&G(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Sl(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?Tk(i,t):wk(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;G(Aj,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&Ek(i,function(e){var t=Yl(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=W({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;G(Nj,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),UT(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&Dl(this.getDom(),Hj,``);var e=this,t=e._api,n=e._model;G(e._componentsViews,function(e){e.dispose(n,t)}),G(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete zj[e.id]},t.prototype.resize=function(e){if(!this[YA]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[ZA]&&(r??=this[ZA].silent,n=!0,this[ZA]=null),this[YA]=!0,Dj(this);try{n&&lj(this),fj.update.call(this,{type:`resize`,animation:W({duration:0},e&&e.animation)})}catch(e){throw this[YA]=!1,e}this[YA]=!1,gj.call(this,r),_j.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(Y(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),Rj[e]){var n=Rj[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=W({},e);return t.type=Mj[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(Y(t)||(t={silent:!!t}),jj[e.type]&&this._model){if(this[YA]){this._pendingActions.push(e);return}var n=t.silent;hj.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&Qt.browser.weChat&&this._throttledZrFlush(),gj.call(this,n),_j.call(this,n)}},t.prototype.updateLabelLayout=function(){Dk.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){lj=function(e){AS(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),uj(e,!0),uj(e,!1),t.plan()},uj=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;c<i.length;c++)i[c].__alive=!1;t?n.eachComponent(function(e,t){e!==`series`&&l(t)}):n.eachSeries(l);function l(e){var c=e.__requireNewView;e.__requireNewView=!1;var l=`_ec_`+e.id+`_`+e.type,u=!c&&a[l];if(!u){var d=rn(e.type);u=new(t?HO.getClass(d.main,d.sub):ob.getClass(d.sub)),u.init(n,s),a[l]=u,i.push(u),o.add(u.group)}e.__viewId=u.__id=l,u.__alive=!0,u.__model=e,u.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(u,e,n,s)}for(var c=0;c<i.length;){var u=i[c];u.__alive?c++:(!t&&u.renderTask.dispose(),o.remove(u.group),u.dispose(n,s),i.splice(c,1),a[u.__id]===u&&delete a[u.__id],u.__id=u.group.__ecComponentInfo=null)}},dj=function(e,t,n,r,i){var a=e._model;if(a.setUpdatePayload(n),!r){G([].concat(e._componentsViews,e._chartsViews),l);return}var o=El(n,r,i),s=n.excludeSeriesId,c;s!=null&&(c=Gt(),G(el(s),function(e){var t=ml(e,null);t!=null&&c.set(t,!0)})),a&&a.eachComponent(o,function(t){if(!(c&&c.get(t.id)!=null)){if(pd(n)){if(t instanceof fy)n.type===`highlight`&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&Yu(t,n,e._api);else{var r=Xu(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===`highlight`&&i&&!n.notBlur&&Ju(t.mainType,t.componentIndex,e._api),a&&G(a,function(e){n.type===`highlight`?zu(e):Bu(e)})}}else fd(n)&&t instanceof fy&&($u(t,n,e._api),ed(t),Tj(e))}},e),a&&a.eachComponent(o,function(t){c&&c.get(t.id)!=null||l(e[r===`series`?`_chartsMap`:`_componentsMap`][t.__viewId])},e);function l(r){r&&r.__alive&&r[t]&&r[t](r.__model,a,e._api,n)}},fj={prepareAndUpdate:function(e){lj(this),fj.update.call(this,e,e&&{optionChanged:e.newOption!=null})},update:function(e,n){var r=this._model,i=this._api,a=this._zr,o=this._coordSysMgr,s=this._scheduler;if(r){jS(r),r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),o.create(r,i),Dk.trigger(`coordsys:aftercreate`,r,i),s.performDataProcessorTasks(r,e),mj(this,r),o.update(r,i),t(r),s.performVisualTasks(r,e);var c=r.get(`backgroundColor`)||`transparent`;a.setBackgroundColor(c);var l=r.get(`darkMode`);l!=null&&l!==`auto`&&a.setDarkMode(l),bj(this,r,i,e,n),Dk.trigger(`afterupdate`,r,i)}},updateTransform:function(e){var t=this,n=t._model,r=t._api;if(n){n.setUpdatePayload(e);var i=[];n.eachComponent(function(a,o){if(a!==`series`){var s=t.getViewOfComponentModel(o);if(s&&s.__alive){if(s.updateTransform){var c=s.updateTransform(o,n,r,e);c&&c.update&&i.push(s)}else i.push(s)}}});var a=Gt();n.eachSeries(function(i){var o=t._chartsMap[i.__viewId],s=i.pipelineContext;if(o.updateTransform&&!s.progressiveRender){var c=o.updateTransform(i,n,r,e);c&&c.update&&a.set(i.uid,1)}else a.set(i.uid,1)}),t._scheduler.performVisualTasks(n,e,{setDirty:!0,dirtyMap:a}),Sj(t,n,r,e,{},a),Dk.trigger(`afterupdate`,n,r)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),ob.markUpdateMethod(e,`updateView`),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),bj(this,n,this._api,e,{}),Dk.trigger(`afterupdate`,n,this._api))},updateVisual:function(e){var n=this,r=this._model;r&&(r.setUpdatePayload(e),r.eachSeries(function(e){e.getData().clearAllVisual()}),ob.markUpdateMethod(e,`updateVisual`),t(r),this._scheduler.performVisualTasks(r,e,{visualType:`visual`,setDirty:!0}),r.eachComponent(function(t,i){if(t!==`series`){var a=n.getViewOfComponentModel(i);a&&a.__alive&&a.updateVisual(i,r,n._api,e)}}),r.eachSeries(function(t){n._chartsMap[t.__viewId].updateVisual(t,r,n._api,e)}),Dk.trigger(`afterupdate`,r,this._api))},updateLayout:function(e){fj.update.call(this,e)}};function e(e,t,n,r,i){if(e._disposed){e.id;return}for(var a=e._model,o=e._coordSysMgr.getCoordinateSystems(),s,c=Sl(a,n),l=0;l<o.length;l++){var u=o[l];if(u[t]&&(s=u[t](a,c,r,i))!=null)return s}}pj=e,mj=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},hj=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=jj[i],s=(o.update||`update`).split(`:`),c=s.pop(),l=s[0]!=null&&rn(s[0]);this[YA]=!0,Dj(this);var u=[e],d=!1;e.batch&&(d=!0,u=K(e.batch,function(t){return t=dt(W({},t),e),t.batch=null,t}));var f=[],p,m=[],h=o.nonRefinedEventType,g=fd(e),_=pd(e);if(_&&Ku(this._api),G(u,function(t){var i=o.action(t,r,n._api);if(o.refineEvent?m.push(i):p=i,p||=W({},t),p.type=h,f.push(p),_){var a=Cl(e),s=a.queryOptionMap,u=a.mainTypeSpecified?s.keys()[0]:`series`;dj(n,c,t,u),Tj(n)}else g?(dj(n,c,t,`series`),Tj(n)):l&&dj(n,c,t,l.main,l.sub)}),c!==`none`&&!_&&!g&&!l)try{this[ZA]?(lj(this),fj.update.call(this,e),this[ZA]=null):fj[c].call(this,e)}catch(e){throw this[YA]=!1,e}if(p=d?{type:h,escapeConnect:a,batch:f}:f[0],this[YA]=!1,!t){var v=void 0;if(o.refineEvent){var y=o.refineEvent(m,e,r,this._api).eventContent;It(Y(y)),v=dt({type:o.refinedEventType},y),v.fromAction=e.type,v.fromActionPayload=e,v.escapeConnect=!0}var b=this._messageCenter;b.trigger(p.type,p),v&&b.trigger(v.type,v)}},gj=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();hj.call(this,n,e)}},_j=function(e){!e&&this.trigger(`updated`)},vj=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[ZA]&&!t._scheduler.unfinished&&!t._pendingActions.length?t.trigger(`finished`):e.refresh()})},yj=function(e,t){e.on(`mouseover`,function(e){var n=e.target,r=Ek(n,ud);r&&(Zu(r,e,t._api),Tj(t))}).on(`mouseout`,function(e){var n=e.target,r=Ek(n,ud);r&&(Qu(r,e,t._api),Tj(t))}).on(`click`,function(e){var n=e.target,r=Ek(n,function(e){return Yl(e).dataIndex!=null},!0);if(r){var i=r.selected?`unselect`:`select`,a=Yl(r);t._api.dispatchAction({type:i,dataType:a.dataType,dataIndexInside:a.dataIndex,seriesIndex:a.seriesIndex,isFromClick:!0})}})};function t(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function n(e){var t=[],n=[],r=!1;if(e.eachComponent(function(e,i){var a=i.get(`zlevel`)||0,o=i.get(`z`)||0,s=i.getZLevelKey();r||=!!s,(e===`series`?n:t).push({zlevel:a,z:o,idx:i.componentIndex,type:e,key:s})}),r){var i=t.concat(n),a,o;dD(i,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),G(i,function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,i=t.key;a!=null&&(r=Math.max(a,r)),i?(r===a&&i!==o&&r++,o=i):o&&=(r===a&&r++,``),a=r,n.setZLevel(r)})}}bj=function(e,t,r,i,a){n(t),xj(e,t,r,i,a),G(e._chartsViews,function(e){e.__alive=!1}),Sj(e,t,r,i,a),G(e._chartsViews,function(e){e.__alive||e.remove(t,r)})},xj=function(e,t,n,r,i,a){G(a||e._componentsViews,function(e){var i=e.__model;s(i,e),e.render(i,t,n,r),o(i,e),c(i,e)})},Sj=function(e,t,n,r,l,u){var d=e._scheduler;l=W(l||{},{updatedSeries:t.getSeries()}),Dk.trigger(`series:beforeupdate`,t,n,l);var f=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var i=n.renderTask;d.updatePayload(i,r),s(t,n),u&&u.get(t.uid)&&i.dirty(),i.perform(d.getPerformArgs(i))&&(f=!0),n.group.silent=!!t.get(`silent`),a(t,n),ed(t)}),d.unfinished=f||d.unfinished,Dk.trigger(`series:layoutlabels`,t,n,l),Dk.trigger(`series:transition`,t,n,l),t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];o(t,n),c(t,n)}),i(e,t),Dk.trigger(`series:afterupdate`,t,n,l)},Tj=function(e){e[QA]=!0,e.getZr().wakeUp()},Dj=function(e){e[XA]=(e[XA]+1)%1e6},Ej=function(e){e[QA]&&(e.getZr().storage.traverse(function(e){Uf(e)||r(e)}),e[QA]=!1)};function r(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];i!==`emphasis`&&i!==`blur`&&i!==`select`&&t.push(i)}e.selected&&e.states.select&&t.push(`select`),e.hoverState===2&&e.states.emphasis?t.push(`emphasis`):e.hoverState===1&&e.states.blur&&t.push(`blur`),e.useStates(t)}function i(e,t){var n=e._zr;if(n.painter.type===`canvas`){var r=n.storage,i=0;r.traverse(function(e){e.isGroup||i++});var a=i>X(t.get(`hoverLayerThreshold`),YD.hoverLayerThreshold)&&!Qt.node&&!Qt.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=Pp(e);t.eachRendered(function(e){return Ip(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!Uf(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(Uf(e))return;if(e instanceof Es&&md(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}Cj=function(e){return new(function(t){U(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){zu(t,n),Tj(e)},n.prototype.leaveEmphasis=function(t,n){Bu(t,n),Tj(e)},n.prototype.enterBlur=function(t){Vu(t),Tj(e)},n.prototype.leaveBlur=function(t){Hu(t),Tj(e)},n.prototype.enterSelect=function(t){Uu(t),Tj(e)},n.prototype.leaveSelect=function(t){Wu(t),Tj(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[XA]},n.prototype.usingTHL=function(){return e._usingTHL},n}(ou))(e)},wj=function(e){function t(e,t){for(var n=0;n<e.length;n++){var r=e[n];r[ej]=t}}G(Mj,function(n,r){e._messageCenter.on(r,function(n){if(Bj[e.group]&&e[ej]!==tj){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];G(zj,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,tj),G(i,function(e){e[ej]!==nj&&e.dispatchAction(r)}),t(i,rj)}})})}}(),t}(Ua),kj=Oj.prototype;kj.on=ij(`on`),kj.off=ij(`off`),kj.one=function(e,t,n){var r=this;function i(){var n=[...arguments];t&&t.apply&&t.apply(this,n),r.off(e,i)}this.on.call(this,e,i,n)};var Aj=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`],jj={},Mj={},Nj={},Pj=[],Fj=[],Ij=[],Lj={},Rj={},zj={},Bj={},Vj=new Date-0;new Date-0;var Hj=`_echarts_instance_`;function Uj(e,t,n){var r=!(n&&n.ssr);if(r){var i=Wj(e);if(i)return i}var a=new Oj(e,t,n);return a.id=`ec_`+Vj++,zj[a.id]=a,r&&Dl(e,Hj,a.id),wj(a),Dk.trigger(`afterinit`,a),a}function Wj(e){return zj[Ol(e,Hj)]}function Gj(e,t){Lj[e]=t}function Kj(e){ft(Fj,e)<0&&Fj.push(e)}function qj(e,t){nM(Pj,e,t,IA)}function Jj(e){Xj(`afterinit`,e)}function Yj(e){Xj(`afterupdate`,e)}function Xj(e,t){Dk.on(e,t)}function Zj(e,t,n){var r,i,a,o,s;Ct(t)&&(n=t,t=``),Y(e)?(r=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,n||=e.action,a=e.refineEvent):(r=e,i=t);function c(e){return e.toLowerCase()}i=c(i||r);var l=a?c(r):i;jj[r]||(It($A.test(r)&&$A.test(i)),a&&It(i!==r),jj[r]={actionType:r,refinedEventType:i,nonRefinedEventType:l,update:o,action:n,refineEvent:a},Nj[i]=1,a&&s&&(Nj[l]=1),Mj[l]=r)}function Qj(e,t){Qh.register(e,t)}function $j(e,t){nM(Ij,e,t,RA,`layout`,!0)}function eM(e,t){nM(Ij,e,t,VA,`visual`,!0)}var tM=[];function nM(e,t,n,r,i,a){if((Ct(t)||Y(t))&&(n=t,t=r),!(ft(tM,n)>=0)){tM.push(n);var o=ek.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function rM(e,t){Rj[e]=t}function iM(e,t,n){var r=Ak(`registerMap`);r&&r(e,t,n)}var aM=jv;eM(BA,JO),eM(UA,XO),eM(UA,ZO),eM(BA,Sk),eM(UA,Ck),eM(qA,kA),Kj(RO),qj(NA,zO),rM(`default`,$O),Zj({type:mu,event:mu,update:mu},Yt),Zj({type:hu,event:hu,update:hu},Yt),Zj({type:gu,event:yu,update:gu,action:Yt,refineEvent:oM,publishNonRefinedEvent:!0}),Zj({type:_u,event:yu,update:_u,action:Yt,refineEvent:oM,publishNonRefinedEvent:!0}),Zj({type:vu,event:yu,update:vu,action:Yt,refineEvent:oM,publishNonRefinedEvent:!0});function oM(e,t,n,r){return{eventContent:{selected:td(n),isFromClick:t.isFromClick||!1}}}Gj(`default`,{}),Gj(`dark`,vk);var sM=[],cM={registerPreprocessor:Kj,registerProcessor:qj,registerPostInit:Jj,registerPostUpdate:Yj,registerUpdateLifecycle:Xj,registerAction:Zj,registerCoordinateSystem:Qj,registerLayout:$j,registerVisual:eM,registerTransform:aM,registerLoading:rM,registerMap:iM,registerImpl:kk,PRIORITY:JA,ComponentModel:lv,ComponentView:HO,SeriesModel:fy,ChartView:ob,registerComponentModel:function(e){lv.registerClass(e)},registerComponentView:function(e){HO.registerClass(e)},registerSeriesModel:function(e){fy.registerClass(e)},registerChartView:function(e){ob.registerClass(e)},registerCustomSeries:function(e,t){Mk(e,t)},registerSubTypeDefaulter:function(e,t){lv.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){WD(e,t)}};function lM(e){if(q(e)){G(e,function(e){lM(e)});return}ft(sM,e)>=0||(sM.push(e),Ct(e)&&(e={install:e}),e.install(cM))}var uM=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e,t){return hg(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?5e3:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?1e4:this.get(`progressiveThreshold`))},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:``},t.type=`series.scatter`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:Q.color.primary}},universalTransition:{divideShape:`clone`}},t}(fy),dM=4,fM=function(){function e(){}return e}(),pM=function(e){U(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new fM},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.buildPath=function(e,t){var n=t.points,r=t.size,i=this.symbolProxy,a=i.shape,o=e.getContext?e.getContext():e,s=o&&r[0]<dM,c=this.softClipShape,l;if(s){this._ctx=o;return}for(this._ctx=null,l=this._off;l<n.length;){var u=n[l++],d=n[l++];isNaN(u)||isNaN(d)||c&&!c.contain(u,d)||(a.x=u-r[0]/2,a.y=d-r[1]/2,a.width=r[0],a.height=r[1],i.buildPath(e,a,!0))}this.incremental&&(this._off=l,this.notClear=!0)},t.prototype.afterBrush=function(){var e=this.shape,t=e.points,n=e.size,r=this._ctx,i=this.softClipShape,a;if(r){for(a=this._off;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||isNaN(s)||i&&!i.contain(o,s)||r.fillRect(o-n[0]/2,s-n[1]/2,n[0],n[1])}this.incremental&&(this._off=a,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var n=this.shape,r=n.points,i=n.size,a=Math.max(i[0],4),o=Math.max(i[1],4),s=r.length/2-1;s>=0;s--){var c=s*2,l=r[c]-a/2,u=r[c+1]-o/2;if(e>=l&&t>=u&&e<=l+a&&t<=u+o)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],a=r[1],o=1/0,s=1/0,c=-1/0,l=-1/0,u=0;u<n.length;){var d=n[u++],f=n[u++];o=Math.min(d,o),c=Math.max(d,c),s=Math.min(f,s),l=Math.max(f,l)}e=this._rect=new fr(o-i/2,s-a/2,c-o+i,l-s+a)}return e},t}(Es),mM=function(){function e(){this.group=new Ld}return e.prototype.updateData=function(e,t){this._clear(),this._data=e;var n=this._create();n.setShape({points:e.getLayout(`points`)}),this._setCommon(n,e,t)},e.prototype.updateLayout=function(e){var t=this._data;if(t){var n=t.getLayout(`points`);this.group.eachChild(function(e){if(e.startIndex!=null){var t=(e.endIndex-e.startIndex)*2,r=e.startIndex*4*2;n=new Float32Array(n.buffer,r,t)}e.setShape(`points`,n),e.reset(),e.stopAnimation()})}},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n,r){var i=this._newAdded[0],a=t.getLayout(`points`),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,c=new Float32Array(s+a.length);c.set(o),c.set(a,s),i.endIndex=e.end,i.setShape({points:c})}else{this._newAdded=[];var l=this._create();l.startIndex=e.start,l.endIndex=e.end,l.incremental=n,l.setShape({points:a}),this._setCommon(l,t,r)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new pM({cursor:`default`});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;n||={};var i=t.getVisual(`symbolSize`);e.setShape(`size`,i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=Dy(t.getVisual(`symbol`),0,0,0,0),e.setColor=e.symbolProxy.setColor;var a=e.shape.size[0]<dM;e.useStyle(r.getModel(`itemStyle`).getItemStyle(a?[`color`,`shadowBlur`,`shadowColor`]:[`color`]));var o=t.getVisual(`style`),s=o&&o.fill;s&&e.setColor(s);var c=Yl(e);c.seriesIndex=r.seriesIndex,e.on(`mousemove`,function(t){c.dataIndex=null;var n=e.hoverDataIdx;n>=0&&(c.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),hM=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,gM(e)),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),Gl(t),gM(t)),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),this._finished){var i=nS(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(gM(e))}else return{update:!0}},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return(!n||r!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=r?new mM:new zy,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type=`scatter`,t}(ob);function gM(e){return{clipShape:hb(e)}}var _M=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),vM=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,wl).models[0]},t.type=`cartesian2dAxis`,t}(lv);mt(vM,_M);var yM={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:Q.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:Q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Q.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Q.color.backgroundTint,Q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Q.color.neutral00,borderColor:Q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},bM=lt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},yM),xM=lt({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Q.color.axisMinorSplitLine,width:1}}},yM),SM={category:bM,value:xM,time:lt({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},xM),log:dt({logBase:10},xM)};function CM(e,t,n,r){G(yx,function(i,a){var o=lt(lt({},SM[a],!0),r,!0),s=function(e){U(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=iv(this),r=n?ov(e):{};lt(e,t.getTheme().get(a+`Axis`)),lt(e,this.getDefaultOption()),e.type=wM(e),n&&av(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=wb.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=EC();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,wM)}function wM(e){return e.type||(e.data?`category`:`value`)}var TM=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return K(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),_t(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),EM=[`x`,`y`];function DM(e){return(e.type===`interval`||e.type===`time`)&&!$g(e)}var OM=function(e){U(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Bw,t.dimensions=EM,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!DM(e)||!DM(t))){var n=jb(e,null),r=jb(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(!(!o||!s)){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=Nn([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new fr(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Yn(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Yn(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new fr(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(TM);function kM(e,t){var n=e.scale,r=e.model,i=Dw(n,r,r.ecModel,e,null),a=Bb(n),o=Bb(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=uc(l[0].value-l[1].value),g=uc(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h<g?f=h/g:p=g/h)}else{var _=o.getConfig().interval;f=(1-(l[0].value-u[0].value)/_)%1,p=(1-(u[d].value-l[d].value)/_)%1,m=d-+!!f-!!p}var v=i.zoomFixMM,y=v[0]||v[1],b=[i.fixMM[0]||y,i.fixMM[1]||y],x=n.getExtent(),S=s.getExtent(),C=Kb(S,b),w,T,E,D,O,k;function A(e){for(var t=50,n=0;n<t&&!e();n++)E=a?E*lc(c,2):Hb(E),D=Ub(E)}function j(){w=wc(k-E*f,D)}function M(){T=wc(O+E*p,D)}function N(){k=f?wc(w+E*f,D):w}function P(){O=p?wc(T-E*p,D):T}if(b[0]&&b[1]){w=C[0],T=C[1],E=(T-w)/(m+f+p);var F=e.getExtent(),I=uc(F[1]-F[0]);D=Oc([T,w],I,.5/m),N(),P(),Wc(D)&&(E=wc(E,D))}else{var ee=C[1]-C[0];E=a?lc(Ic(ee),1):Rc(ee/m,2),D=Ub(E),b[0]?(w=C[0],A(function(){if(N(),O=wc(k+E*m,D),M(),T>=C[1])return!0})):b[1]?(T=C[1],A(function(){if(P(),k=wc(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=wc(pc(C[0]/E)*E,D),O=wc(fc(C[1]/E)*E,D);var e=dc((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=fc(t/2);n=t%2==0?[o,o]:w+T<C[0]+C[1]?[o,o+1]:[o+1,o]}if(k=wc(k-E*n[0],D),O=wc(O+E*n[1],D),j(),M(),w<=C[0]&&T>=C[1])return!0}})}Ix(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function AM(e,t){var n=Bb(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=Kb(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?MM(r,t):jM(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=Ub(d)),i[0]||(s[0]=wc(fc(s[0]/u)*u,l)),i[1]||(s[1]=wc(pc(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),Ix(e,i,o,s,a,c)}function jM(e,t){var n=Jb(t.splitNumber,5),r=Nb(e),i=t.minInterval,a=t.maxInterval,o=Rc(r/n,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);var s=Ub(o),c=e.getExtent(),l=[wc(pc(c[0]/o)*o,s),wc(fc(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function MM(e,t){var n=Jb(t.splitNumber,10),r=e.getExtent(),i=Nb(e),a=lc(Ic(i),1);n/i*a<=.5&&(a*=10);var o=Ub(a),s=[wc(pc(r[0]/a)*a,o),wc(fc(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function NM(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;PM(t,n,r,i,null)}function PM(e,t,n,r,i){var a=Dw(e,t,r,n,i),o=Rb(e)||zb(e);FM(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&kw(n,e,a,r)}function FM(e,t){IM[e.type](e,t)}var IM={interval:AM,log:AM,time:dx,ordinal:Yt},LM=[[3,1],[0,2]],RM=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=EM,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;G(this._axesList,function(e){xw(e,1);var t=e.scale;Vb(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=yt(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):NM(i)}G(n,function(e){UM(e,e.__alignTo)?NM(e):kM(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};G(n.x,function(e){BM(n,`y`,e,i)}),G(n.y,function(e){BM(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=nv(e,t),i=this._rect=ev(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(GM(a,i),!n){var c=YM(i,o,a,s,t),l=void 0;if(s)qM?(qM(this._axesList,i),GM(a,i)):l=JM(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=ZM(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=JM(d,f,p,i,a,c,r))}XM(i,a,lS.determine,null,l,r),G(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}Y(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis(`x`).index===e||i[r].getAxis(`y`).index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents(`xAxis`,wl).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,wl).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,ft(a,o)<0&&(o=null)):n&&r?o=this.getCartesian(n.componentIndex,r.componentIndex):n?s=this.getAxis(`x`,n.componentIndex):r?s=this.getAxis(`y`,r.componentIndex):i&&i.coordinateSystem===this&&(o=this._coordsList[0]),{cartesian:o,axis:s}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,a={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},s={x:0,y:0};if(t.eachComponent(`xAxis`,c(`x`),this),t.eachComponent(`yAxis`,c(`y`),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}this._axesMap=o,G(o.x,function(t,n){G(o.y,function(i,a){var o=`x`+n+`y`+a,s=new OM(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})}),HM(o.x),HM(o.y);function c(t){return function(n,r){if(zM(n,e)){var c=n.get(`position`);t===`x`?c!==`top`&&c!==`bottom`&&(c=a.bottom?`top`:`bottom`):c!==`left`&&c!==`right`&&(c=a.left?`right`:`left`),a[c]=!0;var l=xx(n),u=new cC(t,Sx(n,l,!0),[0,0],l,c);u.onBand=Rx(u.scale,n),u.inverse=n.get(`inverse`),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),o[t][r]=u,s[t]++}}}},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return G(this.getCartesians(),function(r){var i=e!=null&&e!==`auto`?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(i);ft(t,i)<0&&t.push(i),ft(n,a)<0&&n.push(a)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent(`grid`,function(i,a){var o=new e(i,t,n);o.name=`grid_`+a,o.resize(i,n,!0),i.coordinateSystem=o,r.push(o),G(o._axesList,function(t){bw(t,e.dimIdxMap)})}),t.eachSeries(function(e){var t,n;ig({targetModel:e,coordSysType:Bw,coordSysProvider:r});function r(){var r=lw(e),i=r.xAxisModel,a=r.yAxisModel;return t=i.axis,n=a.axis,i.getCoordSysModel().coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}t&&n&&(XS(t,e,Bw),XS(n,e,Bw))},this),r},e.dimensions=EM,e.dimIdxMap=kh(EM),e}();function zM(e,t){return e.getCoordSysModel()===t}function BM(e,t,n,r){n.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=n.model,s=o.get([`axisLine`,`onZero`]),c=o.get([`axisLine`,`onZeroAxisIndex`]);if(!s)return;if(c!=null)VM(s,i[c])&&(a=i[c]);else for(var l in i)if(Z(i,l)&&VM(s,i[l])&&!r[u(i[l])]){a=i[l];break}a&&(r[u(a)]=!0);function u(e){return e.dim+`_`+e.index}}function VM(e,t){if(!t)return!1;var n=t.scale,r=Cx(n,0,!1),i=t&&t.type!==`category`&&t.type!==`time`&&r!==3;return i&&e===`auto`&&Ex(t)&&(i=!1),i}function HM(e){for(var t=yt(e),n,r=[],i=t.length-1;i>=0;i--){var a=e[+t[i]];Lb(a.scale)&&Px(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&G(r,function(e){e.__alignTo=n})}function UM(e,t){return $g(e.scale)||$g(t.scale)||t.scale.getTicks().length<2}function WM(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function GM(e,t){G(e.x,function(e){return KM(e,t.x,t.width)}),G(e.y,function(e){return KM(e,t.y,t.height)})}function KM(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),WM(e,t)}var qM;function JM(e,t,n,r,i,a,o){XM(r,i,lS.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=vt(s,function(e){return e>0})==null;return wp(r,s,!0,!0,n),GM(i,r),c;function l(e){G(i[Xf[e]],function(t){if(Nx(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i<r.length;i++){var o=r[i],s=t.scale.normalize(Lx(t.scale,jC(o.label).labelInfo.tick));s=e===1?1-s:s,u(o.rect,e,s),u(o.rect,1-e,NaN)}var c=n.nameLayout;if(c){var s=Mx(n.nameLocation)?.5:NaN;u(c.rect,e,s),u(c.rect,1-e,NaN)}}})}function u(t,n,r){var i=e[Xf[n]]-t[Xf[n]],a=t[Zf[n]]+t[Xf[n]]-(e[Zf[n]]+e[Xf[n]]);i=d(i,1-r),a=d(a,r);var o=LM[n][0],c=LM[n][1];s[o]=lc(s[o],i),s[c]=lc(s[c],a)}function d(e,t){return e>0&&!jt(t)&&t>1e-4&&(e/=t),e}}function YM(e,t,n,r,i){var a=new NC(QM);return G(n,function(n){return G(n,function(n){if(Nx(n.model)){var o=!r;n.axisBuilder=uw(e,t,n.model,i,a,o)}})}),a}function XM(e,t,n,r,i,a){var o=n===lS.determine;G(t,function(t){return G(t,function(t){Nx(t.model)&&(dw(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[Xf[1-t]]=e[Zf[t]]<=a.refContainer[Zf[t]]*.5?0:1-t==1?2:1}G(t,function(e,t){return G(e,function(e){Nx(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function ZM(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=ev(e.get(`outerBounds`,!0)||Rw,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||ft([`all`,`axisLabel`],a)<0?`all`:a,s=[Sc(X(e.get(`outerBoundsClampWidth`,!0),zw[0]),t.width),Sc(X(e.get(`outerBoundsClampHeight`,!0),zw[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var QM=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;LC(e,t,n,r,i,a),Mx(e.nameLocation)||G(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&zC(e.labelInfoList,e.dirVec,r,i)})};function $M(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return eN(n,e,t),n.seriesInvolved&&nN(n,e),n}function eN(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];G(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=lN(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(G(n.getAxes(),St(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&G(f.baseAxes,St(p,!d||`cross`,u)),d&&G(f.otherAxes,St(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!cN(d))){s??=d.get(`triggerTooltip`),d=r?tN(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=lN(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:cN(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=rN(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function tN(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};G(s,function(e){c[e]=ct(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&dt(l,u.textStyle)}return e.model.getModel(`axisPointer`,new hm(c,n,r))}function nN(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);!n||!n.model||r===`none`||r===!1||r===`item`||i===!1||t.get([`axisPointer`,`show`],!0)===!1||G(e.coordSysAxesInfo[lN(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function rN(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(iN(a[r+`AxisId`],n.id)||iN(a[r+`AxisIndex`],n.componentIndex)||iN(a[r+`AxisName`],n.name))return i}}function iN(e,t){return e===`all`||q(e)&&ft(e,t)>=0||e===t}function aN(e){var t=oN(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=cN(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o<c[0]&&(o=c[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?`hide`:`show`)}}function oN(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[lN(e)]}function sN(e){var t=oN(e);return t&&t.axisPointerModel}function cN(e){return!!e.get([`handle`,`show`])}function lN(e){return e.type+`||`+e.id}var uN={},dN=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(t,n,r,i){this.axisPointerClass&&aN(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var a=sN(e);a?(this._axisPointer||=new i).render(e,a,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){uN[e]=t},t.getAxisPointerClass=function(e){return e&&uN[e]},t.type=`axis`,t}(HO),fN=bl();function pN(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var a=n.getModel(`splitArea`),o=a.getModel(`areaStyle`),s=o.get(`color`),c=r.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:a,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`});if(l.length){var u=s.length,d=fN(e).splitAreaColors,f=Gt(),p=0;if(d)for(var m=0;m<l.length;m++){var h=d.get(l[m].tickValue);if(h!=null){p=(h+(u-1)*m)%u;break}}var g=i.toGlobalCoord(l[0].coord),_=o.getAreaStyle();s=q(s)?s:[s];for(var m=1;m<l.length;m++){var v=i.toGlobalCoord(l[m].coord),y=void 0,b=void 0,x=void 0,S=void 0;i.isHorizontal()?(y=g,b=c.y,x=v-y,S=c.height,g=y+x):(y=c.x,b=g,x=c.width,S=v-b,g=b+S);var C=l[m-1].tickValue;C!=null&&f.set(C,p),t.add(new Bs({anid:C==null?null:`area_`+C,shape:{x:y,y:b,width:x,height:S},style:dt({fill:s[p]},_),autoBatch:!0,silent:!0})),p=(p+1)%u}fN(e).splitAreaColors=f}}}function mN(e){fN(e).splitAreaColors=null}var hN=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`],gN=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`CartesianAxisPointer`,n}return t.prototype.render=function(t,n,r,i){this.group.removeAll();var a=this._axisGroup;this._axisGroup=new Ld,this.group.add(this._axisGroup),Nx(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),G(hN,function(e){t.get([e,`show`])&&_N[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||gp(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},t.prototype.remove=function(){mN(this)},t.type=`cartesianAxis`,t}(dN),_N={splitLine:function(e,t,n,r,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel(`splitLine`),s=o.getModel(`lineStyle`),c=s.get(`color`),l=o.get(`showMinLine`)!==!1,u=o.get(`showMaxLine`)!==!1;c=q(c)?c:[c];for(var d=r.coordinateSystem.getRect(),f=a.isHorizontal(),p=0,m=a.getTicksCoords({tickModel:o,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`}),h=[],g=[],_=s.getLineStyle(),v=0;v<m.length;v++){var y=a.toGlobalCoord(m[v].coord);if(!(v===0&&!l||v===m.length-1&&!u)){var b=m[v].tickValue;f?(h[0]=y,h[1]=d.y,g[0]=y,g[1]=d.y+d.height):(h[0]=d.x,h[1]=y,g[0]=d.x+d.width,g[1]=y);var x=p++%c.length,S=new gf({anid:b==null?null:`line_`+b,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},style:dt({stroke:c[x]},_),silent:!0});cp(S.shape,_.lineWidth),t.add(S)}}}},minorSplitLine:function(e,t,n,r,i){var a=n.axis,o=n.getModel(`minorSplitLine`).getModel(`lineStyle`),s=r.coordinateSystem.getRect(),c=a.isHorizontal(),l=a.getMinorTicksCoords();if(l.length)for(var u=[],d=[],f=o.getLineStyle(),p=0;p<l.length;p++)for(var m=0;m<l[p].length;m++){var h=a.toGlobalCoord(l[p][m].coord);c?(u[0]=h,u[1]=s.y,d[0]=h,d[1]=s.y+s.height):(u[0]=s.x,u[1]=h,d[0]=s.x+s.width,d[1]=h);var g=new gf({anid:`minor_line_`+l[p][m].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]},style:f,silent:!0});cp(g.shape,f.lineWidth),t.add(g)}},splitArea:function(e,t,n,r,i){pN(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=EC(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},vN=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`xAxis`,t}(gN),yN=function(e){U(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=vN.type,t}return t.type=`yAxis`,t}(gN),bN=function(e){U(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`grid`,t}return t.prototype.render=function(e,t){this.group.removeAll(),e.get(`show`)&&this.group.add(new Bs({shape:e.coordinateSystem.getRect(),style:dt({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},t.type=`grid`,t}(HO),xN={offset:0};function SN(e){e.registerComponentView(bN),e.registerComponentModel(Vw),e.registerCoordinateSystem(`cartesian2d`,RM),CM(e,`x`,vM,xN),CM(e,`y`,vM,xN),e.registerComponentView(vN),e.registerComponentView(yN),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function CN(e){lM(SN),e.registerSeriesModel(uM),e.registerChartView(hM),e.registerLayout(nS(`scatter`))}var wN=bl();function TN(e,t){return!!wN(e)[t]}Zj({type:`takeGlobalCursor`,event:`globalCursorTaken`,update:`update`},Yt);var EN={axisPointer:1,tooltip:1,brush:1};function DN(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||EN.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var a=Pp(r),o=Pp(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var ON=function(e){U(t,e);function t(t){var n=e.call(this)||this;n._zr=t;var r=xt(n._mousedownHandler,n),i=xt(n._mousemoveHandler,n),a=xt(n._mouseupHandler,n),o=xt(n._mousewheelHandler,n),s=xt(n._pinchHandler,n);return n.enable=function(e,n){var c=n.zInfo,l=Pp(c.component),u=l.z,d=l.zlevel,f={component:c.component,z:u,zlevel:d,z2:X(c.z2,-1/0)},p=W({},n.triggerInfo);this._opt=dt(W({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:f,triggerInfo:p,cursorGrab:`grab`,cursorGrabbing:`grabbing`}),e??=!0,(!this._enabled||this._controlType!==e)&&(this.disable(),this._enabled=!0,(e===!0||e===`move`||e===`pan`)&&(MN(t,`mousedown`,r,f),MN(t,`mousemove`,i,f),MN(t,`mouseup`,a,f)),(e===!0||e===`scale`||e===`zoom`)&&(MN(t,`mousewheel`,o,f),MN(t,`pinch`,s,f)))},n.disable=function(){this._enabled&&(this._enabled=!1,NN(t,`mousedown`,r),NN(t,`mousemove`,i),NN(t,`mouseup`,a),NN(t,`mousewheel`,o),NN(t,`pinch`,s))},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,t,n){var r=this._opt,i=r.zInfoParsed;if(DN(e,r.api,i.component))return!1;var a=r.triggerInfo,o=a.roamTrigger,s=!1;return o===`global`&&(s=!0),s||=a.isInSelf(e,t,n),s&&a.isInClip&&!a.isInClip(e,t,n)&&(s=!1),s},t.prototype._decideCursorStyle=function(e,t,n,r){var i=e.target;if(!i&&this._checkPointer(e,t,n))return this._opt.cursorGrab;if(r)return i&&i.cursor||`default`},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(BE(e)||kN(e))){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this._checkPointer(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var t=this._zr;if(!(e.gestureEvent===`pinch`||TN(t,`globalPan`)||kN(e))){var n=e.offsetX,r=e.offsetY;if(!this._dragging||!LN(`moveOnMouseMove`,e,this._opt)){var i=this._decideCursorStyle(e,n,r,!1);i&&t.setCursorStyle(i);return}t.setCursorStyle(this._opt.cursorGrabbing);var a=this._x,o=this._y,s=n-a,c=r-o;this._x=n,this._y=r,this._opt.preventDefaultMouseMove&&zE(e.event),e.__ecRoamConsumed=!0,IN(this,`pan`,`moveOnMouseMove`,e,{dx:s,dy:c,oldX:a,oldY:o,newX:n,newY:r,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!kN(e)){var t=this._zr;if(!BE(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!kN(e)){var t=LN(`zoomOnMouseWheel`,e,this._opt),n=LN(`moveOnMouseWheel`,e,this._opt),r=e.wheelDelta,i=Math.abs(r),a=e.offsetX,o=e.offsetY;if(!(r===0||!t&&!n)){if(t){var s=i>3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(TN(this._zr,`globalPan`)||kN(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(zE(r.event),r.__ecRoamConsumed=!0,IN(e,t,n,r,i))},t}(Ua);function kN(e){return e.__ecRoamConsumed}var AN=bl();function jN(e){var t=AN(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function MN(e,t,n,r){for(var i=jN(e).roam,a=i[t]=i[t]||[],o=0;o<a.length;o++){var s=a[o].zInfoParsed;if((s.zlevel-r.zlevel||s.z-r.z||s.z2-r.z2)<=0)break}a.splice(o,0,{listener:n,zInfoParsed:r}),PN(e,t)}function NN(e,t,n){for(var r=jN(e).roam[t]||[],i=0;i<r.length;i++)if(r[i].listener===n){r.splice(i,1),r.length||FN(e,t);return}}function PN(e,t){var n=jN(e);n.uniform[t]||e.on(t,n.uniform[t]=function(e){var r=n.roam[t];if(r)for(var i=0;i<r.length;i++)r[i].listener(e)})}function FN(e,t){var n=jN(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function IN(e,t,n,r,i){i.isAvailableBehavior=xt(LN,null,n,r),e.trigger(t,i)}function LN(e,t,n){var r=n[e];return!e||r&&(!J(r)||t.event[r+`Key`])}function RN(e){return e}var zN=`view`;(function(e){U(t,e);function t(t,n,r){var i=e.call(this)||this;i.type=zN,i.dimensions=[`x`,`y`];var a=RN(i);a.invertY=t,a.lgCt=n,a.lgGeo=r;var o=a.trans=[];return o[0]=hi(),o[1]=hi(),o[2]=hi(),a.mtRaw=En(),a.mtRawInv=En(),a.mtOverall=En(),a.mtOverallInv=En(),a.zoom=1,i}return t.prototype.getBoundingRect=function(){return HN(null,this)},t.prototype.getViewRect=function(){return UN(null,this)},t.prototype.getRoamTransform=function(){return mi(RN(this).trans[1])},t.prototype.dataToPoint=function(e,t,n){var r=t?RN(this).mtRaw:RN(this).mtOverall;return n||=[],r?Yn(n,e,r):Fn(n,e)},t.prototype.pointToData=function(e,t,n){n||=[];var r=RN(this).mtOverallInv;return r?Yn(n,e,r):Fn(n,e)},t.prototype.convertToPixel=function(e,t,n){var r=WN(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=WN(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){var t=RN(this);return hr(BN,t.dataRect),_r(BN,BN,t.mtOverall),vr(BN,e[0],e[1])},t.dimensions=[`x`,`y`],t})(pi);var BN=pr();function VN(e){return RN(e).zoom}function HN(e,t){return hr(e||pr(),RN(t).dataRect)}function UN(e,t){return hr(e||pr(),RN(t).viewRect)}pr();function WN(e){var t=e.seriesModel;return t?t.coordinateSystem:null}hi(),hi();function GN(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}var KN=bl();function qN(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,eP(t,n,e),G(n,function(n){G(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,St(JN,e))})}),t.wrapMethod(`cloneShallow`,St(XN,e)),G(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,St(YN,e))}),It(n[t.dataType]===t)}function JN(e,t){if($N(this)){var n=W({},KN(this).datas);n[this.dataType]=t,eP(t,n,e)}else tP(t,this.dataType,KN(this).mainData,e);return t}function YN(e,t){return e.struct&&e.struct.update(),t}function XN(e,t){return G(KN(t).datas,function(n,r){n!==t&&tP(n.cloneShallow(),r,t,e)}),t}function ZN(e){var t=KN(this).mainData;return e==null||t==null?t:KN(t).datas[e]}function QN(){var e=KN(this).mainData;return e==null?[{data:e}]:K(yt(KN(e).datas),function(t){return{type:t,data:KN(e).datas[t]}})}function $N(e){return KN(e).mainData===e}function eP(e,t,n){KN(e).datas={},G(t,function(t,r){tP(t,r,e,n)})}function tP(e,t,n,r){KN(n).datas[t]=e,KN(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=ZN,e.getLinkedDataAll=QN}var nP=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||``,this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){Ct(e)&&(n=t,t=e,e=null),e||={},J(e)&&(e={order:e});var r=e.order||`preorder`,i=this[e.attr||`children`],a;r===`preorder`&&(a=t.call(n,this));for(var o=0;!a&&o<i.length;o++)i[o].eachNode(e,t,n);r===`postorder`&&t.call(n,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var r=this.children[n];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].getNodeById(e);if(i)return i}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].contains(e);if(i)return i}},e.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||`value`),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),rP=function(){function e(e){this.type=`tree`,this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,r=t.length;n<r;n++)t[n].dataIndex=-1;for(var n=0,r=e.count();n<r;n++)t[e.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,r){var i=new e(n),a=[],o=1;s(t);function s(e,t){var n=e.value;o=Math.max(o,q(n)?n.length:1),a.push(e);var r=new nP(ml(e.name,``),i);t?iP(r,t):i.root=r,i._nodes.push(r);var c=e.children;if(c)for(var l=0;l<c.length;l++)s(c[l],r)}i.root.updateDepthAndHeight(0);var c=qh(a,{coordDimensions:[`value`],dimensionsCount:o}).dimensions,l=new Kh(c,n);return l.initData(a),r&&r(l),qN({mainData:l,struct:i,structAttr:`tree`}),i.update(),i},e}();function iP(e,t){var n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}function aP(e,t,n){if(e&&ft(t,e.type)>=0){var r=n.getData().tree.root,i=e.targetNode;if(J(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=r.getNodeById(a)))return{node:i}}}function oP(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function sP(e,t){return ft(oP(e),t)>=0}function cP(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var lP=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function uP(e){for(var t=0;t<lP.length;t++)e.registerAction({type:lP[t],update:`updateView`},Yt);e.registerAction({type:`treemapRootToNode`,update:`updateView`},function(e,t){t.eachComponent({mainType:`series`,subType:`treemap`,query:e},n);function n(t,n){var r=aP(e,[`treemapZoomToNode`,`treemapRootToNode`],t);if(r){var i=t.getViewRoot();i&&(e.direction=sP(i,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}})}function dP(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var i=mv(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var fP=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};pP(n);var r=e.levels||[],i=new hm({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=mP(r,t);var a=K(r||[],function(e){return new hm(e,i,t)},this),o=rP.createTree(n,this,s);function s(e){e.wrapMethod(`getItemModel`,function(e,t){var n=o.getNodeByDataIndex(t);return e.parentModel=(n?a[n.depth]:null)||i,e})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e);return Kv(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=cP(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},W(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=Gt(),this._idIndexMapCount=0);var n=t.get(e);return n??t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){dP(this)},t.type=`series.treemap`,t.layoutMode=`box`,t.defaultOption={progressive:0,coordinateSystemUsage:`box`,left:Q.size.l,top:Q.size.xxxl,right:Q.size.l,bottom:Q.size.xxxl,sort:!0,clipWindow:`origin`,squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:`▶`,zoomToNodeRatio:.1024,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:`global`,nodeClick:`zoomToNode`,animation:!0,animationDurationUpdate:900,animationEasing:`quinticInOut`,breadcrumb:{show:!0,height:22,left:`center`,bottom:Q.size.m,emptyItemWidth:25,itemStyle:{color:Q.color.backgroundShade,textStyle:{color:Q.color.secondary}},emphasis:{itemStyle:{color:Q.color.background}}},label:{show:!0,distance:0,padding:5,position:`inside`,color:Q.color.neutral00,overflow:`truncate`},upperLabel:{show:!1,position:[0,`50%`],height:20,overflow:`truncate`,verticalAlign:`middle`},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:Q.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,`50%`],overflow:`truncate`,verticalAlign:`middle`}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:`index`,visibleMin:10,childrenVisibleMin:null,levels:[]},t}(fy);function pP(e){var t=0;G(e.children,function(e){pP(e);var n=e.value;q(n)&&(n=n[0]),t+=n});var n=e.value;q(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),q(e.value)?e.value[0]=n:e.value=n}function mP(e,t){var n=el(t.get(`color`)),r=el(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;G(e,function(e){var t=new hm(e),n=t.get(`color`),r=t.get(`decal`);(t.get([`itemStyle`,`color`])||n&&n!==`none`)&&(i=!0),(t.get([`itemStyle`,`decal`])||r&&r!==`none`)&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}}var hP=8,gP=8,_P=5,vP=function(){function e(e){this.group=new Ld,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel(`breadcrumb`),a=this.group;if(a.removeAll(),!(!i.get(`show`)||!n)){var o=i.getModel(`itemStyle`),s=i.getModel(`emphasis`),c=o.getModel(`textStyle`),l=s.getModel([`itemStyle`,`textStyle`]),u=nv(e,t).refContainer,d={left:i.get(`left`),right:i.get(`right`),top:i.get(`top`),bottom:i.get(`bottom`)},f={emptyItemWidth:i.get(`emptyItemWidth`),totalWidth:0,renderList:[]},p=ev(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),rv(a,d,u)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=ml(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+hP*2,t.emptyItemWidth);t.totalWidth+=o+gP,t.renderList.push({node:r,text:i,width:o})}},e.prototype._renderContent=function(e,t,n,r,i,a,o,s){for(var c=0,l=t.emptyItemWidth,u=e.get([`breadcrumb`,`height`]),d=t.totalWidth,f=t.renderList,p=i.getModel(`itemStyle`).getItemStyle(),m=f.length-1;m>=0;m--){var h=f[m],g=h.node,_=h.width,v=h.text;d>n.width&&(d-=_-l,_=l,v=null);var y=new df({shape:{points:yP(c,0,_,u,m===f.length-1,m===0)},style:dt(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new Gs({style:qp(a,{text:v})}),textConfig:{position:`inside`},z2:1e5,onclick:St(s,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=qp(o,{text:v}),y.ensureState(`emphasis`).style=p,id(y,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(y),bP(y,e,g),c+=_+gP}},e.prototype.remove=function(){this.group.removeAll()},e}();function yP(e,t,n,r,i,a){var o=[[i?e:e-_P,t],[e+n,t],[e+n,t+r],[i?e:e-_P,t+r]];return!a&&o.splice(2,0,[e+n+_P,t+r/2]),!i&&o.push([e,t+r/2]),o}function bP(e,t,n){Yl(e).eventData={componentType:`series`,componentSubType:`treemap`,componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:`treemap`,selfType:`breadcrumb`,nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&cP(n,t)}}var xP=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;r<i;r++){var a=this._storage[r];a.el.animateTo(a.target,{duration:a.duration,delay:a.delay,easing:a.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();function SP(){return new xP}var CP=Math.max,wP=Math.min,TP=G,EP=[`itemStyle`,`borderWidth`],DP=[`itemStyle`,`gapWidth`],OP=[`upperLabel`,`show`],kP=[`upperLabel`,`height`],AP={seriesType:`treemap`,reset:function(e,t,n,r){var i=e.option,a=nv(e,n).refContainer,o=ev(e.getBoxLayoutParams(),a),s=r&&r.type,c=aP(r,[`treemapZoomToNode`,`treemapRootToNode`],e),l=s===`treemapRender`||s===`treemapMove`?r.rootRect:null,u=e.getViewRoot(),d=oP(u);if(s!==`treemapMove`){var f=!1,p=s===`treemapZoomToNode`?(f=!0,RP(e,c,u,o)):l?(f=!0,W({},l)):W({},o);if(f){var m=HP(o,p);m=UP(m,e),p.width=o.width*m,p.height=o.height*m}var h=i.sort;h&&h!==`asc`&&h!==`desc`&&(h=`desc`);var g={squareRatio:i.squareRatio,sort:h,leafDepth:i.leafDepth};u.hostTree.clearLayouts();var _={x:0,y:0,width:p.width,height:p.height,area:p.width*p.height};u.setLayout(_),jP(u,g,!1,0),_=u.getLayout(),TP(d,function(e,t){var n=(d[t+1]||u).getValue();e.setLayout(W({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))})}var v=e.getData().tree.root;v.setLayout(zP(o,l,c),!0),e.setLayoutInfo(o),BP(v,new fr(-o.x,-o.y,n.getWidth(),n.getHeight()),d,u,0)}};function jP(e,t,n,r){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),c=s.get(EP),l=s.get(DP)/2,u=VP(s),d=Math.max(c,u),f=c-l,p=d-l;e.setLayout({borderWidth:c,upperHeight:d,upperLabelHeight:u},!0),i=CP(i-2*f,0),a=CP(a-f-p,0);var m=i*a,h=MP(e,s,m,t,n,r);if(h.length){var g={x:f,y:p,width:i,height:a},_=wP(i,a),v=1/0,y=[];y.area=0;for(var b=0,x=h.length;b<x;){var S=h[b];y.push(S),y.area+=S.getLayout().area;var C=IP(y,_,t.squareRatio);C<=v?(b++,v=C):(y.area-=y.pop().getLayout().area,LP(y,_,g,l,!1),_=wP(g.width,g.height),y.length=y.area=0,v=1/0)}if(y.length&&LP(y,_,g,l,!0),!n){var w=s.get(`childrenVisibleMin`);w!=null&&m<w&&(n=!0)}for(var b=0,x=h.length;b<x;b++)jP(h[b],t,n,r+1)}}}function MP(e,t,n,r,i,a){var o=e.children||[],s=r.sort;s!==`asc`&&s!==`desc`&&(s=null);var c=r.leafDepth!=null&&r.leafDepth<=a;if(i&&!c)return e.viewChildren=[];o=_t(o,function(e){return!e.isRemoved()}),PP(o,s);var l=FP(t,o,s);if(l.sum===0||(l.sum=NP(t,n,l.sum,s,o),l.sum===0))return e.viewChildren=[];for(var u=0,d=o.length;u<d;u++){var f=o[u].getValue()/l.sum*n;o[u].setLayout({area:f})}return c&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:l.dataExtent},!0),o}function NP(e,t,n,r,i){if(!r)return n;for(var a=e.get(`visibleMin`),o=i.length,s=o,c=o-1;c>=0;c--){var l=i[r===`asc`?o-c-1:c].getValue();l/n*t<a&&(s=c,n-=l)}return r===`asc`?i.splice(0,o-s):i.splice(s,o-s),n}function PP(e,t){return t&&e.sort(function(e,n){var r=t===`asc`?e.getValue()-n.getValue():n.getValue()-e.getValue();return r===0?t===`asc`?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:r}),e}function FP(e,t,n){for(var r=0,i=0,a=t.length;i<a;i++)r+=t[i].getValue();var o=e.get(`visualDimension`),s;return!t||!t.length?s=[NaN,NaN]:o===`value`&&n?(s=[t[t.length-1].getValue(),t[0].getValue()],n===`asc`&&s.reverse()):(s=jl(),TP(t,function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)})),{sum:r,dataExtent:s}}function IP(e,t,n){for(var r=0,i=1/0,a=0,o=void 0,s=e.length;a<s;a++)o=e[a].getLayout().area,o&&(o<i&&(i=o),o>r&&(r=o));var c=e.area*e.area,l=t*t*n;return c?CP(l*r/c,c/(l*i)):1/0}function LP(e,t,n,r,i){var a=t===n.width?0:1,o=1-a,s=[`x`,`y`],c=[`width`,`height`],l=n[s[a]],u=t?e.area/t:0;(i||u>n[c[o]])&&(u=n[c[o]]);for(var d=0,f=e.length;d<f;d++){var p=e[d],m={},h=u?p.getLayout().area/u:0,g=m[c[o]]=CP(u-2*r,0),_=n[s[a]]+n[c[a]]-l,v=d===f-1||_<h?_:h,y=m[c[a]]=CP(v-2*r,0);m[s[o]]=n[s[o]]+wP(r,g/2),m[s[a]]=l+wP(r,y/2),l+=v,p.setLayout(m,!0)}n[s[o]]+=u,n[c[o]]-=u}function RP(e,t,n,r){var i=(t||{}).node,a=r.width,o=r.height,s=W({},r);if(!i||i===n)return s;for(var c,l=a*o,u=l*e.option.zoomToNodeRatio;c=i.parentNode;){for(var d=0,f=c.children,p=0,m=f.length;p<m;p++)d+=f[p].getValue();var h=i.getValue();if(h===0)return s;u*=d/h;var g=c.getModel(),_=g.get(EP),v=Math.max(_,VP(g));u+=4*_*_+(3*_+v)*u**.5,u>jc&&(u=jc),i=c}u<l&&(u=l);var y=(u/l)**.5;return{width:a*y,height:o*y}}function zP(e,t,n){if(t)return{x:t.x,y:t.y};var r={x:0,y:0};if(!n)return r;var i=n.node,a=i.getLayout();if(!a)return r;for(var o=[a.width/2,a.height/2],s=i;s;){var c=s.getLayout();o[0]+=c.x,o[1]+=c.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function BP(e,t,n,r,i){var a=e.getLayout(),o=n[i],s=o&&o===e;if(!(o&&!s||i===n.length&&e!==r)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var c=new fr(t.x-a.x,t.y-a.y,t.width,t.height);TP(e.viewChildren||[],function(e){BP(e,c,n,r,i+1)})}}function VP(e){return e.get(OP)?e.get(kP):0}function HP(e,t){return t.width/e.width||t.height/e.height||1}function UP(e,t){return GN(e,t.get(`scaleLimit`,!0))}var WP=Ld,GP=Bs,KP=3,qP=`label`,JP=`upperLabel`,YP=100,XP=20,ZP=30,QP=hn([[`fill`,`color`],[`stroke`,`strokeColor`],[`lineWidth`,`strokeWidth`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`]]),$P=function(e){var t=QP(e);return t.stroke=t.fill=t.lineWidth=null,t},eF=bl(),tF=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._state=`ready`,n._storage=nF(),n}return t.prototype.render=function(e,t,n,r){if(!(ft(t.findComponents({mainType:`series`,subType:`treemap`,query:r}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var i=aP(r,[`treemapZoomToNode`,`treemapRootToNode`],e),a=r&&r.type,o=e.layoutInfo,s=!this._oldTree,c=this._storage,l=a===`treemapRootToNode`&&i&&c?{rootNodeGroup:c.nodeGroup[i.node.getRawIndex()],direction:r.direction}:null,u=this._giveContainerGroup(o),d=e.get(`animation`),f=this._doRender(u,e,l);d&&!s&&(!a||a===`treemapZoomToNode`||a===`treemapRootToNode`)?this._doAnimation(u,f,e,l):f.renderFinally(),this._resetController(n),this._renderBreadcrumb(e,n,i)}},t.prototype._giveContainerGroup=function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new WP,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t},t.prototype._doRender=function(e,t,n){var r=t.getData().tree,i=this._oldTree,a=nF(),o=nF(),s=this._storage,c=[];function l(e,r,i,l){return rF(t,o,s,n,a,c,e,r,i,l)}d(r.root?[r.root]:[],i&&i.root?[i.root]:[],e,r===i||!i,0);var u=f(s);return this._oldTree=r,this._storage=o,{lastsForAnimation:a,willDeleteEls:u,renderFinally:p};function d(e,t,n,r,i){r?(t=e,G(e,function(e,t){!e.isRemoved()&&o(t,t)})):new vm(t,e,a,a).add(o).update(o).remove(St(o,null)).execute();function a(e){return e.getId()}function o(a,o){var s=a==null?null:e[a],c=o==null?null:t[o],u=l(s,c,n,i);u&&d(s&&s.viewChildren||[],c&&c.viewChildren||[],u,r,i+1)}}function f(e){var t=nF();return e&&G(e,function(e,n){var r=t[n];G(e,function(e){e&&(r.push(e),eF(e).willDelete=!0)})}),t}function p(){G(u,function(e){G(e,function(e){e.parent&&e.parent.remove(e)})}),G(c,function(e){e.invisible=!0,e.dirty()})}},t.prototype._doAnimation=function(e,t,n,r){var i=n.get(`animationDurationUpdate`),a=n.get(`animationEasing`),o=(Ct(i)?0:i)||0,s=(Ct(a)?null:a)||`cubicOut`,c=SP();G(t.willDeleteEls,function(e,t){G(e,function(e,n){if(!e.invisible){var i=e.parent,a,l=eF(i);if(r&&r.direction===`drillDown`)a=i===r.rootNodeGroup?{shape:{x:0,y:0,width:l.nodeWidth,height:l.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,d=0;l.willDelete||(u=l.nodeWidth/2,d=l.nodeHeight/2),a=t===`nodeGroup`?{x:u,y:d,style:{opacity:0}}:{shape:{x:u,y:d,width:0,height:0},style:{opacity:0}}}a&&c.add(e,a,o,0,s)}})}),G(this._storage,function(e,n){G(e,function(e,r){var i=t.lastsForAnimation[n][r],a={};i&&(e instanceof Ld?i.oldX!=null&&(a.x=e.x,a.y=e.y,e.x=i.oldX,e.y=i.oldY):(i.oldShape&&(a.shape=W({},e.shape),e.setShape(i.oldShape)),i.fadein?(e.setStyle(`opacity`,0),a.style={opacity:1}):e.style.opacity!==1&&(a.style={opacity:1})),c.add(e,a,o,0,s))})},this),this._state=`animating`,c.finished(xt(function(){this._state=`ready`,t.renderFinally()},this)).start()},t.prototype._resetController=function(e){var t=this,n=this.seriesModel,r=this._controller;r||(r=this._controller=new ON(e.getZr()),r.on(`pan`,xt(this._onPan,this)),r.on(`zoom`,xt(this._onZoom,this))),r.enable(n.get(`roam`),{api:e,zInfo:{component:n},triggerInfo:{roamTrigger:n.get(`roamTrigger`),isInSelf:function(e,n,r){var i=t._containerGroup;return i?i.getBoundingRect().contain(n-i.x,r-i.y):!1}}})},t.prototype._clearController=function(){var e=this._controller;e&&=(e.dispose(),null)},t.prototype._onPan=function(e){if(this._state!==`animating`&&(Math.abs(e.dx)>KP||Math.abs(e.dy)>KP)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:`treemapMove`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale,i=this.seriesModel;if(this._state!==`animating`){var a=i.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new fr(o.x,o.y,o.width,o.height),c=i.layoutInfo,l=HP(c,o),u=l*r;u=UP(u,i);var d=u/l;t-=c.x,n-=c.y;var f=En();An(f,f,[-t,-n]),Mn(f,f,[d,d]),An(f,f,[t,n]),s.applyTransform(f),this.api.dispatchAction({type:`treemapRender`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var t=this;e.on(`click`,function(e){if(t._state===`ready`){var n=t.seriesModel.get(`nodeClick`,!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if(n===`zoomToNode`)t._zoomToNode(r);else if(n===`link`){var a=i.hostTree.data.getItemModel(i.dataIndex),o=a.get(`link`,!0),s=a.get(`target`,!0)||`blank`;o&&G_(o,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=e.get(`leafDepth`,!0)==null?this.findTarget(t.getWidth()/2,t.getHeight()/2):{node:e.getViewRoot()},n||={node:e.getData().tree.root}),(this._breadcrumb||=new vP(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&(sP(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=nF(),this._state=`ready`,this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:`treemapZoomToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:`treemapRootToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:`viewChildren`,order:`preorder`},function(r){var i=this._storage.background[r.getRawIndex()];if(i){var a=i.transformCoordToLocal(e,t),o=i.shape;if(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height)n={node:r,offsetX:a[0],offsetY:a[1]};else return!1}},this),n},t.type=`treemap`,t}(ob);function nF(){return{nodeGroup:[],background:[],content:[]}}function rF(e,t,n,r,i,a,o,s,c,l){if(!o)return;var u=o.getLayout(),d=e.getData(),f=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!u||!u.isInView)return;var p=u.width,m=u.height,h=u.borderWidth,g=u.invisible,_=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,b=u.upperHeight,x=y&&y.length,S=f.getModel(`itemStyle`),C=f.getModel([`emphasis`,`itemStyle`]),w=f.getModel([`blur`,`itemStyle`]),T=f.getModel([`select`,`itemStyle`]),E=S.get(`borderRadius`)||0,D=R(`nodeGroup`,WP);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),eF(D).nodeWidth=p,eF(D).nodeHeight=m,u.isAboveViewRoot)return D;var O=R(`background`,GP,l,XP);O&&I(D,O,x&&u.upperLabelHeight);var k=f.getModel(`emphasis`),A=k.get(`focus`),j=k.get(`blurScope`),M=k.get(`disabled`),N=A===`ancestor`?o.getAncestorsIndices():A===`descendant`?o.getDescendantIndices():A;if(x)ud(D)&&ld(D,!1),O&&(ld(O,!M),d.setItemGraphicEl(o.dataIndex,O),ad(O,N,j));else{var P=R(`content`,GP,l,ZP);P&&ee(D,P),O.disableMorphing=!0,O&&ud(O)&&ld(O,!1),ld(D,!M),d.setItemGraphicEl(o.dataIndex,D);var F=f.getShallow(`cursor`);F&&P.attr(`cursor`,F),ad(D,N,j)}return D;function I(t,n,r){var i=Yl(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)te(n);else{n.invisible=!1;var a=o.getVisual(`style`),s=a.stroke,c=$P(S);c.fill=s;var l=QP(C);l.fill=C.get(`borderColor`);var u=QP(w);u.fill=w.get(`borderColor`);var d=QP(T);if(d.fill=T.get(`borderColor`),r){var f=p-2*h;L(n,s,a.opacity,{x:h,y:0,width:f,height:b})}else n.removeTextContent();n.setStyle(c),n.ensureState(`emphasis`).style=l,n.ensureState(`blur`).style=u,n.ensureState(`select`).style=d,Iu(n)}t.add(n)}function ee(t,n){var r=Yl(n);r.dataIndex=o.dataIndex,r.seriesIndex=e.seriesIndex;var i=Math.max(p-2*h,0),a=Math.max(m-2*h,0);if(n.culling=!0,n.setShape({x:h,y:h,width:i,height:a,r:E}),g)te(n);else{n.invisible=!1;var s=o.getVisual(`style`),c=s.fill,l=$P(S);l.fill=c,l.decal=s.decal;var u=QP(C),d=QP(w),f=QP(T);L(n,c,s.opacity,null),n.setStyle(l),n.ensureState(`emphasis`).style=u,n.ensureState(`blur`).style=d,n.ensureState(`select`).style=f,Iu(n)}t.add(n)}function te(e){!e.invisible&&a.push(e)}function L(t,n,r,i){var a=f.getModel(i?JP:qP),s=ml(f.get(`name`),null),c=a.getShallow(`show`);Gp(t,Kp(f,i?JP:qP),{defaultText:c?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:o.dataIndex});var l=t.getTextContent();if(l){var d=l.style,p=Ft(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),l.disableLabelLayout=!0),l.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);(d.width!==e||d.height!==n)&&l.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow=`truncate`,ne(d,i,u);var m=l.getState(`emphasis`);ne(m?m.style:null,i,u)}}function ne(t,n,r){var i=t?t.text:null;if(!n&&r.isLeafRoot&&i!=null){var a=e.get(`drillDownIcon`,!0);t.text=a?a+` `+i:i}}function R(e,r,a,o){var s=v!=null&&n[e][v],c=i[e];return s?(n[e][v]=null,re(c,s)):g||(s=new r,s instanceof yo&&(s.z2=iF(a,o)),ie(c,s)),t[e][_]=s}function re(e,t){var n=e[_]={};t instanceof WP?(n.oldX=t.x,n.oldY=t.y):n.oldShape=W({},t.shape)}function ie(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof Ld;if(a&&(!r||r.direction===`drillDown`)){var c=0,l=0,u=i.background[a.getRawIndex()];!r&&u&&u.oldShape&&(c=u.oldShape.width,l=u.oldShape.height),s?(n.oldX=0,n.oldY=l):n.oldShape={x:c,y:l,width:0,height:0}}n.fadein=!s}}function iF(e,t){return e*YP+t}var aF=G,oF=Y,sF=-1,cF=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=ct(t);this.type=r,this.mappingMethod=n,this._normalizeData=bF[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(dF(i),lF(i)):n===`category`?i.categories?uF(i):dF(i,!0):(It(n!==`linear`||i.dataExtent),dF(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return xt(this._normalizeData,this)},e.listVisualTypes=function(){return yt(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){Y(e)?G(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=q(t)?[]:Y(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&aF(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(q(e))e=e.slice();else if(oF(e)){var t=[];aF(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a<o;a++){var s=t[a].value;if(s!=null){if(s===e||J(s)&&s===e+``)return a;n&&d(s,a)}}for(var a=0,o=t.length;a<o;a++){var c=t[a],l=c.interval,u=c.close;if(l){if(l[0]===-1/0){if(xF(u[1],e,l[1]))return a}else if(l[1]===1/0){if(xF(u[0],l[0],e))return a}else if(xF(u[0],l[0],e)&&xF(u[1],e,l[1]))return a;n&&d(l[0],a),n&&d(l[1],a)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var a=Math.abs(t-e);a<i&&(i=a,r=n)}},e.visualHandlers={color:{applyVisual:mF(`color`),getColorMapper:function(){var e=this.option;return xt(e.mappingMethod===`category`?function(e,t){return!t&&(e=this._normalizeData(e)),hF.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=ua(t,e.parsedVisual,r),i?r:ma(r,`rgba`)},this)},_normalizedToVisual:{linear:function(e){return ma(ua(e,this.option.parsedVisual),`rgba`)},category:hF,piecewise:function(e,t){var n=vF.call(this,t);return n??=ma(ua(e,this.option.parsedVisual),`rgba`),n},fixed:gF}},colorHue:fF(function(e,t){return fa(e,t)}),colorSaturation:fF(function(e,t){return fa(e,null,t)}),colorLightness:fF(function(e,t){return fa(e,null,null,t)}),colorAlpha:fF(function(e,t){return pa(e,t)}),decal:{applyVisual:mF(`decal`),_normalizedToVisual:{linear:null,category:hF,piecewise:null,fixed:null}},opacity:{applyVisual:mF(`opacity`),_normalizedToVisual:_F([0,1])},liftZ:{applyVisual:mF(`liftZ`),_normalizedToVisual:{linear:gF,category:gF,piecewise:gF,fixed:gF}},symbol:{applyVisual:function(e,t,n){n(`symbol`,this.mapValueToVisual(e))},_normalizedToVisual:{linear:pF,category:hF,piecewise:function(e,t){var n=vF.call(this,t);return n??=pF.call(this,e),n},fixed:gF}},symbolSize:{applyVisual:mF(`symbolSize`),_normalizedToVisual:_F([0,1])}},e}();function lF(e){var t=e.pieceList;e.hasSpecialVisual=!1,G(t,function(t,n){t.originIndex=n,t.visual!=null&&(e.hasSpecialVisual=!0)})}function uF(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(aF(t,function(e,t){n[e]=t}),!q(r)){var i=[];Y(r)?aF(r,function(e,t){var r=n[t];i[r??sF]=e}):i[sF]=r,r=yF(e,i)}for(var a=t.length-1;a>=0;a--)r[a]??(delete n[t[a]],t.pop())}function dF(e,t){var n=e.visual,r=[];Y(n)?aF(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),yF(e,r)}function fF(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:_F([0,1])}}function pF(e){var t=this.option.visual;return t[Math.round(yc(e,[0,1],[0,t.length-1],!0))]||{}}function mF(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function hF(e){var t=this.option.visual;return t[this.option.loop&&e!==sF?e%t.length:e]}function gF(){return this.option.visual[0]}function _F(e){return{linear:function(t){return yc(t,e,this.option.visual,!0)},category:hF,piecewise:function(t,n){var r=vF.call(this,n);return r??=yc(t,e,this.option.visual,!0),r},fixed:gF}}function vF(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[cF.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function yF(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=K(t,function(e){return oa(e)||[0,0,0,1]})),t}var bF={linear:function(e){return yc(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=cF.findPieceIndex(e,t,!0);if(n!=null)return yc(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??sF},fixed:Yt};function xF(e,t,n){return e?t<=n:t<n}var SF=`itemStyle`,CF=bl(),wF={seriesType:`treemap`,reset:function(e){var t=e.getData().tree.root;t.isRemoved()||TF(t,{},e.getViewRoot().getAncestors(),e)}};function TF(e,t,n,r){var i=e.getModel(),a=e.getLayout(),o=e.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=i.getModel(SF),c=EF(s,t,r),l=o.ensureUniqueItemVisual(e.dataIndex,`style`),u=s.get(`borderColor`),d=s.get(`borderColorSaturation`),f;d!=null&&(f=DF(c),u=OF(d,f)),l.stroke=u;var p=e.viewChildren;if(!p||!p.length)f=DF(c),l.fill=f;else{var m=AF(e,i,a,s,c,p);G(p,function(e,t){(e.depth>=n.length||e===n[e.depth])&&TF(e,MF(i,c,e,t,m,r),n,r)})}}}function EF(e,t,n){var r=W({},t),i=n.designatedVisualItemStyle;return G([`color`,`colorAlpha`,`colorSaturation`],function(n){i[n]=t[n];var a=e.get(n);i[n]=null,a!=null&&(r[n]=a)}),r}function DF(e){var t=kF(e,`color`);if(t){var n=kF(e,`colorAlpha`),r=kF(e,`colorSaturation`);return r&&(t=fa(t,null,null,r)),n&&(t=pa(t,n)),t}}function OF(e,t){return t==null?null:fa(t,null,null,e)}function kF(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function AF(e,t,n,r,i,a){if(!(!a||!a.length)){var o=jF(t,`color`)||i.color!=null&&i.color!==`none`&&(jF(t,`colorAlpha`)||jF(t,`colorSaturation`));if(o){var s=t.get(`visualMin`),c=t.get(`visualMax`),l=n.dataExtent.slice();s!=null&&s<l[0]&&(l[0]=s),c!=null&&c>l[1]&&(l[1]=c);var u=t.get(`colorMappingBy`),d={type:o.name,dataExtent:l,visual:o.range};d.type===`color`&&(u===`index`||u===`id`)?(d.mappingMethod=`category`,d.loop=!0):d.mappingMethod=`linear`;var f=new cF(d);return CF(f).drColorMappingBy=u,f}}}function jF(e,t){var n=e.get(t);return q(n)&&n.length?{name:t,range:n}:null}function MF(e,t,n,r,i,a){var o=W({},t);if(i){var s=i.type,c=s===`color`&&CF(i).drColorMappingBy,l=c===`index`?r:c===`id`?a.mapIdToIndex(n.getId()):n.getValue(e.get(`visualDimension`));o[s]=i.mapValueToVisual(l)}return o}function NF(e){e.registerSeriesModel(fP),e.registerChartView(tF),e.registerVisual(wF),e.registerLayout(AP),uP(e)}var PF=gf.prototype,FF=bf.prototype,IF=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(IF);function LF(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var RF=function(e){U(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-line`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new IF},t.prototype.buildPath=function(e,t){LF(t)?PF.buildPath.call(this,e,t):FF.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return LF(this.shape)?PF.pointAt.call(this,e):FF.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=LF(t)?[t.x2-t.x1,t.y2-t.y1]:FF.tangentAt.call(this,e);return Un(n,n)},t}(Es),zF=[`fromSymbol`,`toSymbol`];function BF(e){return`_`+e+`Type`}function VF(e,t,n){var r=t.getItemVisual(n,e);if(!r||r===`none`)return r;var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=Oy(i),l=ky(o||0,c);return r+c+l+(a||``)+(s||``)}function HF(e,t,n){var r=t.getItemVisual(n,e);if(!(!r||r===`none`)){var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=Oy(i),l=ky(o||0,c),u=Dy(r,-c[0]/2+l[0],-c[1]/2+l[1],c[0],c[1],null,s);return u.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,u.name=e,u}}function UF(e){var t=new RF({name:`line`,subPixelOptimize:!0});return WF(t.shape,e),t}function WF(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}var GF=function(e){U(t,e);function t(t,n,r){var i=e.call(this)||this;return i._createLine(t,n,r),i}return t.prototype._createLine=function(e,t,n){var r=e.hostModel,i=e.getItemLayout(t),a=e.getItemVisual(t,`z2`),o=UF(i);o.shape.percent=0,Hf(o,{z2:X(a,0),shape:{percent:1}},r,t),this.add(o),G(zF,function(n){var r=HF(n,e,t);this.add(r),this[BF(n)]=VF(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=e.getItemLayout(t),o={shape:{}};WF(o.shape,a),Vf(i,o,r,t),G(zF,function(n){var r=VF(n,e,t),i=BF(n);if(this[i]!==r){this.remove(this.childOfName(n));var a=HF(n,e,t);this.add(a)}this[i]=r},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=n&&n.emphasisLineStyle,o=n&&n.blurLineStyle,s=n&&n.selectLineStyle,c=n&&n.labelStatesModels,l=n&&n.emphasisDisabled,u=n&&n.focus,d=n&&n.blurScope;if(!n||e.hasItemOption){var f=e.getItemModel(t),p=f.getModel(`emphasis`);a=p.getModel(`lineStyle`).getLineStyle(),o=f.getModel([`blur`,`lineStyle`]).getLineStyle(),s=f.getModel([`select`,`lineStyle`]).getLineStyle(),l=p.get(`disabled`),u=p.get(`focus`),d=p.get(`blurScope`),c=Kp(f)}var m=e.getItemVisual(t,`style`),h=m.stroke;i.useStyle(m),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState(`emphasis`).style=a,i.ensureState(`blur`).style=o,i.ensureState(`select`).style=s,G(zF,function(e){var t=this.childOfName(e);if(t){t.setColor(h),t.style.opacity=m.opacity;for(var n=0;n<fu.length;n++){var r=fu[n],a=i.getState(r);if(a){var o=a.style||{},s=t.ensureState(r),c=s.style||={};o.stroke!=null&&(c[t.__isEmptyBrush?`stroke`:`fill`]=o.stroke),o.opacity!=null&&(c.opacity=o.opacity)}}t.markRedraw()}},this);var g=r.getRawValue(t);Gp(this,c,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:h||Q.color.neutral99,defaultOpacity:m.opacity,defaultText:(g==null?e.getName(t):isFinite(g)?wc(g,10):g)+``});var _=this.getTextContent();if(_){var v=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=v.get(`position`)||`middle`;var y=v.get(`distance`);q(y)||(y=[y,y]),_.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),id(this,u,d,l)},t.prototype.highlight=function(){zu(this)},t.prototype.downplay=function(){Bu(this)},t.prototype.updateLayout=function(e,t){this.childOfName(`line`).stopAnimation(),this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName(`line`);WF(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this,t=e.childOfName(`fromSymbol`),n=e.childOfName(`toSymbol`),r=e.getTextContent();if(!t&&!n&&(!r||r.ignore))return;for(var i=1,a=this.parent;a;)a.scaleX&&(i/=a.scaleX),a=a.parent;var o=e.childOfName(`line`);if(!this.__dirty&&!o.__dirty)return;var s=o.shape.percent,c=o.pointAt(0),l=o.pointAt(s),u=zn([],l,c);Un(u,u);function d(e,t){var n=e.__specifiedRotation;if(n==null){var r=o.tangentAt(t);e.attr(`rotation`,(t===1?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr(`rotation`,n)}if(t&&(t.setPosition(c),d(t,0),t.scaleX=t.scaleY=i*s,t.markRedraw()),n&&(n.setPosition(l),d(n,1),n.scaleX=n.scaleY=i*s,n.markRedraw()),r&&!r.ignore){r.x=r.y=0,r.originX=r.originY=0;var f=void 0,p=void 0,m=r.__labelDistance,h=m[0]*i,g=m[1]*i,_=s/2,v=o.tangentAt(_),y=[v[1],-v[0]],b=o.pointAt(_);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0]<c[0]&&(S=Math.PI+S),r.rotation=S}var C=void 0;switch(r.__position){case`insideStartTop`:case`insideMiddleTop`:case`insideEndTop`:case`middle`:C=-g,p=`bottom`;break;case`insideStartBottom`:case`insideMiddleBottom`:case`insideEndBottom`:C=g,p=`top`;break;default:C=0,p=`middle`}switch(r.__position){case`end`:r.x=u[0]*h+l[0],r.y=u[1]*g+l[1],f=u[0]>.8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(Ld),KF=function(){function e(e){this.group=new Ld,this._LineCtor=e||GF}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=JF(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=JF(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!qF(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i<e.end;i++)if(XF(t.getItemLayout(i))){var a=new this._LineCtor(t,i,this._seriesScope);a.traverse(r),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){kp(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(XF(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},e.prototype._doUpdate=function(e,t,n,r,i){var a=e.getItemGraphicEl(n);if(!XF(t.getItemLayout(r))){this.group.remove(a);return}a?a.updateData(t,r,i):a=new this._LineCtor(t,r,i),t.setItemGraphicEl(r,a),this.group.add(a)},e}();function qF(e){return e.animators&&e.animators.length>0}function JF(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Kp(t)}}function YF(e){return isNaN(e[0])||isNaN(e[1])}function XF(e){return e&&!YF(e[0])&&!YF(e[1])}var ZF={color:`fill`,borderColor:`stroke`},QF={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},$F=bl(),eI=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get(`zlevel`,!0),this.currentZ=this.get(`z`,!0)},t.prototype.getInitialData=function(e,t){return hg(null,this)},t.prototype.getDataParams=function(t,n,r){var i=e.prototype.getDataParams.call(this,t,n);return r&&(i.info=$F(r).info),i},t.type=`series.custom`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,clip:!1},t}(fy);function tI(e,t){return t||=[0,0],K([`x`,`y`],function(n,r){var i=this.getAxis(n),a=t[r],o=e[r]/2;return i.type===`category`?tC(i).w:Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function nI(e){var t=e.master.getRect();return{coordSys:{type:`cartesian2d`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:xt(tI,e)}}}function rI(e,t){return t||=[0,0],K([0,1],function(n){var r=t[n],i=e[n]/2,a=[],o=[];return a[n]=r-i,o[n]=r+i,a[1-n]=o[1-n]=t[1-n],Math.abs(this.dataToPoint(a)[n]-this.dataToPoint(o)[n])},this)}function iI(e){var t=e.view,n=t.getBoundingRect();return{coordSys:{type:`geo`,x:n.x,y:n.y,width:n.width,height:n.height,zoom:VN(t)},api:{coord:function(t){return e.dataToPoint(t)},size:xt(rI,e)}}}function aI(e,t){var n=this.getAxis(),r=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return n.type===`category`?tC(n).w:Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}function oI(e){var t=e.getRect();return{coordSys:{type:`singleAxis`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:xt(aI,e)}}}function sI(e,t){return t||=[0,0],K([`Radius`,`Angle`],function(n,r){var i=`get`+n+`Axis`,a=this[i](),o=t[r],s=e[r]/2,c=a.type===`category`?tC(a).w:Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return n===`Angle`&&(c=c*Math.PI/180),c},this)}function cI(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),r=t.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:`polar`,cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=t.dataToRadius(r[0]),a=n.dataToAngle(r[1]),o=e.coordToPoint([i,a]);return o.push(i,a*Math.PI/180),o},size:xt(sI,e)}}}function lI(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:`calendar`,x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}function uI(e){var t=e.getRect();return{coordSys:{type:`matrix`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}var dI={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},fI=yt(dI);gt(gi,function(e,t){return e[t]=1,e},{}),gi.join(`, `);var pI=[``,`style`,`shape`,`extra`],mI=bl();function hI(e,t,n,r,i){var a=e+`Animation`,o=zf(e,r,i)||{},s=mI(t).userDuring;return o.duration>0&&(o.during=s?xt(TI,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),W(o,n[a]),o}function gI(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=mI(e),l=t.style;c.userDuring=t.during;var u={},d={};if(kI(e,t,d),e.type===`compound`)for(var f=e.shape.paths,p=t.shape.paths,m=0;m<p.length;m++){var h=p[m];DI(`shape`,h,f[m])}else DI(`shape`,t,d),DI(`extra`,t,d);if(!a&&s&&(OI(e,t,u),EI(`shape`,e,t,u),EI(`extra`,e,t,u),AI(e,t,l,u)),d.style=l,bI(e,d,o),SI(e,t),s){if(a){var g={};G(pI,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(g[e]=g[e]||{}),W(e?g[e]:g,n.enterFrom))});var _=hI(`enter`,e,t,n,i);_.duration>0&&e.animateFrom(g,_)}else xI(e,t,i||0,n,u)}_I(e,t),l?e.dirty():e.markRedraw()}function _I(e,t){for(var n=mI(e).leaveToProps,r=0;r<pI.length;r++){var i=pI[r],a=i?t[i]:t;a&&a.leaveTo&&(n||=mI(e).leaveToProps={},i&&(n[i]=n[i]||{}),W(i?n[i]:n,a.leaveTo))}}function vI(e,t,n,r){if(e){var i=e.parent,a=mI(e).leaveToProps;if(a){var o=hI(`update`,e,t,n,0);o.done=function(){i&&i.remove(e),r&&r()},e.animateTo(a,o)}else i&&i.remove(e),r&&r()}}function yI(e){return e===`all`}function bI(e,t,n){var r=t.style;if(!e.isGroup&&r){if(n){e.useStyle({});for(var i=e.animators,a=0;a<i.length;a++){var o=i[a];o.targetName===`style`&&o.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}function xI(e,t,n,r,i){if(i){var a=hI(`update`,e,t,r,n);a.duration>0&&e.animateFrom(i,a)}}function SI(e,t){Z(t,`silent`)&&(e.silent=t.silent),Z(t,`ignore`)&&(e.ignore=t.ignore),e instanceof yo&&Z(t,`invisible`)&&(e.invisible=t.invisible),e instanceof Es&&Z(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}var CI={},wI={setTransform:function(e,t){return CI.el[e]=t,this},getTransform:function(e){return CI.el[e]},setShape:function(e,t){var n=CI.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=CI.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=CI.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=CI.el.style;if(t)return t[e]},setExtra:function(e,t){var n=CI.el.extra||(CI.el.extra={});return n[e]=t,this},getExtra:function(e){var t=CI.el.extra;if(t)return t[e]}};function TI(){var e=this,t=e.el;if(t){var n=mI(t).userDuring,r=e.userDuring;if(n!==r){e.el=e.userDuring=null;return}CI.el=t,r(wI)}}function EI(e,t,n,r){var i=n[e];if(i){var a=t[e],o;if(a){var s=n.transition,c=i.transition;if(c){if(!o&&(o=r[e]={}),yI(c))W(o,a);else for(var l=el(c),u=0;u<l.length;u++){var d=l[u],f=a[d];o[d]=f}}else if(yI(s)||ft(s,e)>=0){!o&&(o=r[e]={});for(var p=yt(a),u=0;u<p.length;u++){var d=p[u],f=a[d];jI(i[d],f)&&(o[d]=f)}}}}}function DI(e,t,n){var r=t[e];if(r)for(var i=n[e]={},a=yt(r),o=0;o<a.length;o++){var s=a[o];i[s]=Oa(r[s])}}function OI(e,t,n){for(var r=t.transition,i=yI(r)?gi:el(r||[]),a=0;a<i.length;a++){var o=i[a];o!==`style`&&o!==`shape`&&o!==`extra`&&(n[o]=e[o])}}function kI(e,t,n){for(var r=0;r<fI.length;r++){var i=fI[r],a=dI[i],o=t[i];o&&(n[a[0]]=o[0],n[a[1]]=o[1])}for(var r=0;r<gi.length;r++){var s=gi[r];t[s]!=null&&(n[s]=t[s])}}function AI(e,t,n,r){if(n){var i=e.style,a;if(i){var o=n.transition,s=t.transition;if(o&&!yI(o)){var c=el(o);!a&&(a=r.style={});for(var l=0;l<c.length;l++){var u=c[l],d=i[u];a[u]=d}}else if(e.getAnimationStyleProps&&(yI(s)||yI(o)||ft(s,`style`)>=0)){var f=e.getAnimationStyleProps(),p=f?f.style:null;if(p){!a&&(a=r.style={});for(var m=yt(n),l=0;l<m.length;l++){var u=m[l];if(p[u]){var d=i[u];a[u]=d}}}}}}}function jI(e,t){return ht(e)?e!==t:e!=null&&isFinite(e)}var MI=bl(),NI=[`percent`,`easing`,`shape`,`style`,`extra`];function PI(e){e.stopAnimation(`keyframe`),e.attr(MI(e))}function FI(e,t,n){if(!(!n.isAnimationEnabled()||!t)){if(q(t)){G(t,function(t){FI(e,t,n)});return}var r=t.keyframes,i=t.duration;if(n&&i==null){var a=zf(`enter`,n,0);i=a&&a.duration}if(!(!r||!i)){var o=MI(e);G(pI,function(n){if(!(n&&!e[n])){var a;r.sort(function(e,t){return e.percent-t.percent}),G(r,function(r){var s=e.animators,c=n?r[n]:r;if(c){var l=yt(c);if(n||(l=_t(l,function(e){return ft(NI,e)<0})),l.length){a||(a=e.animate(n,t.loop,!0),a.scope=`keyframe`);for(var u=0;u<s.length;u++)s[u]!==a&&s[u].targetName===a.targetName&&s[u].stopTracks(l);n&&(o[n]=o[n]||{});var d=n?o[n]:o;G(l,function(t){d[t]=((n?e[n]:e)||{})[t]}),a.whenWithKeys(i*r.percent,c,l,r.easing)}}}),a&&a.delay(t.delay||0).duration(i).start(t.easing)}})}}}var II=`emphasis`,LI=`normal`,RI=`blur`,zI=`select`,BI=[LI,II,RI,zI],VI={normal:[`itemStyle`],emphasis:[II,`itemStyle`],blur:[RI,`itemStyle`],select:[zI,`itemStyle`]},HI={normal:[`label`],emphasis:[II,`label`],blur:[RI,`label`],select:[zI,`label`]},UI=[`x`,`y`],WI=`e\0\0`,GI={normal:{},emphasis:{},blur:{},select:{}},KI={cartesian2d:nI,geo:iI,single:oI,polar:cI,calendar:lI,matrix:uI};function qI(e){return e instanceof Es}function JI(e){return e instanceof yo}function YI(e,t){t.copyTransform(e),JI(t)&&JI(e)&&(t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel,t.invisible=e.invisible,t.ignore=e.ignore,qI(t)&&qI(e)&&t.setShape(e.shape))}var XI=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var i=this._data,a=e.getData(),o=this.group,s=nL(e,a,t,n);i||o.removeAll(),a.diff(i).add(function(t){iL(n,null,t,s(t,r),e,o,a)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&vI(n,$F(n).option,e)}).update(function(t,c){iL(n,i.getItemGraphicEl(c),t,s(t,r),e,o,a)}).execute();var c=e.get(`clip`,!0)?mb(e.coordinateSystem,!1,e):null;c?o.setClipPath(c):o.removeClipPath(),this._data=a},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,n,r,i){var a=t.getData(),o=nL(t,a,n,r),s=this._progressiveEls=[];function c(e){e.isGroup||(e.incremental=Gl(t),e.ensureState(`emphasis`).hoverLayer=2)}for(var l=e.start;l<e.end;l++){var u=iL(null,null,l,o(l,i),t,this.group,a);u&&(u.traverse(c),s.push(u))}},t.prototype.eachRendered=function(e){kp(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,t,n,r){var i=t.element;if(i==null||n.name===i)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===i)return!0;return!1},t.type=`custom`,t}(ob);function ZI(e){var t=e.type,n;if(t===`path`){var r=e.shape,i=r.width!=null&&r.height!=null?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,a=vL(r);n=rp(a,null,i,r.layout||`center`),$F(n).customPathData=a}else if(t===`image`)n=new Ms({}),$F(n).customImagePath=e.style.image;else if(t===`text`)n=new Gs({});else if(t===`group`)n=new Ld;else if(t===`compoundPath`){var r=e.shape;if(!r||!r.paths){var o=``;Xc(o)}n=new Cf({shape:{paths:K(r.paths,function(e){if(e.type===`path`)return rp(e.shape.pathData,e,null);var t=np(e.type);return t||Xc(``),new t})}})}else{var s=np(t);if(!s){var o=``;Xc(o)}n=new s}return $F(n).customGraphicType=t,n.name=e.name,n.z2EmphasisLift=1,n.z2SelectLift=1,n}function QI(e,t,n,r,i,a,o){PI(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),r&&r.transition==null&&(r.transition=UI);var c=r&&r.style;if(c){if(t.type===`text`){var l=c;Z(l,`textFill`)&&(l.fill=l.textFill),Z(l,`textStroke`)&&(l.stroke=l.textStroke)}var u=void 0,d=qI(t)?c.decal:null;e&&d&&(d.dirty=!0,u=CA(d,e)),c.__decalPattern=u}if(JI(t)&&c){var u=c.__decalPattern;u&&(c.decal=u)}gI(t,r,a,{dataIndex:n,isInit:o,clearStyle:!0}),FI(t,r.keyframeAnimation,a)}function $I(e,t,n,r,i){var a=t.isGroup?null:t,o=i&&i[e].cfg;if(a){var s=a.ensureState(e);if(r===!1){var c=a.getState(e);c&&(c.style=null)}else s.style=r||null;o&&(s.textConfig=o),Iu(a)}}function eL(e,t,n){if(!e.isGroup){var r=e,i=n.currentZ,a=n.currentZLevel;r.z=i,r.zlevel=a;var o=t.z2;o!=null&&(r.z2=o||0);for(var s=0;s<BI.length;s++)tL(r,t,BI[s])}}function tL(e,t,n){var r=n===LI,i=r?t:uL(t,n),a=i?i.z2:null,o;a!=null&&(o=r?e:e.ensureState(n),o.z2=a||0)}function nL(e,t,n,r){var i=e.get(`renderItem`);if(typeof i==`string`){var a=Nk(i);a&&(i=a)}var o=e.coordinateSystem,s={};o&&(s=o.prepareCustoms?o.prepareCustoms(o):KI[o.type](o));for(var c=dt({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:x,style:C,ordinalRawValue:S,styleEmphasis:w,visual:D,barLayout:O,currentSeriesIndices:k,font:A},s.api||{}),l={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:s.coordSys,dataInsideLength:t.count(),encode:rL(e.getData()),itemPayload:e.get(`itemPayload`)||{}},u,d,f={},p={},m={},h={},g=0;g<BI.length;g++){var _=BI[g];m[_]=e.getModel(VI[_]),h[_]=e.getModel(HI[_])}function v(e){return e===u?d||=t.getItemModel(e):t.getItemModel(e)}function y(e,n){return t.hasItemOption?e===u?f[n]||(f[n]=v(e).getModel(VI[n])):v(e).getModel(VI[n]):m[n]}function b(e,n){return t.hasItemOption?e===u?p[n]||(p[n]=v(e).getModel(HI[n])):v(e).getModel(HI[n]):h[n]}return function(e,n){return u=e,d=null,f={},p={},i&&i(dt({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},l),c)};function x(e,n){return n??=u,t.getStore().get(t.getDimensionIndex(e||0),n)}function S(e,n){n??=u,e||=0;var r=t.getDimensionInfo(e);if(!r){var i=t.getDimensionIndex(e);return i>=0?t.getStore().get(i,n):void 0}var a=t.get(r.name,n),o=r&&r.ordinalMeta;return o?o.categories[a]:a}function C(n,r){r??=u;var i=t.getItemVisual(r,`style`),a=i&&i.fill,o=i&&i.opacity,s=y(r,LI).getItemStyle();a!=null&&(s.fill=a),o!=null&&(s.opacity=o);var c={inheritColor:J(a)?a:Q.color.neutral99},l=b(r,LI),d=qp(l,null,c,!1,!0);d.text=l.getShallow(`show`)?X(e.getFormattedLabel(r,LI),jy(t,r)):null;var f=Jp(l,c,!1);return E(n,s),s=bb(s,d,f),n&&T(s,n),s.legacy=!0,s}function w(n,r){r??=u;var i=y(r,II).getItemStyle(),a=b(r,II),o=qp(a,null,null,!0,!0);o.text=a.getShallow(`show`)?Nt(e.getFormattedLabel(r,II),e.getFormattedLabel(r,LI),jy(t,r)):null;var s=Jp(a,null,!0);return E(n,i),i=bb(i,o,s),n&&T(i,n),i.legacy=!0,i}function T(e,t){for(var n in t)Z(t,n)&&(e[n]=t[n])}function E(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}function D(e,n){if(n??=u,Z(ZF,e)){var r=t.getItemVisual(n,`style`);return r?r[ZF[e]]:null}if(Z(QF,e))return t.getItemVisual(n,e)}function O(e){if(o.type===`cartesian2d`)return Gw(dt({axis:o.getBaseAxis()},e))}function k(){return n.getCurrentSeriesIndices()}function A(e){return tm(e,n)}}function rL(e){var t={};return G(e.dimensions,function(n){var r=e.getDimensionInfo(n);if(!r.isExtraCoord){var i=r.coordDim,a=t[i]=t[i]||[];a[r.coordDimIndex]=e.getDimensionIndex(n)}}),t}function iL(e,t,n,r,i,a,o){if(!r){a.remove(t);return}var s=aL(e,t,n,r,i,a);return s&&o.setItemGraphicEl(n,s),s&&id(s,r.focus,r.blurScope,r.emphasisDisabled),s}function aL(e,t,n,r,i,a){var o=-1,s=t;t&&oL(t,r,i)&&(o=ft(a.childrenRef(),t),t=null);var c=!t,l=t;l?l.clearStates():(l=ZI(r),s&&YI(s,l)),r.morph===!1?l.disableMorphing=!0:l.disableMorphing&&(l.disableMorphing=!1),r.tooltipDisabled&&(l.tooltipDisabled=!0),GI.normal.cfg=GI.normal.conOpt=GI.emphasis.cfg=GI.emphasis.conOpt=GI.blur.cfg=GI.blur.conOpt=GI.select.cfg=GI.select.conOpt=null,GI.isLegacy=!1,cL(l,n,r,i,c,GI),sL(l,n,r,i,c),QI(e,l,n,r,GI,i,c),Z(r,`info`)&&($F(l).info=r.info);for(var u=0;u<BI.length;u++){var d=BI[u];if(d!==LI){var f=uL(r,d),p=dL(r,f,d);$I(d,l,f,p,GI)}}return eL(l,r,i),r.type===`group`&&fL(e,l,n,r,i),o>=0?a.replaceAt(l,o):a.add(l),l}function oL(e,t,n){var r=$F(e),i=t.type,a=t.shape,o=t.style;return n.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i===`path`&&yL(a)&&vL(a)!==r.customPathData||i===`image`&&Z(o,`image`)&&o.image!==r.customImagePath}function sL(e,t,n,r,i){var a=n.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&oL(o,a,r)&&(o=null),o||(o=ZI(a),e.setClipPath(o)),QI(null,o,t,a,null,r,i)}}function cL(e,t,n,r,i,a){if(!(e.isGroup||e.type===`compoundPath`)){lL(n,null,a),lL(n,II,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,c=a.blur.conOpt,l=a.select.conOpt;if(o!=null||s!=null||l!=null||c!=null){var u=e.getTextContent();if(o===!1)u&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:`text`},u?u.clearStates():(u=ZI(o),e.setTextContent(u)),QI(null,u,t,o,null,r,i);for(var d=o&&o.style,f=0;f<BI.length;f++){var p=BI[f];if(p!==LI){var m=a[p].conOpt;$I(p,u,m,dL(o,m,p),null)}}d?u.dirty():u.markRedraw()}}}}function lL(e,t,n){var r=t?uL(e,t):e,i=t?dL(e,r,II):e.style,a=e.type,o=r?r.textConfig:null,s=e.textContent,c=s?t?uL(s,t):s:null;if(i&&(n.isLegacy||_b(i,a,!!o,!!c))){n.isLegacy=!0;var l=vb(i,a,!t);!o&&l.textConfig&&(o=l.textConfig),!c&&l.textContent&&(c=l.textContent)}if(!t&&c){var u=c;!u.type&&(u.type=`text`)}var d=t?n[t]:n.normal;d.cfg=o,d.conOpt=c}function uL(e,t){return t?e?e[t]:null:e}function dL(e,t,n){var r=t&&t.style;return r==null&&n===II&&e&&(r=e.styleEmphasis),r}function fL(e,t,n,r,i){var a=r.children,o=a?a.length:0,s=r.$mergeChildren,c=s===`byName`||r.diffChildrenByName,l=s===!1;if(!(!o&&!c&&!l)){if(c){mL({api:e,oldChildren:t.children()||[],newChildren:a||[],dataIndex:n,seriesModel:i,group:t});return}l&&t.removeAll();for(var u=0;u<o;u++){var d=a[u],f=t.childAt(u);d?(d.ignore??=!1,aL(e,f,n,d,i,t)):f.ignore=!0}for(var p=t.childCount()-1;p>=u;p--)pL(t,t.childAt(p),i)}}function pL(e,t,n){t&&vI(t,$F(e).option,n)}function mL(e){new vm(e.oldChildren,e.newChildren,hL,hL,e).add(gL).update(gL).remove(_L).execute()}function hL(e,t){return(e&&e.name)??WI+t}function gL(e,t){var n=this.context,r=e==null?null:n.newChildren[e],i=t==null?null:n.oldChildren[t];aL(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function _L(e){var t=this.context,n=t.oldChildren[e];n&&vI(n,$F(n).option,t.seriesModel)}function vL(e){return e&&(e.pathData||e.d)}function yL(e){return e&&(Z(e,`pathData`)||Z(e,`d`))}function bL(e){e.registerChartView(XI),e.registerSeriesModel(eI)}var xL=bl(),SL=ct,CL=xt,wL=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!r&&this._lastValue===i&&this._lastStatus===a)){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Ld,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=St(TL,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}kL(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&tC(r).w>o)return!0;if(a){var s=oN(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=xL(e).pointerEl=new Jf[i.type](SL(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=xL(e).labelEl=new Gs(SL(t.label));e.add(i),DL(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=xL(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=xL(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),DL(i,r))},e.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=yp(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){zE(e.event)},onmousedown:CL(this._onHandleDragMove,this,0,0),drift:CL(this._onHandleDragMove,this),ondragend:CL(this._onHandleDragEnd,this)}),n.add(r)),kL(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);q(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,oT(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){TL(this._axisPointerModel,!t&&this._moveAnimation,this._handle,OL(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(OL(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(OL(r)),xL(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),sT(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function TL(e,t,n,r){EL(xL(n).lastProp,r)||(xL(n).lastProp=r,t?Vf(n,r,e):(n.stopAnimation(),n.attr(r)))}function EL(e,t){if(Y(e)&&Y(t)){var n=!0;return G(t,function(t,r){n&&=EL(e[r],t)}),!!n}return e===t}function DL(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function OL(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function kL(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function AL(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function jL(e,t,n,r,i){var a=NL(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=R_(o.get(`padding`)||0),c=o.getFont(),l=Mr(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),ML(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:qp(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function ML(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function NL(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Ox(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};G(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),J(o)?a=o.replace(`{value}`,a):Ct(o)&&(a=o(s))}return a}function PL(e,t,n){var r=En();return jn(r,r,n.rotation),An(r,r,n.position),fp([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function FL(e,t,n,r,i,a){var o=BC.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),jL(t,r,i,a,{position:PL(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function IL(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function LL(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function RL(e,t,n){return tC(e,{fromStat:{sers:K(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function zL(e,t,n){return[lc(cc(t[0],t[1]),e-n/2),cc(e+n/2,lc(t[0],t[1]))]}var BL=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=VL(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=AL(r),f=HL[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}FL(t,e,sw(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=sw(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=PL(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=VL(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=cc(o[1],l[c]),l[c]=lc(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(wL);function VL(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var HL={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:IL([t,r[0]],[t,r[1]],UL(e))}},shadow:function(e,t,n,r,i,a){var o=RL(e,i,a),s=r[1]-r[0],c=zL(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:LL([l,r[0]],[u-l,s],UL(e))}}};function UL(e){return e.dim===`x`?0:1}var WL=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Q.color.border,width:1,type:`dashed`},shadowStyle:{color:Q.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Q.color.neutral00,padding:[5,7,5,7],backgroundColor:Q.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:Q.color.accent40,throttle:40}},t}(lv),GL=bl(),KL=G;function qL(e,t,n){if(!Qt.node){var r=t.getZr();GL(r).records||(GL(r).records={}),JL(r,t);var i=GL(r).records[e]||(GL(r).records[e]={});i.handler=n}}function JL(e,t){if(GL(e).initialized)return;GL(e).initialized=!0,n(`click`,St(ZL,`click`)),n(`mousemove`,St(ZL,`mousemove`)),n(`mousewheel`,St(ZL,`mousewheel`)),n(`globalout`,XL);function n(n,r){e.on(n,function(n){var i=QL(t);KL(GL(e).records,function(e){e&&r(e,n,i.dispatchAction)}),YL(i.pendings,t)})}}function YL(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function XL(e,t,n){e.handler(`leave`,null,n)}function ZL(e,t,n,r){t.handler(e,n,r)}function QL(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function $L(e,t){if(!Qt.node){var n=t.getZr();(GL(n).records||{})[e]&&(GL(n).records[e]=null)}}var eR=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;qL(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){$L(`axisPointer`,t)},t.prototype.dispose=function(e,t){$L(`axisPointer`,t)},t.type=`axisPointer`,t}(HO);function tR(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=yl(a,e);if(o==null||o<0||q(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(K(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var nR=bl();function rR(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||xt(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){pR(i)&&(i=tR({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=pR(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||pR(i),f={},p={},m={list:[],map:{}},h={showPointer:St(oR,p),showTooltip:St(sR,m)};G(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);G(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=dR(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&iR(e,o,h,!1,f)}})});var g={};return G(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&G(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,fR(t),fR(e)))),g[e.key]=a}})}),G(g,function(e,t){iR(u[t],e,h,!0,f)}),cR(p,u,f),lR(m,i,e,o),uR(u,o,n),f}}function iR(e,t,n,r,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){n.showPointer(e,t);return}var o=aR(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&W(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function aR(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return G(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Wc(u)){var p=e-u,m=Math.abs(p);m<=o&&((m<o||p>=0&&s<0)&&(o=m,s=p,i=u,a.length=0),G(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function oR(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function sR(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var c=t.coordSys.model,l=lN(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function cR(e,t,n){var r=n.axesInfo=[];G(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function lR(e,t,n,r){if(pR(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function uR(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=nR(r)[i]||{},o=nR(r)[i]={};G(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&G(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}G(a,function(e,t){!o[t]&&c.push(l(e))}),G(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function dR(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function fR(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function pR(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function mR(e){dN.registerAxisPointerClass(`CartesianAxisPointer`,BL),e.registerComponentModel(WL),e.registerComponentView(eR),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!q(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=$M(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},rR)}function hR(e){lM(SN),lM(mR)}function gR(e,t){var n=R_(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Bs({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var _R=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Q.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Q.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Q.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Q.color.tertiary,fontSize:14}},t}(lv);function vR(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function yR(e){if(Qt.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var bR=yR([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),xR=yR([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function SR(e,t){if(!e)return t;t=L_(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function CR(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}var wR=SR(xR,`transition`),TR=SR(bR,`transform`),ER=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(Qt.transform3dSupported?`will-change:transform;`:``);function DR(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function OR(e,t,n){if(!J(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=W_(t);var a=DR(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=TR+`:`,l;ft([`left`,`right`],a)>-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`<div style="`+[`position:absolute;width:`+o+`px;height:`+o+`px;z-index:-1;`,s+`;`+c+`;`,`border-bottom:`+m,`border-right:`+m,`background-color:`+r+`;`].join(``)+`"></div>`}function kR(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(Qt.transformSupported?``+TR+i:`,left`+i+`,top`+i)),wR+`:`+a}function AR(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!Qt.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=Qt.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+TR+`:`+o+`;`:[[`top`,0],[`left`,0],[bR,o]]}function jR(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=X(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),G([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function MR(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=oy(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(kR(a,n,r)),o&&i.push(`background-color:`+o),G([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=L_(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(jR(d)),f!=null&&i.push(`padding:`+R_(f).join(`px `)+`px`),i.join(`;`)+`;`}function NR(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Og(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var PR=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Qt.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(J(i)?document.querySelector(i):Ot(i)?i:Ct(i)&&i(e.getDom()));NR(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;FE(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=CR(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=ER+MR(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+AR(i[0],i[1],!0)+(`border-color:`+W_(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(J(i)&&n.get(`trigger`)===`item`&&!vR(n)&&(o=OR(n,r,i)),J(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,q(e)||(e=[e]);for(var s=0;s<e.length;s++)Ot(e[s])&&e[s].parentNode!==a&&a.appendChild(e[s]);if(o&&a.childNodes.length){var c=document.createElement(`div`);c.innerHTML=o,a.appendChild(c)}}},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(NR(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;G(AR(n[0],n[1]),function(e){r[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility=`hidden`,t.opacity=`0`):t.display=`none`,Qt.transform3dSupported&&(t.willChange=``),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(xt(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;kg(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},e}(),FR=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),RR(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get(`alwaysShowContent`);t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var a=this;Y(e)&&Xc(``),this.el&&this._zr.remove(this.el);var o=n.getModel(`textStyle`);this.el=new Gs({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:oy(n,`richText`),verticalAlign:`top`,align:`left`},z:n.get(`z`)}),G([`backgroundColor`,`borderRadius`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],function(e){a.el.style[e]=n.get(e)}),G([`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],function(e){a.el.style[e]=o.get(e)||0}),this._zr.add(this.el);var s=this;this.el.on(`mouseover`,function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on(`mouseout`,function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=LR(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;RR(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=IR(i.borderWidth||0),o=LR(i);n.x=e+a+o.left,n.y=t+a+o.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(xt(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function IR(e){return Math.max(0,e)}function LR(e){var t=IR(e.shadowBlur||0),n=IR(e.shadowOffsetX||0),r=IR(e.shadowOffsetY||0);return{left:IR(t-n),right:IR(t+n),top:IR(t-r),bottom:IR(t+r)}}function RR(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var zR=new Bs({shape:{x:-1,y:-1,width:2,height:2}}),BR=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){if(!(Qt.node||!t.getDom())){var n=e.getComponent(`tooltip`),r=this._renderMode=kl(n.get(`renderMode`));this._tooltipContent=r===`richText`?new FR(t):new PR(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}},t.prototype.render=function(e,t,n){if(!(Qt.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get(`enterable`)),this._initGlobalListener(),this._keepShow(),this._renderMode!==`richText`&&e.get(`transitionDuration`)?oT(this,`_updatePosition`,50,`fixRate`):sT(this,`_updatePosition`)}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);qL(`itemTooltip`,this._api,xt(function(t,n,r){e!==`none`&&(e.indexOf(t)>=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(!(r.from===this.uid||Qt.node||!n.getDom())){var i=HR(r,n);this._ticket=``;var a=r.dataByCoordSys,o=qR(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=zR;c.x=r.x,c.y=r.y,c.update(),Yl(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=tR(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(HR(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&VR([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(Yl(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;Ek(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Yl(e).dataIndex==null?Yl(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=xt(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=VR([t.tooltipOption],r),o=this._renderMode,s=[],c=Kv(`section`,{blocks:[],noHeader:!0}),l=[],u=new sy;G(e,function(e){G(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(!(!t||i==null)){var f=NL(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=Kv(`section`,{header:f,noHeader:!Lt(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),G(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=Ox(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,W_(m.color),o);var h=bv(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=VR([a],r).get(`valueFormatter`);p.blocks.push(_?W({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=Qv(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?`
|
|
15
|
+
|
|
16
|
+
`:`<br/>`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Yl(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=VR([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new sy;h.marker=g.makeTooltipMarker(`item`,W_(h.color),d);var _=bv(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?Qv(y?W({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Yl(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(J(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=ct(a),a.content=Ig(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=VR(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new sy;this._showOrMove(d,function(){var n=ct(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,!(!e.get(`showContent`)||!e.get(`show`))){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(J(u)){var p=e.ecModel.get(`useUTC`),m=q(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=v_(m.axisValue,d,p)),d=H_(d,n,!0)}else if(Ct(u)){var g=xt(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||q(t))return{color:r||i};if(!q(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),Ct(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),q(t))n=bc(t[0],s),r=bc(t[1],c);else if(Y(t)){var p=t;p.width=l[0],p.height=l[1];var m=ev(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(J(t)&&o){var h=GR(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=UR(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=KR(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=KR(d)?l[1]/2:d===`bottom`?l[1]:0),vR(e)){var h=WR(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&G(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&G(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&G(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&G(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){Qt.node||!t.getDom()||(sT(this,`_updatePosition`),this._tooltipContent.dispose(),$L(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(HO);function VR(e,t,n){var r=t.ecModel,i;n?(i=new hm(n,r,r),i=new hm(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof hm&&(o=o.get(`tooltip`,!0)),J(o)&&(o={formatter:o}),o&&(i=new hm(o,i,r)))}return i}function HR(e,t){return e.dispatchAction||xt(t.dispatchAction,t)}function UR(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function WR(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function GR(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function KR(e){return e===`center`||e===`middle`}function qR(e,t,n){var r=Cl(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=Tl(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Yl(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function JR(e){lM(mR),e.registerComponentModel(_R),e.registerComponentView(BR),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Yt),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Yt)}var YR=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.type=`title`,t.defaultOption={z:6,show:!0,text:``,target:`blank`,subtext:``,subtarget:`blank`,left:`center`,top:Q.size.m,backgroundColor:Q.color.transparent,borderColor:Q.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:`bold`,color:Q.color.primary},subtextStyle:{fontSize:12,color:Q.color.quaternary}},t}(lv),XR=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=X(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new Gs({style:qp(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new Gs({style:qp(a,{text:u,fill:a.getTextColor(),y:l.height+e.get(`itemGap`),verticalAlign:`top`},{disableBox:!0}),z2:10}),f=e.get(`link`),p=e.get(`sublink`),m=e.get(`triggerEvent`,!0);c.silent=!f&&!m,d.silent=!p&&!m,f&&c.on(`click`,function(){G_(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){G_(p,`_`+e.get(`subtarget`))}),Yl(c).eventData=Yl(d).eventData=m?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(d);var h=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=h.width,g.height=h.height;var _=ev(g,nv(e,n).refContainer,e.get(`padding`));o||(o=e.get(`left`)||e.get(`right`),o===`middle`&&(o=`center`),o===`right`?_.x+=_.width:o===`center`&&(_.x+=_.width/2)),s||(s=e.get(`top`)||e.get(`bottom`),s===`center`&&(s=`middle`),s===`bottom`?_.y+=_.height:s===`middle`&&(_.y+=_.height/2),s||=`top`),r.x=_.x,r.y=_.y,r.markRedraw();var v={align:o,verticalAlign:s};c.setStyle(v),d.setStyle(v),h=r.getBoundingRect();var y=_.margin,b=e.getItemStyle([`color`,`opacity`]);b.fill=e.get(`backgroundColor`);var x=new Bs({shape:{x:h.x-y[3],y:h.y-y[0],width:h.width+y[1]+y[3],height:h.height+y[0]+y[2],r:e.get(`borderRadius`)},style:b,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type=`title`,t}(HO);function ZR(e){e.registerComponentModel(YR),e.registerComponentView(XR)}function QR(e,t){if(!e)return!1;for(var n=q(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function $R(e){tl(e,`label`,[`show`])}var ez=bl(),tz=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n.preventAutoZ=!0,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(Qt.node)return!1;var e=this.__hostSeries;return this.getShallow(`animation`)&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),a=ez(e)[i];if(!n||!n.data){ez(e)[i]=null;return}a?a._mergeOption(n,t,!0):(r&&$R(n),G(n.data,function(e){e instanceof Array?($R(e[0]),$R(e[1])):$R(e)}),a=this.createMarkerModelFromSeries(n,this,t),W(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),ez(e)[i]=a},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return Kv(`section`,{header:this.name,blocks:[Kv(`nameValue`,{name:a,value:i,noName:!a,noValue:i==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=yv.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},t.getMarkerModelFromSeries=function(e,t){return ez(e)[t]},t.type=`marker`,t.dependencies=[`series`,`grid`,`polar`,`geo`],t}(lv);mt(tz,yv.prototype);function nz(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function rz(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function iz(e,t,n,r,i,a,o){var s=[],c=dg(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=dz(t,c,e),u=t.hostModel.indicesOfNearest(n,c,l)[0];s[a]=t.get(r,u),s[o]=t.get(c,u);var d=t.get(i,u),f=Ec(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var az={min:St(iz,`min`),max:St(iz,`max`),average:St(iz,`average`),median:St(iz,`median`)};function oz(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!rz(t)&&!q(t.coord)&&q(i)){var a=sz(t,n,r,e);if(t=ct(t),t.type&&az[t.type]&&a.baseAxis&&a.valueAxis){var o=ft(i,a.baseAxis.dim),s=ft(i,a.valueAxis.dim),c=az[t.type](n,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=c[0],t.value=c[1]}else t.coord=[t.xAxis==null?t.radiusAxis:t.xAxis,t.yAxis==null?t.angleAxis:t.yAxis]}if(t.coord==null||!q(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&az[t.type]){var u=r.getOtherAxis(l);u&&(t.value=dz(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)az[d[f]]&&(d[f]=dz(n,n.mapDimension(i[f]),d[f]));return t}}function sz(e,t,n,r){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex==null?e.valueDim:t.getDimension(e.valueIndex),i.valueAxis=n.getAxis(cz(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function cz(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function lz(e,t){return e&&e.containData&&t.coord&&!nz(t)?e.containData(t.coord):!0}function uz(e,t){return e?function(e,n,r,i){return uh(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return uh(e.value,t[i])}}function dz(e,t,n){if(n===`average`){var r=0,i=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,i++)}),r/i}return n===`median`?e.getMedian(t):e.getDataExtent(t)[+(n===`max`)]}var fz=bl(),pz=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this.markerGroupMap=Gt()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){fz(e).keep=!1}),t.eachSeries(function(e){var i=tz.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!fz(e).keep&&r.group.remove(e.group)}),mz(t,i,this.type)},t.prototype.markKeep=function(e){fz(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;G(e,function(e){var r=tz.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?Vu(e):Hu(e))})})},t.type=`marker`,t}(HO);function mz(e,t,n){e.eachSeries(function(e){var r=tz.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=Pp(r),o=a.z,s=a.zlevel;Ip(i.group,o,s)}})}var hz=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markLine`,t.defaultOption={z:5,symbol:[`circle`,`arrow`],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:`item`},label:{show:!0,position:`end`,distance:5},lineStyle:{type:`dashed`},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:`linear`},t}(tz),gz=bl(),_z=function(e,t,n,r){var i=e.getData(),a;if(q(r))a=r;else{var o=r.type;if(o===`min`||o===`max`||o===`average`||o===`median`||r.xAxis!=null||r.yAxis!=null){var s=void 0,c=void 0;if(r.yAxis!=null||r.xAxis!=null)s=t.getAxis(r.yAxis==null?`x`:`y`),c=Mt(r.yAxis,r.xAxis);else{var l=sz(r,i,t,e);s=l.valueAxis,c=dz(i,fg(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=ct(r),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var m=n.get(`precision`);m>=0&&Tt(c)&&(c=+c.toFixed(Math.min(m,20))),f.coord[u]=p.coord[u]=c,a=[f,p,{type:o,valueIndex:r.valueIndex,value:c}]}else a=[]}var h=[oz(e,a[0]),oz(e,a[1]),W({},a[2])];return h[2].type=h[2].type||null,lt(h[2],h[0]),lt(h[2],h[1]),h};function vz(e){return!isNaN(e)&&!isFinite(e)}function yz(e,t,n,r){var i=1-e,a=r.dimensions[e];return vz(t[i])&&vz(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function bz(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(yz(1,n,r,e)||yz(0,n,r,e)))return!0}return lz(e,t[0])&&lz(e,t[1])}function xz(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=bc(o.get(`x`),i.getWidth()),l=bc(o.get(`y`),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition)s=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=a.dimensions,d=e.get(u[0],t),f=e.get(u[1],t);s=a.dataToPoint([d,f])}if(gb(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;vz(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):vz(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var Sz=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=tz.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=gz(t).from,a=gz(t).to;i.each(function(t){xz(i,t,!0,e,n),xz(a,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),a.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new KF);this.group.add(c.group);var l=Cz(i,e,t),u=l.from,d=l.to,f=l.line;gz(t).from=u,gz(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);q(p)||(p=[p,p]),q(m)||(m=[m,m]),q(h)||(h=[h,h]),q(g)||(g=[g,g]),l.from.each(function(e){_(u,e,!0),_(d,e,!1)}),f.each(function(e){var t=f.getItemModel(e),n=t.getModel(`lineStyle`).getLineStyle();f.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]);var r=t.get(`z2`);n.stroke??=u.getItemVisual(e,`style`).fill,f.setItemVisual(e,{z2:X(r,0),fromSymbolKeepAspect:u.getItemVisual(e,`symbolKeepAspect`),fromSymbolOffset:u.getItemVisual(e,`symbolOffset`),fromSymbolRotate:u.getItemVisual(e,`symbolRotate`),fromSymbolSize:u.getItemVisual(e,`symbolSize`),fromSymbol:u.getItemVisual(e,`symbol`),toSymbolKeepAspect:d.getItemVisual(e,`symbolKeepAspect`),toSymbolOffset:d.getItemVisual(e,`symbolOffset`),toSymbolRotate:d.getItemVisual(e,`symbolRotate`),toSymbolSize:d.getItemVisual(e,`symbolSize`),toSymbol:d.getItemVisual(e,`symbol`),style:n})}),c.updateData(f),l.line.eachItemGraphicEl(function(e){Yl(e).dataModel=t,e.traverse(function(e){Yl(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);xz(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=Tk(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:X(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:X(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:X(a.get(`symbolSize`),m[+!i]),symbol:X(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(pz);function Cz(e,t,n){var r=e?K(e&&e.dimensions,function(e){var n=t.getData();return W(W({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new Kh(r,n),a=new Kh(r,n),o=new Kh([],n),s=K(n.get(`data`),St(_z,t,e,n));e&&(s=_t(s,St(bz,e)));var c=uz(!!e,r);return i.initData(K(s,function(e){return e[0]}),null,c),a.initData(K(s,function(e){return e[1]}),null,c),o.initData(K(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function wz(e){e.registerComponentModel(hz),e.registerComponentView(Sz),e.registerPreprocessor(function(e){QR(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var Tz=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},Ez=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),q(t)&&G(t,function(e,r){J(e)&&(e={type:e}),t[r]=lt(e,Tz(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get(`name`);if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get(`name`))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var i=r.name;n.push(i);var a;if(r.legendVisualProvider){var o=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&hl(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=Gt(),a=K(r,function(e){return(J(e)||Tt(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new hm(e,this,this.ecModel))},this);this._data=_t(a,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;if(this.get(`selectedMode`)===`single`){var n=this._data;G(n,function(e){t[e.get(`name`)]=!1})}t[e]=!0},t.prototype.unSelect=function(e){this.get(`selectedMode`)!==`single`&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?`unSelect`:`select`](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;G(e,function(e){t[e.get(`name`,!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;G(e,function(e){var n=e.get(`name`,!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&ft(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Q.size.m,align:`auto`,backgroundColor:Q.color.transparent,borderColor:Q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Q.color.disabled,inactiveBorderColor:Q.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:Q.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Q.color.tertiary,borderWidth:1,borderColor:Q.color.border},emphasis:{selectorLabel:{show:!0,color:Q.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(lv),Dz=St,Oz=G,kz=Ld,Az=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new kz),this.group.add(this._selectorGroup=new kz),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=nv(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=ev(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=ev(dt({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=gR(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=Gt(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),Oz(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
|
|
17
|
+
`)){var p=new kz;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,Dz(Nz,f,null,r,d)).on(`mouseover`,Dz(Pz,m.name,null,r,d)).on(`mouseout`,Dz(Fz,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Yl(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=oa(h.fill);_&&_[3]===0&&(_[3]=.2,h=W(W({},h),{fill:ma(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,Dz(Nz,null,f,r,d)).on(`mouseover`,Dz(Pz,null,f,r,d)).on(`mouseout`,Dz(Fz,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Yl(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Yl(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();Oz(e,function(e){var r=e.type,i=new Gs({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Gp(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),nd(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=jz(c,r,o,s,d,m,u),y=new kz,b=r.getModel(`textStyle`);if(Ct(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(Mz({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;J(w)&&w?T=w.replace(`{name}`,t??``):Ct(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Gs({style:qp(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Bs({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Dp({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),nd(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();X_(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){X_(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(HO);function jz(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),Oz(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:CA(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function Mz(e){var t=e.icon||`roundRect`,n=Dy(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Q.color.neutral00,n.style.lineWidth=2),n}function Nz(e,t,n,r){Fz(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),Pz(e,t,n,r)}function Pz(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function Fz(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function Iz(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),Lz(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){G(i,function(t,n){e[t?`select`:`unSelect`](n)}),Lz(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function Lz(e,t){var n=t||{};return G(e.getData(),function(t){var r=t.get(`name`);if(r!==`
|
|
18
|
+
`&&r!==``){var i=e.isSelected(r);n[r]=Z(n,r)?n[r]&&i:i}}),n}function Rz(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,St(Iz,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,St(Iz,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,St(Iz,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,St(Iz,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,St(Iz,`unSelect`))}var zz=Jl(Bz);function Bz(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function Vz(e){e.registerComponentModel(Ez),e.registerComponentView(Az),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,zz),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),Rz(e)}var Hz=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=ov(t);e.prototype.init.call(this,t,n,r),Uz(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),Uz(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=Sg(Ez.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:Q.color.accent50,pageIconInactiveColor:Q.color.accent10,pageIconSize:15,pageTextStyle:{color:Q.color.tertiary},animationDurationUpdate:800}),t}(Ez);function Uz(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,av(t,n,{type:`box`,ignoreSize:!!i})}var Wz=Ld,Gz=[`width`,`height`],Kz=[`x`,`y`],qz=function(e){U(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new Wz),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Wz)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,a,o,s){var c=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var l=this._controllerGroup,u=n.get(`pageIconSize`,!0),d=q(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new Gs({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),p(`pageNext`,1);function p(e,t){var r=e+`DataIndex`,a=yp(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:xt(c._pageGo,c,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,l.add(a)}},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=Gz[s],l=Kz[s],u=Gz[1-s],d=Kz[1-s];i&&X_(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=ct(n);i&&(h[c]=n[c]-p[c]-f);var g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{var _=p[c]+f;m[s]-=_,g[l]-=_}g[c]+=p[c]+f,m[1-s]+=g[d]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[d]=Math.min(g[d],p[d]+m[1-s]),o.x=m[0],o.y=m[1],o.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;X_(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),X_(`horizontal`,u,e.get(`pageButtonItemGap`,!0));var d=c.getBoundingRect(),f=u.getBoundingRect(),p=this._showController=d[i]>n[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=X(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Bs({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Vf(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;G([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,J(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=Gz[i],o=Kz[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(Az);function Jz(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function Yz(e){lM(Vz),e.registerComponentModel(Hz),e.registerComponentView(qz),Jz(e)}function Xz(e){lM(Vz),lM(Yz)}var Zz={label:{enabled:!0},decal:{show:!1}},Qz=bl(),$z=bl(),eB=Jl(tB);function tB(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=$z(e).scope||($z(e).scope={}),i=ct(Zz);lt(i.label,e.getLocaleModel().get(`aria`),!1),lt(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=Gt();e.eachSeries(function(e){e.isColorBySeries()||(Qz(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(Ct(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=mv(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=Qz(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=mv(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?W(W({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=dt(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t<f){var n=void 0,r=e.get(`name`)?`withName`:`withoutName`;n=o>1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_<i.count();_++)if(_<u){var v=i.getName(_),y=m?_t(i.getValues(_),function(e,t){return ft(m,t)===-1}):i.getValues(_),b=a.get([`data`,v?`withName`:`withoutName`]);g.push(s(b,{name:v,value:y.join(d)}))}n+=g.join(d)+p,h.push(n)}});var _=a.getModel([`series`,`multiple`,`separator`]),v=_.get(`middle`),y=_.get(`end`);p+=h.join(v)+y,r.setAttribute(`aria-label`,p)}}}}function s(e,t){if(!J(e))return e;var n=e;return G(t,function(e,t){n=n.replace(RegExp(`\\{\\s*`+t+`\\s*\\}`,`g`),e)}),n}function c(){var t=e.get(`title`);return t&&t.length&&(t=t[0]),t&&t.text}function l(t){var n=e.getLocaleModel().get([`series`,`typeNames`]);return n[t]||n.chart}}function nB(e){if(!(!e||!e.aria)){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},G([`description`,`general`,`series`,`data`],function(e){t[e]!=null&&(t.label[e]=t[e])})}}function rB(e){e.registerPreprocessor(nB),e.registerVisual(e.PRIORITY.VISUAL.ARIA,eB)}function iB(e,t,n){var r=Ke.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=r.style;return o&&(o.position=`absolute`,o.left=`0`,o.top=`0`,o.width=i+`px`,o.height=a+`px`,r.setAttribute(`data-zr-dom-id`,e)),r.width=i*n,r.height=a*n,r}function aB(e){return!e.__cursors.get(0)}function oB(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var sB=function(e){U(t,e);function t(t,n,r){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.zlevel=0,i.zlevel2=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__prevIdx={startIdx:0,endIdx:0};var a;r||=Ga,typeof t==`string`?a=iB(t,n,r):Y(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(Jt(a),a.onselectstart=function(){return!1},o.padding=`0`,o.margin=`0`,o.borderWidth=`0`),i.painter=n,i.dpr=r,i}return t.prototype.afterBrush=function(){this.__prevIdx=oB(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext(`2d`),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=iB(`back-`+this.id,this.painter,e),this.ctxBack=this.domBack.getContext(`2d`),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i=[],a=this.maxRepaintRectCount,o=!1,s=new fr(0,0,0,0);function c(e){if(!(!e.isFinite()||e.isZero())){if(i.length===0){var t=new fr(0,0,0,0);t.copy(e),i.push(t)}else{for(var n=!1,r=1/0,c=0,l=0;l<i.length;++l){var u=i[l];if(u.intersect(e)){var d=new fr(0,0,0,0);d.copy(u),d.union(e),i[l]=d,n=!0;break}if(o){s.copy(e),s.union(u);var f=e.width*e.height,p=u.width*u.height,m=s.width*s.height-f-p;m<r&&(r=m,c=l)}}if(o&&(i[c].union(e),n=!0),!n){var t=new fr(0,0,0,0);t.copy(e),i.push(t)}o||=i.length>=a}}}for(var l=oB(this),u=l.startIdx;u<l.endIdx;++u){var d=e[u];if(d){var f=d.shouldBePainted(n,r,!0,!0),p=d.__isRendered&&(d.__dirty&1||!f)?d.getPrevPaintRect():null;p&&c(p);var m=f&&(d.__dirty&1||!d.__isRendered)?d.getPaintRect():null;m&&c(m)}}for(var h=this.__prevIdx,u=h.startIdx;u<h.endIdx;++u){var d=t[u],f=d&&d.shouldBePainted(n,r,!0,!0);if(d&&(!f||!d.__zr)&&d.__isRendered){var p=d.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var u=0;u<i.length;){if(i[u].isZero()){i.splice(u,1);continue}for(var _=u+1;_<i.length;)i[u].intersect(i[_])?(g=!0,i[u].union(i[_]),i.splice(_,1)):_++;u++}}while(g);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,a=this.domBack;i&&(i.width=e+`px`,i.height=t+`px`),r.width=e*n,r.height=t*n,a&&(a.width=e*n,a.height=t*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,a=r.width,o=r.height;t||=this.clearColor;var s=this.motionBlur&&!e,c=this.lastFrameAlpha,l=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation=`copy`,this.ctxBack.drawImage(r,0,0,a/l,o/l));var d=this.domBack;function f(e,n,r,a){if(i.clearRect(e,n,r,a),t&&t!==`transparent`){var o=void 0;kt(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||Bk(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):At(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=Qk(i,t,{dirty:function(){u.setUnpainted(),u.painter.refresh()}})),i.save(),i.fillStyle=o||t,i.fillRect(e,n,r,a),i.restore()}s&&(i.save(),i.globalAlpha=c,i.drawImage(d,e,n,r,a),i.restore())}!n||s?f(0,0,a,o):n.length&&G(n,function(e){f(e.x*l,e.y*l,e.width*l,e.height*l)})},t}(Ua),cB=1e5,lB=314159,uB=void 0,dB=1,fB=2;function pB(e){return e?e.__builtin__?!0:typeof e.resize==`function`&&typeof e.refresh==`function`:!1}function mB(e,t){var n=document.createElement(`div`);return n.style.cssText=[`position:relative`,`width:`+e+`px`,`height:`+t+`px`,`padding:0`,`margin:0`,`border-width:0`].join(`;`)+`;`,n}function hB(e,t,n,r){var i=new sB(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,gB(i),i}function gB(e){e.__cursorStack=[],e.__cursors=Gt()}function _B(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function vB(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,_B({key:r})))}function yB(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function bB(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function xB(e,t,n){for(var r=e.layerStack,i=0;i<r.length;i++){var a=r[i].zl,o=r[i].zl2,s=e.layers[a][o];(!n||(!(n&SB)||s.__builtin__)&&(!(n&CB)||!s.__builtin__)&&(!(n&wB)||s!==e.hoverlayer))&&t(s,a,o,i)}}var SB=1,CB=2,wB=4,TB=SB|wB,EB=function(){function e(e,t,n,r){this.type=`canvas`,this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type=`canvas`,this._i={layerStack:[],layers:[]};var i=!e.nodeName||e.nodeName.toUpperCase()===`CANVAS`;if(this._opts=n=W({},n||{}),this.dpr=n.devicePixelRatio||Ga,this._singleCanvas=i,this.root=e,e.style&&(Jt(e),e.innerHTML=``),this.storage=t,this._prevDisplayList=[],i){var a=e,o=a.width,s=a.height;n.width!=null&&(o=n.width),n.height!=null&&(s=n.height),this.dpr=n.devicePixelRatio||1,a.width=o*this.dpr,a.height=s*this.dpr,this._width=o,this._height=s;var c=hB(a,this,lB,0);c.initContext(),this._insertLayer(c,lB,0,!0),this._domRoot=e}else{this._width=Uk(e,0,n),this._height=Uk(e,1,n);var l=this._domRoot=mB(this._width,this._height);e.appendChild(l)}}return e.prototype.getType=function(){return`canvas`},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=e&&!Y(e)?{paintAll:!!e}:e||{},n=X(t.refresh,!0),r=X(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=fB),!n)return r&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var i=this.storage.getDisplayList(!0);this._updateLayerStatus(i,t.paintAll),this._redrawId=Math.random();var a=this._prevDisplayList;this._paintList(i,a,this._redrawId);var o=this._backgroundColor;return xB(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},CB),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=uB,n!==uB&&(!t&&n===fB&&(t=this._i.hoverlayer=this._ensureLayer(cB)),t)){t.clear();for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},i,a=0,o=e.length;a<o;a++){var s=e[a];if(s.__inHover){i||(i=t.ctx,i.save());var c=s.__hoverStyle,l=void 0;c&&(l=s.style,s.style=c),_A(i,s,r),c&&(s.style=l)}}i&&(vA(i,r),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(cB)},e.prototype.paintOne=function(e,t){gA(e,t)},e.prototype._paintList=function(e,t,n){if(this._redrawId===n){var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),r)xB(this._i,function(e){e.afterBrush&&e.afterBrush()},TB),this._paintHoverList(e);else{var i=this;gD(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(lB).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),xB(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},SB)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return xB(this._i,function(i){var a=!1;if(yB(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),!(!a&&!i.__dirty)){var o=n._opts.useDirtyRect&&!aB(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}yB(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},TB),Qt.wxa&&xB(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r){if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s<r.length;++s){var c=r[s];a.save(),a.beginPath(),a.rect(c.x*o,c.y*o,c.width*o,c.height*o),a.clip(),this._paintPerCursorInRect(e,t,n,c,i),a.restore()}}else a.save(),this._paintPerCursorInRect(e,t,n,null,i),a.restore();return t.drawIdx>=t.endIdx},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=aB(e),c=s&&Ke.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d<t.endIdx;d++){var f=n[d];if(!(d<l&&!f.notClear)){if(f.__inHover&&(this._hoverLayerDirty=fB),r!=null){var p=f.getPaintRect();p&&p.intersect(r)&&(_A(o,f,a),f.setPrevPaintRect(p))}else _A(o,f,a);if(s&&Ke.getTime()-c>15){d++;break}}}vA(o,a),t.drawIdx=Math.max(d,l)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t||=0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=lB,t=0);var i=bB(this._i,e)[t];return i||(i=hB(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&<(i,this._layerConfig[e],!0),(n||r&&e!==lB)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(!(a[t]&&a[t][n])&&pB(e)){for(var l=o.length,u=0;u<l&&(o[u].zl<t||o[u].zl===t&&o[u].zl2<n);)u++;if(u>0&&(c=bB(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),bB(i,t)[n]=e,!r&&!e.virtual){if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}e.painter||=this}},e.prototype.eachLayer=function(e,t){return xB(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return xB(this._i,function(n,r){e.call(t,n,r)},SB)},e.prototype.eachOtherLayer=function(e,t){return xB(this._i,function(n,r){e.call(t,n,r)},CB)},e.prototype.getLayers=function(){var e={};return xB(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r<e.length;r++){var i=e[r];if(i.zlevel!==e[r-1].zlevel||i.incremental){n._needsManuallyCompositing=!0;break}}xB(n._i,function(e){e.__dirty=!1,yB(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},TB);for(var a,o=null,s=null,c=!1,l=0,u=e.length;l<u;l++){var i=e[l],d=i.zlevel,f=i.incremental,p=void 0;if(a!==d&&(a=d,c=!1),f?(c=!0,p=1):p=c?2:0,(!o||d!==o.zlevel||p!==o.zlevel2)&&(o=n._ensureLayer(d,p),s=null,!o.__builtin__)){st(`ZLevel `+d+` has been used by unknown layer `+o.id);continue}if((!s||f!==s.key)&&(s=vB(o,f),!s.used)){if(s.used=!0,!t&&s.first===i.id){var m=l-s.startIdx;s.startIdx=l,s.drawIdx+=m,s.endIdx+=m}else o.__dirty=!0,s.first=i.id,s.startIdx=s.drawIdx=l,s.endIdx=l+1}s.endIdxNew=l+1,i.__dirty&1&&!i.__inHover&&((!f||!i.notClear&&l<s.drawIdx)&&(o.__dirty=!0),f&&i.notClear&&s.notClearIdx<0&&(s.notClearIdx=l))}xB(n._i,function(t){for(var r=t.__cursorStack,i=t.__cursors,a=r.length-1;a>=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(aB(t)?s<o.drawIdx:s!==o.endIdx||!s||e[s-1].id!==o.last)&&(t.__dirty=!0),o.endIdx=o.endIdxNew,o.last=s?e[s-1].id:NaN}}t.__dirty&&(yB(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===uB&&(n._hoverLayerDirty=dB))},TB)},e.prototype.clear=function(){return xB(this._i,function(e){e.clear(),gB(e)},SB),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,xB(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?lt(n[e],t,!0):n[e]=t,xB(this._i,function(e,t){lt(e,n[t],!0)})}},e.prototype.delLayer=function(e){for(var t=this._i.layerStack,n=this._i.layers,r=t.length-1;r>=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=Uk(i,0,r),t=Uk(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,xB(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(lB).resize(e,t)}return this},e.prototype.clearLayer=function(e){G(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._i.layers[lB][0].dom;var t=new sB(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;xB(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;s<c;s++){var l=o[s];_A(n,l,a)}vA(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function DB(e){e.registerPainter(`canvas`,EB)}var OB=p(`<tr><td> </td><td> </td></tr>`),kB=p(`<tr><td> </td><td> </td><td> </td></tr>`),AB=p(`<div data-testid="model-detail-visual" data-chart-engine="echarts"></div> <div class="model-detail-data svelte-1i3n9mf"><table><thead><tr><th> </th><th> </th></tr></thead><tbody></tbody></table> <table><thead><tr><th> </th><th> </th><th> </th></tr></thead><tbody></tbody></table></div>`,1);function jB(e,t){ie(t,!1);let n=R(),r=R(),s=`agent-usage:theme-changed`;lM([EE,oS,hR,JR,Xz,ZR,rB,DB]);let c=w(t,`compositionTotals`,8),p=w(t,`unclassifiedTokens`,8),m=w(t,`trend`,8),h=w(t,`trendEvidence`,8),y=w(t,`locale`,8),S=w(t,`formatNumber`,8),T=w(t,`formatMoney`,8),O=R(null),k=R(null),A=null,j=0,N=0,P=0,F=R(!1),I=R(!1),ne=R({text:`#10131a`,muted:`#697386`,surface:`#ffffff`,border:`#dce1e9`,primary:`#647cf0`,cost:`#9b7cf4`}),ae=[{key:`input`,label:`input`,color:`#6f8ff7`},{key:`output`,label:`output`,color:`#e19a6c`},{key:`reasoning`,label:`reasoning`,color:`#9b7cf4`},{key:`cacheRead`,label:`cacheRead`,color:`#52c5a4`},{key:`cacheWrite`,label:`cacheWrite`,color:`#e0b84f`}];function oe(e){return be(y(),e)}function z(e){let{composition:t,trend:n,trendEvidence:r,compact:i,colors:a,locale:o,formatNumber:s,formatMoney:c}=e,l=e=>be(o,e),u=l(`recordedTotal`),d=l(`cost`),f=r.find(e=>e.costAmount!==null)?.costCurrency??`USD`;return{animation:!se(),animationDuration:320,aria:{enabled:!0,decal:{show:!1}},title:[{text:l(`tokenBreakdown`),left:i?16:`3%`,top:i?8:10,textStyle:{color:a.text,fontSize:12,fontWeight:600},subtextStyle:{color:a.muted,fontSize:9}},{text:l(`modelTrend`),left:i?16:`47%`,top:i?`53%`:10,textStyle:{color:a.text,fontSize:12,fontWeight:600},subtextStyle:{color:a.muted,fontSize:9}}],legend:[{type:`scroll`,orient:`horizontal`,left:i?12:`2%`,right:i?12:`55%`,...i?{top:224}:{bottom:12},data:t.map(e=>e.name),textStyle:{color:a.muted,fontSize:9},itemWidth:9,itemHeight:9},{left:i?12:`47%`,top:i?`62%`:50,data:[u,d],textStyle:{color:a.muted,fontSize:9},itemWidth:14,itemHeight:8}],tooltip:{trigger:`item`,confine:!0,renderMode:`richText`,backgroundColor:a.surface,borderColor:a.border,borderWidth:1,padding:[9,11],textStyle:{color:a.text,fontSize:11},formatter:e=>{let t=Array.isArray(e)?e[0]:e,i=typeof t.dataIndex==`number`?t.dataIndex:-1,a=typeof t.value==`number`?t.value:0;if(t.seriesType===`pie`)return`${t.name}\n${s(a)} ${l(`tokens`)}`;let o=n[i],u=r[i];return!o||!u?`${s(a)} ${l(`tokens`)}`:t.seriesName===d?`${o.label}\n${c(u.costAmount,u.costCurrency)}`:`${o.label}\n${s(a)} ${l(`tokens`)}`}},grid:{left:i?48:`47%`,right:48,top:i?`68%`:82,bottom:i?34:38,containLabel:!0},xAxis:{type:`category`,boundaryGap:!1,data:n.map(e=>e.label),axisLine:{lineStyle:{color:a.border}},axisTick:{show:!1},axisLabel:{color:a.muted,fontSize:9,hideOverlap:!0,interval:`auto`}},yAxis:[{type:`value`,min:0,splitNumber:3,axisLabel:{color:a.muted,fontSize:9,formatter:e=>B(e,o)},splitLine:{lineStyle:{color:a.border,opacity:.65}}},{type:`value`,min:0,position:`right`,splitNumber:3,axisLabel:{color:a.cost,fontSize:9,formatter:e=>V(e,f,o)},splitLine:{show:!1}}],series:[{name:l(`tokenBreakdown`),type:`pie`,center:i?[`50%`,`27%`]:[`23%`,`50%`],radius:i?[`20%`,`34%`]:[`34%`,`54%`],avoidLabelOverlap:!0,itemStyle:{borderColor:a.surface,borderWidth:3,borderRadius:4},label:{show:!1},emphasis:{focus:`self`,scaleSize:5},data:t},{name:u,type:`line`,yAxisIndex:0,smooth:.28,showSymbol:n.length<=14,symbolSize:6,connectNulls:!1,data:r.map(e=>e.recordedTokens),lineStyle:{width:2.5,color:a.primary},itemStyle:{color:a.primary},areaStyle:{color:a.primary,opacity:.12},emphasis:{focus:`series`}},{name:d,type:`line`,yAxisIndex:1,smooth:.28,showSymbol:n.length<=14,symbolSize:6,connectNulls:!1,data:r.map(e=>e.costAmount),lineStyle:{width:2,type:`dashed`,color:a.cost},itemStyle:{color:a.cost},emphasis:{focus:`series`}}]}}function B(e,t){return new Intl.NumberFormat(t,{notation:`compact`,maximumFractionDigits:1}).format(e)}function V(e,t,n){return new Intl.NumberFormat(n,{style:`currency`,currency:t,notation:`compact`,maximumFractionDigits:1}).format(e)}function se(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function ce(e,t){return f(O)&&getComputedStyle(f(O)).getPropertyValue(e).trim()||t}function le(){l(ne,{text:ce(`--text-strong`,f(ne).text),muted:ce(`--muted`,f(ne).muted),surface:ce(`--surface`,f(ne).surface),border:ce(`--border`,f(ne).border),primary:ce(`--primary`,f(ne).primary),cost:ce(`--warning`,f(ne).cost)})}function ue(e){f(k)?.setOption(e,{notMerge:!0,lazyUpdate:!1})}re(()=>{if(f(O))return N=requestAnimationFrame(()=>{P=requestAnimationFrame(()=>{f(O)&&(le(),l(I,f(O).clientWidth<660),l(k,Uj(f(O),void 0,{renderer:`canvas`,useDirtyRect:!0})),f(k).getDom().setAttribute(`aria-hidden`,`true`),ue(f(r)),A=new ResizeObserver(([e])=>{let t=e.contentRect.width<660;t!==f(I)&&l(I,t),cancelAnimationFrame(j),j=requestAnimationFrame(()=>f(k)?.resize())}),A.observe(f(O)),l(F,!0))})}),window.addEventListener(s,le),()=>{window.removeEventListener(s,le),cancelAnimationFrame(N),cancelAnimationFrame(P),cancelAnimationFrame(j),A?.disconnect(),f(k)?.dispose(),l(k,null)}}),d(()=>(M(c()),M(p())),()=>{l(n,ae.map(e=>({name:oe(e.label),value:c()[e.key],itemStyle:{color:e.color}})).filter(e=>e.value>0).concat(p()>0?[{name:oe(`unclassified`),value:p(),itemStyle:{color:`#8b94a5`}}]:[]))}),d(()=>(f(n),M(m()),M(h()),f(I),f(ne),M(y()),M(S()),M(T())),()=>{l(r,z({composition:f(n),trend:m(),trendEvidence:h(),compact:f(I),colors:f(ne),locale:y(),formatNumber:S(),formatMoney:T()}))}),d(()=>(f(k),f(r)),()=>{f(k)&&ue(f(r))}),g(),te();var de=AB(),fe=o(de);let pe;E(fe,e=>l(O,e),()=>f(O));var me=u(fe,2),he=b(me),ge=b(he),_e=b(ge),ve=b(_e),ye=b(ve,!0);L(ve);var xe=u(ve),Se=b(xe,!0);L(xe),L(_e),L(ge);var Ce=u(ge);_(Ce,5,()=>f(n),e=>e.name,(e,t)=>{var n=OB(),r=b(n),o=b(r,!0);L(r);var s=u(r),c=b(s,!0);L(s),L(n),H(e=>{v(o,(f(t),a(()=>f(t).name))),v(c,e)},[()=>(M(S()),f(t),a(()=>S()(f(t).value)))]),i(e,n)}),L(Ce),L(he);var we=u(he,2),Te=b(we),Ee=b(Te),De=b(Ee),Oe=b(De,!0);L(De);var ke=u(De),Ae=b(ke,!0);L(ke);var je=u(ke),Me=b(je,!0);L(je),L(Ee),L(Te);var Ne=u(Te);_(Ne,7,m,e=>e.start,(e,t,n)=>{let r=x(()=>(M(h()),M(f(n)),a(()=>h()[f(n)])));var o=kB(),s=b(o),c=b(s,!0);L(s);var l=u(s),d=b(l,!0);L(l);var p=u(l),m=b(p,!0);L(p),L(o),H((e,n)=>{v(c,(f(t),a(()=>f(t).label))),v(d,e),v(m,n)},[()=>(f(t),M(f(r)),M(S()),a(()=>f(t).gap||f(r)?.recordedTokens===null?oe(`gap`):S()(f(r).recordedTokens))),()=>(M(f(r)),M(T()),a(()=>f(r)?.costAmount===null?oe(`notAvailable`):T()(f(r).costAmount,f(r).costCurrency)))]),i(e,o)}),L(Ne),L(we),L(me),H((e,t,n,r,i,a,o,s)=>{pe=C(fe,1,`model-detail-visual svelte-1i3n9mf`,null,pe,{"chart-pending":!f(F)}),D(fe,`aria-busy`,!f(F)),D(fe,`aria-label`,e),D(he,`aria-label`,t),v(ye,n),v(Se,r),D(we,`aria-label`,i),v(Oe,a),v(Ae,o),v(Me,s)},[()=>a(()=>`${oe(`tokenBreakdown`)} · ${oe(`modelTrend`)}`),()=>a(()=>oe(`tokenBreakdown`)),()=>a(()=>oe(`tokens`)),()=>a(()=>oe(`total`)),()=>a(()=>oe(`modelTrend`)),()=>a(()=>oe(`interval`)),()=>a(()=>oe(`tokens`)),()=>a(()=>oe(`cost`))]),i(e,de),ee()}function MB(e){return e.retailEquivalent.amount===null?e.reportedEstimate.amount:e.retailEquivalent.amount}function NB(e,t,n,r,i){let a=e.flatMap(e=>{let n=t===`tokens`?e.tokenTotals.total:MB(e);return n===null||n<=0?[]:[{modelId:e.id,model:e,value:n,providerDisplayName:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,includedInHeadline:e.includedInHeadline}]}),o=a.reduce((e,t)=>e+t.value,0)||1,s=new Map;for(let e of a)s.set(e.model.model,(s.get(e.model.model)??0)+1);let c=new Set,l=e=>{if((s.get(e.model)??0)===1)return e.model;let t=`${e.model} · ${e.providerDisplayName}`;if(!c.has(t))return t;let n=`${e.model} · ${e.providerDisplayName} · ${e.billingDomainDisplayName}`;if(!c.has(n))return n;let r=2,i=`${n} #${r}`;for(;c.has(i);)i=`${n} #${++r}`;return i};return a.map(e=>{let t=l(e.model);return c.add(t),{modelId:e.model.id,name:t,providerDisplayName:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,includedInHeadline:e.includedInHeadline,value:e.value,share:e.value/o,color:n(e.model.providerId,e.model.billingDomainId),formattedValue:r(e.value),formattedShare:i(e.value/o)}})}function PB(e,t,n={notAvailable:`Unavailable`,separateFromHeadline:`Separate domain · not included in headline`},r=!0){return{animation:r,animationDuration:r?320:0,animationEasing:`cubicOut`,aria:{enabled:!0,decal:{show:!1}},title:{show:e.length===0,text:n.notAvailable,left:`center`,top:`46%`,textStyle:{color:t.muted,fontSize:12,fontWeight:500}},tooltip:{show:!0,trigger:`item`,renderMode:`html`,confine:!0,className:`model-breakdown-tooltip`,backgroundColor:t.surface,borderColor:t.border,borderWidth:1,padding:[10,12],textStyle:{color:t.text,fontSize:11},extraCssText:`border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.22);`,formatter:e=>IB(e,t,n,n.notAvailable)},series:[{type:`treemap`,top:0,left:0,right:0,bottom:0,roam:!1,nodeClick:!1,squareRatio:1,gapWidth:2,breadcrumb:{show:!1},upperLabel:{show:!1},label:{show:!0,color:t.text,fontSize:11,fontWeight:600,lineHeight:16,overflow:`truncate`,ellipsis:`…`,formatter:e=>FB(e)},itemStyle:{borderColor:t.surface,borderWidth:2,gapWidth:2},emphasis:{label:{show:!0,fontWeight:700},itemStyle:{borderColor:t.border,borderWidth:3}},data:e.map(e=>({name:e.name,value:e.value,modelId:e.modelId,formattedValue:e.formattedValue,formattedShare:e.formattedShare,providerDisplayName:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,includedInHeadline:e.includedInHeadline,itemStyle:{color:e.color}}))}]}}function FB(e){if(!e||typeof e!=`object`||!(`data`in e))return``;let t=e.data;return!t||typeof t!=`object`?``:[t.name,t.formattedValue].filter(e=>typeof e==`string`).join(`
|
|
19
|
+
`)}function IB(e,t,n,r){if(!e||typeof e!=`object`||!(`data`in e))return r;let i=e.data;if(!i||typeof i!=`object`)return r;let a=i,o=[`<strong>${LB(a.name)}</strong>`,`<span style="color:${LB(t.muted)}">${LB(a.providerDisplayName)} · ${LB(a.billingDomainDisplayName)}</span>`,`<span>${LB(a.formattedValue)} · ${LB(a.formattedShare)}</span>`];return a.includedInHeadline||o.push(`<span style="color:${LB(t.muted)}">${LB(n.separateFromHeadline)}</span>`),o.join(`<br>`)}function LB(e){return e.replace(/[&<>'"]/g,e=>({"&":`&`,"<":`<`,">":`>`,"'":`'`,'"':`"`})[e]??e)}var RB=2.5,zB=[10,7],BB=`rgba(122, 136, 164, 0.16)`,VB=`#697386`,HB=`Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,UB={codex:`#78a7ff`,"claude-code":`#d69b73`,opencode:`#55c89d`,"opencode-go":`#73d4b2`,"grok:grok-build-subscription":`#b28cff`,"grok:xai-api":`#f07f9a`};function WB(e,t){return UB[`${e}:${t}`]??UB[e]??`#9aa5b8`}function GB(e,t=0,n=null){if(e<=0)return{start:0,size:0};let r=Math.max(Math.min(4,e),Math.min(n??e,e));return{start:Math.max(0,Math.min(t,e-r)),size:r}}function KB(e,t,n,r,i=.5){if(e<=1)return{start:t,size:n};let a=GB(e,t,n),o=r===`in`?Math.max(Math.min(4,e),Math.round(a.size*.7)):Math.min(e,Math.ceil(a.size/.7));if(o===a.size)return{start:a.start,size:o===e?null:o};let s=Math.max(0,Math.min(1,i)),c=a.start+s*Math.max(0,a.size-1);return{start:Math.max(0,Math.min(e-o,Math.round(c-s*Math.max(0,o-1)))),size:o===e?null:o}}function qB(e,t,n,r){let i=GB(e,t,n);return Math.max(0,Math.min(e-i.size,i.start+r))}function JB(e,t){let n=e.flatMap(e=>e.segments),r=t===`tokens`?n.map(e=>({...e,costPurpose:null})):n.flatMap(e=>[...e.retailEquivalent.amount===null?[]:[{...e,costPurpose:`retail-equivalent`}],...e.reportedEstimate?.amount==null?[]:[{...e,costPurpose:`reported-estimate`}]]);return[...new Map(r.map(e=>[`${e.providerId}:${e.billingDomainId}:${e.costPurpose??`tokens`}`,{providerId:e.providerId,providerDisplayName:e.providerDisplayName,billingDomainId:e.billingDomainId,billingDomainDisplayName:e.billingDomainDisplayName,includedInHeadline:e.includedInHeadline,costPurpose:e.costPurpose}])).values()]}function YB(e,t,n){return e?t===`tokens`?e.recordedTokens:n===`reported-estimate`?e.reportedEstimate?.amount??null:e.retailEquivalent.amount:null}function XB(e,t){return JB(e,t).map(n=>({...n,key:`${n.providerId}:${n.billingDomainId}:${n.costPurpose??`tokens`}`,values:e.map(e=>e.gap?null:YB(e.segments.find(e=>e.providerId===n.providerId&&e.billingDomainId===n.billingDomainId),t,n.costPurpose))}))}function ZB(e){let t=e.flatMap(e=>e.values.filter(e=>e!==null));return t.length>0?Math.max(...t):null}function QB(e,t){return e[t]!=null&&e[t-1]==null&&e[t+1]==null}function $B(e,t){return t<=1?50:Math.max(8,Math.min(92,e/(t-1)*100))}function eV(e){let t=WB(e.providerId,e.billingDomainId),n=e.costPurpose===`reported-estimate`;return{id:e.key,name:e.key,type:`line`,data:e.values,connectNulls:!1,silent:!0,showSymbol:e.values.some((t,n)=>QB(e.values,n)),symbol:`circle`,symbolSize:(t,n)=>QB(e.values,n.dataIndex)?8:0,lineStyle:{width:RB,color:t,type:n?zB:`solid`,cap:`round`,join:`round`},itemStyle:n?{color:`transparent`,borderColor:t,borderWidth:2}:{color:t,borderColor:t,borderWidth:0},areaStyle:n?void 0:{color:{type:`linear`,x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:`${t}3d`},{offset:1,color:`${t}00`}]}},emphasis:{disabled:!0},z:n?3:2,clip:!0}}function tV(e,t,n,r,i,a=e=>String(e)){let o=Math.max(1,n??0),s={color:r.label,fontFamily:HB,fontSize:10};return{animation:i,animationDuration:i?240:0,backgroundColor:`transparent`,grid:{left:12,right:16,top:16,bottom:12,containLabel:!0},xAxis:{type:`category`,data:e,boundaryGap:!1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{...s,show:!0,hideOverlap:!0,margin:10},splitLine:{show:!1}},yAxis:{type:`value`,min:0,max:o,interval:o/2,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{...s,show:!0,margin:8,formatter:a},splitLine:{show:!0,lineStyle:{color:r.gridLine,width:1}}},series:t.map(eV)}}var nV=p(`<div class="model-breakdown-treemap-root svelte-1nr4hcl"><div class="model-breakdown-echarts svelte-1nr4hcl" data-testid="model-breakdown-treemap" data-chart-engine="echarts"></div></div>`);function rV(e,t){ie(t,!1);let n=R(),r=R();lM([NF,JR,ZR,rB,DB]);let o=w(t,`models`,8),s=w(t,`metric`,8),c=w(t,`currency`,8),u=w(t,`locale`,24,()=>ye(``)),p=w(t,`formatUsageMetric`,8),h=w(t,`formatPercent`,8),_=w(t,`onSelect`,8),v=R(null),y=R(null),x=R(null),S=null,C=R({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`});function T(e){return be(u(),e)}function O(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function k(e,t,n){let r=getComputedStyle(e).getPropertyValue(t).trim();if(!r)return n;let i=document.createElement(`span`);i.style.color=r,i.style.position=`absolute`,i.style.visibility=`hidden`,e.appendChild(i);let a=getComputedStyle(i).color;return i.remove(),a&&a!==`rgba(0, 0, 0, 0)`?a:n}function A(){let e=f(y)??f(v);e&&l(C,{text:k(e,`--text-strong`,f(C).text),muted:k(e,`--muted`,f(C).muted),surface:k(e,`--surface`,f(C).surface),border:k(e,`--border`,f(C).border)})}async function j(e){f(x)&&(f(x).setOption(e,{notMerge:!0,lazyUpdate:!1}),await m(),f(x).resize())}re(()=>{if(f(v))return A(),l(x,Uj(f(v),void 0,{renderer:`canvas`,useDirtyRect:!0})),f(x).on(`click`,e=>{let t=e?.data,n=t&&typeof t==`object`?t.modelId:null;typeof n==`string`&&_()(n)}),S=new ResizeObserver(()=>f(x)?.resize()),S.observe(f(v)),window.addEventListener(xe,A),()=>{window.removeEventListener(xe,A),S?.disconnect(),S=null,f(x)?.dispose(),l(x,null)}}),d(()=>(M(o()),M(s()),M(p()),M(c()),M(h())),()=>{l(n,NB(o(),s(),WB,e=>p()(e,c(),s()),h()))}),d(()=>(f(n),f(C)),()=>{l(r,PB(f(n),f(C),{notAvailable:T(`notAvailable`),separateFromHeadline:T(`separateFromHeadline`)},!O()))}),d(()=>(f(x),f(r)),()=>{f(x)&&j(f(r))}),g(),te();var N=nV(),P=b(N);E(P,e=>l(v,e),()=>f(v)),L(N),E(N,e=>l(y,e),()=>f(y)),H(e=>D(P,`aria-label`,e),[()=>a(()=>T(`modelBreakdownTreemap`))]),i(e,N),ee()}var iV=p(`<div class="model-trend-stacked-root svelte-kd7ncs" data-testid="model-trend-stacked"></div>`);function aV(e,t){ie(t,!1);let n=R(),r=R(),o=R();lM([BT,hR,JR,Xz,rB,DB]);let s=w(t,`models`,8),c=w(t,`metric`,8),u=w(t,`currency`,8),p=w(t,`locale`,24,()=>ye(``)),m=w(t,`formatUsageMetric`,8),h=w(t,`onSelect`,8),_=R(null),v=R(null),y=null;function b(e){return be(p(),e)}function x(e){let t={};for(let n of e)t[n.model]=(t[n.model]??0)+1;return e.map(e=>(t[e.model]??0)>1?`${e.model} · ${e.providerDisplayName}`:e.model)}function S(e,t){let n=e.trend[t];return!n||n.gap?null:c()===`tokens`?n.tokenTotals.total:n.retailEquivalent.amount}function C(e,t,n){let r=e.map((e,r)=>({name:t[r],type:`bar`,stack:`total`,barMaxWidth:34,emphasis:{focus:`series`},itemStyle:{color:WB(e.providerId,e.billingDomainId)},data:n.map((t,n)=>S(e,n))}));return{animation:!T(),animationDuration:280,aria:{enabled:!0,decal:{show:!1}},legend:{type:`scroll`,bottom:4,left:8,right:8,textStyle:{color:`#697386`,fontSize:9},data:t},tooltip:{trigger:`axis`,axisPointer:{type:`shadow`},confine:!0,formatter:e=>{let t=Array.isArray(e)?e:[e],n=t[0];return[typeof n?.axisValue==`string`?n.axisValue:``,...t.flatMap(e=>{let t=typeof e.value==`number`?e.value:null;return t===null?[]:`${e.marker??``} ${e.seriesName}: ${m()(t,u(),c())}`})].join(`<br/>`)}},grid:{left:48,right:48,top:18,bottom:46,containLabel:!0},xAxis:{type:`category`,data:n,axisTick:{show:!1},axisLine:{lineStyle:{color:`#dce1e9`}},axisLabel:{color:`#697386`,fontSize:9,hideOverlap:!0}},yAxis:{type:`value`,min:0,axisLabel:{color:`#697386`,fontSize:9,formatter:e=>m()(e,u(),c())},splitLine:{lineStyle:{color:`#dce1e9`,opacity:.65}}},series:r}}function T(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}re(()=>{if(f(_))return l(v,Uj(f(_),void 0,{renderer:`canvas`,useDirtyRect:!0})),f(v).on(`click`,e=>{let t=typeof e.seriesIndex==`number`?e.seriesIndex:-1,n=s()[t];n&&h()(n.id)}),y=new ResizeObserver(()=>f(v)?.resize()),y.observe(f(_)),()=>{y?.disconnect(),f(v)?.dispose(),l(v,null)}}),d(()=>M(s()),()=>{l(n,s()[0]?.trend.map(e=>e.label)??[])}),d(()=>M(s()),()=>{l(r,x(s()))}),d(()=>(M(s()),f(r),f(n)),()=>{l(o,C(s(),f(r),f(n)))}),d(()=>(f(v),f(o)),()=>{f(v)&&f(v).setOption(f(o),{notMerge:!0,lazyUpdate:!1})}),g(),te();var O=iV();E(O,e=>l(_,e),()=>f(_)),H(e=>D(O,`aria-label`,e),[()=>a(()=>b(`modelTrendStacked`))]),i(e,O),ee()}function oV(e,t){if(!e)return null;let n=e.retailEquivalent.status===`available`?e.retailEquivalent.amount:null,r=Math.min(100,Math.max(0,e.progress*100)),i=e.breakEvenRatio===null?0:Math.min(100,Math.max(0,e.breakEvenRatio*100));return{start:e.start,end:e.end,elapsedDays:e.elapsedDays,totalDays:e.totalDays,elapsedPercent:r,earnedPercent:i,onPace:e.breakEvenRatio!==null&&e.breakEvenRatio>=e.progress,earnedLabel:t.money(n),periodCostLabel:t.money(e.periodCost.amount),bound:e.ratioBound}}var sV=[1,2,5,10,20,50],cV=14;function lV(e){let t=new Map;for(let n of e)t.set(n.providerDisplayName,(t.get(n.providerDisplayName)??0)+1);return new Map(e.map(e=>[`${e.providerId}:${e.billingDomainId}`,(t.get(e.providerDisplayName)??0)>1?uV(e):e.providerDisplayName]))}function uV(e){return e.providerDisplayName===e.billingDomainDisplayName?e.providerDisplayName:`${e.providerDisplayName} · ${e.billingDomainDisplayName}`}function dV(e,t){return e.plan.displayName||t}function fV(e,t,n){let r=lV(e.entries);return e.entries.flatMap(e=>{let i=e.windowPlanCost.amount,a=e.retailEquivalent.status===`available`?e.retailEquivalent.amount:null;return i===null||a===null?[]:[{key:`${e.providerId}:${e.billingDomainId}`,name:uV(e),shortName:r.get(`${e.providerId}:${e.billingDomainId}`)??uV(e),planLabel:dV(e,n),color:t(e.providerId,e.billingDomainId),paid:i,worth:a,tokens:e.recordedTokens??0,ratio:e.valueRatio,bound:e.ratioBound,effectiveUnitPrice:e.effectiveUnitPrice,retailUnitPrice:e.retailUnitPrice}]})}function pV(e,t){return t<=0||e<=0?cV:cV+32*Math.sqrt(e/t)}function mV(e,t){if(e<=0||t<=0)return[];let n=n=>{let r=Math.min(e,t/n);return{ratio:n,points:[[0,0],[r,r*n]]}},r=sV.filter(e=>e!==1).map(n).filter(t=>t.points[1][0]>=e*.2).slice(-3);return[n(1),...r]}function hV(e,t,n,r,i=!0){let a=Math.max(...e.map(e=>e.paid),0)*1.25,o=Math.max(...e.map(e=>e.worth),0)*1.25,s=Math.max(...e.map(e=>e.tokens),0),c=mV(a,o);return{animation:i,animationDuration:i?320:0,animationEasing:`cubicOut`,aria:{enabled:!0,decal:{show:!1}},title:{show:e.length===0,text:n.empty,left:`center`,top:`44%`,textStyle:{color:t.muted,fontSize:12,fontWeight:500}},grid:{top:34,right:26,bottom:46,left:62,containLabel:!0},xAxis:{type:`value`,show:e.length>0,min:0,max:a||void 0,name:n.paid,nameLocation:`middle`,nameGap:30,nameTextStyle:{color:t.muted,fontSize:11},axisLabel:{color:t.muted,fontSize:10,formatter:e=>r.money(e)},axisLine:{lineStyle:{color:t.border}},splitLine:{lineStyle:{color:t.border,opacity:.35}}},yAxis:{type:`value`,show:e.length>0,min:0,max:o||void 0,name:n.worth,nameLocation:`end`,nameGap:14,nameTextStyle:{color:t.muted,fontSize:11,align:`left`},axisLabel:{color:t.muted,fontSize:10,formatter:e=>r.money(e)},axisLine:{lineStyle:{color:t.border}},splitLine:{lineStyle:{color:t.border,opacity:.35}}},tooltip:{show:e.length>0,trigger:`item`,renderMode:`html`,confine:!0,className:`plan-value-tooltip`,backgroundColor:t.surface,borderColor:t.border,borderWidth:1,padding:[10,12],textStyle:{color:t.text,fontSize:11},extraCssText:`border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.22);`,formatter:e=>gV(e,t,n,r)},series:[...c.map(e=>({type:`line`,silent:!0,symbol:`none`,data:e.points,lineStyle:{color:t.muted,width:e.ratio===1?1.4:1,type:e.ratio===1?`dashed`:`dotted`,opacity:e.ratio===1?.85:.45},endLabel:{show:!0,color:t.muted,fontSize:10,formatter:()=>`${e.ratio}x`},emphasis:{disabled:!0},animation:!1,z:1})),{type:`scatter`,z:3,symbolSize:(e,t)=>pV(t.data?.tokens??0,s),label:{show:!0,position:`top`,distance:6,color:t.text,fontSize:10,fontWeight:600,formatter:e=>e.data?.shortName??``},emphasis:{scale:1.08,focus:`self`},data:e.map(e=>({value:[e.paid,e.worth],name:e.name,shortName:e.shortName,planLabel:e.planLabel,tokens:e.tokens,ratio:e.ratio,bound:e.bound,effectiveUnitPrice:e.effectiveUnitPrice,retailUnitPrice:e.retailUnitPrice,itemStyle:{color:e.color,opacity:.85,borderColor:t.surface,borderWidth:1.5}}))}]}}function gV(e,t,n,r){if(!e||typeof e!=`object`||!(`data`in e))return n.empty;let i=e.data;if(!i||typeof i!=`object`)return n.empty;let a=i,o=[`<strong>${vV(a.name??``)}</strong>`,`<span style="color:${vV(t.muted)}">${vV(a.planLabel??``)}</span>`,`<span>${vV(n.ratio)} · ${vV(r.ratio(a.ratio??null,a.bound??`unavailable`))}</span>`,`<span>${vV(n.paid)} · ${vV(r.money(a.value?.[0]??null))}</span>`,`<span>${vV(n.worth)} · ${vV(r.money(a.value?.[1]??null))}</span>`,`<span>${vV(n.tokens)} · ${vV(r.tokens(a.tokens??null))}</span>`,`<span>${vV(n.effectiveUnitPrice)} · ${vV(r.money(a.effectiveUnitPrice??null))} ${vV(n.perMillion)}</span>`,`<span>${vV(n.retailUnitPrice)} · ${vV(r.money(a.retailUnitPrice??null))} ${vV(n.perMillion)}</span>`];return a.bound===`lower`&&o.push(`<span style="color:${vV(t.muted)}">${vV(n.partial)}</span>`),o.join(`<br>`)}function _V(e,t,n,r){let i=e.entries.map(e=>e.valueRatio).filter(e=>e!==null),a=Math.max(...i,1);return e.entries.map(e=>{let i=e.retailUnitPrice!==null&&e.effectiveUnitPrice!==null?e.retailUnitPrice-e.effectiveUnitPrice:null;return{key:`${e.providerId}:${e.billingDomainId}`,name:uV(e),planLabel:dV(e,r),color:t(e.providerId,e.billingDomainId),ratio:e.valueRatio,bound:e.ratioBound,ratioLabel:n.ratio(e.valueRatio,e.ratioBound),meterPercent:e.valueRatio===null?0:Math.min(100,e.valueRatio/a*100),breakEvenPercent:Math.min(100,1/a*100),beatsBreakEven:e.valueRatio!==null&&e.valueRatio>=1,paidLabel:n.money(e.windowPlanCost.amount),worthLabel:n.money(e.retailEquivalent.status===`available`?e.retailEquivalent.amount:null),tokensLabel:n.tokens(e.recordedTokens),effectiveUnitPriceLabel:n.money(e.effectiveUnitPrice),retailUnitPriceLabel:n.money(e.retailUnitPrice),savingsLabel:i===null?null:n.money(Math.abs(i)),savingsIsLoss:i!==null&&i<0,period:oV(e.billingPeriod,n)}})}function vV(e){return e.replace(/[&<>'"]/g,e=>({"&":`&`,"<":`<`,">":`>`,"'":`'`,'"':`"`})[e]??e)}var yV=p(`<tr><td> </td><td> </td><td> </td><td> </td><td> </td></tr>`),bV=p(`<div class="plan-value-chart-root svelte-jg0yd3"><div class="plan-value-echarts svelte-jg0yd3" data-testid="plan-value-chart" data-chart-engine="echarts"></div> <div class="plan-value-data svelte-jg0yd3"><table><thead><tr><th> </th><th> </th><th> </th><th> </th><th> </th></tr></thead><tbody></tbody></table></div></div>`);function xV(e,t){ie(t,!1);let n=R(),r=R();lM([CN,oS,hR,JR,ZR,rB,DB]);let o=w(t,`planValue`,8),s=w(t,`locale`,24,()=>ye(``)),c=w(t,`formatters`,8),p=R(null),h=R(null),y=R(null),x=null,S=R({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`});function C(e){return be(s(),e)}function T(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function O(e,t,n){let r=getComputedStyle(e).getPropertyValue(t).trim();if(!r)return n;let i=document.createElement(`span`);i.style.color=r,i.style.position=`absolute`,i.style.visibility=`hidden`,e.appendChild(i);let a=getComputedStyle(i).color;return i.remove(),a&&a!==`rgba(0, 0, 0, 0)`?a:n}function k(){let e=f(h)??f(p);e&&l(S,{text:O(e,`--text-strong`,f(S).text),muted:O(e,`--muted`,f(S).muted),surface:O(e,`--surface-subtle`,f(S).surface),border:O(e,`--border`,f(S).border)})}async function A(e){f(y)&&(f(y).setOption(e,{notMerge:!0,lazyUpdate:!1}),await m(),f(y).resize())}re(()=>{if(f(p))return k(),l(y,Uj(f(p),void 0,{renderer:`canvas`,useDirtyRect:!0})),f(y).getDom().setAttribute(`aria-hidden`,`true`),x=new ResizeObserver(()=>f(y)?.resize()),x.observe(f(p)),window.addEventListener(xe,k),()=>{window.removeEventListener(xe,k),x?.disconnect(),x=null,f(y)?.dispose(),l(y,null)}}),d(()=>(M(o()),WB),()=>{l(n,fV(o(),WB,C(`planCustom`)))}),d(()=>(f(n),f(S),M(c())),()=>{l(r,hV(f(n),f(S),{paid:C(`planValuePaid`),worth:C(`planValueWorth`),ratio:C(`planValueRatio`),tokens:C(`tokens`),effectiveUnitPrice:C(`planValueEffectiveUnitPrice`),retailUnitPrice:C(`planValueRetailUnitPrice`),perMillion:C(`planValuePerMillion`),partial:C(`planValuePartial`),empty:C(`planValueEmpty`)},c(),!T()))}),d(()=>(f(y),f(r)),()=>{f(y)&&A(f(r))}),g(),te();var j=bV(),N=b(j);E(N,e=>l(p,e),()=>f(p));var P=u(N,2),F=b(P),I=b(F),ne=b(I),ae=b(ne),oe=b(ae,!0);L(ae);var z=u(ae),B=b(z,!0);L(z);var V=u(z),se=b(V,!0);L(V);var ce=u(V),le=b(ce,!0);L(ce);var ue=u(ce),de=b(ue,!0);L(ue),L(ne),L(I);var fe=u(I);_(fe,5,()=>f(n),e=>e.key,(e,t)=>{var n=yV(),r=b(n),o=b(r);L(r);var s=u(r),l=b(s,!0);L(s);var d=u(s),p=b(d,!0);L(d);var m=u(d),h=b(m,!0);L(m);var g=u(m),_=b(g,!0);L(g),L(n),H((e,n,r,i)=>{v(o,`${f(t),a(()=>f(t).name)??``} · ${f(t),a(()=>f(t).planLabel)??``}`),v(l,e),v(p,n),v(h,r),v(_,i)},[()=>(M(c()),f(t),a(()=>c().money(f(t).paid))),()=>(M(c()),f(t),a(()=>c().money(f(t).worth))),()=>(M(c()),f(t),a(()=>c().ratio(f(t).ratio,f(t).bound))),()=>(M(c()),f(t),a(()=>c().tokens(f(t).tokens)))]),i(e,n)}),L(fe),L(F),L(P),L(j),E(j,e=>l(h,e),()=>f(h)),H((e,t,n,r,i,a)=>{D(F,`aria-label`,e),v(oe,t),v(B,n),v(se,r),v(le,i),v(de,a)},[()=>a(()=>C(`planValueChartLabel`)),()=>a(()=>C(`plans`)),()=>a(()=>C(`planValuePaid`)),()=>a(()=>C(`planValueWorth`)),()=>a(()=>C(`planValueRatio`)),()=>a(()=>C(`tokens`))]),i(e,j),ee()}function SV(e,t,n,r,i){return e.flatMap(e=>{let a=t===`tokens`?e.recordedTokens:e.retailEquivalent.amount,o=t===`tokens`?e.tokenShare:e.retailShare;return e.includedInHeadline===!1||a===null||o===null||a<=0||o<=0?[]:[{key:`${e.providerId}:${e.billingDomainId}`,name:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,value:a,share:o,color:n(e.providerId,e.billingDomainId),formattedValue:r(a),formattedShare:i(o)}]})}function CV(e,t,n=`Unavailable`,r=!0){return{animation:r,animationDuration:r?360:0,animationEasing:`cubicOut`,aria:{enabled:!0,decal:{show:!1}},title:{show:e.length===0,text:n,left:`center`,top:`38%`,textStyle:{color:t.muted,fontSize:12,fontWeight:500}},legend:{show:e.length>0,type:`scroll`,left:`center`,right:`center`,bottom:0,orient:`horizontal`,icon:`circle`,itemWidth:8,itemHeight:8,itemGap:16,pageButtonGap:7,pageIconSize:9,pageIconColor:t.text,pageIconInactiveColor:t.border,pageTextStyle:{color:t.muted,fontSize:10},textStyle:{color:t.muted,fontSize:11},formatter:e=>e.length>18?`${e.slice(0,17)}…`:e,tooltip:{show:!0,formatter:r=>EV(TV(r,e),t,n)}},tooltip:{show:!0,trigger:`item`,renderMode:`html`,confine:!0,className:`provider-share-tooltip`,backgroundColor:t.surface,borderColor:t.border,borderWidth:1,padding:[10,12],textStyle:{color:t.text,fontSize:11},extraCssText:`border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.22);`,formatter:e=>EV(wV(e),t,n)},series:[{type:`pie`,radius:[`48%`,`70%`],center:[`50%`,`42%`],minAngle:2,avoidLabelOverlap:!0,padAngle:1.5,itemStyle:{borderColor:t.surface,borderWidth:3,borderRadius:5},label:{show:!1},labelLine:{show:!1},emphasis:{scale:!0,scaleSize:7,itemStyle:{shadowBlur:14,shadowColor:`rgba(0, 0, 0, 0.22)`}},data:e.map(e=>({...e,itemStyle:{color:e.color}}))}]}}function wV(e){if(!e||typeof e!=`object`||!(`data`in e))return null;let t=e.data;return!t||typeof t!=`object`?null:t}function TV(e,t){if(!e||typeof e!=`object`||!(`name`in e))return null;let n=e.name;return typeof n==`string`?t.find(e=>e.name===n)??null:null}function EV(e,t,n){return e?[`<strong>${DV(e.name)}</strong>`,`<span style="color:${DV(t.muted)}">${DV(e.billingDomainDisplayName)}</span>`,`<span>${DV(e.formattedValue)} · ${DV(e.formattedShare)}</span>`].join(`<br>`):n}function DV(e){return e.replace(/[&<>'"]/g,e=>({"&":`&`,"<":`<`,">":`>`,"'":`'`,'"':`"`})[e]??e)}var OV=p(`<tr><td> </td><td> </td><td> </td></tr>`),kV=p(`<div class="provider-share-chart-root svelte-15bk8av"><div class="provider-share-echarts svelte-15bk8av" data-testid="provider-share-chart" data-chart-engine="echarts"></div> <div class="provider-share-data svelte-15bk8av"><table><thead><tr><th> </th><th> </th><th> </th></tr></thead><tbody></tbody></table></div></div>`);function AV(e,t){ie(t,!1);let n=R(),r=R();lM([EE,Xz,JR,ZR,rB,DB]);let o=w(t,`providers`,8),s=w(t,`metric`,8),c=w(t,`currency`,8),p=w(t,`locale`,24,()=>ye(``)),h=w(t,`formatUsageMetric`,8),y=w(t,`formatPercent`,8),x=R(null),S=R(null),C=R(null),T=null,O=R({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`});function k(e){return be(p(),e)}function A(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function j(e,t,n){let r=getComputedStyle(e).getPropertyValue(t).trim();if(!r)return n;let i=document.createElement(`span`);i.style.color=r,i.style.position=`absolute`,i.style.visibility=`hidden`,e.appendChild(i);let a=getComputedStyle(i).color;return i.remove(),a&&a!==`rgba(0, 0, 0, 0)`?a:n}function N(){let e=f(S)??f(x);e&&l(O,{text:j(e,`--text-strong`,f(O).text),muted:j(e,`--muted`,f(O).muted),surface:j(e,`--surface-subtle`,f(O).surface),border:j(e,`--border`,f(O).border)})}async function P(e){f(C)&&(f(C).setOption(e,{notMerge:!0,lazyUpdate:!1}),await m(),f(C).resize())}re(()=>{if(f(x))return N(),l(C,Uj(f(x),void 0,{renderer:`canvas`,useDirtyRect:!0})),f(C).getDom().setAttribute(`aria-hidden`,`true`),T=new ResizeObserver(()=>f(C)?.resize()),T.observe(f(x)),window.addEventListener(xe,N),()=>{window.removeEventListener(xe,N),T?.disconnect(),T=null,f(C)?.dispose(),l(C,null)}}),d(()=>(M(o()),M(s()),M(h()),M(c()),M(y())),()=>{l(n,SV(o(),s(),WB,e=>h()(e,c(),s()),y()))}),d(()=>(f(n),f(O)),()=>{l(r,CV(f(n),f(O),k(`notAvailable`),!A()))}),d(()=>(f(C),f(r)),()=>{f(C)&&P(f(r))}),g(),te();var F=kV(),I=b(F);E(I,e=>l(x,e),()=>f(x));var ne=u(I,2),ae=b(ne),oe=b(ae),z=b(oe),B=b(z),V=b(B,!0);L(B);var se=u(B),ce=b(se,!0);L(se);var le=u(se),ue=b(le,!0);L(le),L(z),L(oe);var de=u(oe);_(de,5,()=>f(n),e=>e.key,(e,t)=>{var n=OV(),r=b(n),o=b(r);L(r);var s=u(r),c=b(s,!0);L(s);var l=u(s),d=b(l,!0);L(l),L(n),H(()=>{v(o,`${f(t),a(()=>f(t).name)??``} · ${f(t),a(()=>f(t).billingDomainDisplayName)??``}`),v(c,(f(t),a(()=>f(t).formattedValue))),v(d,(f(t),a(()=>f(t).formattedShare)))}),i(e,n)}),L(de),L(ae),L(ne),L(F),E(F,e=>l(S,e),()=>f(S)),H((e,t,n,r)=>{D(ae,`aria-label`,e),v(V,t),v(ce,n),v(ue,r)},[()=>a(()=>k(`providerShare`)),()=>a(()=>k(`providersLabel`)),()=>(M(s()),a(()=>s()===`tokens`?k(`tokens`):k(`cost`))),()=>(M(s()),a(()=>s()===`tokens`?k(`tokenShare`):k(`costShare`)))]),i(e,F),ee()}var jV=6e4,MV=300,NV=1440,PV=20160;function FV(e){if(typeof e.windowDurationMinutes==`number`&&Number.isFinite(e.windowDurationMinutes)&&e.windowDurationMinutes>0)return e.windowDurationMinutes;let t=e.label.trim().toLowerCase();if(/\b5[- ]?hours?\b/.test(t))return MV;if(/\bweeks?\b|\bweekly\b/.test(t))return 10080;if(/\bmonths?\b|\bmonthly\b/.test(t))return 43200;let n=t.match(/\b(\d+(?:\.\d+)?)\s*(minutes?|hours?|days?)\b/);if(!n)return null;let r=Number(n[1]);return!Number.isFinite(r)||r<=0?null:n[2].startsWith(`day`)?r*24*60:n[2].startsWith(`hour`)?r*60:r}function IV(e,t,n,r,i=`UTC`){let a=LV(t,n,r,i),o=e.flatMap(e=>{let n=HV(e,t);return!n||!n.bucket.resetsAt?[]:[{id:`${e.providerId}:${e.billingDomainId}`,providerId:e.providerId,providerDisplayName:e.providerDisplayName,billingDomainId:e.billingDomainId,billingDomainDisplayName:e.billingDomainDisplayName,selectedLabel:n.bucket.label,durationMinutes:n.durationMinutes,usedPercent:n.bucket.usedPercent,resetsAt:n.bucket.resetsAt,authority:n.bucket.authority,observedAt:n.bucket.observedAt??e.observedAt}]});return{mode:t,range:a,lanes:o,windows:o.flatMap(e=>WV(e,a,r)),nowMs:r}}function LV(e,t,n,r=`UTC`){let i=RV(n,r);if(e===`session`){let e=zV(i,t),n=zV(e,3);return{startMs:BV(e,r),endMs:BV(n,r)}}let a=zV(i,-new Date(Date.UTC(i.year,i.month-1,i.day)).getUTCDay()+t*7),o=zV(a,14);return{startMs:BV(a,r),endMs:BV(o,r)}}function RV(e,t){let n=new Intl.DateTimeFormat(`en-CA`,{timeZone:t,year:`numeric`,month:`2-digit`,day:`2-digit`}).formatToParts(e),r=e=>Number(n.find(t=>t.type===e)?.value);return{year:r(`year`),month:r(`month`),day:r(`day`)}}function zV(e,t){let n=new Date(Date.UTC(e.year,e.month-1,e.day+t));return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate()}}function BV(e,t){let n=Date.UTC(e.year,e.month-1,e.day),r=n;for(let e=0;e<2;e+=1){let e=VV(r,t),i=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second);r+=n-i}return r}function VV(e,t){let n=new Intl.DateTimeFormat(`en-GB`,{timeZone:t,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hourCycle:`h23`}).formatToParts(e),r=e=>Number(n.find(t=>t.type===e)?.value);return{year:r(`year`),month:r(`month`),day:r(`day`),hour:r(`hour`),minute:r(`minute`),second:r(`second`)}}function HV(e,t){return e.quotaBuckets.flatMap(e=>{let n=FV(e),r=e.resetsAt?Date.parse(e.resetsAt):NaN;return!n||!Number.isFinite(r)||t===`session`&&n!==MV||t===`weekly`&&(n<NV||n>PV)?[]:[{bucket:e,durationMinutes:n}]}).sort((e,t)=>{let n=t.durationMinutes-e.durationMinutes;if(n!==0)return n;let r=UV(e.bucket)-UV(t.bucket);return r===0?e.bucket.id.localeCompare(t.bucket.id):r})[0]??null}function UV(e){let t=e.label.toLowerCase();return/all models|^week$|^weekly limit$/.test(t)?0:/fable|spark|model/.test(t)?2:1}function WV(e,t,n){let r=Date.parse(e.resetsAt),i=e.durationMinutes*jV;if(!Number.isFinite(r)||!(i>0)||t.endMs<=t.startMs||Math.ceil((t.endMs-t.startMs)/i)+2>1e3)return[];let a=r+Math.ceil((t.startMs-r)/i)*i,o=[];for(;a-i<t.endMs;){let s=a-i,c=Math.max(s,t.startMs),l=Math.min(a,t.endMs);if(l>c){let t=a<=n?`elapsed`:s<=n?`current`:`upcoming`,i=t===`current`&&a===r;o.push({laneId:e.id,providerId:e.providerId,providerDisplayName:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,label:e.selectedLabel,startMs:s,endMs:a,visibleStartMs:c,visibleEndMs:l,state:t,usedPercent:i?e.usedPercent:null,authority:i?e.authority:`estimate`,observedAt:e.observedAt})}a+=i}return o}var GV=p(`<p class="quota-timeline-empty svelte-1oyi7sq" role="status"> </p>`),KV=p(`<div class="quota-timeline-scroll svelte-1oyi7sq"><div class="quota-timeline-chart svelte-1oyi7sq"></div></div>`),qV=p(`<tr><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>`),JV=p(`<section class="quota-timeline svelte-1oyi7sq" data-testid="quota-timeline" data-chart-engine="echarts" aria-labelledby="quota-timeline-heading"><header class="svelte-1oyi7sq"><div><h2 id="quota-timeline-heading" class="svelte-1oyi7sq"> </h2> <p class="quota-timeline-range svelte-1oyi7sq"> </p></div> <div class="quota-timeline-controls svelte-1oyi7sq"><div class="quota-timeline-navigation svelte-1oyi7sq"><button type="button" class="svelte-1oyi7sq">‹</button> <button type="button" class="svelte-1oyi7sq"> </button> <button type="button" class="svelte-1oyi7sq">›</button></div> <div class="quota-timeline-modes svelte-1oyi7sq" role="group"><button type="button" class="svelte-1oyi7sq"> </button> <button type="button" class="svelte-1oyi7sq"> </button></div></div></header> <div class="quota-timeline-legend svelte-1oyi7sq" aria-hidden="true"><ul class="quota-timeline-legend-items svelte-1oyi7sq"><li class="quota-timeline-legend-item svelte-1oyi7sq"><span class="quota-timeline-swatch swatch-solid svelte-1oyi7sq"></span> </li> <li class="quota-timeline-legend-item svelte-1oyi7sq"><span class="quota-timeline-swatch swatch-outline svelte-1oyi7sq"></span> </li> <li class="quota-timeline-legend-item svelte-1oyi7sq"><span class="quota-timeline-swatch swatch-dashed svelte-1oyi7sq"></span> </li></ul></div> <!> <div class="quota-timeline-data svelte-1oyi7sq"><table><thead><tr><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th></tr></thead><tbody></tbody></table></div></section>`);function YV(e,n){ie(n,!1);let s=R(),c=R(),p=R(),h=R(),y=R(),x=`agent-usage:theme-changed`;lM([bL,hR,wz,JR,rB,DB]);let S=w(n,`providers`,8),C=w(n,`locale`,24,()=>ye(``)),T=w(n,`timeZone`,8,`UTC`),O=w(n,`now`,24,()=>Date.now()),k=R(null),j=R(null),N=R(null),P=null,F=R(`weekly`),I=R(0),ne=R({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`,grid:`rgba(122, 136, 164, 0.16)`});function re(e){return be(C(),e)}function ae(e,t){let n=new Intl.DateTimeFormat(C(),{month:`2-digit`,day:`2-digit`,timeZone:T()});return`${n.format(e)} – ${n.format(t-1)}`}function oe(e){return new Intl.DateTimeFormat(C(),{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1,timeZone:T()}).format(e)}function z(e){return new Intl.DateTimeFormat(C(),{month:`2-digit`,day:`2-digit`,...f(F)===`session`?{hour:`2-digit`}:{},hour12:!1,timeZone:T()}).format(e)}function se(e){return re({elapsed:`quotaTimelineElapsed`,current:`quotaTimelineCurrent`,upcoming:`quotaTimelineUpcoming`}[e])}function ce(e){return re({"official-account":`authorityOfficialAccount`,"official-client":`authorityOfficialClient`,"local-observation":`authorityLocalObservation`,estimate:`authorityEstimate`,unavailable:`authorityUnavailable`}[e])}function le(e){l(F,e),l(I,0)}function ue(e){return e===`current`?.34:e===`upcoming`?.12:.08}function de(e,t,n,r,i,a){let o=e.windows.map(t=>{let n=e.lanes.findIndex(e=>e.id===t.laneId);return{value:[n,t.visibleStartMs,t.visibleEndMs],window:t,color:WB(t.providerId,e.lanes[n].billingDomainId)}}),s=a>=e.range.startMs&&a<e.range.endMs;return{animation:!ge(),animationDuration:ge()?0:320,aria:{enabled:!0,decal:{show:!1}},grid:{left:156,right:18,top:42,bottom:14},tooltip:{show:!0,trigger:`item`,renderMode:`html`,confine:!0,className:`quota-timeline-tooltip`,backgroundColor:t.surface,borderColor:t.border,borderWidth:1,padding:[10,12],textStyle:{color:t.text,fontSize:11},extraCssText:`border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.22);`,formatter(e){let t=fe(e);if(!t)return``;let n=t.usedPercent===null?``:`<br/><strong>${pe(t.usedPercent)}% ${he(re(`used`))}</strong>`,r=t.observedAt?oe(Date.parse(t.observedAt)):`—`;return`<strong>${he(t.providerDisplayName)}</strong> · ${he(t.billingDomainDisplayName)}<br/>${he(t.label)} · ${he(se(t.state))}<br/>${he(oe(t.startMs))} → ${he(oe(t.endMs))}${n}<br/>${he(re(`source`))}: ${he(ce(t.authority))} · ${he(re(`updated`))}: ${he(r)}`}},xAxis:{type:`time`,position:`top`,min:e.range.startMs,max:e.range.endMs,splitNumber:i===`weekly`?14:12,axisLine:{lineStyle:{color:t.border}},axisTick:{show:!1},axisLabel:{color:t.muted,fontSize:10,formatter:z},splitLine:{show:!0,lineStyle:{color:t.grid}}},yAxis:{type:`category`,inverse:!0,data:e.lanes.map(e=>`${e.providerDisplayName}\n${e.billingDomainDisplayName}`),axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:(n,r)=>{let i=e.lanes[r];return i?WB(i.providerId,i.billingDomainId):t.text},fontSize:12,fontWeight:600,width:136,overflow:`truncate`,lineHeight:16,formatter:e=>`● ${e}`},splitLine:{show:!0,lineStyle:{color:t.grid}}},series:[{type:`custom`,name:re(`quotaTimelineTitle`),encode:{x:[1,2],y:0},data:o,renderItem(e,n){let r=o[e.dataIndex]??null,i=Number(n.value(0)),a=n.coord([n.value(1),i]),s=n.coord([n.value(2),i]),c=Math.max(18,Math.min(26,n.size([0,1])[1]*.46)),l=Math.max(1,s[0]-a[0]),u=r??o.find(e=>e.value[0]===i&&e.value[1]===n.value(1));if(!u)return null;let d=[{type:`rect`,shape:{x:a[0],y:a[1]-c/2,width:l,height:c,r:8},style:{fill:me(u.color,ue(u.window.state)),stroke:me(u.color,u.window.state===`current`?.72:.38),lineWidth:1,lineDash:u.window.state===`upcoming`?[4,3]:void 0}}];return u.window.usedPercent!==null&&d.push({type:`rect`,shape:{x:a[0],y:a[1]-c/2,width:l*Math.min(100,Math.max(0,u.window.usedPercent))/100,height:c,r:8},style:{fill:me(u.color,.58)}}),l>86&&u.window.state===`current`&&d.push({type:`text`,style:{x:a[0]+8,y:a[1],text:`${pe(u.window.usedPercent)}% · ${oe(u.window.endMs)}`,fill:t.text,font:`600 10px Inter, system-ui, sans-serif`,verticalAlign:`middle`,width:Math.max(0,l-16),overflow:`truncate`}}),{type:`group`,children:d}},markLine:s?{silent:!0,symbol:`none`,lineStyle:{color:t.muted,width:1,opacity:.72},label:{show:!1},data:[{xAxis:a}]}:void 0}]}}function fe(e){if(!e||typeof e!=`object`||!(`data`in e))return null;let t=e.data;return!t||typeof t!=`object`||!(`window`in t)?null:t.window}function pe(e){return e===null?`—`:new Intl.NumberFormat(C(),{maximumFractionDigits:1}).format(e)}function me(e,t){let n=e.replace(`#`,``);return/^[0-9a-f]{6}$/i.test(n)?`rgba(${Number.parseInt(n.slice(0,2),16)}, ${Number.parseInt(n.slice(2,4),16)}, ${Number.parseInt(n.slice(4,6),16)}, ${t})`:e}function he(e){return e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`).replaceAll(`'`,`'`)}function ge(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function _e(e,t,n){let r=getComputedStyle(e).getPropertyValue(t).trim();if(!r)return n;let i=document.createElement(`span`);i.style.color=r,i.style.position=`absolute`,i.style.visibility=`hidden`,e.appendChild(i);let a=getComputedStyle(i).color;return i.remove(),a&&a!==`rgba(0, 0, 0, 0)`?a:n}function ve(){let e=f(j)??f(k);e&&l(ne,{text:_e(e,`--text-strong`,f(ne).text),muted:_e(e,`--muted`,f(ne).muted),surface:_e(e,`--surface-subtle`,f(ne).surface),border:_e(e,`--border`,f(ne).border),grid:_e(e,`--border-soft`,f(ne).grid)})}async function xe(e){f(N)&&(f(N).setOption(e,{notMerge:!0,lazyUpdate:!1}),await m(),f(N).resize())}function Se(e){return l(k,e),ve(),l(N,Uj(e,void 0,{renderer:`canvas`,useDirtyRect:!0})),f(N).getDom().setAttribute(`aria-hidden`,`true`),P=new ResizeObserver(()=>f(N)?.resize()),P.observe(e),window.addEventListener(x,ve),xe(f(y)),{destroy(){window.removeEventListener(x,ve),P?.disconnect(),P=null,f(N)?.dispose(),l(N,null),f(k)===e&&l(k,null)}}}d(()=>(M(S()),M(O()),M(T())),()=>{l(s,IV(S(),`weekly`,0,O(),T()))}),d(()=>(M(S()),f(F),f(I),M(O()),M(T())),()=>{l(c,IV(S(),f(F),f(I),O(),T()))}),d(()=>f(c),()=>{l(p,ae(f(c).range.startMs,f(c).range.endMs))}),d(()=>f(c),()=>{l(h,Math.max(188,70+f(c).lanes.length*48))}),d(()=>(f(c),f(ne),M(C()),M(T()),f(F),M(O())),()=>{l(y,de(f(c),f(ne),C(),T(),f(F),O()))}),d(()=>(f(N),f(y)),()=>{f(N)&&xe(f(y))}),g(),te();var Ce=r(),we=o(Ce),Te=e=>{var n=JV(),r=b(n),o=b(r),s=b(o),d=b(s,!0);L(s);var m=u(s,2),g=b(m);L(m),L(o);var y=u(o,2),x=b(y),S=b(x),C=u(S,2),w=b(C,!0);L(C);var T=u(C,2);L(x);var O=u(x,2),M=b(O),N=b(M,!0);L(M);var P=u(M,2),ee=b(P,!0);L(P),L(O),L(y),L(r);var te=u(r,2),ne=b(te),R=b(ne),ie=u(b(R));L(R);var ae=u(R,2),z=u(b(ae));L(ae);var se=u(ae,2),ue=u(b(se));L(se),L(ne),L(te);var de=u(te,2),fe=e=>{var t=GV(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>re(`quotaTimelineEmpty`))]),i(e,t)},me=e=>{var t=KV(),n=b(t);E(n,e=>l(k,e),()=>f(k)),B(n,e=>Se?.(e)),L(t),H(()=>A(n,`height: ${f(h)}px`)),i(e,t)};V(de,e=>{f(c),a(()=>f(c).lanes.length===0)?e(fe):e(me,-1)});var he=u(de,2),ge=b(he),_e=b(ge),ve=b(_e),ye=b(ve),be=b(ye,!0);L(ye);var xe=u(ye),Ce=b(xe,!0);L(xe);var we=u(xe),Te=b(we,!0);L(we);var Ee=u(we),De=b(Ee,!0);L(Ee);var Oe=u(Ee),ke=b(Oe,!0);L(Oe);var Ae=u(Oe),je=b(Ae,!0);L(Ae);var Me=u(Ae),Ne=b(Me,!0);L(Me),L(ve),L(_e);var Pe=u(_e);_(Pe,5,()=>(f(c),a(()=>f(c).lanes)),e=>e.id,(e,t)=>{var n=qV(),r=b(n),o=b(r,!0);L(r);var s=u(r),c=b(s,!0);L(s);var l=u(s),d=b(l,!0);L(l);var p=u(l),m=b(p,!0);L(p);var h=u(p),g=b(h,!0);L(h);var _=u(h),y=b(_,!0);L(_);var x=u(_),S=b(x,!0);L(x),L(n),H((e,n,r,i)=>{v(o,(f(t),a(()=>f(t).providerDisplayName))),v(c,(f(t),a(()=>f(t).billingDomainDisplayName))),v(d,(f(t),a(()=>f(t).selectedLabel))),v(m,e),v(g,n),v(y,r),v(S,i)},[()=>(f(t),a(()=>f(t).usedPercent===null?`—`:`${pe(f(t).usedPercent)}%`)),()=>(f(t),a(()=>oe(Date.parse(f(t).resetsAt)))),()=>(f(t),a(()=>ce(f(t).authority))),()=>(f(t),a(()=>f(t).observedAt?oe(Date.parse(f(t).observedAt)):`—`))]),i(e,n)}),L(Pe),L(ge),L(he),L(n),E(n,e=>l(j,e),()=>f(j)),H((e,t,r,i,o,s,l,u,m,h,_,y,b,x,E,k,A,j,te,L)=>{D(n,`data-lane-count`,(f(c),a(()=>f(c).lanes.length))),v(d,e),v(g,`${f(p)??``} · ${t??``}`),D(S,`aria-label`,r),C.disabled=f(I)===0,D(C,`aria-label`,i),v(w,o),D(T,`aria-label`,s),D(O,`aria-label`,l),D(M,`aria-pressed`,f(F)===`weekly`),v(N,u),D(P,`aria-pressed`,f(F)===`session`),v(ee,m),v(ie,` ${h??``}`),v(z,` ${_??``}`),v(ue,` ${y??``}`),D(ge,`aria-label`,b),v(be,x),v(Ce,E),v(Te,k),v(De,A),v(ke,j),v(je,te),v(Ne,L)},[()=>a(()=>re(`quotaTimelineTitle`)),()=>a(()=>re(`quotaTimelineCurrentRange`)),()=>a(()=>re(`quotaTimelinePrevious`)),()=>a(()=>re(`quotaTimelineToday`)),()=>a(()=>re(`quotaTimelineToday`)),()=>a(()=>re(`quotaTimelineNext`)),()=>a(()=>re(`quotaTimelineModes`)),()=>a(()=>re(`quotaTimelineWeekly`)),()=>a(()=>re(`quotaTimelineFiveHour`)),()=>a(()=>re(`quotaTimelineCurrent`)),()=>a(()=>re(`quotaTimelineElapsed`)),()=>a(()=>re(`quotaTimelineUpcoming`)),()=>a(()=>re(`quotaTimelineData`)),()=>a(()=>re(`providersLabel`)),()=>a(()=>re(`quotaTimelineAccount`)),()=>a(()=>re(`quota`)),()=>a(()=>re(`used`)),()=>a(()=>re(`resets`)),()=>a(()=>re(`source`)),()=>a(()=>re(`updated`))]),t(`click`,S,()=>l(I,f(I)-1)),t(`click`,C,()=>l(I,0)),t(`click`,T,()=>l(I,f(I)+1)),t(`click`,M,()=>le(`weekly`)),t(`click`,P,()=>le(`session`)),i(e,n)};V(we,e=>{f(s),a(()=>f(s).lanes.length>0)&&e(Te)}),i(e,Ce),ee()}var XV=p(`<span></span>`),ZV=p(`<div class="trend-hover-line svelte-1axsv0d"></div>`),QV=p(`<span class="svelte-1axsv0d"> </span>`),$V=p(`<span class="svelte-1axsv0d"><b class="svelte-1axsv0d"> </b> <small class="svelte-1axsv0d"> </small></span>`),eH=p(`<div class="trend-tooltip svelte-1axsv0d" data-testid="trend-tooltip" role="tooltip"><strong class="svelte-1axsv0d"> </strong> <!></div>`),tH=p(`<span class="svelte-1axsv0d"><i class="svelte-1axsv0d"></i> <!></span>`),nH=p(`<tr><td> </td><td> </td></tr>`),rH=p(`<article class="workbench-trend svelte-1axsv0d"><div class="trend-heading svelte-1axsv0d"><div class="svelte-1axsv0d"><span class="svelte-1axsv0d"> </span> <strong class="svelte-1axsv0d"> </strong></div> <div class="trend-interactions svelte-1axsv0d"><span class="svelte-1axsv0d"> </span> <div class="trend-zoom-controls svelte-1axsv0d" role="group"><button type="button" class="svelte-1axsv0d">−</button> <button type="button" class="svelte-1axsv0d">+</button> <button type="button" class="svelte-1axsv0d">↺</button></div></div></div> <div class="trend-chart svelte-1axsv0d" data-testid="usage-trend-chart"><div data-testid="trend-plot" role="slider" aria-valuemin="0" tabindex="0"><div class="trend-echarts svelte-1axsv0d"></div> <div class="trend-series-markers svelte-1axsv0d" aria-hidden="true"></div> <!> <!></div></div> <div class="trend-legend svelte-1axsv0d" aria-hidden="true"></div> <div class="trend-data svelte-1axsv0d"><table><thead><tr><th> </th><th> </th></tr></thead><tbody></tbody></table></div></article>`);function iH(e,n){ie(n,!1);let s=R(),c=R(),p=R(),h=R(),y=R(),x=R(),S=R();lM([oS,hR,DB]);let T=w(n,`buckets`,8),O=w(n,`metric`,8),k=w(n,`currency`,8),j=w(n,`locale`,24,()=>ye(``)),P=w(n,`selectedWindow`,8),F=w(n,`timeZone`,8),I=w(n,`granularity`,8),ne=w(n,`rangeLabel`,8),oe=w(n,`formatUsageMetric`,8),z=w(n,`describeSegment`,8),B=R(null),se=R(null),ce=R(null),le=null,ue=R(0),de=R(null),fe=R(null),pe=R(null),me=R(!1),he=R(BB),ge=R(VB);function _e(e){return be(j(),e)}function ve(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function Se(e,t){let n=document.createElement(`span`);n.style.color=t,n.style.position=`absolute`,n.style.visibility=`hidden`,e.appendChild(n);let r=getComputedStyle(n).color;return n.remove(),r}function Ce(){let e=f(se)??f(B);if(!e)return;let t=getComputedStyle(e).getPropertyValue(`--trend-grid-line`).trim(),n=getComputedStyle(e).getPropertyValue(`--muted`).trim(),r=t?Se(e,t):``,i=n?Se(e,n):``;l(he,r&&r!==`rgba(0, 0, 0, 0)`?r:BB),l(ge,i&&i!==`rgba(0, 0, 0, 0)`?i:VB)}function we(e){if(f(ce)){let t=f(ce).convertToPixel({xAxisIndex:0},e),n=f(ce).convertToPixel({yAxisIndex:0},Math.max(1,f(h)??1)),r=f(ce).convertToPixel({yAxisIndex:0},0);if(Number.isFinite(t)&&Number.isFinite(n)&&Number.isFinite(r))return`left: ${t}px; top: ${n}px; height: ${Math.max(0,r-n)}px`}return`left: ${$B(e,f(c).length)}%; top: 16px; bottom: 28px`}function Te(){l(ue,0),l(de,null),l(fe,null),l(pe,null),l(me,!1)}function Ee(e,t=.5){let n=KB(T().length,f(ue),f(de),e,t);l(ue,n.start),l(de,n.size),l(fe,null)}function De(e){if(e.deltaY===0)return;let t=e.currentTarget instanceof HTMLElement?e.currentTarget.getBoundingClientRect():null,n=t?.width?(e.clientX-t.left)/t.width:.5;Ee(e.deltaY<0?`in`:`out`,n)}function Oe(e){if(!(e.currentTarget instanceof HTMLElement)||f(c).length===0)return;let t=e.currentTarget.getBoundingClientRect(),n=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width));l(fe,Math.round(n*Math.max(0,f(c).length-1)))}function ke(e){!(e.currentTarget instanceof HTMLElement)||f(s).size>=T().length||(e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),l(pe,{clientX:e.clientX,viewportStart:f(s).start}),l(me,!0))}function Ae(e){if(Oe(e),!f(pe)||!(e.currentTarget instanceof HTMLElement))return;let t=e.currentTarget.getBoundingClientRect(),n=Math.round((f(pe).clientX-e.clientX)/t.width*f(s).size);l(ue,Math.max(0,Math.min(T().length-f(s).size,f(pe).viewportStart+n)))}function je(e){e.currentTarget instanceof HTMLElement&&e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),l(pe,null),l(me,!1)}function Me(e){l(ue,qB(T().length,f(ue),f(de),e)),l(fe,null)}function Ne(e){if(e.key===`+`||e.key===`=`)Ee(`in`);else if(e.key===`-`)Ee(`out`);else if(e.key===`ArrowLeft`)Me(-1);else if(e.key===`ArrowRight`)Me(1);else if(e.key===`Home`)Te();else return;e.preventDefault()}async function Pe(e){f(ce)&&(f(ce).setOption(e,{notMerge:!0,lazyUpdate:!1}),await m(),f(ce).resize())}re(()=>{if(f(B))return Ce(),l(ce,Uj(f(B),void 0,{renderer:`canvas`,useDirtyRect:!0})),f(ce).getDom().setAttribute(`aria-hidden`,`true`),le=new ResizeObserver(()=>f(ce)?.resize()),le.observe(f(B)),window.addEventListener(xe,Ce),()=>{window.removeEventListener(xe,Ce),le?.disconnect(),le=null,f(ce)?.dispose(),l(ce,null)}}),d(()=>(M(T()),f(ue),f(de)),()=>{l(s,GB(T().length,f(ue),f(de)))}),d(()=>(M(T()),f(s)),()=>{l(c,T().slice(f(s).start,f(s).start+f(s).size))}),d(()=>(f(c),M(O())),()=>{l(p,XB(f(c),O()))}),d(()=>f(p),()=>{l(h,ZB(f(p)))}),d(()=>f(p),()=>{l(y,f(p).filter((e,t)=>f(p).findIndex(t=>t.providerId===e.providerId&&t.billingDomainId===e.billingDomainId)===t))}),d(()=>(f(fe),f(c)),()=>{l(x,f(fe)===null?null:f(c)[f(fe)])}),d(()=>(f(c),f(p),f(h),f(he),f(ge),f(me),M(oe()),M(k()),M(O())),()=>{l(S,tV(f(c).map(e=>e.label),f(p),f(h),{gridLine:f(he),label:f(ge)},!f(me)&&!ve(),e=>oe()(e,k(),O())))}),d(()=>(f(ce),f(S)),()=>{f(ce)&&Pe(f(S))}),g(),te();var Fe=rH(),Ie=b(Fe),Le=b(Ie),Re=b(Le),ze=b(Re,!0);L(Re);var U=u(Re,2),Be=b(U,!0);L(U),L(Le);var Ve=u(Le,2),He=b(Ve),Ue=b(He,!0);L(He);var We=u(He,2),Ge=b(We),Ke=u(Ge,2),qe=u(Ke,2);L(We),L(Ve),L(Ie);var Je=u(Ie,2),Ye=b(Je);let Xe;var Ze=b(Ye);E(Ze,e=>l(B,e),()=>f(B));var Qe=u(Ze,2);_(Qe,5,()=>f(p),e=>e.key,(e,t)=>{var n=XV();H(e=>{D(n,`data-cost-purpose`,(f(t),a(()=>f(t).costPurpose??`tokens`))),A(n,e)},[()=>(f(t),M(WB),a(()=>f(t).costPurpose===`reported-estimate`?`fill: transparent; stroke: ${WB(f(t).providerId,f(t).billingDomainId)}`:`fill: ${WB(f(t).providerId,f(t).billingDomainId)}`))]),i(e,n)}),L(Qe);var $e=u(Qe,2),et=e=>{var t=ZV();H(e=>A(t,e),[()=>(f(fe),a(()=>we(f(fe))))]),i(e,t)};V($e,e=>{f(fe),f(c),a(()=>f(fe)!==null&&f(c).length>0)&&e(et)});var tt=u($e,2),nt=e=>{var t=eH(),n=b(t),s=b(n,!0);L(n);var l=u(n,2),d=e=>{var t=QV(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>_e(`gap`))]),i(e,t)},p=e=>{var t=r(),n=o(t);_(n,1,()=>(f(x),a(()=>f(x).segments)),e=>`${e.providerId}:${e.billingDomainId}`,(e,t)=>{var n=$V(),r=b(n),o=b(r,!0);L(r);var s=u(r,2),c=b(s,!0);L(s),L(n),H(e=>{v(o,(f(t),a(()=>f(t).providerDisplayName))),v(c,e)},[()=>(M(z()),f(t),M(O()),a(()=>z()(f(t),O())))]),i(e,n)}),i(e,t)};V(l,e=>{f(x),a(()=>f(x).gap||f(x).segments.length===0)?e(d):e(p,-1)}),L(t),H(e=>{A(t,e),v(s,(f(x),a(()=>f(x).label)))},[()=>(M($B),f(fe),f(c),a(()=>`left: ${$B(f(fe)??0,f(c).length)}%`))]),i(e,t)};V(tt,e=>{f(x)&&e(nt)}),L(Ye),L(Je);var rt=u(Je,2);_(rt,5,()=>f(y),e=>e.key,(e,t)=>{var n=tH(),r=b(n),o=u(r),s=u(o),c=e=>{var t=N();H(e=>v(t,`· ${e??``}`),[()=>a(()=>_e(`separateFromHeadline`))]),i(e,t)};V(s,e=>{f(t),a(()=>f(t).includedInHeadline===!1)&&e(c)}),L(n),H(e=>{A(r,e),v(o,` ${f(t),a(()=>f(t).providerDisplayName)??``} · ${f(t),a(()=>f(t).billingDomainDisplayName)??``} `)},[()=>(M(WB),f(t),a(()=>`background: ${WB(f(t).providerId,f(t).billingDomainId)}`))]),i(e,n)}),L(rt);var it=u(rt,2),at=b(it),ot=b(at),st=b(ot),ct=b(st),lt=b(ct,!0);L(ct);var W=u(ct),ut=b(W,!0);L(W),L(st),L(ot);var dt=u(ot);_(dt,5,T,e=>e.start,(e,t)=>{var n=nH(),r=b(n),o=b(r,!0);L(r);var s=u(r),c=b(s,!0);L(s),L(n),H(e=>{v(o,(f(t),a(()=>f(t).label))),v(c,e)},[()=>(f(t),M(z()),M(O()),a(()=>f(t).gap?_e(`gap`):f(t).segments.map(e=>z()(e,O())).join(`; `)))]),i(e,n)}),L(dt),L(at),L(it),L(Fe),E(Fe,e=>l(se,e),()=>f(se)),H((e,t,n,r,i,o,c,l,u,d,p,m,h)=>{v(ze,e),v(Be,ne()),v(Ue,t),D(We,`aria-label`,n),D(Ge,`aria-label`,r),Ge.disabled=f(de)===null,D(Ke,`aria-label`,i),Ke.disabled=o,D(qe,`aria-label`,c),qe.disabled=f(de)===null&&f(ue)===0,Xe=C(Ye,1,`trend-plot svelte-1axsv0d`,null,Xe,{"trend-panning":f(me)}),D(Ye,`data-total-buckets`,(M(T()),a(()=>T().length))),D(Ye,`data-visible-buckets`,(f(s),a(()=>f(s).size))),D(Ye,`data-viewport-start`,(f(s),a(()=>f(s).start))),D(Ye,`aria-label`,l),D(Ye,`aria-valuemax`,u),D(Ye,`aria-valuenow`,(f(s),a(()=>f(s).start))),D(Ye,`aria-valuetext`,d),D(at,`aria-label`,p),v(lt,m),v(ut,h)},[()=>(M(O()),a(()=>O()===`tokens`?_e(`tokenTrend`):_e(`costTrend`))),()=>a(()=>_e(`trendInteractionHint`)),()=>a(()=>_e(`timeAxisControls`)),()=>a(()=>_e(`zoomOutTimeAxis`)),()=>a(()=>_e(`zoomInTimeAxis`)),()=>(f(de),M(T()),M(4),a(()=>(f(de)??T().length)<=Math.min(4,T().length))),()=>a(()=>_e(`resetTimeAxis`)),()=>a(()=>_e(`interactiveTrend`)),()=>(M(T()),f(s),a(()=>Math.max(0,T().length-f(s).size))),()=>(f(c),a(()=>`${f(c)[0]?.label??`—`} – ${f(c).at(-1)?.label??`—`}`)),()=>(M(P()),M(F()),M(I()),a(()=>`${_e(`trendData`)} · ${P()} · ${F()} · ${I()===`hour`?_e(`precisionHour`):_e(`precisionDay`)} · ${_e(`trendSummary`)}`)),()=>a(()=>_e(`interval`)),()=>(M(O()),a(()=>O()===`tokens`?_e(`tokens`):_e(`cost`)))]),t(`click`,Ge,()=>Ee(`out`)),t(`click`,Ke,()=>Ee(`in`)),t(`click`,qe,()=>Te()),t(`wheel`,Ye,ae(De)),t(`pointerdown`,Ye,ke),t(`pointermove`,Ye,Ae),t(`pointerup`,Ye,je),t(`pointercancel`,Ye,je),t(`pointerleave`,Ye,()=>{f(pe)||l(fe,null)}),t(`keydown`,Ye,Ne),i(e,Fe),ee()}var aH=p(`<link rel="icon" href="/brand/agent-usage-logo.svg"/> <meta name="description"/>`,1),oH=p(`<div id="token-model-costs-panel" data-testid="token-model-costs-panel" role="tabpanel" aria-labelledby="token-model-costs-tab" aria-busy="true"><section class="token-money-workbench initial-workbench-loading svelte-1uha8ag"><p class="module-progress svelte-1uha8ag" role="status" data-testid="model-costs-initial-status"> </p></section></div>`),sH=p(`<div class="state error svelte-1uha8ag" role="alert"> </div>`),cH=p(`<div class="inline-error svelte-1uha8ag" role="status"> </div>`),lH=p(`<div class="state compact svelte-1uha8ag"> </div>`),uH=p(`<div class="agent-skeleton-quota-row svelte-1uha8ag"><div class="agent-skeleton-quota-copy svelte-1uha8ag"><i class="agent-skeleton-block svelte-1uha8ag"></i> <i class="agent-skeleton-block svelte-1uha8ag"></i></div> <i class="agent-skeleton-block agent-skeleton-progress svelte-1uha8ag"></i> <i class="agent-skeleton-block agent-skeleton-meta svelte-1uha8ag"></i></div>`),dH=p(`<div class="agent-card-skeleton-overlay svelte-1uha8ag" aria-hidden="true"><div class="agent-card-skeleton-content svelte-1uha8ag"><div class="agent-skeleton-section-label svelte-1uha8ag"><i class="agent-skeleton-block svelte-1uha8ag"></i></div> <div class="agent-skeleton-quota-list svelte-1uha8ag"></div></div></div>`),fH=p(`<img class="provider-logo svelte-1uha8ag" alt=""/>`),pH=p(`<span class="connection-chip svelte-1uha8ag"><span class="visually-hidden svelte-1uha8ag"> </span> <button class="svelte-1uha8ag"><span aria-hidden="true">⚙</span></button></span>`),mH=p(`<button type="button" role="tab" class="svelte-1uha8ag"> </button>`),hH=p(`<div class="domain-tabs svelte-1uha8ag" role="tablist"></div>`),gH=p(`<small class="svelte-1uha8ag"> </small>`),_H=p(`<label class="secret-field svelte-1uha8ag"><span> </span> <input type="password" autocomplete="off" class="svelte-1uha8ag"/></label>`),vH=p(`<button class="primary-action svelte-1uha8ag"> </button>`),yH=p(`<button class="svelte-1uha8ag"> </button>`),bH=p(`<details open=""><summary class="svelte-1uha8ag"><span class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <!></span> </summary> <div class="inline-connection-body svelte-1uha8ag"><p class="permission svelte-1uha8ag"> </p> <div class="connection-meta svelte-1uha8ag"><span> </span> <span> </span></div> <div class="coverage-list svelte-1uha8ag"><span> </span> <strong class="svelte-1uha8ag"> </strong></div> <!> <div class="connection-actions svelte-1uha8ag"><!> <!> <!></div></div></details>`),xH=p(`<div class="quota-row svelte-1uha8ag"><div class="quota-copy svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <span class="svelte-1uha8ag"> </span></div> <div role="progressbar" aria-valuemin="0" aria-valuemax="100"><span class="svelte-1uha8ag"></span></div> <span hidden=""> </span> <div class="quota-meta svelte-1uha8ag"><span> </span></div></div>`),SH=p(`<!> <div class="section-label svelte-1uha8ag"> </div> <div class="quotas svelte-1uha8ag"></div>`,1),CH=p(`<article><!> <div class="provider-heading svelte-1uha8ag"><!> <div class="provider-heading-copy svelte-1uha8ag"><div class="provider-heading-top svelte-1uha8ag"><h2 class="svelte-1uha8ag"> </h2> <div class="provider-status svelte-1uha8ag"><div class="coverage svelte-1uha8ag"> </div> <!></div></div> <p class="freshness svelte-1uha8ag"><span class="svelte-1uha8ag"></span> <!></p></div></div> <!> <!></article>`),wH=p(`<div id="agent-usage-panel" data-testid="agent-usage-panel" role="tabpanel" aria-labelledby="agent-usage-tab"><section class="providers svelte-1uha8ag"></section> <!></div>`),TH=p(`<button type="button" class="svelte-1uha8ag"> </button>`),EH=p(`<div class="panel-progress svelte-1uha8ag" role="status" data-testid="workbench-summary-refresh-status"><span class="visually-hidden svelte-1uha8ag"> </span></div>`),DH=p(`<div class="panel-progress svelte-1uha8ag" role="status" data-testid="workbench-analysis-refresh-status"><span class="visually-hidden svelte-1uha8ag"> </span></div>`),OH=p(`<div class="plan-value-empty svelte-1uha8ag" data-testid="plan-value-empty"><p class="svelte-1uha8ag"> </p> <button type="button" class="svelte-1uha8ag"> </button></div>`),kH=p(`<div><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div>`),AH=p(`<div class="plan-value-period svelte-1uha8ag" data-testid="plan-value-period"><div class="plan-value-period-heading svelte-1uha8ag"><span> </span> <span data-testid="plan-value-period-progress"> </span></div> <div class="plan-value-meter plan-value-period-meter svelte-1uha8ag" role="img"><span class="plan-value-meter-fill svelte-1uha8ag"></span> <span class="plan-value-pace svelte-1uha8ag"></span></div> <small> </small></div>`),jH=p(`<p class="plan-value-caveat svelte-1uha8ag"> </p>`),MH=p(`<li data-testid="plan-value-row" class="svelte-1uha8ag"><div class="plan-value-row-heading svelte-1uha8ag"><span class="plan-value-name svelte-1uha8ag"><span class="plan-value-swatch svelte-1uha8ag"></span> <strong class="svelte-1uha8ag"> </strong> <small class="svelte-1uha8ag"> </small></span> <span data-testid="plan-value-ratio"> </span></div> <div class="plan-value-meter svelte-1uha8ag" role="img"><span class="plan-value-meter-fill svelte-1uha8ag"></span> <span class="plan-value-break-even svelte-1uha8ag"></span></div> <dl class="plan-value-facts svelte-1uha8ag"><div><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <!></dl> <!> <!></li>`),NH=p(`<div class="plan-value-body svelte-1uha8ag"><!> <ol class="plan-value-ranking svelte-1uha8ag" data-testid="plan-value-ranking"></ol></div> <p class="plan-value-note svelte-1uha8ag"> </p>`,1),PH=p(`<li class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <span> </span> <span> </span></li>`),FH=p(`<li class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <span> </span> <button type="button" class="svelte-1uha8ag"> </button></li>`),IH=p(`<ul class="plan-value-aside svelte-1uha8ag" data-testid="plan-value-aside"><!> <!></ul>`),LH=p(`<section class="plan-value svelte-1uha8ag" data-testid="plan-value" aria-labelledby="plan-value-heading"><div class="plan-value-heading svelte-1uha8ag"><h3 id="plan-value-heading" class="svelte-1uha8ag"> </h3> <small class="svelte-1uha8ag"> </small></div> <!> <!></section>`),RH=p(`<div class="panel-progress svelte-1uha8ag" role="status" data-testid="workbench-breakdown-refresh-status"><span class="visually-hidden svelte-1uha8ag"> </span></div>`),zH=p(`<div class="treemap-wrap svelte-1uha8ag" role="tabpanel"><!> <p class="treemap-hint svelte-1uha8ag"> </p></div>`),BH=p(`<div class="treemap-wrap svelte-1uha8ag" role="tabpanel"><!></div>`),VH=p(`<img class="ranking-logo svelte-1uha8ag" alt=""/>`),HH=p(`<span class="model-share-track svelte-1uha8ag" data-testid="model-share-meter" role="meter" aria-valuemin="0" aria-valuemax="100"><i class="svelte-1uha8ag"></i></span>`),UH=p(`<li><button type="button" data-testid="model-ranking-row" class="svelte-1uha8ag"><span class="ranking-identity svelte-1uha8ag"><!> <span class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <small class="svelte-1uha8ag"> </small> <!></span></span> <span class="ranking-value svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong></span> <span class="ranking-value ranking-share-value svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <!></span> <span class="ranking-value svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong></span></button></li>`),WH=p(`<div role="tabpanel"><ol class="ranking-list svelte-1uha8ag"></ol></div>`),GH=p(`<section class="token-money-workbench svelte-1uha8ag" data-testid="token-money-workbench" aria-labelledby="token-money-workbench-heading"><div class="usage-toolbar svelte-1uha8ag"><div><h2 id="token-money-workbench-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong><span class="svelte-1uha8ag">/</span> </p></div> <div class="workbench-controls svelte-1uha8ag"><div class="segmented-control svelte-1uha8ag" role="group"><button type="button" class="svelte-1uha8ag"> </button> <button type="button" class="svelte-1uha8ag"> </button></div> <div class="history-toolbar svelte-1uha8ag"></div> <div class="segmented-control svelte-1uha8ag" role="group"></div></div></div> <section class="usage-summary-board svelte-1uha8ag" data-testid="usage-summary-board"><!> <div class="usage-headline svelte-1uha8ag" data-testid="usage-headline"><strong class="svelte-1uha8ag"> </strong></div> <div class="usage-totals svelte-1uha8ag" data-testid="usage-totals" aria-labelledby="usage-totals-heading"><h3 id="usage-totals-heading" class="svelte-1uha8ag"> </h3> <dl class="svelte-1uha8ag"><div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div></dl></div></section> <div class="usage-overview-grid svelte-1uha8ag" data-testid="usage-analysis-grid"><!> <section class="usage-summary svelte-1uha8ag" aria-labelledby="provider-share-heading"><div class="provider-share-heading svelte-1uha8ag"><h3 id="provider-share-heading" class="svelte-1uha8ag"> </h3> <small class="svelte-1uha8ag"> </small></div> <!></section> <!></div> <!> <section class="model-ranking svelte-1uha8ag" data-testid="usage-breakdown" aria-labelledby="model-ranking-heading"><!> <div class="ranking-heading svelte-1uha8ag"><div><h3 id="model-ranking-heading" class="svelte-1uha8ag"> </h3></div> <div class="segmented-control svelte-1uha8ag" role="tablist" data-testid="breakdown-view-tabs"><button type="button" role="tab" class="svelte-1uha8ag"> </button> <button type="button" role="tab" class="svelte-1uha8ag"> </button> <button type="button" role="tab" class="svelte-1uha8ag"> </button></div></div> <div class="breakdown-header svelte-1uha8ag" aria-hidden="true"><span class="svelte-1uha8ag"> </span> <span class="svelte-1uha8ag"> </span> <span class="svelte-1uha8ag"> </span> <span class="svelte-1uha8ag"> </span></div> <!></section></section>`),KH=p(`<div id="token-model-costs-panel" data-testid="token-model-costs-panel" role="tabpanel" aria-labelledby="token-model-costs-tab"><!></div>`),qH=p(`<!> <!> <!>`,1),JH=p(`<p class="settings-error svelte-1uha8ag" role="status"> </p>`),YH=p(`<article tabindex="-1"><div class="settings-connector-title svelte-1uha8ag"><strong> </strong> <span class="svelte-1uha8ag"> </span></div> <p class="svelte-1uha8ag"> </p> <small class="svelte-1uha8ag"> </small> <!> <div class="connection-actions svelte-1uha8ag"><!> <!> <!> <!></div></article>`),XH=p(`<option> </option>`),ZH=p(`<div class="plan-settings-price svelte-1uha8ag"><label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.01" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="text" maxlength="3" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <select class="svelte-1uha8ag"><option> </option><option> </option></select></label></div> <label class="svelte-1uha8ag"><span> </span> <input type="date" class="svelte-1uha8ag"/> <small class="svelte-1uha8ag"> </small></label>`,1),QH=p(`<label class="svelte-1uha8ag"><span> </span> <select class="svelte-1uha8ag"><option> </option><!><option> </option></select></label> <!> <div class="plan-settings-actions svelte-1uha8ag"><button type="button" class="svelte-1uha8ag"> </button> <!></div>`,1),$H=p(`<article class="svelte-1uha8ag"><div class="plan-settings-heading svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <small class="svelte-1uha8ag"> </small></div> <!></article>`),eU=p(`<div class="plan-settings svelte-1uha8ag"></div>`),tU=p(`<div class="monitoring-controls svelte-1uha8ag"><label class="svelte-1uha8ag"><input type="checkbox"/> </label> <label class="svelte-1uha8ag"><input type="checkbox"/> </label> <label class="svelte-1uha8ag"><input type="checkbox"/> </label></div>`),nU=p(`<p class="svelte-1uha8ag"> </p>`),rU=p(`<code class="svelte-1uha8ag"> </code>`),iU=p(`<article tabindex="-1"><div class="svelte-1uha8ag"><strong> </strong> <span class="svelte-1uha8ag"> </span></div> <small class="svelte-1uha8ag"> </small> <!> <!></article>`),aU=p(`<div class="diagnostics-grid svelte-1uha8ag"></div>`),oU=p(`<div class="settings-backdrop svelte-1uha8ag" role="presentation"><div class="settings-drawer svelte-1uha8ag" role="dialog" aria-modal="true" aria-labelledby="settings-heading" tabindex="-1"><div class="settings-header svelte-1uha8ag"><div class="svelte-1uha8ag"><p class="eyebrow svelte-1uha8ag"> </p> <h2 id="settings-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"> </p></div> <button class="settings-close svelte-1uha8ag">×</button></div> <div class="settings-content svelte-1uha8ag"><section aria-labelledby="settings-connections-heading" class="svelte-1uha8ag"><div class="settings-section-heading svelte-1uha8ag"><h2 id="settings-connections-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"> </p></div> <!> <div class="settings-connections svelte-1uha8ag"></div></section> <section aria-labelledby="plans-heading" data-settings-target="plans" data-testid="settings-plans" tabindex="-1"><div class="settings-section-heading svelte-1uha8ag"><h2 id="plans-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"> </p></div> <!> <!></section> <section class="monitoring-section svelte-1uha8ag" aria-labelledby="monitoring-heading"><div class="settings-section-heading svelte-1uha8ag"><h2 id="monitoring-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"> </p></div> <!> <!></section> <section class="diagnostics-section svelte-1uha8ag" aria-labelledby="diagnostics-heading"><div class="settings-section-heading svelte-1uha8ag"><h2 id="diagnostics-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"> </p></div> <!> <!></section> <section class="privacy-section svelte-1uha8ag" aria-labelledby="privacy-heading"><div class="settings-section-heading svelte-1uha8ag"><h2 id="privacy-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"> </p></div> <!> <!> <div class="privacy-actions svelte-1uha8ag"><button class="svelte-1uha8ag"> </button> <button class="svelte-1uha8ag"> </button> <label class="svelte-1uha8ag"><input type="checkbox"/> </label> <label class="svelte-1uha8ag"><input type="checkbox"/> </label> <button class="danger-action svelte-1uha8ag"> </button> <small class="svelte-1uha8ag"> </small> <button class="danger-action svelte-1uha8ag"> </button></div></section></div></div></div>`),sU=p(`<span class="model-price-source svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span>`),cU=p(`<div class="model-detail-backdrop svelte-1uha8ag" role="presentation"><div class="model-detail-drawer svelte-1uha8ag" role="dialog" aria-modal="true" tabindex="-1"><div class="model-detail-header svelte-1uha8ag"><div><p class="eyebrow svelte-1uha8ag"> </p> <h2 class="svelte-1uha8ag"> </h2> <!></div> <button class="svelte-1uha8ag">×</button></div> <div class="model-detail-content svelte-1uha8ag"><div class="model-detail-summary svelte-1uha8ag" data-testid="model-detail-summary"><span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></span></div> <section class="model-activity svelte-1uha8ag" aria-labelledby="model-activity-heading"><h3 id="model-activity-heading" class="svelte-1uha8ag"> </h3> <!></section> <section class="model-evidence-summary svelte-1uha8ag" data-testid="model-evidence-summary" aria-labelledby="model-evidence-heading"><h3 id="model-evidence-heading" class="svelte-1uha8ag"> </h3> <div class="svelte-1uha8ag"><span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span> <!></div></section></div></div></div>`),lU=p(`<main class="shell svelte-1uha8ag"><header class="product-header svelte-1uha8ag"><img class="product-logo svelte-1uha8ag" src="/brand/agent-usage-logo.svg"/> <h1 class="visually-hidden svelte-1uha8ag"> </h1> <div class="dashboard-tabs svelte-1uha8ag" role="tablist"><button id="agent-usage-tab" type="button" role="tab" aria-controls="agent-usage-panel" class="svelte-1uha8ag"> </button> <button id="token-model-costs-tab" type="button" role="tab" aria-controls="token-model-costs-panel" class="svelte-1uha8ag"> </button></div> <div class="header-actions svelte-1uha8ag"><button class="settings-toggle svelte-1uha8ag"> </button> <button class="theme-toggle svelte-1uha8ag"><span class="theme-icon svelte-1uha8ag" aria-hidden="true"> </span> </button> <button class="locale-toggle svelte-1uha8ag"> </button> <button class="refresh svelte-1uha8ag"><span aria-hidden="true">↻</span> </button></div></header> <!></main> <!> <!>`,1);function uU(p,w){ie(w,!1);let T=()=>e(ke,`$themePreference`,ae),O=()=>e(Ae,`$activeTheme`,ae),[ae,oe]=h(),B=R(),ce=R(),le=R(),ue=R(),fe=R(),pe=R(),me=R(),he=[{id:`codex`,displayName:`Codex`},{id:`claude-code`,displayName:`Claude Code`},{id:`opencode-go`,displayName:`OpenCode Go`},{id:`grok`,displayName:`Grok`}],ge=new Set(he.map(e=>e.id)),ve=R(`en`),xe=R(),Se=R(null),Ce=R(he),we=R({}),Te=R(Object.fromEntries(he.map(e=>[e.id,!0]))),Ee=new Set,De=R(!0),Oe=R(!1),je=R(!1),Me=R(!1),Ne=R(!1),Pe=R(!1),Fe=R(!1),Ie=R(!1),ze=R(!1),U=R([]),Be=R(null),Ve=R({}),He=R({}),Ue=R(`agents`),We=R(`7d`),Ge=R(`CNY`),Ke=R(`retail-equivalent`),qe=R(`list`),Je=R(null),Ye=null,Xe=R(null),Ze=R(`UTC`),Qe=R(null),$e=R(null),et=R(!1),tt=R({}),nt=R(null),rt=R(null),it=!1,at=R(null),ot=R(!1),st=R(!1),ct=R(!1),lt=R(!1),W=R(!1),ut=R(null),dt=null,ft=R(!1),pt=R(null),mt=R(null),ht=null,G=R(null),K=R(),gt=R(),_t=R(),vt=!1,yt=0,bt={},xt=0,St=_e(()=>At());re(async()=>{Le(),l(ve,ye(navigator.language)),document.documentElement.lang=f(ve),l(Ze,Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`),l(We,wn()),l(Ge,Tn()),await Promise.all([Et(),Dt(),X(),Nt(),Pt(),Bt(),Vt()]),f(rt)||await zt(),Ut();let e=new URL(window.location.href).searchParams.get(`settings`);e&&await Yt(e,!1)}),I(()=>{vt=!0,dt&&clearInterval(dt),St.dispose()});function q(e){return be(f(ve),e)}function Ct(){return f(Ke)===`tokens`?q(`tokenShare`):q(`costShare`)}function J(){l(ve,f(ve)===`en`?`zh-CN`:`en`),document.documentElement.lang=f(ve)}let wt=[`system`,`light`,`dark`];function Tt(){let e=wt[(wt.indexOf(T())+1)%wt.length];Re(e)}function Y(e){return q({system:`themeSystem`,light:`themeLight`,dark:`themeDark`}[e])}async function Et(){let e=++yt,t=f(We),n=f(Ge);try{let r=new URLSearchParams({window:t,timeZone:f(Ze),currency:n}),i=await fetch(`/api/overview?${r}`);if(!i.ok)throw Error(`HTTP ${i.status}`);let a=await i.json();if(vt||e!==yt)return;l(Se,a),l(je,!1),Mt()}catch{e===yt&&l(je,!0)}}async function Dt(){l(De,!0);let e=new Set([...ge,...Ee]),t=[...e].map(e=>Ot(e));try{let n=await fetch(`/api/overview/providers`);if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();if(vt)return;let i=r.providers.filter(e=>e.id!==`opencode`),a=new Map(i.map(e=>[e.id,e]));Ee=new Set(a.keys()),l(Ce,[...he.map(e=>a.get(e.id)??e),...i.filter(e=>!ge.has(e.id))]),l(De,!1);let o=i.filter(t=>!e.has(t.id)).map(e=>Ot(e.id));await Promise.all([...t,...o])}catch{vt||l(De,!1),await Promise.all(t)}}async function Ot(e){let t=(bt[e]??0)+1;bt={...bt,[e]:t},l(Te,{...f(Te),[e]:!0});try{let n=new URLSearchParams({window:f(We),timeZone:f(Ze),currency:f(Ge)}),r=await fetch(`/api/overview/providers/${encodeURIComponent(e)}?${n}`);if(!r.ok)throw Error(`HTTP ${r.status}`);let i=await r.json();if(vt||bt[e]!==t)return;l(we,{...f(we),[e]:i})}catch{}finally{!vt&&bt[e]===t&&l(Te,{...f(Te),[e]:!1})}}async function kt(){await jt(`manual`)}async function At(){await jt(`automatic`)}async function jt(e){l(Oe,!0);try{let t=await fetch(e===`automatic`?`/api/refresh?mode=automatic&background=true`:`/api/refresh?background=true`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);await Promise.all([Et(),Dt(),zt()]),await Vt(),Ut(),l(Me,!1)}catch{l(Me,!0)}finally{vt||(l(Oe,!1),Mt())}}function Mt(){vt||!f(Se)||!it||St.schedule(f(Se),f(rt),f(Oe))}async function X(){try{let e=await fetch(`/api/connectors`);if(!e.ok)throw Error(`HTTP ${e.status}`);l(U,await e.json()),l(Ne,!1)}catch{l(Ne,!0)}}async function Nt(){try{let e=await fetch(`/api/monitoring`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();l(Qe,t.settings),l(Pe,!1)}catch{l(Pe,!0)}}async function Pt(){try{let e=await fetch(`/api/plans`);if(!e.ok)throw Error(`HTTP ${e.status}`);l($e,await e.json()),l(tt,It(f($e))),l(et,!1)}catch{l(et,!0)}}function Ft(e,t){return`${e}:${t}`}function It(e){let t=new Map(e.subscriptions.map(e=>[Ft(e.providerId,e.billingDomainId),e]));return Object.fromEntries(e.domains.map(e=>{let n=Ft(e.providerId,e.billingDomainId),r=t.get(n);return[n,{selection:r?r.priceSource===`catalog-preset`&&r.planId||`custom`:`none`,amount:r?String(r.amount):``,currency:r?.currency??`USD`,billingPeriod:r?.billingPeriod??`monthly`,anchorDate:r?.anchorDate??``}]}))}function Lt(e,t){let n=f(tt)[e];if(!n)return;let r={...n,...t};if(t.selection&&t.selection!==`custom`&&t.selection!==`none`){let e=f($e)?.domains.flatMap(e=>e.presets).find(e=>e.id===t.selection);e&&(r.amount=String(e.amount),r.currency=e.currency,r.billingPeriod=e.billingPeriod)}l(tt,{...f(tt),[e]:r})}async function Rt(e,t){let n=Ft(e,t),r=f(tt)[n];if(!r)return;let i=Number(r.amount),a=r.selection===`none`?null:{planId:r.selection===`custom`?null:r.selection,amount:Number.isFinite(i)&&i>0?i:void 0,currency:r.currency,billingPeriod:r.billingPeriod,anchorDate:r.anchorDate===``?null:r.anchorDate};l(nt,n);try{let n=await fetch(`/api/plans`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify({providerId:e,billingDomainId:t,plan:a})});if(!n.ok)throw Error(`HTTP ${n.status}`);l($e,await n.json()),l(tt,It(f($e))),l(et,!1),await Et()}catch{l(et,!0)}finally{l(nt,null)}}async function zt(){try{let e=await fetch(`/api/doctor`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();if(vt)return;l(rt,t),l(Fe,!1)}catch{l(Fe,!0)}finally{vt||(it=!0,Mt())}}async function Bt(){try{let e=await fetch(`/api/retention`);if(!e.ok)throw Error(`HTTP ${e.status}`);l(at,await e.json()),l(Ie,!1)}catch{l(Ie,!0)}}async function Vt(){try{let e=await fetch(`/api/processing`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json(),n=f(ut);l(ut,t),Ht(n,t,`discovery`)&&X(),Ht(n,t,`usage`)&&(Dt(),Et()),Ht(n,t,`pricing`)&&Et(),Ht(n,t,`retention`)&&Bt(),l(lt,t.hardRebuild&&Object.values(t.modules).some(e=>e.state===`pending`||e.state===`running`)),dt&&Object.values(t.modules).every(e=>e.state===`ready`||e.state===`failed`)&&(clearInterval(dt),dt=null)}catch{}}function Ht(e,t,n){return e!==null&&e.modules[n].state!==`ready`&&t.modules[n].state===`ready`}function Ut(){dt||f(ut)&&Object.values(f(ut).modules).every(e=>e.state===`ready`||e.state===`failed`)||(dt=setInterval(()=>void Vt(),1e3))}async function Wt(){if(window.confirm(q(`hardRebuildConfirmation`))){l(lt,!0);try{let e=await fetch(`/api/rebuild`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({confirmExpensiveOperation:!0})});if(e.status!==202)throw Error(`HTTP ${e.status}`);await Vt(),Ut(),l(ze,!1)}catch{l(lt,!1),l(ze,!0)}}}function Gt(e){return`/api/export?${new URLSearchParams({format:e,window:f(We),timeZone:f(Ze),currency:f(Ge),includeAccountIdentifiers:String(f(st))})}`}async function Kt(e){try{let t=await fetch(Gt(e));if(!t.ok)throw Error(`HTTP ${t.status}`);let n=URL.createObjectURL(await t.blob()),r=document.createElement(`a`);r.href=n,r.download=`agent-usage-${f(We)}.${e}`,r.click(),URL.revokeObjectURL(n),l(ze,!1)}catch{l(ze,!0)}}async function qt(){if(window.confirm(q(`clearConfirmation`))){l(ct,!0);try{let e=await fetch(`/api/data`,{method:`DELETE`,headers:{"content-type":`application/json`},body:JSON.stringify({deleteProductSecrets:f(ot)})});if(!e.ok)throw Error(`HTTP ${e.status}`);l(ot,!1),await Promise.all([Et(),Dt(),X(),zt(),Bt()]),l(ze,!1)}catch{l(ze,!0)}finally{l(ct,!1)}}}async function Jt(e){try{let t=await fetch(`/api/monitoring/settings`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(`HTTP ${t.status}`);l(Qe,await t.json()),l(Pe,!1)}catch{l(Pe,!0)}}async function Z(e,t){l(Be,e);try{let n=await fetch(`/api/connectors/${encodeURIComponent(e)}/action`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:t,...t===`connect`&&f(Ve)[e]?{secret:f(Ve)[e]}:{}})});if(!n.ok)throw Error(`HTTP ${n.status}`);await n.json(),l(Ve,{...f(Ve),[e]:``}),await Promise.all([X(),Et(),Dt(),zt()])}catch{l(Ne,!0)}finally{l(Be,null)}}async function Yt(e=null,t=!0){if(!f(ft)){let e=document.activeElement;ht=e instanceof HTMLElement&&e!==document.body?e:null}if(l(ft,!0),l(pt,e),t){let t=new URL(window.location.href);e?t.searchParams.set(`settings`,e):t.searchParams.set(`settings`,`root`),window.history.replaceState(null,``,t)}await m(),((e?[...document.querySelectorAll(`[data-settings-target]`)].find(t=>t.dataset.settingsTarget===e):null)??f(G))?.focus()}async function Xt(){let e=ht;l(ft,!1),l(pt,null),ht=null;let t=new URL(window.location.href);t.searchParams.delete(`settings`),window.history.replaceState(null,``,t),await m(),(e?.isConnected?e:f(mt))?.focus()}function Zt(e){let t=f(Je)?f(Xe):f(ft)?f(G):null;e.key===`Tab`&&t?Qt(e,t):f(Je)&&e.key===`Escape`?qn():f(ft)&&e.key===`Escape`&&Xt()}function Qt(e,t){let n=[...t.querySelectorAll(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])`)].filter(e=>!e.hidden&&e.getAttribute(`aria-hidden`)!==`true`);if(n.length===0){e.preventDefault(),t.focus();return}let r=n[0],i=n.at(-1),a=document.activeElement;e.shiftKey&&(a===t||a===r||!t.contains(a))?(e.preventDefault(),i.focus()):!e.shiftKey&&a===i&&(e.preventDefault(),r.focus())}function $t(e){if(![`ArrowLeft`,`ArrowRight`,`Home`,`End`].includes(e.key))return;let t=[...e.currentTarget.parentElement.querySelectorAll(`[role="tab"]`)],n=t.indexOf(e.currentTarget),r=e.key===`Home`?0:e.key===`End`?t.length-1:(n+(e.key===`ArrowRight`?1:-1)+t.length)%t.length;e.preventDefault(),t[r]?.focus(),t[r]?.click()}function en(e){return q({"not-checked":`notChecked`,"not-installed":`notInstalled`,discovered:`discovered`,connected:`connected`,skipped:`skipped`,error:`connectionError`}[e])}function tn(e){return q(e===`official-client`?`officialClient`:e===`agent-usage`?`managedSecret`:`noCredential`)}function nn(e){let t={codex:`codexPermission`,"claude-code":`claudePermission`,"opencode-go":`openCodePermission`,grok:`grokPermission`,"xai-api":`xaiPermission`}[e.id];return t?q(t):e.permissionDescription}function rn(e){return e.status===`healthy`?q(`healthy`):e.category?q({"missing-binary":`diagnosticMissingBinary`,"not-configured":`diagnosticNotConfigured`,unauthorized:`diagnosticUnauthorized`,unsupported:`diagnosticUnsupported`,"schema-mismatch":`diagnosticSchemaMismatch`,"rate-limited":`diagnosticRateLimited`,timeout:`diagnosticTimeout`,stale:`diagnosticStale`,unavailable:`diagnosticUnavailable`}[e.category]):q(`diagnosticUnavailable`)}function an(e){return!e.recovery||f(ve)===`en`?e.recovery:e.category?q({"missing-binary":`recoveryMissingBinary`,"not-configured":`recoveryNotConfigured`,unauthorized:`recoveryUnauthorized`,unsupported:`recoveryUnsupported`,"schema-mismatch":`recoverySchemaMismatch`,"rate-limited":`recoveryRateLimited`,timeout:`recoveryTimeout`,stale:`recoveryStale`,unavailable:`recoveryUnavailable`}[e.category]):q(`recoveryUnavailable`)}function on(e){return new Intl.NumberFormat(f(ve)).format(e)}function sn(e){return Math.abs(e)<1e4?on(e):new Intl.NumberFormat(f(ve),{compactDisplay:`short`,maximumFractionDigits:1,notation:`compact`}).format(e)}function cn(e){return`${on(e)} ${q(`tokens`)}`}function ln(e){return e===null?q(`notAvailable`):new Intl.NumberFormat(f(ve),{style:`percent`,maximumFractionDigits:1}).format(e)}function un(e){return e?new Intl.DateTimeFormat(f(ve),{hour:`2-digit`,minute:`2-digit`,month:`short`,day:`numeric`}).format(new Date(e)):`—`}function dn(e){if(!e)return`—`;let t=new Date(e).getTime()-Date.now(),n=Math.abs(t),[r,i]=n>=864e5?[864e5,`day`]:n>=36e5?[36e5,`hour`]:n>=6e4?[6e4,`minute`]:[1e3,`second`];return new Intl.RelativeTimeFormat(f(ve),{numeric:`auto`}).format(Math.round(t/r),i)}function fn(e){return q({"official-account":`authorityOfficialAccount`,"official-client":`authorityOfficialClient`,"local-observation":`authorityLocalObservation`,estimate:`authorityEstimate`,unavailable:`authorityUnavailable`,mixed:`authorityMixed`}[e])}function pn(e){return q({complete:`coverageComplete`,partial:`coveragePartial`,unavailable:`coverageUnavailable`}[e])}function mn(e){return q(e===`account-wide`?`accountWide`:e===`this-mac`?`localOnly`:`unknown`)}function hn(e,t){if(e.length===0)return{...t,total:t.input+t.output+t.cacheRead+t.cacheWrite};let n={total:0,input:0,output:0,reasoning:0,cacheRead:0,cacheWrite:0};for(let t of e)n.input+=t.tokenTotals.input,n.output+=t.tokenTotals.output,t.tokenSemantics.reasoning===`separate`&&(n.reasoning+=t.tokenTotals.reasoning),t.tokenSemantics.cacheRead===`separate`&&(n.cacheRead+=t.tokenTotals.cacheRead),t.tokenSemantics.cacheWrite===`separate`&&(n.cacheWrite+=t.tokenTotals.cacheWrite);return n.total=n.input+n.output+n.reasoning+n.cacheRead+n.cacheWrite,n}function gn(e){let t=Object.create(null);return e.flatMap(e=>{let n=e.priceSnapshot;return!n||t[n.id]?[]:(t[n.id]=!0,[n])})}function _n(e){let t=e.trend.map(()=>0);for(let n of e.observations){let r=0,i=e.trend.length-1;for(;r<=i;){let a=Math.floor((r+i)/2),o=e.trend[a];if(n.observedAt<o.start)i=a-1;else if(n.observedAt>=o.end)r=a+1;else{t[a]+=n.recordedTokens;break}}}return e.trend.map((e,n)=>{let r=e.retailEquivalent.status!==`unavailable`&&e.retailEquivalent.amount!==null?e.retailEquivalent:e.reportedEstimate??e.retailEquivalent;return{recordedTokens:e.gap?null:t[n],costAmount:r.amount,costCurrency:r.comparisonCurrency}})}function vn(e){return q({"source-reported":`derivationSourceReported`,"reconciled-remainder":`derivationReconciledRemainder`,categorized:`derivationCategorized`,"legacy-total":`derivationLegacyTotal`}[e]??`unknown`)}function yn(e){return q({quota:`quota`,tokens:`tokens`,"actual-cost":`actualCost`,history:`history`}[e])}function bn(e,t){let n=e.billingDomains??[];return n.find(e=>e.id===t)??n[0]??{id:`combined`,displayName:e.displayName,freshness:e.freshness,health:e.health,coverage:e.coverage,quotaBuckets:e.quotaBuckets,tokenTotals:e.tokenTotals,tokenEvidence:e.tokenEvidence,tokenAuthority:e.tokenAuthority,costs:[],balances:[],invoices:[],history:xn(e.tokenTotals,[],e.tokenAuthority,e.tokenEvidence),forecasts:[],forecastCoverage:e.forecastCoverage}}function xn(e,t,n,r=In()){return{window:f(We),start:``,end:``,timeZone:f(Ze),tokenTotals:e,tokenEvidence:r,models:[],unclassified:{tokenTotals:Fn(),tokenEvidence:In(),authorities:[],lastObservedAt:null},days:[],intervals:[],costs:t.map(e=>({kind:e.kind,currency:e.currency,amount:e.amount,convertedAmount:null,comparisonCurrency:`CNY`,conversionUnavailableReason:e.amount===null?`unknown-native-amount`:`missing-rate`,priceSnapshots:e.priceSnapshot?[e.priceSnapshot]:[],authorities:[e.authority],observedAt:e.observedAt})),exchangeRates:[],authorities:n===`mixed`?void 0:n?[n]:[],lastObservedAt:null}}async function Sn(e){if(f(We)===e&&!f(W))return;l(We,e);try{localStorage.setItem(`agent-usage:history-window`,e)}catch{}let t=++xt;l(W,!0);try{await Et()}finally{t===xt&&l(W,!1)}}async function Cn(e){if(f(Ge)===e)return;l(Ge,e);try{localStorage.setItem(`agent-usage:comparison-currency`,e)}catch{}let t=++xt;l(W,!0);try{await Et()}finally{t===xt&&l(W,!1)}}function wn(){try{let e=localStorage.getItem(`agent-usage:history-window`);return e===`24h`||e===`7d`||e===`30d`?e:`7d`}catch{return`7d`}}function Tn(){try{let e=localStorage.getItem(`agent-usage:comparison-currency`);return e===`USD`||e===`CNY`?e:`CNY`}catch{return`CNY`}}function En(e,t){l(He,{...f(He),[e]:t})}function Dn(e,t,n){return e.find(e=>e.target.provider.id===t&&e.target.billingDomain.id===n)}function On(e){return{codex:{dark:`/brands/openai.svg`,light:`/brands/openai.svg`},"claude-code":{dark:`/brands/claude.svg`,light:`/brands/claude.svg`},"opencode-go":{dark:`/brands/opencode-dark.svg`,light:`/brands/opencode-light.svg`},opencode:{dark:`/brands/opencode-dark.svg`,light:`/brands/opencode-light.svg`},grok:{dark:`/brands/grok-light.svg`,light:`/brands/grok-dark.svg`}}[e]??null}function kn(e,t){return t===`dark`?e.dark:e.light}function An(e,t,n=[]){let r=e.providers.filter(e=>e.id!==`opencode`).map(e=>({...e,billingDomains:[...e.billingDomains??[]]}));for(let e of t){let{provider:t,billingDomain:n}=e.target,i=r.find(e=>e.id===t.id);i||(i=Nn(t.id,t.displayName),r.push(i)),i.billingDomains.some(e=>e.id===n.id)||i.billingDomains.push(Pn(n.id,n.displayName))}for(let t of n){let n=r.find(e=>e.id===t.id);n?e.providers.some(e=>e.id===n.id)||(n.displayName=t.displayName):r.push(Nn(t.id,t.displayName))}let i={codex:0,"claude-code":1,"opencode-go":2,grok:3};return r.sort((e,t)=>(i[e.id]??100)-(i[t.id]??100)||e.displayName.localeCompare(t.displayName))}function jn(e){let t=e=>/\b5\s*hours?\b/i.test(e.label)?0:/\b(?:week|weekly)\b/i.test(e.label)?1:/\b(?:month|monthly)\b/i.test(e.label)?2:3;return e.map((e,t)=>({bucket:e,sourceIndex:t})).sort((e,n)=>t(e.bucket)-t(n.bucket)||e.sourceIndex-n.sourceIndex).map(({bucket:e})=>e)}function Mn(e,t){return An(e,t,f(Ce)).flatMap(e=>(e.billingDomains.length>0?e.billingDomains:[bn(e,void 0)]).flatMap(t=>{let n=jn(t.quotaBuckets);return n.length===0?[]:[{providerId:e.id,providerDisplayName:e.displayName,billingDomainId:t.id,billingDomainDisplayName:t.displayName,observedAt:t.freshness?.lastSuccessAt??e.freshness.lastSuccessAt,quotaBuckets:n}]}))}function Nn(e,t){return{id:e,displayName:t,summaryBillingDomainId:null,freshness:{status:`unavailable`,lastSuccessAt:null},health:{status:`healthy`,errorCode:null,message:null,recovery:null},coverage:{quota:`unavailable`,tokens:`unavailable`,actualCost:`unavailable`,history:`unavailable`},quotaBuckets:[],tokenTotals:Fn(),tokenEvidence:In(),tokenAuthority:null,billingDomains:[],forecasts:[],forecastCoverage:`insufficient`}}function Pn(e,t){let n=Fn();return{id:e,displayName:t,freshness:{status:`unavailable`,lastSuccessAt:null},health:{status:`healthy`,errorCode:null,message:null,recovery:null},coverage:{quota:`unavailable`,tokens:`unavailable`,actualCost:`unavailable`,history:`unavailable`},quotaBuckets:[],tokenTotals:n,tokenEvidence:In(),tokenAuthority:null,costs:[],balances:[],invoices:[],history:xn(n,[],null),forecasts:[],forecastCoverage:`insufficient`}}function Fn(){return{total:0,input:0,output:0,reasoning:0,cacheRead:0,cacheWrite:0}}function In(){return{recordedTokens:0,sourceReportedTokens:0,sourceReportedObservationCount:0,observationCount:0,unclassifiedTokens:0,classifiedTokens:0,classificationCoverage:null,totalDerivations:[],timePrecisions:[],usageScopes:[],aggregationTemporalities:[]}}function Ln(e,t){return e===null?`—`:new Intl.NumberFormat(f(ve),{style:`currency`,currency:t,currencyDisplay:`narrowSymbol`,minimumFractionDigits:2,maximumFractionDigits:Math.abs(e)>0&&Math.abs(e)<.01?8:2}).format(e)}function Rn(e,t){let n=new Intl.DateTimeFormat(f(ve),{month:`short`,day:`numeric`});return`${n.format(new Date(e))} – ${n.format(new Date(t))}`}function zn(e,t){return{money:t=>t===null?q(`notAvailable`):Ln(t,e),tokens:e=>e===null?q(`notAvailable`):`${sn(e)} ${q(`tokens`)}`,ratio:(e,n)=>{if(e===null)return q(`notAvailable`);let r=`${new Intl.NumberFormat(t,{maximumFractionDigits:+(e<10)}).format(e)}x`;return n===`lower`?`≥ ${r}`:r}}}function Bn(e){l(Ke,e)}function Vn(e){let t=new Intl.DateTimeFormat(f(ve),{month:`short`,day:`numeric`,timeZone:e.timeZone});return`${t.format(new Date(e.start))} – ${t.format(new Date(e.end))}`}function Hn(e,t,n){return e===null?q(`notAvailable`):n===`tokens`?`${sn(e)} ${q(`tokens`)}`:Ln(e,t)}function Un(e,t){return e.includedInHeadline===!1?null:t===`tokens`?e.tokenShare:e.retailEquivalent.amount===null&&e.reportedEstimate.amount!==null?e.reportedShare:e.retailShare}function Wn(e,t){let n=e.retailEquivalent.amount===null?e.reportedEstimate:e.retailEquivalent,r=t===`tokens`?`${on(e.recordedTokens)} ${q(`tokens`)}`:n?.amount==null?q(`notAvailable`):Ln(n.amount,n.currency),i=e.includedInHeadline===!1?` · ${q(`separateFromHeadline`)}`:``;return`${e.providerDisplayName} · ${e.billingDomainDisplayName}${i}: ${r}`}function Gn(e,t){return(t===`tokens`?e.modelRanking.byTokens:e.modelRanking.byCost).flatMap(t=>{let n=e.modelRanking.entries.find(e=>e.id===t);return n?[n]:[]})}async function Kn(e,t){l(Je,e),Ye=t,await m(),f(Xe)?.focus()}async function qn(){l(Je,null),await m(),Ye?.focus()}d(()=>f(ve),()=>{l(xe,be(f(ve),`metaDescription`))}),d(()=>(f(Se),f(Je)),()=>{l(K,f(Se)?.workbench?.modelRanking.entries.find(e=>e.id===f(Je))??null)}),d(()=>(f(De),f(Ce),f(we)),()=>{l(gt,f(De)&&f(Ce).length===0?null:{generatedAt:new Date().toISOString(),providers:Object.values(f(we))})}),d(()=>(f(Ue),f(gt),f(Se)),()=>{l(_t,f(Ue)===`agents`?f(gt):f(Se))}),d(()=>f(ut),()=>{l(B,f(ut)?Object.values(f(ut).modules).some(e=>e.state===`pending`||e.state===`running`):!1)}),d(()=>(f(W),f(Oe),f(B)),()=>{l(ce,f(W)||f(Oe)||f(B))}),d(()=>(f(_t),f(Ge)),()=>{l(le,f(_t)?.workbench?.comparisonCurrency??f(Ge))}),d(()=>(f(le),f(ve)),()=>{l(ue,zn(f(le),f(ve)))}),d(()=>f($e),()=>{l(fe,new Set((f($e)?.domains??[]).map(e=>Ft(e.providerId,e.billingDomainId))))}),d(()=>(f(_t),f(fe)),()=>{l(pe,(f(_t)?.workbench?.planValue?.unconfiguredDomains??[]).filter(e=>f(fe).has(Ft(e.providerId,e.billingDomainId))))}),d(()=>(f(_t),f(ue)),()=>{l(me,f(_t)?.workbench?.planValue?_V(f(_t).workbench.planValue,WB,f(ue),q(`planCustom`)):[])}),g(),te();var Jn=r();se(`1uha8ag`,e=>{var t=aH(),n=u(o(t),2);H(()=>D(n,`content`,f(xe))),c(()=>{s.title=`Agent Usage`}),i(e,t)}),t(`keydown`,y,Zt);var Yn=o(Jn);n(Yn,()=>f(ve),e=>{var r=lU(),s=o(r),c=b(s),d=b(c),p=u(d,2),m=b(p,!0);L(p);var h=u(p,2),g=b(h),y=b(g,!0);L(g);var w=u(g,2),I=b(w,!0);L(w),L(h);var ee=u(h,2),te=b(ee),R=b(te,!0);L(te),E(te,e=>l(mt,e),()=>f(mt));var re=u(te,2),ie=b(re),ae=b(ie,!0);L(ie);var oe=u(ie);L(re);var B=u(re,2),se=b(B,!0);L(B);var le=u(B,2),fe=b(le);let he;var ge=u(fe);L(le),L(ee),L(c);var _e=u(c,2),ye=e=>{var t=oH(),n=b(t),r=b(n),o=b(r,!0);L(r),L(n),L(t),H(e=>v(o,e),[()=>a(()=>q(`loadingModelCosts`))]),i(e,t)},be=e=>{var t=sH(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>q(`error`))]),i(e,t)},xe=e=>{var r=qH(),s=o(r),c=e=>{var t=cH(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>q(`refreshUnavailable`))]),i(e,t)};V(s,e=>{f(Me)&&e(c)});var d=u(s,2),p=e=>{var t=lH(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>q(`noProviders`))]),i(e,t)};V(d,e=>{f(Ue),f(De),f(Ce),f(U),a(()=>f(Ue)===`agents`&&!f(De)&&f(Ce).length===0&&f(U).length===0)&&e(p)});var m=u(d,2),h=e=>{var n=wH(),r=b(n);_(r,5,()=>(f(_t),f(U),f(Ce),a(()=>An(f(_t),f(U),f(Ce)))),e=>e.id,(e,n)=>{let r=x(()=>(f(n),a(()=>On(f(n).id)))),s=x(()=>(f(we),f(n),a(()=>!!f(we)[f(n).id]))),c=x(()=>(f(Te),f(n),M(f(s)),a(()=>f(Te)[f(n).id]&&!f(s)))),d=x(()=>(f(Te),f(n),M(f(s)),a(()=>f(Te)[f(n).id]&&f(s)))),p=x(()=>(f(n),f(He),a(()=>bn(f(n),f(He)[f(n).id])))),m=x(()=>(M(f(p)),f(n),a(()=>f(p).freshness??f(n).freshness))),h=x(()=>(M(f(p)),f(n),a(()=>f(p).coverage??f(n).coverage))),g=x(()=>(f(U),f(n),M(f(p)),a(()=>Dn(f(U),f(n).id,f(p).id))));var y=CH();let S;var w=b(y),T=e=>{var t=dH(),r=b(t),o=u(b(r),2);_(o,4,()=>[0,1,2],e=>e,(e,t)=>{var n=uH();i(e,n)}),L(o),L(r),L(t),H(()=>D(t,`data-testid`,(f(n),a(()=>`agent-provider-skeleton-${f(n).id}`)))),i(e,t)};V(w,e=>{f(c)&&e(T)});var E=u(w,2),k=b(E),j=e=>{var t=fH();H(e=>{D(t,`data-provider-logo`,(f(n),a(()=>f(n).id))),D(t,`src`,e)},[()=>(M(f(r)),O(),a(()=>kn(f(r),O())))]),i(e,t)};V(k,e=>{f(r)&&e(j)});var P=u(k,2),F=b(P),I=b(F),ee=b(I,!0);L(I);var te=u(I,2),R=b(te),re=b(R,!0);L(R);var ie=u(R,2),ae=e=>{var n=pH(),r=b(n),o=b(r,!0);L(r);var s=u(r,2);L(n),H((e,t,r)=>{D(n,`data-testid`,(M(f(g)),a(()=>`connector-${f(g).id}`))),v(o,e),D(s,`title`,t),D(s,`aria-label`,r)},[()=>(M(f(g)),a(()=>en(f(g).state))),()=>(M(f(g)),a(()=>`${en(f(g).state)} · ${q(`manageConnection`)}`)),()=>a(()=>q(`manageConnection`))]),t(`click`,s,()=>Yt(`connector:${f(g).id}`)),i(e,n)};V(ie,e=>{M(f(g)),a(()=>f(g)?.state===`connected`)&&e(ae)}),L(te),L(F);var oe=u(F,2),B=u(b(oe),2),se=e=>{var t=N();H(e=>v(t,e),[()=>a(()=>q(`updating`))]),i(e,t)},ce=e=>{var t=N();H((e,n)=>v(t,`${e??``}
|
|
20
|
+
${n??``}`),[()=>(M(f(m)),a(()=>f(m).status===`fresh`?q(`updatedNow`):f(m).lastSuccessAt?q(`updated`):q(`unavailable`))),()=>(M(f(m)),a(()=>f(m).lastSuccessAt?` · ${un(f(m).lastSuccessAt)}`:``))]),i(e,t)};V(B,e=>{f(d)?e(se):e(ce,-1)}),L(oe),L(P),L(E);var le=u(E,2),ue=e=>{var r=hH();_(r,5,()=>(f(n),a(()=>f(n).billingDomains)),e=>e.id,(e,r)=>{let o=x(()=>(M(f(p)),f(r),a(()=>f(p).id===f(r).id)));var s=mH(),c=b(s,!0);L(s),H(()=>{D(s,`aria-selected`,f(o)),D(s,`tabindex`,f(o)?0:-1),v(c,(f(r),a(()=>f(r).displayName)))}),t(`click`,s,()=>En(f(n).id,f(r).id)),t(`keydown`,s,$t),i(e,s)}),L(r),H(e=>D(r,`aria-label`,e),[()=>(f(n),a(()=>`${f(n).displayName} ${q(`billingDomainTabs`)}`))]),i(e,r)};V(le,e=>{f(n),a(()=>(f(n).billingDomains?.length??0)>1)&&e(ue)});var de=u(le,2);_(de,1,()=>[f(p)],e=>e.id,(e,r)=>{let s=x(()=>(f(U),f(n),f(r),a(()=>Dn(f(U),f(n).id,f(r).id))));var c=SH(),d=o(c),p=e=>{var n=bH();let r;var o=b(n),c=b(o),d=b(c),p=b(d,!0);L(d);var m=u(d,2),h=e=>{var t=gH(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>q(`experimental`))]),i(e,t)};V(m,e=>{M(f(s)),a(()=>f(s).experimental)&&e(h)}),L(c);var g=u(c);L(o);var _=u(o,2),y=b(_),x=b(y,!0);L(y);var S=u(y,2),w=b(S),T=b(w,!0);L(w);var E=u(w,2),O=b(E,!0);L(E),L(S);var k=u(S,2),A=b(k),j=b(A,!0);L(A);var N=u(A,2),P=b(N,!0);L(N),L(k);var F=u(k,2),I=e=>{var n=_H(),r=b(n),o=b(r,!0);L(r);var c=u(r,2);z(c),L(n),H((e,t)=>{v(o,e),D(c,`aria-label`,t),ne(c,(f(Ve),M(f(s)),a(()=>f(Ve)[f(s).id]??``)))},[()=>a(()=>q(`managementKey`)),()=>(M(f(s)),a(()=>`${f(s).displayName} ${q(`managementKey`)}`))]),t(`input`,c,e=>l(Ve,{...f(Ve),[f(s).id]:e.currentTarget.value})),i(e,n)};V(F,e=>{M(f(s)),a(()=>f(s).credentialOwner===`agent-usage`)&&e(I)});var ee=u(F,2),te=b(ee),R=e=>{var n=vH(),r=b(n,!0);L(n),H(e=>{n.disabled=(M(f(s)),f(Be),f(Ve),a(()=>!f(s).installed||f(Be)===f(s).id||f(s).credentialOwner===`agent-usage`&&!f(Ve)[f(s).id])),v(r,e)},[()=>a(()=>q(`connect`))]),t(`click`,n,()=>Z(f(s).id,`connect`)),i(e,n)};V(te,e=>{M(f(s)),a(()=>f(s).state===`discovered`||f(s).state===`skipped`)&&e(R)});var re=u(te,2),ie=e=>{var n=yH(),r=b(n,!0);L(n),H(e=>{n.disabled=(f(Be),M(f(s)),a(()=>f(Be)===f(s).id)),v(r,e)},[()=>a(()=>q(`retry`))]),t(`click`,n,()=>Z(f(s).id,`retry`)),i(e,n)};V(re,e=>{M(f(s)),a(()=>f(s).state===`error`||f(s).state===`not-installed`)&&e(ie)});var ae=u(re,2),oe=e=>{var n=yH(),r=b(n,!0);L(n),H(e=>{n.disabled=(f(Be),M(f(s)),a(()=>f(Be)===f(s).id)),v(r,e)},[()=>a(()=>q(`skip`))]),t(`click`,n,()=>Z(f(s).id,`skip`)),i(e,n)};V(ae,e=>{M(f(s)),a(()=>f(s).state!==`skipped`)&&e(oe)}),L(ee),L(_),L(n),H((e,t,i,o,c,l,u)=>{r=C(n,1,`inline-connection svelte-1uha8ag`,null,r,{"connection-pending":f(Be)===f(s).id}),D(n,`data-testid`,(M(f(s)),a(()=>`connector-${f(s).id}`))),D(n,`aria-busy`,(f(Be),M(f(s)),a(()=>f(Be)===f(s).id))),v(p,e),v(g,` ${t??``}`),v(x,i),v(T,o),v(O,c),v(j,l),v(P,u)},[()=>(M(f(s)),a(()=>en(f(s).state))),()=>a(()=>q(`connectionSetup`)),()=>(M(f(s)),a(()=>nn(f(s)))),()=>(M(f(s)),a(()=>f(s).installed?q(`installed`):q(`notInstalled`))),()=>(M(f(s)),a(()=>tn(f(s).credentialOwner))),()=>a(()=>q(`coverageLabel`)),()=>(M(f(s)),a(()=>f(s).expectedCoverage.map(yn).join(` · `)))]),i(e,n)};V(d,e=>{M(f(s)),a(()=>f(s)&&f(s).state!==`connected`)&&e(p)});var m=u(d,2),h=b(m,!0);L(m);var g=u(m,2);_(g,5,()=>(f(r),a(()=>jn(f(r).quotaBuckets))),e=>e.id,(e,t)=>{var o=xH(),s=b(o),c=b(s),l=b(c,!0);L(c);var d=u(c,2),p=b(d);L(d),L(s);var m=u(s,2);let h;var g=b(m);L(m);var _=u(m,2),y=b(_);L(_);var x=u(_,2),S=b(x),w=b(S);L(S),L(x),L(o),H((e,i,o,s,c,u,d,b,x)=>{v(l,(f(t),a(()=>f(t).label))),v(p,`${f(t),a(()=>f(t).usedPercent??`—`)??``}% ${e??``}`),h=C(m,1,`progress svelte-1uha8ag`,null,h,{"progress-warning":(f(t).usedPercent??0)>=70&&(f(t).usedPercent??0)<90,"progress-critical":(f(t).usedPercent??0)>=90}),D(m,`aria-label`,(f(t),a(()=>f(t).label))),D(m,`aria-valuenow`,(f(t),a(()=>f(t).usedPercent??void 0))),D(m,`aria-valuetext`,i),D(m,`aria-describedby`,(f(n),f(r),f(t),a(()=>`quota-evidence-${f(n).id}-${f(r).id}-${f(t).id}`))),A(g,o),D(_,`id`,(f(n),f(r),f(t),a(()=>`quota-evidence-${f(n).id}-${f(r).id}-${f(t).id}`))),v(y,`${s??``}: ${c??``} ·
|
|
21
|
+
${u??``}`),v(w,`${d??``}
|
|
22
|
+
${b??``} · ${x??``}`)},[()=>a(()=>q(`used`)),()=>(f(t),a(()=>f(t).usedPercent===null?q(`notAvailable`):`${on(f(t).usedPercent)}% ${q(`used`)}`)),()=>(f(t),a(()=>`width: ${Math.min(100,Math.max(0,f(t).usedPercent??0))}%`)),()=>a(()=>q(`source`)),()=>(f(t),a(()=>fn(f(t).authority))),()=>(f(t),f(r),f(n),a(()=>un(f(t).observedAt??f(r).freshness?.lastSuccessAt??f(n).freshness.lastSuccessAt))),()=>a(()=>q(`resets`)),()=>(f(t),a(()=>un(f(t).resetsAt))),()=>(f(t),a(()=>dn(f(t).resetsAt)))]),i(e,o)}),L(g),H(e=>v(h,e),[()=>a(()=>q(`quota`))]),i(e,c)}),L(y),H(e=>{S=C(y,1,`provider-card svelte-1uha8ag`,null,S,{"provider-card-loading":f(c)}),D(y,`aria-busy`,(f(Te),f(n),a(()=>f(Te)[f(n).id]))),D(I,`data-provider-logo`,(M(f(r)),f(n),a(()=>f(r)?void 0:f(n).id))),v(ee,(f(n),a(()=>f(n).displayName))),v(re,e),D(oe,`data-status`,(M(f(d)),M(f(m)),a(()=>f(d)?`updating`:f(m).status===`unavailable`?`unavailable`:`available`))),D(oe,`role`,f(d)?`status`:void 0),D(oe,`data-testid`,(M(f(d)),f(n),a(()=>f(d)?`agent-provider-update-${f(n).id}`:void 0)))},[()=>(M(f(h)),a(()=>pn(f(h).quota)))]),i(e,y)}),L(r);var s=u(r,2);{let e=x(()=>(f(_t),f(U),a(()=>Mn(f(_t),f(U))))),t=x(()=>(f(_t),a(()=>Date.parse(f(_t).generatedAt))));YV(s,{get providers(){return f(e)},get locale(){return f(ve)},get timeZone(){return f(Ze)},get now(){return f(t)}})}L(n),H(e=>D(r,`aria-label`,e),[()=>a(()=>q(`providersLabel`))]),i(e,n)},g=e=>{var r=KH(),s=b(r),c=e=>{let r=x(()=>(f(_t),a(()=>f(_t).workbench)));var s=GH(),c=b(s),d=b(c),p=b(d),m=b(p,!0);L(p);var h=u(p,2),g=b(h),y=b(g,!0);L(g);var S=u(g,2,!0);L(h),L(d);var w=u(d,2),T=b(w),E=b(T),k=b(E,!0);L(E);var j=u(E,2),N=b(j,!0);L(j),L(T);var P=u(T,2);_(P,4,()=>[`24h`,`7d`,`30d`],e=>e,(e,n)=>{var r=TH(),a=b(r,!0);L(r),H(()=>{D(r,`aria-pressed`,f(We)===n),v(a,n)}),t(`click`,r,()=>Sn(n)),i(e,r)}),L(P);var F=u(P,2);_(F,4,()=>[`CNY`,`USD`],e=>e,(e,n)=>{var r=TH(),a=b(r,!0);L(r),H(()=>{D(r,`aria-pressed`,f(Ge)===n),v(a,n)}),t(`click`,r,()=>Cn(n)),i(e,r)}),L(F),L(w),L(c);var I=u(c,2),ee=b(I),te=e=>{var t=EH(),n=b(t),r=b(n,!0);L(n),L(t),H(e=>v(r,e),[()=>a(()=>q(`updatingModelCosts`))]),i(e,t)};V(ee,e=>{f(ce)&&e(te)});var ne=u(ee,2),R=b(ne),re=b(R,!0);L(R),L(ne);var ie=u(ne,2),ae=b(ie),oe=b(ae,!0);L(ae);var z=u(ae,2),B=b(z),se=b(B),le=b(se,!0);L(se);var de=u(se,2),fe=b(de,!0);L(de),L(B);var he=u(B,2),ge=b(he),_e=b(ge,!0);L(ge);var ye=u(ge,2),be=b(ye,!0);L(ye),L(he);var xe=u(he,2),Se=b(xe),Ce=b(Se,!0);L(Se);var we=u(Se,2),Te=b(we,!0);L(we),L(xe);var Ee=u(xe,2),De=b(Ee),Oe=b(De,!0);L(De);var ke=u(De,2),Ae=b(ke,!0);L(ke),L(Ee);var je=u(Ee,2),Me=b(je),Ne=b(Me,!0);L(Me);var Pe=u(Me,2),Fe=b(Pe,!0);L(Pe),L(je);var Ie=u(je,2),Le=b(Ie),Re=b(Le,!0);L(Le);var ze=u(Le,2),U=b(ze,!0);L(ze),L(Ie),L(z),L(ie),L(I);var Be=u(I,2),Ve=b(Be),He=e=>{var t=DH(),n=b(t),r=b(n,!0);L(n),L(t),H(e=>v(r,e),[()=>a(()=>q(`updatingModelCosts`))]),i(e,t)};V(Ve,e=>{f(ce)&&e(He)});var Ue=u(Ve,2),Je=b(Ue),Ye=b(Je),Xe=b(Ye,!0);L(Ye);var Ze=u(Ye,2),Qe=b(Ze,!0);L(Ze),L(Je),AV(u(Je,2),{get providers(){return M(f(r)),a(()=>f(r).providerSummary)},get metric(){return f(Ke)},get currency(){return M(f(r)),a(()=>f(r).comparisonCurrency)},get locale(){return f(ve)},formatUsageMetric:Hn,formatPercent:ln}),L(Ue);var $e=u(Ue,2);n($e,()=>f(We),e=>{{let t=x(()=>(M(f(r)),a(()=>Vn(f(r)))));iH(e,{get buckets(){return M(f(r)),a(()=>f(r).trend.buckets)},get metric(){return f(Ke)},get currency(){return M(f(r)),a(()=>f(r).comparisonCurrency)},get locale(){return f(ve)},get selectedWindow(){return f(We)},get timeZone(){return M(f(r)),a(()=>f(r).timeZone)},get granularity(){return M(f(r)),a(()=>f(r).trend.granularity)},get rangeLabel(){return f(t)},formatUsageMetric:Hn,describeSegment:Wn})}}),L(Be);var et=u(Be,2),tt=e=>{var n=LH(),s=b(n),c=b(s),l=b(c,!0);L(c);var d=u(c,2),p=b(d,!0);L(d),L(s);var m=u(s,2),h=e=>{var n=OH(),r=b(n),o=b(r,!0);L(r);var s=u(r,2),c=b(s,!0);L(s),L(n),H((e,t)=>{v(o,e),v(c,t)},[()=>a(()=>q(`planValueEmpty`)),()=>a(()=>q(`planValueEmptyAction`))]),t(`click`,s,()=>Yt(`plans`)),i(e,n)},g=e=>{var t=NH(),n=o(t),s=b(n);xV(s,{get planValue(){return M(f(r)),a(()=>f(r).planValue)},get locale(){return f(ve)},get formatters(){return f(ue)}});var c=u(s,2);_(c,5,()=>f(me),e=>e.key,(e,t)=>{var n=MH(),r=b(n),o=b(r),s=b(o),c=u(s,2),l=b(c,!0);L(c);var d=u(c,2),p=b(d,!0);L(d),L(o);var m=u(o,2);let h;var g=b(m,!0);L(m),L(r);var _=u(r,2),y=b(_),x=u(y,2);L(_);var S=u(_,2),w=b(S),T=b(w),E=b(T,!0);L(T);var O=u(T,2),k=b(O,!0);L(O),L(w);var j=u(w,2),M=b(j),N=b(M,!0);L(M);var P=u(M,2),F=b(P,!0);L(P),L(j);var I=u(j,2),ee=b(I),te=b(ee,!0);L(ee);var ne=u(ee,2),R=b(ne,!0);L(ne),L(I);var re=u(I,2),ie=b(re),ae=b(ie,!0);L(ie);var oe=u(ie,2),z=b(oe,!0);L(oe),L(re);var B=u(re,2),se=e=>{var n=kH(),r=b(n),o=b(r,!0);L(r);var s=u(r,2),c=b(s);L(s),L(n),H((e,n)=>{v(o,e),v(c,`${f(t),a(()=>f(t).savingsLabel)??``} · ${n??``}`)},[()=>(f(t),a(()=>f(t).savingsIsLoss?q(`planValueOverpaid`):q(`planValueSavings`))),()=>a(()=>q(`planValuePerMillion`))]),i(e,n)};V(B,e=>{f(t),a(()=>f(t).savingsLabel)&&e(se)}),L(S);var ce=u(S,2),le=e=>{var n=AH(),r=b(n),o=b(r),s=b(o);L(o);var c=u(o,2),l=b(c);L(c),L(r);var d=u(r,2),p=b(d),m=u(p,2);L(d);var h=u(d,2);let g;var _=b(h);L(h),L(n),H((e,n,r,i,o,c,u,y,b)=>{v(s,`${e??``} · ${n??``}`),v(l,`${r??``}/${i??``}
|
|
23
|
+
${o??``}`),D(d,`aria-label`,c),A(p,(f(t),a(()=>`width:${f(t).period.earnedPercent}%;background:${f(t).color}`))),A(m,(f(t),a(()=>`left:${f(t).period.elapsedPercent}%`))),D(m,`title`,u),g=C(h,1,`svelte-1uha8ag`,null,g,{"plan-value-behind":!f(t).period.onPace}),v(_,`${y??``}
|
|
24
|
+
${f(t),a(()=>f(t).period.earnedLabel)??``} / ${f(t),a(()=>f(t).period.periodCostLabel)??``} · ${b??``}`)},[()=>a(()=>q(`planPeriodLabel`)),()=>(f(t),a(()=>Rn(f(t).period.start,f(t).period.end))),()=>(f(t),a(()=>Math.floor(f(t).period.elapsedDays))),()=>(f(t),a(()=>Math.round(f(t).period.totalDays))),()=>a(()=>q(`planPeriodDays`)),()=>(f(t),a(()=>`${q(`planPeriodEarnedBack`)} ${f(t).period.earnedLabel} / ${f(t).period.periodCostLabel}`)),()=>(f(t),a(()=>f(t).period.onPace?q(`planPeriodOnPace`):q(`planPeriodBehindPace`))),()=>a(()=>q(`planPeriodEarnedBack`)),()=>(f(t),a(()=>f(t).period.onPace?q(`planPeriodOnPace`):q(`planPeriodBehindPace`)))]),i(e,n)};V(ce,e=>{f(t),a(()=>f(t).period)&&e(le)});var ue=u(ce,2),de=e=>{var t=jH(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>q(`planValuePartial`))]),i(e,t)},fe=e=>{var t=jH(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>q(`planValueUnavailable`))]),i(e,t)};V(ue,e=>{f(t),a(()=>f(t).bound===`lower`)?e(de):(f(t),a(()=>f(t).bound===`unavailable`)&&e(fe,1))}),L(n),H((e,n,r,i,o,c)=>{A(s,(f(t),a(()=>`background:${f(t).color}`))),v(l,(f(t),a(()=>f(t).name))),v(p,(f(t),a(()=>f(t).planLabel))),h=C(m,1,`plan-value-ratio svelte-1uha8ag`,null,h,{"plan-value-below":f(t).ratio!==null&&!f(t).beatsBreakEven}),v(g,(f(t),a(()=>f(t).ratioLabel))),D(_,`aria-label`,e),A(y,(f(t),a(()=>`width:${f(t).meterPercent}%;background:${f(t).color}`))),A(x,(f(t),a(()=>`left:${f(t).breakEvenPercent}%`))),D(x,`title`,n),v(E,r),v(k,(f(t),a(()=>f(t).paidLabel))),v(N,i),v(F,(f(t),a(()=>f(t).worthLabel))),v(te,o),v(R,(f(t),a(()=>f(t).effectiveUnitPriceLabel))),v(ae,c),v(z,(f(t),a(()=>f(t).retailUnitPriceLabel)))},[()=>(f(t),a(()=>`${q(`planValueRatio`)} ${f(t).ratioLabel}`)),()=>a(()=>q(`planValueBreakEven`)),()=>a(()=>q(`planValuePaid`)),()=>a(()=>q(`planValueWorth`)),()=>a(()=>q(`planValueEffectiveUnitPrice`)),()=>a(()=>q(`planValueRetailUnitPrice`))]),i(e,n)}),L(c),L(n);var l=u(n,2),d=b(l,!0);L(l),H(e=>v(d,e),[()=>a(()=>q(`planValueWindowNote`))]),i(e,t)};V(m,e=>{M(f(r)),a(()=>f(r).planValue.entries.length===0)?e(h):e(g,-1)});var y=u(m,2),x=e=>{var n=IH(),o=b(n);_(o,1,()=>(M(f(r)),a(()=>f(r).planValue.meteredDomains)),e=>`${e.providerId}:${e.billingDomainId}`,(e,t)=>{var n=PH(),o=b(n),s=b(o);L(o);var c=u(o,2),l=b(c,!0);L(c);var d=u(c,2),p=b(d);L(d),L(n),H((e,n,r)=>{v(s,`${f(t),a(()=>f(t).providerDisplayName)??``} · ${f(t),a(()=>f(t).billingDomainDisplayName)??``}`),v(l,e),v(p,`${n??``} · ${r??``}`)},[()=>a(()=>q(`planValueMetered`)),()=>a(()=>q(`actualCost`)),()=>(f(t),M(f(r)),a(()=>Ln(f(t).actualCost.amount,f(r).comparisonCurrency)))]),i(e,n)});var s=u(o,2);_(s,1,()=>f(pe),e=>`${e.providerId}:${e.billingDomainId}`,(e,n)=>{var r=FH(),o=b(r),s=b(o);L(o);var c=u(o,2),l=b(c,!0);L(c);var d=u(c,2),p=b(d,!0);L(d),L(r),H((e,t)=>{v(s,`${f(n),a(()=>f(n).providerDisplayName)??``} · ${f(n),a(()=>f(n).billingDomainDisplayName)??``}`),v(l,e),v(p,t)},[()=>a(()=>q(`planValueUnconfigured`)),()=>a(()=>q(`planValueEmptyAction`))]),t(`click`,d,()=>Yt(`plans`)),i(e,r)}),L(n),i(e,n)};V(y,e=>{M(f(r)),f(pe),a(()=>f(r).planValue.meteredDomains.length>0||f(pe).length>0)&&e(x)}),L(n),H((e,t)=>{D(n,`aria-busy`,f(ce)),v(l,e),v(p,t)},[()=>a(()=>q(`planValue`)),()=>a(()=>q(`planValueSubtitle`))]),i(e,n)};V(et,e=>{M(f(r)),a(()=>f(r).planValue)&&e(tt)});var nt=u(et,2),rt=b(nt),it=e=>{var t=RH(),n=b(t),r=b(n,!0);L(n),L(t),H(e=>v(r,e),[()=>a(()=>q(`updatingModelCosts`))]),i(e,t)};V(rt,e=>{f(ce)&&e(it)});var at=u(rt,2),ot=b(at),st=b(ot),ct=b(st,!0);L(st),L(ot);var lt=u(ot,2),W=b(lt),ut=b(W,!0);L(W);var dt=u(W,2),ft=b(dt,!0);L(dt);var pt=u(dt,2),mt=b(pt,!0);L(pt),L(lt),L(at);var ht=u(at,2),G=b(ht),K=b(G,!0);L(G);var gt=u(G,2),vt=b(gt,!0);L(gt);var yt=u(gt,2),bt=b(yt,!0);L(yt);var xt=u(yt,2),St=b(xt,!0);L(xt),L(ht);var J=u(ht,2),wt=e=>{var t=zH(),n=b(t);{let e=x(()=>(M(f(r)),f(Ke),a(()=>Gn(f(r),f(Ke)))));rV(n,{get models(){return f(e)},get metric(){return f(Ke)},get currency(){return M(f(r)),a(()=>f(r).comparisonCurrency)},get locale(){return f(ve)},formatUsageMetric:Hn,formatPercent:ln,onSelect:e=>void Kn(e,null)})}var o=u(n,2),s=b(o,!0);L(o),L(t),H(e=>v(s,e),[()=>a(()=>q(`treemapHint`))]),i(e,t)},Tt=e=>{var t=BH(),n=b(t);{let e=x(()=>(M(f(r)),f(Ke),a(()=>Gn(f(r),f(Ke)))));aV(n,{get models(){return f(e)},get metric(){return f(Ke)},get currency(){return M(f(r)),a(()=>f(r).comparisonCurrency)},get locale(){return f(ve)},formatUsageMetric:Hn,onSelect:e=>void Kn(e,null)})}L(t),i(e,t)},Y=e=>{var n=WH(),o=b(n);_(o,5,()=>(M(f(r)),f(Ke),a(()=>Gn(f(r),f(Ke)))),e=>e.id,(e,n)=>{let r=x(()=>(f(n),a(()=>On(f(n).providerId)))),o=x(()=>(f(n),a(()=>f(n).retailEquivalent.amount===null?f(n).reportedEstimate??f(n).retailEquivalent:f(n).retailEquivalent))),s=x(()=>(f(n),f(Ke),a(()=>Un(f(n),f(Ke)))));var c=UH(),l=b(c),d=b(l),p=b(d),m=e=>{var t=VH();H(e=>{D(t,`data-provider-logo`,(f(n),a(()=>f(n).providerId))),D(t,`src`,e)},[()=>(M(f(r)),O(),a(()=>kn(f(r),O())))]),i(e,t)};V(p,e=>{f(r)&&e(m)});var h=u(p,2),g=b(h),_=b(g,!0);L(g);var y=u(g,2),S=b(y);L(y);var C=u(y,2),w=e=>{var t=gH(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>q(`separateFromHeadline`))]),i(e,t)};V(C,e=>{f(n),a(()=>f(n).includedInHeadline===!1)&&e(w)}),L(h),L(d);var T=u(d,2),E=b(T),k=b(E,!0);L(E),L(T);var j=u(T,2),N=b(j),P=b(N,!0);L(N);var F=u(N,2),I=e=>{var t=HH(),r=b(t);L(t),H((e,n,i)=>{D(t,`aria-label`,e),D(t,`aria-valuenow`,n),A(r,i)},[()=>(f(n),a(()=>`${f(n).model} ${Ct()}`)),()=>(M(f(s)),a(()=>Math.round(f(s)*1e3)/10)),()=>(M(f(s)),a(()=>`width: ${Math.max(2,Math.min(100,f(s)*100))}%`))]),i(e,t)};V(F,e=>{f(s)!==null&&e(I)}),L(j);var ee=u(j,2),te=b(ee),ne=b(te,!0);L(te),L(ee),L(l),L(c),H((e,t,r,i,o,s,c)=>{v(_,(f(n),a(()=>f(n).model))),v(S,`${f(n),a(()=>f(n).providerDisplayName)??``} · ${f(n),a(()=>f(n).billingDomainDisplayName)??``}`),D(T,`data-label`,e),v(k,t),D(j,`data-label`,r),v(P,i),D(ee,`data-label`,o),D(te,`aria-label`,s),v(ne,c)},[()=>a(()=>q(`cost`)),()=>(M(f(o)),a(()=>f(o).amount===null?q(`notAvailable`):Ln(f(o).amount,f(o).comparisonCurrency))),()=>a(Ct),()=>(f(n),M(f(s)),a(()=>f(n).includedInHeadline===!1?q(`headlineShareNotApplicable`):ln(f(s)))),()=>a(()=>q(`tokens`)),()=>(f(n),a(()=>cn(f(n).tokenTotals.total))),()=>(f(n),a(()=>sn(f(n).tokenTotals.total)))]),t(`click`,l,e=>Kn(f(n).id,e.currentTarget)),t(`keydown`,l,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),Kn(f(n).id,e.currentTarget))}),i(e,c)}),L(o),L(n),i(e,n)};V(J,e=>{f(qe)===`treemap`?e(wt):f(qe)===`trend`?e(Tt,1):e(Y,-1)}),L(nt),L(s),H((e,t,n,r,i,a,o,s,c,l,u,d,p,h,g,_,b,x,C,w,O,A,M,ee,te,L,ne,ie,ae,z,B,V,se,H,ue)=>{v(m,e),v(y,t),v(S,n),D(T,`aria-label`,r),D(E,`aria-pressed`,f(Ke)===`retail-equivalent`),v(k,i),D(j,`aria-pressed`,f(Ke)===`tokens`),v(N,a),D(P,`aria-label`,o),D(F,`aria-label`,s),D(I,`aria-label`,c),D(I,`aria-busy`,f(ce)),D(R,`aria-label`,l),v(re,u),v(oe,d),v(le,p),v(fe,h),v(_e,g),v(be,_),v(Ce,b),v(Te,x),v(Oe,C),v(Ae,w),v(Ne,O),v(Fe,A),v(Re,M),v(U,ee),D(Be,`aria-busy`,f(ce)),v(Xe,te),v(Qe,L),D(nt,`aria-busy`,f(ce)),v(ct,ne),D(lt,`aria-label`,ie),D(W,`aria-selected`,f(qe)===`list`),v(ut,ae),D(dt,`aria-selected`,f(qe)===`treemap`),v(ft,z),D(pt,`aria-selected`,f(qe)===`trend`),v(mt,B),v(K,V),v(vt,se),v(bt,H),v(St,ue)},[()=>a(()=>q(`tokenMoneyWorkbench`)),()=>a(()=>q(`usage`)),()=>(M(f(r)),a(()=>Vn(f(r)))),()=>a(()=>q(`trendMetric`)),()=>a(()=>q(`cost`)),()=>a(()=>q(`tokens`)),()=>a(()=>q(`history`)),()=>a(()=>q(`displayCurrency`)),()=>a(()=>q(`usageOverview`)),()=>(f(Ke),M(f(r)),a(()=>f(Ke)===`tokens`?f(r).recordedTokens===null?q(`notAvailable`):cn(f(r).recordedTokens):Ln(f(r).costs.retailEquivalent.amount,f(r).comparisonCurrency))),()=>(f(Ke),M(f(r)),a(()=>f(Ke)===`tokens`?f(r).recordedTokens===null?q(`notAvailable`):sn(f(r).recordedTokens):Ln(f(r).costs.retailEquivalent.amount,f(r).comparisonCurrency))),()=>a(()=>q(`usageTotals`)),()=>a(()=>q(`recordedTokens`)),()=>(M(f(r)),a(()=>f(r).recordedTokens===null?q(`notAvailable`):sn(f(r).recordedTokens))),()=>a(()=>q(`input`)),()=>(M(f(r)),a(()=>f(r).tokenBreakdown.status===`unavailable`?q(`notAvailable`):sn(f(r).tokenBreakdown.tokenTotals.input))),()=>a(()=>q(`output`)),()=>(M(f(r)),a(()=>f(r).tokenBreakdown.status===`unavailable`?q(`notAvailable`):sn(f(r).tokenBreakdown.tokenTotals.output))),()=>a(()=>q(`reasoning`)),()=>(M(f(r)),a(()=>f(r).tokenBreakdown.status===`unavailable`?q(`notAvailable`):sn(f(r).tokenBreakdown.tokenTotals.reasoning))),()=>a(()=>q(`cacheRead`)),()=>(M(f(r)),a(()=>f(r).tokenBreakdown.status===`unavailable`?q(`notAvailable`):sn(f(r).tokenBreakdown.tokenTotals.cacheRead))),()=>a(()=>q(`cacheWrite`)),()=>(M(f(r)),a(()=>f(r).tokenBreakdown.status===`unavailable`?q(`notAvailable`):sn(f(r).tokenBreakdown.tokenTotals.cacheWrite))),()=>a(()=>q(`providerShare`)),()=>a(()=>q(`providerShareSubtitle`)),()=>a(()=>q(`breakdown`)),()=>a(()=>q(`breakdownView`)),()=>a(()=>q(`list`)),()=>a(()=>q(`treemap`)),()=>a(()=>q(`trendStacked`)),()=>a(()=>q(`model`)),()=>a(()=>q(`cost`)),()=>a(Ct),()=>a(()=>q(`tokens`))]),t(`click`,E,()=>Bn(`retail-equivalent`)),t(`click`,j,()=>Bn(`tokens`)),t(`click`,W,()=>l(qe,`list`)),t(`click`,dt,()=>l(qe,`treemap`)),t(`click`,pt,()=>l(qe,`trend`)),i(e,s)};V(s,e=>{f(_t),a(()=>f(_t).workbench)&&e(c)}),L(r),i(e,r)};V(m,e=>{f(Ue)===`agents`?e(h):e(g,-1)}),i(e,r)};V(_e,e=>{f(_t)?f(Ue)===`models`&&f(je)&&!f(Se)?e(be,1):f(_t)&&e(xe,2):e(ye)}),L(s);var Ee=u(s,2),ke=e=>{var n=oU(),r=b(n),s=b(r),c=b(s),d=b(c),p=b(d,!0);L(d);var m=u(d,2),h=b(m,!0);L(m);var g=u(m,2),y=b(g,!0);L(g),L(c);var w=u(c,2);L(s);var T=u(s,2),O=b(T),A=b(O),N=b(A),I=b(N,!0);L(N);var ee=u(N,2),te=b(ee,!0);L(ee),L(A);var R=u(A,2),re=e=>{var t=JH(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>q(`connectorsUnavailable`))]),i(e,t)};V(R,e=>{f(Ne)&&e(re)});var ie=u(R,2);_(ie,5,()=>f(U),e=>e.id,(e,n)=>{var r=YH();let o;var s=b(r),c=b(s),d=b(c,!0);L(c);var p=u(c,2),m=b(p,!0);L(p),L(s);var h=u(s,2),g=b(h,!0);L(h);var _=u(h,2),y=b(_);L(_);var x=u(_,2),S=e=>{var r=_H(),o=b(r),s=b(o,!0);L(o);var c=u(o,2);z(c),L(r),H((e,t)=>{v(s,e),D(c,`aria-label`,t),ne(c,(f(Ve),f(n),a(()=>f(Ve)[f(n).id]??``)))},[()=>a(()=>q(`managementKey`)),()=>(f(n),a(()=>`${f(n).displayName} ${q(`managementKey`)}`))]),t(`input`,c,e=>l(Ve,{...f(Ve),[f(n).id]:e.currentTarget.value})),i(e,r)};V(x,e=>{f(n),a(()=>f(n).credentialOwner===`agent-usage`)&&e(S)});var w=u(x,2),T=b(w),E=e=>{var r=vH(),o=b(r,!0);L(r),H(e=>{r.disabled=(f(Be),f(n),f(Ve),a(()=>f(Be)===f(n).id||!f(Ve)[f(n).id])),v(o,e)},[()=>a(()=>q(`replaceCredential`))]),t(`click`,r,()=>Z(f(n).id,`connect`)),i(e,r)};V(T,e=>{f(n),a(()=>f(n).state===`connected`&&f(n).credentialOwner===`agent-usage`)&&e(E)});var O=u(T,2),k=e=>{var r=vH(),o=b(r,!0);L(r),H(e=>{r.disabled=(f(n),f(Be),f(Ve),a(()=>!f(n).installed||f(Be)===f(n).id||f(n).credentialOwner===`agent-usage`&&!f(Ve)[f(n).id])),v(o,e)},[()=>a(()=>q(`connect`))]),t(`click`,r,()=>Z(f(n).id,`connect`)),i(e,r)};V(O,e=>{f(n),a(()=>f(n).state===`discovered`||f(n).state===`skipped`)&&e(k)});var A=u(O,2),j=e=>{var r=yH(),o=b(r,!0);L(r),H(e=>{r.disabled=(f(Be),f(n),a(()=>f(Be)===f(n).id)),v(o,e)},[()=>a(()=>q(`retry`))]),t(`click`,r,()=>Z(f(n).id,`retry`)),i(e,r)};V(A,e=>{f(n),a(()=>f(n).state===`error`||f(n).state===`not-installed`||f(n).state===`connected`)&&e(j)});var M=u(A,2),N=e=>{var r=yH(),o=b(r,!0);L(r),H(e=>{r.disabled=(f(Be),f(n),a(()=>f(Be)===f(n).id)),v(o,e)},[()=>a(()=>q(`skip`))]),t(`click`,r,()=>Z(f(n).id,`skip`)),i(e,r)};V(M,e=>{f(n),a(()=>f(n).state!==`skipped`)&&e(N)}),L(w),L(r),H((e,t,i)=>{D(r,`data-settings-target`,(f(n),a(()=>`connector:${f(n).id}`))),D(r,`data-testid`,(f(n),a(()=>`settings-connector-${f(n).id}`))),o=C(r,1,`svelte-1uha8ag`,null,o,{"settings-target-active":f(pt)===`connector:${f(n).id}`}),v(d,(f(n),a(()=>f(n).displayName))),v(m,e),v(g,t),v(y,`${i??``} · ${f(n),a(()=>f(n).target.billingDomain.displayName)??``}`)},[()=>(f(n),a(()=>en(f(n).state))),()=>(f(n),a(()=>nn(f(n)))),()=>(f(n),a(()=>tn(f(n).credentialOwner)))]),i(e,r)}),L(ie),L(O);var ae=u(O,2);let oe;var B=b(ae),se=b(B),ce=b(se,!0);L(se);var le=u(se,2),ue=b(le,!0);L(le),L(B);var fe=u(B,2),pe=e=>{var t=JH(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>q(`plansUnavailable`))]),i(e,t)};V(fe,e=>{f(et)&&e(pe)});var me=u(fe,2),he=e=>{var n=eU();_(n,5,()=>(f($e),a(()=>f($e).domains)),e=>`${e.providerId}:${e.billingDomainId}`,(e,n)=>{let r=x(()=>(f(n),a(()=>Ft(f(n).providerId,f(n).billingDomainId)))),s=x(()=>(f(tt),M(f(r)),a(()=>f(tt)[f(r)]))),c=x(()=>(f($e),f(n),a(()=>f($e).subscriptions.find(e=>e.providerId===f(n).providerId&&e.billingDomainId===f(n).billingDomainId))));var l=$H(),d=b(l),p=b(d),m=b(p,!0);L(p);var h=u(p,2),g=b(h,!0);L(h),L(d);var y=u(d,2),S=e=>{var l=QH(),d=o(l),p=b(d),m=b(p,!0);L(p);var h=u(p,2),g=b(h),y=b(g,!0);L(g),g.value=g.__value=`none`;var x=u(g);_(x,1,()=>(f(n),a(()=>f(n).presets)),e=>e.id,(e,t)=>{var n=XH(),r=b(n,!0);L(n);var o={};H(()=>{v(r,(f(t),a(()=>f(t).displayName))),o!==(o=(f(t),a(()=>f(t).id)))&&(n.value=(n.__value=(f(t),a(()=>f(t).id)))??``)}),i(e,n)});var S=u(x),C=b(S,!0);L(S),S.value=S.__value=`custom`,L(h);var w;F(h),L(d);var T=u(d,2),E=e=>{var n=ZH(),c=o(n),l=b(c),d=b(l),p=b(d,!0);L(d);var m=u(d,2);z(m),L(l);var h=u(l,2),g=b(h),_=b(g,!0);L(g);var y=u(g,2);z(y),L(h);var x=u(h,2),S=b(x),C=b(S,!0);L(S);var w=u(S,2),T=b(w),E=b(T,!0);L(T),T.value=T.__value=`monthly`;var D=u(T),O=b(D,!0);L(D),D.value=D.__value=`annual`,L(w);var k;F(w),L(x),L(c);var A=u(c,2),N=b(A),P=b(N,!0);L(N);var I=u(N,2);z(I);var ee=u(I,2),te=b(ee,!0);L(ee),L(A),H((e,t,n,r,i,o,c)=>{v(p,e),ne(m,(M(f(s)),a(()=>f(s).amount))),v(_,t),ne(y,(M(f(s)),a(()=>f(s).currency))),v(C,n),v(E,r),v(O,i),k!==(k=(M(f(s)),a(()=>f(s).billingPeriod)))&&(w.value=(w.__value=(M(f(s)),a(()=>f(s).billingPeriod)))??``,j(w,(M(f(s)),a(()=>f(s).billingPeriod)))),v(P,o),ne(I,(M(f(s)),a(()=>f(s).anchorDate))),v(te,c)},[()=>a(()=>q(`planAmount`)),()=>a(()=>q(`planCurrency`)),()=>a(()=>q(`planPeriod`)),()=>a(()=>q(`planPeriodMonthly`)),()=>a(()=>q(`planPeriodAnnual`)),()=>a(()=>q(`planAnchorDate`)),()=>a(()=>q(`planAnchorHint`))]),t(`input`,m,e=>Lt(f(r),{amount:e.currentTarget.value})),t(`input`,y,e=>Lt(f(r),{currency:e.currentTarget.value.toUpperCase()})),t(`change`,w,e=>Lt(f(r),{billingPeriod:e.currentTarget.value})),t(`input`,I,e=>Lt(f(r),{anchorDate:e.currentTarget.value})),i(e,n)};V(T,e=>{M(f(s)),a(()=>f(s).selection!==`none`)&&e(E)});var D=u(T,2),O=b(D),k=b(O,!0);L(O);var A=u(O,2),N=e=>{var t=gH(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>(M(f(c)),a(()=>f(c).priceSource===`catalog-preset`?q(`planPresetSource`):q(`planUserEntered`)))]),i(e,t)};V(A,e=>{f(c)&&e(N)}),L(D),H((e,t,n,i)=>{v(m,e),v(y,t),v(C,n),w!==(w=(M(f(s)),a(()=>f(s).selection)))&&(h.value=(h.__value=(M(f(s)),a(()=>f(s).selection)))??``,j(h,(M(f(s)),a(()=>f(s).selection)))),O.disabled=f(nt)===f(r),v(k,i)},[()=>a(()=>q(`planPreset`)),()=>a(()=>q(`planNone`)),()=>a(()=>q(`planCustom`)),()=>(M(f(s)),a(()=>f(s).selection===`none`?q(`planClear`):q(`planSave`)))]),t(`change`,h,e=>Lt(f(r),{selection:e.currentTarget.value})),t(`click`,O,()=>Rt(f(n).providerId,f(n).billingDomainId)),i(e,l)};V(y,e=>{f(s)&&e(S)}),L(l),H(()=>{D(l,`data-testid`,(f(n),a(()=>`plan-domain-${f(n).providerId}-${f(n).billingDomainId}`))),v(m,(f(n),a(()=>f(n).providerDisplayName))),v(g,(f(n),a(()=>f(n).billingDomainDisplayName)))}),i(e,l)}),L(n),i(e,n)};V(me,e=>{f($e)&&e(he)}),L(ae);var ge=u(ae,2),_e=b(ge),ve=b(_e),ye=b(ve,!0);L(ve);var be=u(ve,2),xe=b(be,!0);L(be),L(_e);var Se=u(_e,2),Ce=e=>{var t=JH(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>q(`monitoringUnavailable`))]),i(e,t)};V(Se,e=>{f(Pe)&&e(Ce)});var we=u(Se,2),Te=e=>{var n=tU(),r=b(n),o=b(r);z(o);var s=u(o);L(r);var c=u(r,2),l=b(c);z(l);var d=u(l);L(c);var p=u(c,2),m=b(p);z(m);var h=u(m);L(p),L(n),H((e,t,n)=>{k(o,(f(Qe),a(()=>f(Qe).backgroundCollectionEnabled))),v(s,` ${e??``}`),k(l,(f(Qe),a(()=>f(Qe).notificationsEnabled))),v(d,` ${t??``}`),k(m,(f(Qe),a(()=>f(Qe).startAtLogin))),v(h,` ${n??``}`)},[()=>a(()=>q(`backgroundCollection`)),()=>a(()=>q(`notifications`)),()=>a(()=>q(`startAtLogin`))]),t(`change`,o,e=>Jt({backgroundCollectionEnabled:e.currentTarget.checked})),t(`change`,l,e=>Jt({notificationsEnabled:e.currentTarget.checked})),t(`change`,m,e=>Jt({startAtLogin:e.currentTarget.checked})),i(e,n)};V(we,e=>{f(Qe)&&e(Te)}),L(ge);var Ee=u(ge,2),De=b(Ee),Oe=b(De),ke=b(Oe,!0);L(Oe);var Ae=u(Oe,2),je=b(Ae,!0);L(Ae),L(De);var Me=u(De,2),Le=e=>{var t=JH(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>q(`diagnosticsUnavailable`))]),i(e,t)};V(Me,e=>{f(Fe)&&e(Le)});var Re=u(Me,2),He=e=>{var t=aU();_(t,5,()=>(f(rt),M(de),a(()=>f(rt).connectors.filter(e=>!de(e.category)))),e=>e.id,(e,t)=>{var n=iU();let r;var o=b(n),s=b(o),c=b(s,!0);L(s);var l=u(s,2),d=b(l,!0);L(l),L(o);var p=u(o,2),m=b(p,!0);L(p);var h=u(p,2),g=e=>{var n=nU(),r=b(n,!0);L(n),H(e=>v(r,e),[()=>(f(t),a(()=>f(t).affectedCoverage.map(yn).join(` · `)))]),i(e,n)};V(h,e=>{f(t),a(()=>f(t).affectedCoverage.length>0)&&e(g)});var _=u(h,2),y=e=>{var n=rU(),r=b(n,!0);L(n),H(e=>v(r,e),[()=>(f(t),a(()=>an(f(t))))]),i(e,n)},x=S(()=>(f(t),a(()=>an(f(t)))));V(_,e=>{f(x)&&e(y)}),L(n),H((e,i)=>{D(n,`data-settings-target`,(f(t),a(()=>`diagnostic:${f(t).id}`))),D(n,`data-testid`,(f(t),a(()=>`settings-diagnostic-${f(t).id}`))),r=C(n,1,`svelte-1uha8ag`,null,r,{"diagnostic-degraded":f(t).status===`degraded`,"settings-target-active":f(pt)===`diagnostic:${f(t).id}`}),v(c,(f(t),a(()=>f(t).id))),v(d,e),v(m,i)},[()=>(f(t),a(()=>rn(f(t)))),()=>(f(t),a(()=>f(t).billingDomainId??q(`unknown`)))]),i(e,n)}),L(t),i(e,t)};V(Re,e=>{f(rt)&&e(He)}),L(Ee);var Ue=u(Ee,2),We=b(Ue),Ge=b(We),Ke=b(Ge,!0);L(Ge);var qe=u(Ge,2),Je=b(qe,!0);L(qe),L(We);var Ye=u(We,2),Xe=e=>{var t=JH(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>q(`retentionUnavailable`))]),i(e,t)},Ze=e=>{var t=gH(),n=b(t);L(t),H((e,t,r)=>v(n,`${f(at),a(()=>f(at).rawRetentionDays)??``}
|
|
25
|
+
${e??``} · ${f(at),a(()=>f(at).rawObservations)??``}
|
|
26
|
+
${t??``} · ${f(at),a(()=>f(at).dailyAggregates)??``}
|
|
27
|
+
${r??``}`),[()=>a(()=>q(`retentionDays`)),()=>a(()=>q(`rawObservations`)),()=>a(()=>q(`dailyAggregates`))]),i(e,t)};V(Ye,e=>{f(Ie)?e(Xe):f(at)&&e(Ze,1)});var it=u(Ye,2),W=e=>{var t=JH(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>q(`privacyActionUnavailable`))]),i(e,t)};V(it,e=>{f(ze)&&e(W)});var ut=u(it,2),dt=b(ut),ft=b(dt,!0);L(dt);var mt=u(dt,2),ht=b(mt,!0);L(mt);var K=u(mt,2),gt=b(K);z(gt);var _t=u(gt);L(K);var vt=u(K,2),yt=b(vt);z(yt);var bt=u(yt);L(vt);var xt=u(vt,2),St=b(xt,!0);L(xt);var Ct=u(xt,2),J=b(Ct,!0);L(Ct);var wt=u(Ct,2),Tt=b(wt,!0);L(wt),L(ut),L(Ue),L(T),L(r),E(r,e=>l(G,e),()=>f(G)),L(n),H((e,t,n,r,i,a,o,s,c,l,u,d,m,g,_,b,x,S,T,E,O)=>{v(p,e),v(h,t),v(y,n),D(w,`aria-label`,r),v(I,i),v(te,a),oe=C(ae,1,`plans-section svelte-1uha8ag`,null,oe,{"settings-target-active":f(pt)===`plans`}),v(ce,o),v(ue,s),v(ye,c),v(xe,l),v(ke,u),v(je,d),v(Ke,m),v(Je,g),v(ft,_),v(ht,b),v(_t,` ${x??``}`),v(bt,` ${S??``}`),xt.disabled=f(lt),v(St,T),v(J,E),wt.disabled=f(ct),v(Tt,O)},[()=>a(()=>q(`settings`)),()=>a(()=>q(`settings`)),()=>a(()=>q(`settingsSubtitle`)),()=>a(()=>q(`closeSettings`)),()=>a(()=>q(`connections`)),()=>a(()=>q(`connectionsSubtitle`)),()=>a(()=>q(`plans`)),()=>a(()=>q(`plansSubtitle`)),()=>a(()=>q(`monitoring`)),()=>a(()=>q(`monitoringSubtitle`)),()=>a(()=>q(`diagnostics`)),()=>a(()=>q(`diagnosticsSubtitle`)),()=>a(()=>q(`privacy`)),()=>a(()=>q(`privacySubtitle`)),()=>a(()=>q(`exportJson`)),()=>a(()=>q(`exportCsv`)),()=>a(()=>q(`includeAccountIdentifiers`)),()=>a(()=>q(`deleteProductSecrets`)),()=>(f(lt),a(()=>f(lt)?q(`hardRebuilding`):q(`hardRebuild`))),()=>a(()=>q(`hardRebuildWarning`)),()=>(f(ct),a(()=>f(ct)?q(`clearing`):q(`clearData`)))]),t(`click`,w,Xt),t(`click`,dt,()=>Kt(`json`)),t(`click`,mt,()=>Kt(`csv`)),P(gt,()=>f(st),e=>l(st,e)),P(yt,()=>f(ot),e=>l(ot,e)),t(`click`,xt,Wt),t(`click`,wt,qt),i(e,n)};V(Ee,e=>{f(ft)&&e(ke)});var Ae=u(Ee,2),Le=e=>{let n=x(()=>f(K)),r=x(()=>(M(f(n)),a(()=>f(n).retailEquivalent.status===`unavailable`?f(n).reportedEstimate:f(n).retailEquivalent))),o=x(()=>(M(f(n)),a(()=>gn(f(n).priceEvidence)))),s=x(()=>(M(f(n)),a(()=>hn(f(n).observations,f(n).tokenTotals)))),c=x(()=>(M(f(n)),a(()=>_n(f(n)))));var d=cU(),p=b(d),m=b(p),h=b(m),g=b(h),_=b(g);L(g);var y=u(g,2),S=b(y,!0);L(y);var C=u(y,2),w=e=>{var t=nU(),n=b(t,!0);L(t),H(e=>v(n,e),[()=>a(()=>q(`separateFromHeadline`))]),i(e,t)};V(C,e=>{M(f(n)),a(()=>f(n).includedInHeadline===!1)&&e(w)}),L(h);var T=u(h,2);L(m);var O=u(m,2),k=b(O),A=b(k),j=b(A),N=b(j,!0);L(j);var P=u(j,2),F=b(P,!0);L(P),L(A);var I=u(A,2),ee=b(I),te=b(ee,!0);L(ee);var ne=u(ee,2),R=b(ne,!0);L(ne),L(I);var re=u(I,2),ie=b(re),ae=b(ie,!0);L(ie);var oe=u(ie,2),z=b(oe,!0);L(oe),L(re),L(k);var B=u(k,2),se=b(B),ce=b(se,!0);L(se),jB(u(se,2),{get compositionTotals(){return f(s)},get unclassifiedTokens(){return M(f(n)),a(()=>f(n).tokenEvidence.unclassifiedTokens)},get trend(){return M(f(n)),a(()=>f(n).trend)},get trendEvidence(){return f(c)},get locale(){return f(ve)},formatNumber:on,formatMoney:Ln}),L(B);var le=u(B,2),ue=b(le),de=b(ue,!0);L(ue);var fe=u(ue,2),pe=b(fe),me=b(pe),he=b(me,!0);L(me);var ge=u(me,2),_e=b(ge,!0);L(ge),L(pe);var ye=u(pe,2),be=b(ye),xe=b(be,!0);L(be);var Se=u(be,2),Ce=b(Se,!0);L(Se),L(ye);var we=u(ye,2),Te=b(we),Ee=b(Te,!0);L(Te);var De=u(Te,2),Oe=b(De,!0);L(De),L(we);var ke=u(we,2),Ae=e=>{var t=sU(),n=b(t),r=b(n,!0);L(n);var s=u(n,2),c=b(s,!0);L(s),L(t),H((e,t)=>{v(r,e),v(c,t)},[()=>a(()=>q(`priceSnapshot`)),()=>(M(f(o)),a(()=>f(o).map(e=>`${e.version} · ${e.source}`).join(` + `)))]),i(e,t)};V(ke,e=>{M(f(o)),a(()=>f(o).length>0)&&e(Ae)}),L(fe),L(le),L(O),L(p),E(p,e=>l(Xe,e),()=>f(Xe)),L(d),H((e,t,r,i,o,s,c,l,u,d,m,h,g,y,b,x)=>{D(p,`aria-label`,e),v(_,`${M(f(n)),a(()=>f(n).providerDisplayName)??``} · ${M(f(n)),a(()=>f(n).billingDomainDisplayName)??``}`),v(S,(M(f(n)),a(()=>f(n).model))),D(T,`aria-label`,t),v(N,r),v(F,i),v(te,o),v(R,s),v(ae,c),v(z,l),v(ce,u),v(de,d),v(he,m),v(_e,h),v(xe,g),v(Ce,y),v(Ee,b),v(Oe,x)},[()=>(M(f(n)),a(()=>`${q(`modelDetail`)}: ${f(n).model}`)),()=>a(()=>q(`closeModelDetail`)),()=>a(()=>q(`recordedTotal`)),()=>(M(f(n)),a(()=>on(f(n).tokenEvidence.recordedTokens))),()=>a(()=>q(`cost`)),()=>(M(f(r)),a(()=>f(r).status===`unavailable`?q(`notAvailable`):Ln(f(r).amount,f(r).comparisonCurrency))),()=>a(()=>q(`observations`)),()=>(M(f(n)),a(()=>on(f(n).tokenEvidence.observationCount))),()=>a(()=>q(`activityOverview`)),()=>a(()=>q(`evidenceSummary`)),()=>a(()=>q(`scope`)),()=>(M(f(n)),a(()=>f(n).tokenEvidence.usageScopes.map(mn).join(` + `)||q(`unknown`))),()=>a(()=>q(`totalDerivation`)),()=>(M(f(n)),a(()=>f(n).tokenEvidence.totalDerivations.map(vn).join(` + `)||q(`unknown`))),()=>a(()=>q(`latestData`)),()=>(M(f(n)),a(()=>un(f(n).lastObservedAt)))]),t(`click`,T,qn),i(e,d)};V(Ae,e=>{f(K)&&e(Le)}),H((e,t,n,r,i,a,o,c,l)=>{s.inert=f(ft)||f(K)!==null,D(d,`alt`,e),v(m,t),D(h,`aria-label`,n),D(g,`aria-selected`,f(Ue)===`agents`),D(g,`tabindex`,f(Ue)===`agents`?0:-1),v(y,r),D(w,`aria-selected`,f(Ue)===`models`),D(w,`tabindex`,f(Ue)===`models`?0:-1),v(I,i),v(R,a),D(re,`aria-label`,o),v(ae,T()===`system`?`◐`:O()===`dark`?`☾`:`☀`),v(oe,` ${c??``}`),v(se,f(ve)===`en`?`中文`:`EN`),le.disabled=f(Oe),he=C(fe,1,`svelte-1uha8ag`,null,he,{spin:f(Oe)}),v(ge,` ${l??``}`)},[()=>a(()=>q(`bannerAlt`)),()=>a(()=>q(`title`)),()=>a(()=>q(`mainViews`)),()=>a(()=>q(`agentUsageTab`)),()=>a(()=>q(`tokenModelCostsTab`)),()=>a(()=>q(`settings`)),()=>a(()=>q(`themeToggleAria`)),()=>(T(),a(()=>Y(T()))),()=>(f(Oe),a(()=>f(Oe)?q(`refreshing`):q(`refresh`)))]),t(`click`,g,()=>l(Ue,`agents`)),t(`keydown`,g,$t),t(`click`,w,()=>l(Ue,`models`)),t(`keydown`,w,$t),t(`click`,te,()=>Yt()),t(`click`,re,Tt),t(`click`,B,J),t(`click`,le,kt),i(e,r)}),i(p,Jn),ee(),oe()}export{uU as component};
|