agent-usage-all-in-one 0.2.2 → 0.3.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 +13 -11
- package/README.zh-CN.md +10 -9
- package/THIRD_PARTY_LICENSES.md +3 -1
- package/dist/cli.js +337 -92
- package/dist/cli.js.map +1 -1
- package/dist/web/_app/immutable/assets/2.BiUr1b86.css +1 -0
- package/dist/web/_app/immutable/chunks/BW9s3L2z.js +3 -0
- package/dist/web/_app/immutable/chunks/{Cui19qu3.js → CwKqhBmI.js} +1 -1
- package/dist/web/_app/immutable/entry/{app.CpOB18I2.js → app.CJoUfLXD.js} +2 -2
- package/dist/web/_app/immutable/entry/start.DEFna-Tq.js +1 -0
- package/dist/web/_app/immutable/nodes/0.DTcMU-UW.js +1 -0
- package/dist/web/_app/immutable/nodes/1.BRZSpfvp.js +1 -0
- package/dist/web/_app/immutable/nodes/2.BKHXaqdm.js +43 -0
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +8 -8
- package/package.json +2 -1
- package/dist/web/_app/immutable/assets/2.Bb7EkOVL.css +0 -1
- package/dist/web/_app/immutable/chunks/DQaovcqE.js +0 -3
- 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
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import{B as e,C as t,D as n,E as r,F as i,G as a,H as o,I as s,J as c,M as l,N as u,O as d,P as f,Q as p,S as m,T as h,U as g,V as _,W as v,Z as y,a as b,b as x,c as S,d as C,et as w,f as T,g as E,h as D,j as O,k,l as A,m as j,n as M,nt as N,o as P,p as ee,q as F,r as te,s as I,tt as L,u as ne,w as re,x as R,y as ie,z as ae}from"../chunks/BW9s3L2z.js";import"../chunks/xihTtKlq.js";w();function oe(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 z=new Set([`stale`,`timeout`,`unavailable`]),B=new Set([...z,`rate-limited`]);function se(e){return e!==null&&B.has(e)}function ce(e){return e?oe(e,``):null}function le(e,t){return`${e}:${t}`}function ue(e,t,n,r){return!r&&(t===`stale`||t===`unavailable`)?[`${e}:freshness:${t}:${n??`unknown`}`]:[]}function de(e,t,n){let r=ce(t);return r&&z.has(r)?[`${e}:health:${r}:${n??`unknown`}`]:[]}function fe(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=>le(e.providerId,e.billingDomainId??``)));for(let t of e.providers){ce(t.health.errorCode)===`rate-limited`&&(t.summaryBillingDomainId?r.add(le(t.id,t.summaryBillingDomainId)):n.add(t.id));for(let e of t.billingDomains)e.health&&ce(e.health.errorCode)===`rate-limited`&&r.add(le(t.id,e.id))}let i=e.providers.flatMap(e=>{let t=n.has(e.id)||(e.summaryBillingDomainId?r.has(le(e.id,e.summaryBillingDomainId)):!1),i=[...ue(`provider:${e.id}`,e.freshness.status,e.freshness.lastSuccessAt,t)];t||i.push(...de(`provider:${e.id}`,e.health.errorCode,e.freshness.lastSuccessAt));let a=e.billingDomains.flatMap(t=>{let i=t.freshness??e.freshness,a=t.health??e.health,o=n.has(e.id)||r.has(le(e.id,t.id))||ce(a.errorCode)===`rate-limited`;return[...ue(`domain:${e.id}:${t.id}`,i.status,i.lastSuccessAt,o),...o?[]:de(`domain:${e.id}:${t.id}`,a.errorCode,i.lastSuccessAt)]});return[...i,...a]}),a=(t?.connectors??[]).filter(e=>e.category!==null&&z.has(e.category)&&!n.has(e.providerId)&&!(e.billingDomainId&&r.has(le(e.providerId,e.billingDomainId)))).map(e=>`diagnostic:${e.id}:${e.billingDomainId??`provider`}:${e.category}:${e.lastSuccessAt??`unknown`}`),o=[...new Set([...i,...a])].sort();return o.length>0?o.join(`|`):null}function pe(e){let t=null,n=null,r=!1;return{schedule(i,a,o){if(r)return;let s=fe(i,a);if(!s){n=null,t&&clearTimeout(t),t=null;return}o||t||s===n||(n=s,t=setTimeout(()=>{t=null,!r&&e()},0))},dispose(){r=!0,t&&clearTimeout(t),t=null}}}var me={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.`,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…`,updatingAgentUsage:`Updating agent usage in the background. Cached data remains available.`,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`,timePrecision:`Precision`,precisionEvent:`Event`,precisionHour:`Hour`,precisionDay:`Day`,precisionBillingPeriod:`Billing period`,precisionUnknown:`Unknown`,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`,apiRetailEquivalent:`API retail equivalent`,providerReportedEstimate:`Provider-reported estimate`,classificationCoverage:`Classification coverage`,pricingCoverage:`Pricing coverage`,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`,day:`Day`,breakdown:`Breakdown`,apiRateEstimate:`API rate estimate`,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`,providerEvidence:`Provider evidence`,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.`,sortByTokens:`Sort by recorded Tokens`,sortByRetailEquivalent:`Sort by API retail equivalent`,tokenShare:`Token share`,costShare:`Cost share`,retailShare:`Retail share`,unclassifiedUsage:`Unclassified usage`,modelDetail:`Model detail`,closeModelDetail:`Close model detail`,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.`,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:`连接、自动化、诊断与本地数据控制。`,reviewInSettings:`在设置中查看`,connectorsUnavailable:`连接设置暂不可用。`,monitoringUnavailable:`监控设置暂不可用。`,diagnosticsUnavailable:`诊断信息暂不可用。`,retentionUnavailable:`保留策略数据暂不可用。`,privacyActionUnavailable:`无法完成本地数据操作。`,refreshUnavailable:`刷新失败,继续显示已有用量。`,loading:`正在加载 provider 用量…`,loadingAgentUsage:`正在加载已缓存的 Agent 用量…`,loadingModelCosts:`正在加载已缓存的 Token 与模型费用…`,updatingAgentUsage:`正在后台更新 Agent 用量,已缓存的数据仍可查看。`,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:`独立计算`,timePrecision:`时间精度`,precisionEvent:`事件级`,precisionHour:`小时级`,precisionDay:`日级`,precisionBillingPeriod:`账单周期级`,precisionUnknown:`未知`,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`,apiRetailEquivalent:`API 等价零售价`,providerReportedEstimate:`客户端报告估算`,classificationCoverage:`分类覆盖率`,pricingCoverage:`定价覆盖率`,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:`模型`,day:`日期`,breakdown:`明细`,apiRateEstimate:`按 API 价格估算`,usageTotals:`汇总`,costTrend:`费用趋势`,tokenTrend:`Token 趋势`,displayCurrency:`显示币种`,trendMetric:`趋势指标`,recordedTokenTrend:`已记录 Token 趋势`,retailEquivalentTrend:`API 等价零售价趋势`,trendData:`趋势数据`,trendSummary:`选中时间范围与 Provider 序列,包含数据缺口和时间精度`,timeAxisControls:`时间轴控制`,zoomInTimeAxis:`放大时间轴`,zoomOutTimeAxis:`缩小时间轴`,resetTimeAxis:`重置时间轴`,interactiveTrend:`交互式用量趋势`,trendInteractionHint:`滚轮缩放 · 拖拽平移`,interval:`区间`,providerEvidence:`Provider 证据`,gap:`数据缺口`,amountCoverage:`金额覆盖率`,conversionEvidence:`换算证据`,noConversionNeeded:`原币显示,无需换算`,modelRankingSubtitle:`已知模型按 Provider 与计费域分开;选择一行可审计完整证据。`,sortByTokens:`按已记录 Token 排序`,sortByRetailEquivalent:`按 API 等价零售价排序`,tokenShare:`Token 占比`,costShare:`费用占比`,retailShare:`零售价占比`,unclassifiedUsage:`未分类用量`,modelDetail:`模型详情`,closeModelDetail:`关闭模型详情`,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,然后重试刷新。`,privacy:`隐私与数据`,privacySubtitle:`导出会移除账户标识与密钥;原始数据只保存在本机。`,retentionDays:`天原始数据保留期`,rawObservations:`条原始记录`,dailyAggregates:`条每日聚合`,exportJson:`导出 JSON`,exportCsv:`导出 CSV`,includeAccountIdentifiers:`导出可得的账户标识`,deleteProductSecrets:`同时删除产品 Keychain 条目`,clearData:`清除本地用量`,clearing:`清除中…`,clearConfirmation:`清除全部本地用量历史?官方客户端凭据会保留。`,hardRebuild:`硬重算全部数据`,hardRebuilding:`硬重算进行中…`,hardRebuildWarning:`高代价操作:忽略扫描与定价缓存,可能等待很久,但不会阻塞页面使用。`,hardRebuildConfirmation:`确定硬重算全部本地用量与费用数据吗?该操作会忽略缓存、消耗较多资源,并且可能需要等待很长时间。`}};function he(e){return e.toLowerCase().startsWith(`zh`)?`zh-CN`:`en`}function ge(e,t){return me[e][t]}var _e=function(e,t){return _e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},_e(e,t)};function V(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);_e(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ve=`12px sans-serif`,ye=20,be=100,xe=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function Se(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)-ye)/be}return t}var Ce=Se(xe),we={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=we.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=Ce[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}},Te=qe([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),Ee=qe([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),De=Object.prototype.toString,Oe=Array.prototype,ke=Oe.forEach,Ae=Oe.filter,je=Oe.slice,Me=Oe.map,Ne=function(){}.constructor,Pe=Ne?Ne.prototype:null,Fe=`__proto__`,Ie=2311,Le=2**53-1;function Re(){return Ie>=Le&&(Ie=0),Ie++}function ze(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function Be(e){if(typeof e!=`object`||!e)return e;var t=e,n=De.call(e);if(n===`[object Array]`){if(!gt(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=Be(e[r])}}else if(Ee[n]){if(!gt(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(!Te[n]&&!gt(e)&&!it(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==Fe&&(t[o]=Be(e[o]));return t}function Ve(e,t,n){if(!Y(t)||!Y(e))return n?Be(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==Fe){var i=e[r],a=t[r];Y(a)&&Y(i)&&!K(a)&&!K(i)&&!it(a)&&!it(i)&&!nt(a)&&!nt(i)&&!gt(a)&&!gt(i)?Ve(i,a,n):(n||!(r in e))&&(e[r]=Be(t[r]))}return e}function H(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==Fe&&(e[n]=t[n]);return e}function He(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function Ue(e,t,n){for(var r=Xe(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}we.createCanvas;function U(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 We(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 Ge(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 Ue(e,t,n)}function Ke(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function W(e,t,n){if(e&&t){if(e.forEach&&e.forEach===ke)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 G(e,t,n){if(!e)return[];if(!t)return ut(e);if(e.map&&e.map===Me)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 qe(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 Je(e,t,n){if(!e)return[];if(!t)return ut(e);if(e.filter&&e.filter===Ae)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 Ye(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 Xe(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 Ze(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(je.call(arguments)))}}var Qe=Pe&&q(Pe.bind)?Pe.call.bind(Pe.bind):Ze;function $e(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(je.call(arguments)))}}function K(e){return Array.isArray?Array.isArray(e):De.call(e)===`[object Array]`}function q(e){return typeof e==`function`}function J(e){return typeof e==`string`}function et(e){return De.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 nt(e){return!!Te[De.call(e)]}function rt(e){return!!Ee[De.call(e)]}function it(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function at(e){return e.colorStops!=null}function ot(e){return e.image!=null}function st(e){return e!==e}function ct(){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 lt(e,t,n){return e??t??n}function ut(e){var t=[...arguments].slice(1);return je.apply(e,t)}function dt(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 ft(e,t){if(!e)throw Error(t)}function pt(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var mt=`__ec_primitive__`;function ht(e){e[mt]=!0}function gt(e){return e[mt]}var _t=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 Xe(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),vt=typeof Map==`function`;function yt(){return vt?new Map:new _t}var bt=function(){function e(t){var n=K(t);this.data=yt();var r=this;t instanceof e?t.each(i):t&&W(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 vt?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function xt(e){return new bt(e)}function St(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 Ct(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&H(n,t),n}function wt(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 Tt(){}var Et=180/Math.PI,Dt=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),Ot=new(function(){function e(){this.browser=new Dt,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`?(Ot.wxa=!0,Ot.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?Ot.worker=!0:!Ot.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(Ot.node=!0,Ot.svgSupported=!0):kt(navigator.userAgent,Ot);function kt(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 At=`.`,jt=`___EC__COMPONENT__CONTAINER___`,Mt=`___EC__EXTENDED_CLASS___`;function Nt(e){var t={main:``,sub:``};if(e){var n=e.split(At);t.main=n[0]||``,t.sub=n[1]||``}return t}function Pt(e){ft(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Ft(e){return!!(e&&e[Mt])}function It(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return Lt(t)?n=function(e){V(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},We(n,this)),H(n.prototype,e),n[Mt]=!0,n.extend=this.extend,n.superCall=Vt,n.superApply=Ht,n.superClass=t,n}}function Lt(e){return q(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Rt(e,t){e.extend=t.extend}var zt=Math.round(Math.random()*10);function Bt(e){var t=[`__\0is_clz`,zt++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function Vt(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function Ht(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Ut(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){Pt(r),e.prototype.type=r;var i=Nt(r);if(!i.sub)t[i.main]=e;else if(i.sub!==jt){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[jt]&&(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=Nt(e),r=[],i=t[n.main];return i&&i[jt]?W(i,function(e,t){t!==jt&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[Nt(e).main]},e.getAllClassMainTypes=function(){var e=[];return W(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[Nt(e).main];return n&&n[jt]};function n(e){var n=t[e.main];return(!n||!n[jt])&&(n=t[e.main]={},n[jt]=!0),n}}function Wt(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&&U(r,s)>=0||i&&U(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var Gt=Wt([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),Kt=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Gt(this,e,t)},e}(),qt=function(){function e(e){this.value=e}return e}(),Jt=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new qt(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}(),Yt=function(){function e(e){this._list=new Jt,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 qt(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}(),Xt=new Yt(50);function Zt(e){if(typeof e==`string`){var t=Xt.get(e);return t&&t.image}return e}function Qt(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=Xt.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!en(t)&&a.pending.push(o)):(t=we.loadImage(e,$t,$t),t.__zrImageSrc=e,Xt.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function $t(){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 en(e){return e&&e.width&&e.height}function tn(){return[1,0,0,1,0,0]}function nn(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function rn(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 an(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 on(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 sn(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 cn(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 ln(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 un(e,t){return e??=0,t??=0,[e,t]}function dn(e,t){return e[0]=t[0],e[1]=t[1],e}function fn(e){return[e[0],e[1]]}function pn(e,t,n){return e[0]=t,e[1]=n,e}function mn(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function hn(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function gn(e){return Math.sqrt(_n(e))}function _n(e){return e[0]*e[0]+e[1]*e[1]}function vn(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function yn(e,t){var n=gn(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function bn(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var xn=bn;function Sn(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Cn=Sn;function wn(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 Tn(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 En(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Dn(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var On=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}(),kn=Math.min,An=Math.max,jn=Math.abs,Mn=[`x`,`y`],Nn=[`width`,`height`],Pn=new On,Fn=new On,In=new On,Ln=new On,Rn=$n(),zn=Rn.minTv,Bn=Rn.maxTv,Vn=[0,0],Hn=function(){function e(e,t,n,r){Wn(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=kn(e.x,this.x),n=kn(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?An(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?An(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 Kn(tn(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&On.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=Wn(Yn,t.x,t.y,t.width,t.height)),n instanceof e||(n=Wn(Xn,n.x,n.y,n.width,n.height));var s=!!r;Rn.reset(i,s);var c=Rn.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)&&(Vn[0]=1/0,Vn[1]=0,Qn(l,u,p,m,0,s,a,o),Qn(d,f,h,g,1,s,a,o),s&&On.copy(r,_?Rn.useDir?Rn.dirMinTv:zn:Bn)),_},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){Gn(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&&Gn(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}Pn.x=In.x=t.x,Pn.y=Ln.y=t.y,Fn.x=Ln.x=t.x+t.width,Fn.y=In.y=t.y+t.height,Pn.transform(n),Ln.transform(n),Fn.transform(n),In.transform(n),e.x=kn(Pn.x,Fn.x,In.x,Ln.x),e.y=kn(Pn.y,Fn.y,In.y,Ln.y);var s=An(Pn.x,Fn.x,In.x,Ln.x),c=An(Pn.y,Fn.y,In.y,Ln.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=nn(e||[]),on(e,e,pn(Zn,-t.x,-t.y)),cn(e,e,pn(Zn,r,i)),on(e,e,pn(Zn,n.x,n.y)),e},e}(),Un=Hn.create,Wn=Hn.set,Gn=Hn.copy,Kn=Hn.calculateTransform,qn=Hn.applyTransform,Jn=Hn.contain,Yn=new Hn(0,0,0,0),Xn=new Hn(0,0,0,0),Zn=[];function Qn(e,t,n,r,i,a,o,s){var c=jn(t-n),l=jn(r-e),u=kn(c,l),d=Mn[i],f=Mn[1-i],p=Nn[i];t<n||r<e?c<l?(a&&(Bn[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(Bn[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=An(e,n),o[p]=kn(t,r)-o[d]),a&&(u<Vn[0]||Rn.useDir)&&(Vn[0]=kn(u,Vn[0]),(c<l||!Rn.bidirectional)&&(zn[d]=c,zn[f]=0,Rn.useDir&&Rn.calcDirMTV()),(c>=l||!Rn.bidirectional)&&(zn[d]=-l,zn[f]=0,Rn.useDir&&Rn.calcDirMTV())))}function $n(){var e=0,t=new On,n=new On,r={minTv:new On,maxTv:new On,useDir:!1,dirMinTv:new On,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=An(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 jn(e)<1e-10}return r}function er(e){tr||=new Yt(100),e||=`12px sans-serif`;var t=tr.get(e);return t||(t={font:e,strWidthCache:new Yt(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:we.measureText(`国`,e).width,asciiCharWidth:we.measureText(`a`,e).width},tr.put(e,t)),t}var tr;function nr(e){if(!(rr>=ir)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=we.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?rr=ir:i>2&&rr++,t}}var rr=0,ir=5;function ar(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=nr(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function or(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=we.measureText(t,e.font).width,n.put(t,r)),r}function sr(e,t,n,r){var i=or(er(t),e),a=dr(t);return new Hn(lr(0,i,n),ur(0,a,r),i,a)}function cr(e,t,n,r){var i=((e||``)+``).split(`
|
|
2
|
+
`);if(i.length===1)return sr(i[0],t,n,r);for(var a=new Hn(0,0,0,0),o=0;o<i.length;o++){var s=sr(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function lr(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function ur(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function dr(e){return er(e).stWideCharWidth}function fr(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function pr(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+=fr(r[0],n.width),l+=fr(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 mr=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function hr(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(`
|
|
3
|
+
`);a=gr(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)_r(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
|
|
4
|
+
`),e.isTruncated=s}function gr(e,t,n,r){r||={};var i=H({},r);n=X(n,`...`),i.maxIterations=X(r.maxIterations,2);var a=i.minChar=X(r.minChar,0),o=i.fontMeasureInfo=er(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=or(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 _r(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=or(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?vr(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=or(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function vr(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=ar(n,e.charCodeAt(i));return i}function yr(e,t,n,r){var i=Mr(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=dr(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?Or(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=gr(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)_r(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=er(l),S=0;S<_.length;S++)w=Math.max(or(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 br=function(){function e(){}return e}(),xr=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Sr=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 Cr(e,t,n,r,i){var a=new Sr,o=Mr(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=mr.lastIndex=0,h;(h=mr.exec(o))!=null;){var g=h.index;g>m&&wr(a,o.substring(m,g),t,p),wr(a,h[2],t,p,h[1]),m=mr.lastIndex}m<o.length&&wr(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=dr(N);var P=X(A.height,k.contentHeight);if(k.innerHeight=P,j&&(P+=j[0]+j[2]),k.height=P,k.lineHeight=lt(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 ee=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<ee;break outer}var F=A.width,te=F==null||F===`auto`;if(typeof F==`string`&&F.charAt(F.length-1)===`%`)k.percentWidth=F,_.push(k),k.contentWidth=or(er(N),k.text);else{if(te){var I=A.backgroundColor,L=I&&I.image;L&&(L=Zt(L),en(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?!te||ne<M?(k.text=``,k.width=k.contentWidth=0):(hr(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=or(er(N),k.text)):k.contentWidth=or(er(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],re=k.percentWidth;k.width=parseInt(re,10)/100*a.width}return a}function wr(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=fr(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=Or(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=er(c),_=0;_<u.length;_++){var v=u[_],y=new br;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!a,y.width=typeof o.width==`number`?o.width:d?d[_]:or(g,v),!_&&!l){var b=(s[s.length-1]||(s[0]=new xr)).tokens,x=b.length;x===1&&b[0].isLineHolder?b[0]=y:(v||!x||a)&&b.push(y)}else s.push(new xr([y]))}}function Tr(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Er=qe(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Dr(e){return!Tr(e)||!!Er[e]}function Or(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=er(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=ar(d,p.charCodeAt(0)),h=!r&&!Dr(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 kr(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;Hn.set(Ar,lr(n,o,i),ur(r,s,a),o,s),Hn.intersect(t,Ar,null,jr);var c=jr.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=lr(c.x,c.width,i,!0),e.baseY=ur(c.y,c.height,a,!0)}}var Ar=new Hn(0,0,0,0),jr={outIntersectRect:{},clamp:!0};function Mr(e){return e==null?e=``:e+=``}function Nr(e){var t=Mr(e.text),n=e.font;return Pr(e,or(er(n),t),dr(n),null)}function Pr(e,t,n,r){var i=new Hn(lr(e.x||0,t,e.textAlign),ur(e.y||0,n,e.textBaseline),t,n),a=r??(Fr(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Fr(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var Ir=nn,Lr=5e-5;function Rr(e){return e>Lr||e<-Lr}var zr=[],Br=[],Vr=tn(),Hr=Math.abs,Ur=function(){function e(){}return e.prototype.getLocalTransform=function(e){return Wr(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 Rr(this.rotation)||Rr(this.x)||Rr(this.y)||Rr(this.scaleX-1)||Rr(this.scaleY-1)||Rr(this.skewX)||Rr(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(Ir(n),this.invTransform=null);return}n||=tn(),t?this.getLocalTransform(n):Ir(n),e&&(t?an(n,e,n):rn(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||tn(),ln(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(zr);var n=zr[0]<0?-1:1,r=zr[1]<0?-1:1,i=((zr[0]-n)*t+n)/zr[0]||0,a=((zr[1]-r)*t+r)/zr[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||tn(),an(Br,e.invTransform,t),t=Br);var n=this.originX,r=this.originY;(n||r)&&(Vr[4]=n,Vr[5]=r,an(Br,t,Vr),Br[4]-=n,Br[5]-=r,t=Br),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&&Tn(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Tn(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Hr(e[0]-1)>1e-10&&Hr(e[3]-1)>1e-10?Math.sqrt(Hr(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){qr(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&&sn(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}(),Wr=Ur.getLocalTransform;function Gr(){return new Ur}var Kr=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function qr(e,t){return He(e,t,Kr)}var Jr={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-Jr.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?Jr.bounceIn(e*2)*.5:Jr.bounceOut(e*2-1)*.5+.5}},Yr=Math.pow,Xr=Math.sqrt,Zr=1e-8,Qr=1e-4,$r=Xr(3),ei=1/3,ti=un(),ni=un(),ri=un();function ii(e){return e>-Zr&&e<Zr}function ai(e){return e>Zr||e<-Zr}function oi(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 si(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function ci(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(ii(u)&&ii(d)){if(ii(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(ii(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=Xr(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Yr(-y,ei):Yr(y,ei),b=b<0?-Yr(-b,ei):Yr(b,ei);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*Xr(u*u*u)),S=Math.acos(x)/3,C=Xr(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+$r*Math.sin(S)))/(3*o),T=(-s+C*(w-$r*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 li(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(ii(o)){if(ai(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(ii(u))i[0]=-a/(2*o);else if(u>0){var d=Xr(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 ui(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 di(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)ni[0]=oi(e,n,i,o,v),ni[1]=oi(t,r,a,s,v),g=Cn(ti,ni),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<Qr);y++)m=d-f,h=d+f,ni[0]=oi(e,n,i,o,m),ni[1]=oi(t,r,a,s,m),g=Cn(ni,ti),m>=0&&g<p?(d=m,p=g):(ri[0]=oi(e,n,i,o,h),ri[1]=oi(t,r,a,s,h),_=Cn(ri,ti),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=oi(e,n,i,o,d),u[1]=oi(t,r,a,s,d)),Xr(p)}function fi(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=oi(e,n,i,o,m),g=oi(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function pi(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function mi(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function hi(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(ii(a)){if(ai(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(ii(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=Xr(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 gi(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function _i(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 vi(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){ni[0]=pi(e,n,i,f),ni[1]=pi(t,r,a,f);var p=Cn(ti,ni);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<Qr);m++){var h=l-u,g=l+u;ni[0]=pi(e,n,i,h),ni[1]=pi(t,r,a,h);var p=Cn(ni,ti);if(h>=0&&p<d)l=h,d=p;else{ri[0]=pi(e,n,i,g),ri[1]=pi(t,r,a,g);var _=Cn(ri,ti);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=pi(e,n,i,l),c[1]=pi(t,r,a,l)),Xr(d)}function yi(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=pi(e,n,i,f),m=pi(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var bi=/cubic-bezier\(([0-9,\.e ]+)\)/;function xi(e){var t=e&&bi.exec(e);if(t){var n=t[1].split(`,`),r=+pt(n[0]),i=+pt(n[1]),a=+pt(n[2]),o=+pt(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:ci(0,r,a,1,e,s)&&oi(0,i,o,1,s[0])}}}var Si=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||Tt,this.ondestroy=e.ondestroy||Tt,this.onrestart=e.onrestart||Tt,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=q(e)?e:Jr[e]||xi(e)},e}(),Ci={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 wi(e){return e=Math.round(e),e<0?0:e>255?255:e}function Ti(e){return e=Math.round(e),e<0?0:e>360?360:e}function Ei(e){return e<0?0:e>1?1:e}function Di(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?wi(parseFloat(t)/100*255):wi(parseInt(t,10))}function Oi(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ei(parseFloat(t)/100):Ei(parseFloat(t))}function ki(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 Ai(e,t,n){return e+(t-e)*n}function ji(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Mi(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ni=new Yt(20),Pi=null;function Fi(e,t){Pi&&Mi(Pi,t),Pi=Ni.put(e,Pi||t.slice())}function Ii(e,t){if(e){t||=[];var n=Ni.get(e);if(n)return Mi(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Ci)return Mi(t,Ci[r]),Fi(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)){ji(t,0,0,0,1);return}return ji(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),Fi(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){ji(t,0,0,0,1);return}return ji(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Fi(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?ji(t,+l[0],+l[1],+l[2],1):ji(t,0,0,0,1);u=Oi(l.pop());case`rgb`:if(l.length>=3)return ji(t,Di(l[0]),Di(l[1]),Di(l[2]),l.length===3?u:Oi(l[3])),Fi(e,t),t;ji(t,0,0,0,1);return;case`hsla`:if(l.length!==4){ji(t,0,0,0,1);return}return l[3]=Oi(l[3]),Li(l,t),Fi(e,t),t;case`hsl`:if(l.length!==3){ji(t,0,0,0,1);return}return Li(l,t),Fi(e,t),t;default:return}}ji(t,0,0,0,1)}}function Li(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Oi(e[1]),i=Oi(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],ji(t,wi(ki(o,a,n+1/3)*255),wi(ki(o,a,n)*255),wi(ki(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Ri(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 zi(e,t){var n=Ii(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 Hi(n,n.length===4?`rgba`:`rgb`)}}function Bi(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=Ii(t[i]),s=Ii(t[a]),c=r-i,l=Hi([wi(Ai(o[0],s[0],c)),wi(Ai(o[1],s[1],c)),wi(Ai(o[2],s[2],c)),Ei(Ai(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Vi(e,t,n,r){var i=Ii(e);if(e)return i=Ri(i),t!=null&&(i[0]=Ti(q(t)?t(i[0]):t)),n!=null&&(i[1]=Oi(q(n)?n(i[1]):n)),r!=null&&(i[2]=Oi(q(r)?r(i[2]):r)),Hi(Li(i),`rgba`)}function Hi(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 Ui(e,t){var n=Ii(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Wi=new Yt(100);function Gi(e){if(J(e)){var t=Wi.get(e);return t||(t=zi(e,-.1),Wi.put(e,t)),t}if(at(e)){var n=H({},e);return n.colorStops=G(e.colorStops,function(e){return{offset:e.offset,color:zi(e.color,-.1)}}),n}return e}function Ki(e){return e.type===`linear`}function qi(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 Ji=Array.prototype.slice;function Yi(e,t,n){return(t-e)*n+e}function Xi(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=Yi(t[a],n[a],r);return e}function Zi(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]=Yi(t[o][s],n[o][s],r)}return e}function Qi(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function $i(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 ta(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]:Ji.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 na(e){if(Ke(e)){var t=e.length;if(Ke(e[0])){for(var n=[],r=0;r<t;r++)n.push(Ji.call(e[r]));return n}return Ji.call(e)}return e}function ra(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 ia(e){return Ke(e&&e[0])?2:1}var aa=0,oa=1,sa=2,ca=3,la=4,ua=5,da=6;function fa(e){return e===la||e===ua}function pa(e){return e===oa||e===sa}var ma=[0,0,0,0],ha=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=da,s=t;if(Ke(t)){var c=ia(t);o=c,(c===1&&!tt(t[0])||c===2&&!tt(t[0][0]))&&(a=!0)}else if(tt(t)&&!st(t))o=aa;else if(J(t)){if(!isNaN(+t))o=aa;else{var l=Ii(t);l&&(s=l,o=ca)}}else if(at(t)){var u=H({},s);u.colorStops=G(t.colorStops,function(e){return{offset:e.offset,color:Ii(e.color)}}),Ki(t)?o=la:qi(t)&&(o=ua),s=u}i===0?this.valType=o:(o!==this.valType||o===da)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=q(n)?n:Jr[n]||xi(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=pa(r),c=fa(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?ta(d,f,r):c&&ea(d.colorStops,f.colorStops))}if(!o&&r!==ua&&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===aa?n[l].additiveValue=n[l].value-p:r===ca?n[l].additiveValue=Qi([],n[l].value,p,-1):pa(r)&&(n[l].additiveValue=r===oa?Qi([],n[l].value,p,-1):$i([],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===ca,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?ma:e[s];if((pa(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(pa(i))i===oa?Xi(g,f[r],p[r],h):Zi(g,f[r],p[r],h);else if(fa(i)){var _=f[r],v=p[r],y=i===la;e[s]={type:y?`linear`:`radial`,x:Yi(_.x,v.x,h),y:Yi(_.y,v.y,h),colorStops:G(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Yi(e.offset,n.offset,h),color:ra(Xi([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Yi(_.x2,v.x2,h),e[s].y2=Yi(_.y2,v.y2,h)):e[s].r=Yi(_.r,v.r,h)}else if(c)Xi(g,f[r],p[r],h),n||(e[s]=ra(g));else{var b=Yi(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===aa?e[n]=e[n]+r:t===ca?(Ii(e[n],ma),Qi(ma,ma,r,1),e[n]=ra(ma)):t===oa?Qi(e[n],e[n],r,1):t===sa&&$i(e[n],e[n],r,1)},e}(),ga=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){ze(`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,Xe(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 ha(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===ca&&c&&(c=ra(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,na(c),r),this._trackKeys.push(o)}s.addKeyframe(e,na(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 Si({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 G(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]=na(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=Xe(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}(),_a=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}(),va=1;Ot.hasGlobalWindow&&(va=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ya=va,ba=.4,xa=`#333`,Sa=`#ccc`,Ca=`#eee`,wa=`__zr_normal__`,Ta=Kr.concat([`ignore`]),Ea=qe(Kr,function(e,t){return e[t]=!0,e},{ignore:!1}),Da={},Oa=new Hn(0,0,0,0),ka=[],Aa=function(){function e(e){this.id=Re(),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=Oa,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(Da,n,d):pr(Da,n,d),i.x=Da.x,i.y=Da.y,a=Da.align,o=Da.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=fr(f[0],d.width),m=fr(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 Hn(0,0,0,0);i.getLocalTransform(ka),ln(ka,ka),Hn.copy(_,d),_.applyTransform(ka)}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()?Sa:xa},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Ii(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,Hi(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||{},H(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=Xe(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,Ta)},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(wa,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===wa;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(U(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){ze(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=Ra(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,Ba(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=Ra(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,Ba(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=U(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=U(r,e),a=U(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];H(t,i),i.textConfig&&(n||={},H(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=H({},r?this.textConfig:n.textConfig),H(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<Ta.length;l++){var u=Ta[l],d=i&&Ea[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 Ur,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},H(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 ga(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=U(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){ja(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){ja(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=ja(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}();Ge(Aa,_a),Ge(Aa,Ur);function ja(e,t,n,r,i){n||={};var a=[];La(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 Ma(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function Na(e){return Ke(e[0])}function Pa(e,t,n){if(Ke(t[n])){if(Ke(e[n])||(e[n]=[]),rt(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),Ma(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(Na(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?Ma(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else Ma(a,i,o);a.length=i.length}}else e[n]=t[n]}function Fa(e,t){return e===t||Ke(e)&&Ke(t)&&Ia(e,t)}function Ia(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 La(e,t,n,r,i,a,o,s){for(var c=Xe(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)&&!Ke(v)&&!at(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}La(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=U(m,x);m.splice(S,1)}}if(i.force||(h=Je(h,function(e){return!Fa(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[_]=na(n[_]),Pa(n,r,_)}}var x=new ga(n,!1,!1,d?Je(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 Ra(e,t,n,r){return!(n&&n.hoverLayer||r)||za(e)||t&&za(t)?0:1}function za(e){return e.type===`text`||e.type===`tspan`}function Ba(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var Va=`__zr_style_`+Math.round(Math.random()*10),Ha={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},Ua={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ha[Va]=!0;var Wa=[`z`,`z2`,`invisible`],Ga=[`invisible`],Ka=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=Xe(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&&Ya(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 Hn(0,0,0,0),t?Hn.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 Hn(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:H(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 Ct(Ha,e)},t.prototype.useStyle=function(e){e[Va]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()},t.prototype._useHoverStyle=function(e){this.__hoverStyle=e},t.prototype.isStyleObject=function(e){return e[Va]},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,Wa)},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=Xe(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=Xe(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?Ga:Wa,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 H(e,t),e},t.prototype.getAnimationStyleProps=function(){return Ua},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}(Aa),qa=new Hn(0,0,0,0),Ja=new Hn(0,0,0,0);function Ya(e,t,n){return qa.copy(e.getBoundingRect()),e.transform&&qa.applyTransform(e.transform),Ja.width=t,Ja.height=n,!qa.intersect(Ja)}var Xa=Math.min,Za=Math.max,Qa=Math.sin,$a=Math.cos,eo=Math.PI*2,to=un(),no=un(),ro=un();function io(e,t,n,r,i,a){i[0]=Xa(e,n),i[1]=Xa(t,r),a[0]=Za(e,n),a[1]=Za(t,r)}var ao=[],oo=[];function so(e,t,n,r,i,a,o,s,c,l){var u=li,d=oi,f=u(e,n,i,o,ao);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,ao[p]);c[0]=Xa(m,c[0]),l[0]=Za(m,l[0])}f=u(t,r,a,s,oo);for(var p=0;p<f;p++){var h=d(t,r,a,s,oo[p]);c[1]=Xa(h,c[1]),l[1]=Za(h,l[1])}c[0]=Xa(e,c[0]),l[0]=Za(e,l[0]),c[0]=Xa(o,c[0]),l[0]=Za(o,l[0]),c[1]=Xa(t,c[1]),l[1]=Za(t,l[1]),c[1]=Xa(s,c[1]),l[1]=Za(s,l[1])}function co(e,t,n,r,i,a,o,s){var c=gi,l=pi,u=Za(Xa(c(e,n,i),1),0),d=Za(Xa(c(t,r,a),1),0),f=l(e,n,i,u),p=l(t,r,a,d);o[0]=Xa(e,i,f),o[1]=Xa(t,a,p),s[0]=Za(e,i,f),s[1]=Za(t,a,p)}function lo(e,t,n,r,i,a,o,s,c){var l=En,u=Dn,d=Math.abs(i-a);if(d%eo<1e-4&&d>1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(to[0]=$a(i)*n+e,to[1]=Qa(i)*r+t,no[0]=$a(a)*n+e,no[1]=Qa(a)*r+t,l(s,to,no),u(c,to,no),i%=eo,i<0&&(i+=eo),a%=eo,a<0&&(a+=eo),i>a&&!o?a+=eo:i<a&&o&&(i+=eo),o){var f=a;a=i,i=f}for(var p=0;p<a;p+=Math.PI/2)p>i&&(ro[0]=$a(p)*n+e,ro[1]=Qa(p)*r+t,l(s,ro,s),u(c,ro,c))}var uo={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},fo=[],po=[],mo=[],ho=[],go=[],_o=[],vo=Math.min,yo=Math.max,bo=Math.cos,xo=Math.sin,So=Math.abs,Co=Math.PI,wo=Co*2,To=typeof Float32Array<`u`,Eo=[];function Do(e){return Math.round(e/Co*1e8)/1e8%2*Co}function Oo(e,t){var n=Do(e[0]);n<0&&(n+=wo);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=wo?i=n+wo:t&&n-i>=wo?i=n-wo:!t&&n>i?i=n+(wo-Do(n-i)):t&&n<i&&(i=n-(wo-Do(i-n))),e[0]=n,e[1]=i}var ko=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=So(n/ya/e)||0,this._uy=So(n/ya/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(uo.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=So(e-this._xi),r=So(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(uo.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(uo.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(uo.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(),Eo[0]=r,Eo[1]=i,Oo(Eo,a),r=Eo[0],i=Eo[1];var o=i-r;return this.addData(uo.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=bo(i)*n+e,this._yi=xo(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(uo.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(uo.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)&&To&&(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(To&&(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,To&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){mo[0]=mo[1]=go[0]=go[1]=Number.MAX_VALUE,ho[0]=ho[1]=_o[0]=_o[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 uo.M:t=r=e[a++],n=i=e[a++],go[0]=r,go[1]=i,_o[0]=r,_o[1]=i;break;case uo.L:io(t,n,e[a],e[a+1],go,_o),t=e[a++],n=e[a++];break;case uo.C:so(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],go,_o),t=e[a++],n=e[a++];break;case uo.Q:co(t,n,e[a++],e[a++],e[a],e[a+1],go,_o),t=e[a++],n=e[a++];break;case uo.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=bo(f)*u+c,i=xo(f)*d+l),lo(c,l,u,d,f,p,m,go,_o),t=bo(p)*u+c,n=xo(p)*d+l;break;case uo.R:r=t=e[a++],i=n=e[a++];var h=e[a++],g=e[a++];io(r,i,r+h,i+g,go,_o);break;case uo.Z:t=r,n=i}En(mo,mo,go),Dn(ho,ho,_o)}return a===0&&(mo[0]=mo[1]=ho[0]=ho[1]=0),new Hn(mo[0],mo[1],ho[0]-mo[0],ho[1]-mo[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 uo.M:i=o=e[d++],a=s=e[d++];break;case uo.L:var h=e[d++],g=e[d++],_=h-i,v=g-a;(So(_)>n||So(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case uo.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=fi(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case uo.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=yi(i,a,y,b,h,g,10),i=h,a=g;break;case uo.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=bo(D)*T+C,s=xo(D)*E+w),m=yo(T,E)*vo(wo,Math.abs(O)),i=bo(k)*T+C,a=xo(k)*E+w;break;case uo.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case uo.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!==uo.L&&v>0&&(e.lineTo(y,b),v=0),S){case uo.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case uo.L:u=n[x++],d=n[x++];var w=So(u-c),T=So(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 uo.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;ui(c,k,j,N,D,fo),ui(l,A,M,P,D,po),e.bezierCurveTo(fo[1],po[1],fo[2],po[2],fo[3],po[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,N,P),c=N,l=P;break;case uo.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;_i(c,k,j,D,fo),_i(l,A,M,D,po),e.quadraticCurveTo(fo[1],po[1],fo[2],po[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case uo.A:var ee=n[x++],F=n[x++],te=n[x++],I=n[x++],L=n[x++],ne=n[x++],re=n[x++],R=!n[x++],ie=te>I?te:I,ae=So(te-I)>.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(ee,F,te,I,re,L,oe,R):e.arc(ee,F,ie,L,oe,R),z)break lo;C&&(o=bo(L)*te+ee,s=xo(L)*I+F),c=bo(oe)*te+ee,l=xo(oe)*I+F;break;case uo.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var B=n[x++],se=n[x++];if(f){var E=p[g++];if(h+E>_){var ce=_-h;e.moveTo(u,d),e.lineTo(u+vo(ce,B),d),ce-=B,ce>0&&e.lineTo(u+B,d+vo(ce,se)),ce-=se,ce>0&&e.lineTo(u+yo(B-ce,0),d+se),ce-=B,ce>0&&e.lineTo(u,d+yo(se-ce,0));break lo}h+=E}e.rect(u,d,B,se);break;case uo.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=uo,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function Ao(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 jo(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:di(e,t,n,r,i,a,o,s,l,u,null)<=d/2}function Mo(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:vi(e,t,n,r,i,a,s,c,null)<=l/2}var No=Math.PI*2;function Po(e){return e%=No,e<0&&(e+=No),e}var Fo=Math.PI*2;function Io(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)%Fo<1e-4)return!0;if(a){var d=r;r=Po(i),i=Po(d)}else r=Po(r),i=Po(i);r>i&&(i+=Fo);var f=Math.atan2(c,s);return f<0&&(f+=Fo),f>=r&&f<=i||f+Fo>=r&&f+Fo<=i}function Lo(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 Ro=ko.CMD,zo=Math.PI*2,Bo=1e-4;function Vo(e,t){return Math.abs(e-t)<Bo}var Ho=[-1,-1,-1],Uo=[-1,-1];function Wo(){var e=Uo[0];Uo[0]=Uo[1],Uo[1]=e}function Go(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=ci(t,r,a,s,l,Ho);if(u===0)return 0;for(var d=0,f=-1,p=void 0,m=void 0,h=0;h<u;h++){var g=Ho[h],_=g===0||g===1?.5:1;oi(e,n,i,o,g)<c||(f<0&&(f=li(t,r,a,s,Uo),Uo[1]<Uo[0]&&f>1&&Wo(),p=oi(t,r,a,s,Uo[0]),f>1&&(m=oi(t,r,a,s,Uo[1]))),f===2?g<Uo[0]?d+=p<t?_:-_:g<Uo[1]?d+=m<p?_:-_:d+=s<m?_:-_:g<Uo[0]?d+=p<t?_:-_:d+=s<p?_:-_)}return d}function Ko(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=hi(t,r,a,s,Ho);if(c===0)return 0;var l=gi(t,r,a);if(l>=0&&l<=1){for(var u=0,d=pi(t,r,a,l),f=0;f<c;f++){var p=Ho[f]===0||Ho[f]===1?.5:1,m=pi(e,n,i,Ho[f]);m<o||(Ho[f]<l?u+=d<t?p:-p:u+=a<d?p:-p)}return u}var p=Ho[0]===0||Ho[0]===1?.5:1,m=pi(e,n,i,Ho[0]);return m<o?0:a<t?p:-p}function qo(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);Ho[0]=-c,Ho[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=zo-1e-4){r=0,i=zo;var u=a?1:-1;return o>=Ho[0]+e&&o<=Ho[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=zo,i+=zo);for(var f=0,p=0;p<2;p++){var m=Ho[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=zo+h),(h>=r&&h<=i||h+zo>=r&&h+zo<=i)&&(h>Math.PI/2&&h<Math.PI*1.5&&(u=-u),f+=u)}}return f}function Jo(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===Ro.M&&m>1&&(n||(s+=Lo(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case Ro.M:u=a[m++],d=a[m++],c=u,l=d;break;case Ro.L:if(n){if(Ao(c,l,a[m],a[m+1],t,r,i))return!0}else s+=Lo(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Ro.C:if(n){if(jo(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Go(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 Ro.Q:if(n){if(Mo(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Ko(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Ro.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+=Lo(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(Io(_,v,b,x,x+S,C,t,w,i))return!0}else s+=qo(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case Ro.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(Ao(u,d,f,d,t,r,i)||Ao(f,d,f,p,t,r,i)||Ao(f,p,u,p,t,r,i)||Ao(u,p,u,d,t,r,i))return!0}else s+=Lo(f,d,f,p,r,i),s+=Lo(u,p,u,d,r,i);break;case Ro.Z:if(n){if(Ao(c,l,u,d,t,r,i))return!0}else s+=Lo(c,l,u,d,r,i);c=u,l=d}}return!n&&!Vo(l,d)&&(s+=Lo(c,l,u,d,r,i)||0),s!==0}function Yo(e,t,n){return Jo(e,0,!1,t,n)}function Xo(e,t,n,r){return Jo(e,t,!0,n,r)}var Zo=Ue({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ha),Qo={style:Ue({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Ua.style)},$o=Kr.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),es=function(e){V(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<$o.length;++s)i[$o[s]]=this[$o[s]];i.__dirty|=1}else this._decalEl&&=null},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=Xe(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?H(this.style,o):this.useStyle(o):a===`shape`?H(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=Ui(e,0);return t>.5?xa:t>.2?Ca:Sa}if(e)return Sa}return xa},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(J(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Ui(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 ko(!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)),Xo(a,o/s,e,t)))return!0}if(this.hasFill())return Yo(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:H(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return Ct(Zo,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=H({},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=H({},r.shape),H(c,n.shape)):(c=H({},i?this.shape:r.shape),H(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=H({},this.shape);for(var l={},u=Xe(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 Qo},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){V(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 Be(e.style)},n.prototype.getDefaultShape=function(){return Be(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}(Ka),ts=Ue({strokeFirst:!0,font:ve,x:0,y:0,textAlign:`left`,textBaseline:`top`,miterLimit:2},Zo),ns=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return Fr(this.style)},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.createStyle=function(e){return Ct(ts,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||=Nr(this.style),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t}(Ka);ns.prototype.type=`tspan`;var rs=Ue({x:0,y:0},Ha),is={style:Ue({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Ua.style)};function as(e){return!!(e&&typeof e!=`string`&&e.width&&e.height)}var os=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return Ct(rs,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(n!=null)return n;var r=as(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 is},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||=new Hn(e.x||0,e.y||0,this.getWidth(),this.getHeight()),this._rect},t}(Ka);os.prototype.type=`image`;function ss(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 cs=Math.round;function ls(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?(cs(r*2)===cs(i*2)&&(e.x1=e.x2=ds(r,s,!0)),cs(a*2)===cs(o*2)&&(e.y1=e.y2=ds(a,s,!0)),e):e}}function us(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=ds(r,s,!0),e.y=ds(i,s,!0),e.width=Math.max(ds(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(ds(i+o,s,!1)-e.y,o===0?0:1),e):e}}function ds(e,t,n){if(!t)return e;var r=cs(e*2);return(r+cs(t))%2==0?r/2:(r+(n?1:-1))/2}var fs=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),ps={},ms=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new fs},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=us(ps,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?ss(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(es);ms.prototype.type=`rect`;var hs={fill:`#000`},gs=2,_s={},vs={style:Ue({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},Ua.style)},ys=function(e){V(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=hs,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,Es(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 Hn(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||hs},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return H(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=Xe(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},H(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return vs},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`;kr(_s,r.overflowRect,i,a,o,s),i=_s.baseX,a=_s.baseY;var c=yr(js(e),e,_s.outerWidth,_s.outerHeight),l=Ms(e),u=!!e.backgroundColor,d=c.outerHeight,f=c.outerWidth,p=c.lines,m=c.lineHeight;this.isTruncated=!!c.isTruncated;var h=i,g=ur(a,c.contentHeight,s);if(l||n){var _=lr(i,f,o),v=ur(a,d,s);l&&this._renderBackground(e,e,_,v,f,d)}g+=m/2,n&&(h=As(i,o,n),s===`top`?g+=n[0]:s===`bottom`&&(g-=n[2]));for(var y=0,b=!1,x=!1,S=ks(`fill`in e?e.fill:(x=!0,r.fill)),C=Os(`stroke`in e?e.stroke:!u&&(!r.autoStroke||x)?(y=gs,b=!0,r.stroke):null),w=e.textShadowBlur>0,T=0;T<p.length;T++){var E=this._getOrCreateChild(ns),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,ws(D,e),g+=m,E.setBoundingRect(Pr(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;kr(_s,t.overflowRect,i,a,n,r),i=_s.baseX,a=_s.baseY;var o=Cr(js(e),e,_s.outerWidth,_s.outerHeight,n),s=o.width,c=o.outerWidth,l=o.outerHeight,u=e.padding;this.isTruncated=!!o.isTruncated;var d=lr(i,c,n),f=ur(a,l,r),p=d,m=f;u&&(p+=u[3],m+=u[0]);var h=p+s;Ms(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&&Ms(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=As(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(ns),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=ks(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=Os(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=gs,_=!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=lt(s.opacity,t.opacity,1),ws(p,s),y&&(p.lineWidth=lt(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(Pr(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(ms),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(os),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=lt(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return Ts(e)&&(t=[e.fontStyle,e.fontWeight,Cs(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&pt(t)||e.textFont||e.font},t}(Ka),bs={left:!0,right:1,center:1},xs={top:1,bottom:1,middle:1},Ss=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Cs(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function ws(e,t){for(var n=0;n<Ss.length;n++){var r=Ss[n],i=t[r];i!=null&&(e[r]=i)}}function Ts(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function Es(e){return Ds(e),W(e.rich,Ds),e}function Ds(e){if(e){e.font=ys.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||bs[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||xs[n]?n:`top`,e.padding&&=dt(e.padding)}}function Os(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function ks(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function As(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function js(e){var t=e.text;return t!=null&&(t+=``),t}function Ms(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var Ns=1e-4,Ps=20;function Fs(e){return e.replace(/^\s+|\s+$/g,``)}var Is=Math.min,Ls=Math.max,Rs=Math.abs,zs=Math.round,Bs=Math.floor,Vs=Math.ceil,Hs=Math.pow,Us=Math.log,Ws=Math.LN10,Gs=Math.PI,Ks=Math.random;function qs(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 Js=Ys;function Ys(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 Xs(e,t,n)}function Xs(e,t,n){return J(e)?Zs(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Zs(e){return!!Fs(e).match(/%$/)}function Qs(e,t,n){return isNaN(t)?n?``+e:+e:(t=Is(Ls(0,t),Ps),e=(+e).toFixed(t),n?e:+e)}function $s(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(zs(e*t)/t===e)return n}return tc(e)}function tc(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 Ls(0,(a<0?0:i-1-a)-r)}function nc(e,t,n){var r=Rs(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=Us(2*Rs(n||1)*Rs(r))/Ws,a=Us(Rs(t))/Ws,o=Ls(0,Vs(-i+a));return isFinite(o)||(o=NaN),o}function rc(e,t){var n=qe(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=Hs(10,t),i=G(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=G(i,function(e){return Bs(e)}),s=qe(o,function(e,t){return e+t},0),c=G(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 G(o,function(e){return e/r})}function ic(e,t){var n=Ls(ec(e),ec(t)),r=e+t;return n>Ps?r:Qs(r,n)}var ac=Hs(2,53)-1;function oc(e){var t=Gs*2;return(e%t+t)%t}function sc(e){return e>-Ns&&e<Ns}var cc=/^(?:(\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 lc(e){if(e instanceof Date)return e;if(J(e)){var t=cc.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(zs(e))}function uc(e){return Hs(10,dc(e))}function dc(e){if(e===0)return 0;var t=Bs(Us(e)/Ws);return e/Hs(10,t)>=10&&t++,t}function fc(e,t){var n=dc(e),r=Hs(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,Qs(e,-n)}function pc(e){var t=parseFloat(e);return t==e&&(t!==0||!J(e)||e.indexOf(`x`)<=0)?t:NaN}function mc(e){return!isNaN(pc(e))}function hc(){return zs(Ks()*9)}function gc(e,t){return t===0?e:gc(t,e%t)}function _c(e,t){return e==null?t:t==null?e:e*t/gc(e,t)}function vc(e){return e!=null&&isFinite(e)}var yc=`[ECharts] `,bc={},xc=typeof console<`u`&&console.warn&&console.log;function Sc(e,t,n){if(xc){if(n){if(bc[t])return;bc[t]=!0}console[e](yc+t)}}function Cc(e,t){Sc(`error`,e,t)}function wc(e){throw Error(e)}function Tc(e,t,n){return(t-e)*n+e}var Ec=`series\0`,Dc=`\0_ec_\0`;function Oc(e){return e instanceof Array?e:e==null?[]:[e]}function kc(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 Ac=`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 jc(e){return Y(e)&&!K(e)&&!(e instanceof Date)?e.value:e}function Mc(e){return Y(e)&&!(e instanceof Array)}function Nc(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=xt();W(t,function(e,n){if(!Y(e)){t[n]=null;return}});var s=Pc(e,o,n);return(r||i)&&Fc(s,e,o,t),r&&Ic(s,t),r||i?Lc(s,t,i):a&&Rc(s,t),zc(s),s}function Pc(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`||Wc(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function Fc(e,t,n,r){W(r,function(i,a){if(!(!i||i.id==null)){var o=Vc(i.id),s=n.get(o);if(s!=null){var c=e[s];ft(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function Ic(e,t){W(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)&&!Wc(n)&&!Wc(a)&&Bc(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function Lc(e,t,n){W(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||Wc(r.existing)||r.existing&&t.id!=null&&!Bc(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function Rc(e,t){W(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function zc(e){var t=xt();W(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),W(e,function(e){var n=e.newOption;ft(!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={})}),W(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:Ec+n:Vc(i.name),r)a.id=Vc(r.id);else if(i.id!=null)a.id=Vc(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 Bc(e,t,n){var r=Hc(t[e],null),i=Hc(n[e],null);return r!=null&&i!=null&&r===i}function Vc(e){return Hc(e,``)}function Hc(e,t){return e==null?t:J(e)?e:tt(e)||et(e)?e+``:t}function Uc(e){var t=e.name;return!!(t&&t.indexOf(Ec))}function Wc(e){return e&&e.id!=null&&Vc(e.id).indexOf(Dc)===0}function Gc(e,t,n){W(e,function(e){var r=e.newOption;Y(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=Kc(t,r,e.existing,n))})}function Kc(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function qc(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return K(t.dataIndex)?G(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return K(t.name)?G(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function Jc(){var e=`__ec_inner_`+Yc++;return function(t){return t[e]||(t[e]={})}}var Yc=hc();function Xc(e,t,n){var r=Zc(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=$c(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 Zc(e,t){var n;if(J(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=xt(),a={},o=!1;return W(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&&U(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Qc={useDefault:!0,enableAll:!1,enableNone:!1};function $c(e,t,n,r){r||=Qc;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 tl(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function nl(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function rl(e){return e===`auto`?Ot.domSupported?`html`:`richText`:e||`html`}function il(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(tt(r)){var o=Tc(n||0,r,i);return Qs(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=Tc(p,m,i);s[d]=Qs(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 al(){return[1/0,-1/0]}function ol(e,t){ul(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function sl(e,t){ul(t)&&t<e[0]&&(e[0]=t)}function cl(e,t){ul(t)&&t>e[1]&&(e[1]=t)}function ll(e,t){dl(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function ul(e){return e!=null&&isFinite(e)}function dl(e,t){return ul(e)&&ul(t)&&e<=t}function fl(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function pl(e){dl(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function ml(){var e=`__ec_once_`+hl++;return function(t,n){Z(t,e)||(t[e]=1,n())}}var hl=hc();function gl(e,t,n){var r=xt(),i=0;W(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 _l(e){return e.value+``}function vl(e){return e+``}function yl(e,t){return X(t,!0)?e.seriesIndex+2:0}function bl(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 xl(e,t){return{seriesType:e,overallReset:t}}function Sl(e){return{overallReset:e}}var Cl=Jc(),wl=function(e,t,n,r){if(r){var i=Cl(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=Cl(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},Tl=xt([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),El=`original`,Dl=`arrayRows`,Ol=`objectRows`,kl=`keyedColumns`,Al=`typedArray`,jl=`unknown`,Ml=`column`,Nl=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],Pl=function(){function e(e){W(Nl,function(t){this[t]=Qe(e[t],e)},this)}return e}();function Fl(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var Il=1,Ll={},Rl=Jc(),zl=Jc(),Bl=[`emphasis`,`blur`,`select`],Vl=[`normal`,`emphasis`,`blur`,`select`],Hl=`highlight`,Ul=`downplay`,Wl=`select`,Gl=`unselect`,Kl=`toggleSelect`,ql=`selectchanged`;function Jl(e){return e!=null&&e!==`none`}function Yl(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Xl(e){Yl(e,`emphasis`,2)}function Zl(e){e.hoverState===2&&Yl(e,`normal`,0)}function Ql(e){Yl(e,`blur`,1)}function $l(e){e.hoverState===1&&Yl(e,`normal`,0)}function eu(e){e.selected=!0}function tu(e){e.selected=!1}function nu(e,t,n){t(e,n)}function ru(e,t,n){nu(e,t,n),e.isGroup&&e.traverse(function(e){nu(e,t,n)})}function iu(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 au(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 ou(e,t,n,r){var i=n&&U(n,`select`)>=0,a=!1;if(e instanceof es){var o=Rl(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Jl(s)||Jl(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=H({},r),l=H({},l),l.fill=s):!Jl(l.fill)&&Jl(s)?(a=!0,r=H({},r),l=H({},l),l.fill=Gi(s)):!Jl(l.stroke)&&Jl(c)&&(a||(r=H({},r),l=H({},l)),l.stroke=Gi(c)),r.style=l}}if(r&&r.z2==null){a||(r=H({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function su(e,t,n){if(n&&n.z2==null){n=H({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function cu(e,t,n){var r=U(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:au(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=H({},n),o=H({opacity:r?i:a.opacity*.1},o),n.style=o),n}function lu(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return ou(this,e,t,n);if(e===`blur`)return cu(this,e,n);if(e===`select`)return su(this,e,n)}return n}function uu(e){e.stateProxy=lu;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=lu),n&&(n.stateProxy=lu)}function du(e,t){!yu(e,t)&&!e.__highByOuter&&ru(e,Xl)}function fu(e,t){!yu(e,t)&&!e.__highByOuter&&ru(e,Zl)}function pu(e,t){e.__highByOuter|=1<<(t||0),ru(e,Xl)}function mu(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&ru(e,Zl)}function hu(e){ru(e,Ql)}function gu(e){ru(e,$l)}function _u(e){ru(e,eu)}function vu(e){ru(e,tu)}function yu(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function bu(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=zl(i),o=Fl(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){$l(e)}),s&&n.push(i)),a.isBlured=!1}),W(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function xu(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&&gu(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`||Ql(e)}),Ke(t))a(e.getData(),t);else if(Y(t))for(var u=Xe(t),d=0;d<u.length;d++)a(e.getData(u[d]),t[u[d]]);c.push(e),zl(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 Su(e,t,n){if(e!=null&&t!=null){var r=n.getModel().getComponent(e,t);if(r){zl(r).isBlured=!0;var i=n.getViewOfComponentModel(r);!i||!i.focusBlurEnabled||i.group.traverse(function(e){Ql(e)})}}}function Cu(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=qc(i,t);a=(K(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=Cl(o);xu(r,l.focus,l.blurScope,n)}else{var u=e.get([`emphasis`,`focus`]),d=e.get([`emphasis`,`blurScope`]);u!=null&&xu(r,u,d,n)}}}function wu(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(Cl(s[l]).focus===`self`){c=!0;break}return{focusSelf:c,dispatchers:s}}function Tu(e,t,n){var r=Cl(e),i=wu(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&Su(r.componentMainType,r.componentIndex,n),W(a,function(e){return du(e,t)})):(xu(r.seriesIndex,r.focus,r.blurScope,n),r.focus===`self`&&Su(r.componentMainType,r.componentIndex,n),du(e,t))}function Eu(e,t,n){bu(n);var r=Cl(e),i=wu(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?W(i,function(e){return fu(e,t)}):fu(e,t)}function Du(e,t,n){if(Bu(t)){var r=t.dataType,i=qc(e.getData(r),t);K(i)||(i=[i]),e[t.type===`toggleSelect`?`toggleSelect`:t.type===`select`?`select`:`unselect`](i,r)}}function Ou(e){W(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?_u(t):vu(t)})})}function ku(e){var t=[];return e.eachSeries(function(e){W(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 Au(e,t,n){Lu(e,!0),ru(e,uu),Nu(e,t,n)}function ju(e){Lu(e,!1)}function Mu(e,t,n,r){r?ju(e):Au(e,t,n)}function Nu(e,t,n){var r=Cl(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var Pu=[`emphasis`,`blur`,`select`],Fu={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function Iu(e,t,n,r){n||=`itemStyle`;for(var i=0;i<Pu.length;i++){var a=Pu[i],o=t.getModel([a,n]),s=e.ensureState(a);s.style=r?r(o):o[Fu[n]]()}}function Lu(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 Ru(e){return!!(e&&e.__highDownDispatcher)}function zu(e){var t=Ll[e];return t==null&&Il<=32&&(t=Ll[e]=Il++),t}function Bu(e){var t=e.type;return t===`select`||t===`unselect`||t===`toggleSelect`}function Vu(e){var t=e.type;return t===`highlight`||t===`downplay`}function Hu(e){var t=Rl(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 Uu=ko.CMD,Wu=[[],[],[]],Gu=Math.sqrt,Ku=Math.atan2;function qu(e,t){if(t){var n=e.data,r=e.len(),i,a,o,s,c,l,u=Uu.M,d=Uu.C,f=Uu.L,p=Uu.R,m=Uu.A,h=Uu.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=Gu(t[0]*t[0]+t[1]*t[1]),y=Gu(t[2]*t[2]+t[3]*t[3]),b=Ku(-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++],Tn(l,l,t),n[s++]=l[0],n[s++]=l[1],l[0]+=n[o++],l[1]+=n[o++],Tn(l,l,t),n[s++]=l[0],n[s++]=l[1]}for(c=0;c<a;c++){var x=Wu[c];x[0]=n[o++],x[1]=n[o++],Tn(x,x,t),n[s++]=x[0],n[s++]=x[1]}}e.increaseVersion()}}var Ju=Math.sqrt,Yu=Math.sin,Xu=Math.cos,Zu=Math.PI;function Qu(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function $u(e,t){return(e[0]*t[0]+e[1]*t[1])/(Qu(e)*Qu(t))}function ed(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos($u(e,t))}function td(e,t,n,r,i,a,o,s,c,l,u){var d=Zu/180*c,f=Xu(d)*(e-n)/2+Yu(d)*(t-r)/2,p=-1*Yu(d)*(e-n)/2+Xu(d)*(t-r)/2,m=f*f/(o*o)+p*p/(s*s);m>1&&(o*=Ju(m),s*=Ju(m));var h=(i===a?-1:1)*Ju((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+Xu(d)*g-Yu(d)*_,y=(t+r)/2+Yu(d)*g+Xu(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($u(x,S)<=-1&&(C=Zu),$u(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Zu*1e6)/1e6;C=Zu*2+w%2*Zu}u.addData(l,v,y,o,s,b,C,d,a)}var nd=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,rd=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function id(e){var t=new ko;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=ko.CMD,c=e.match(nd);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(rd)||[],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,td(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,td(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 ad=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(es);function od(e){return e.setData!=null}function sd(e,t){var n=id(e),r=H({},t);return r.buildPath=function(e){var t=od(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){qu(n,e),this.dirtyShape()},r}function cd(e,t){return new ad(sd(e,t))}function ld(e,t){var n=sd(e,t);return function(e){V(t,e);function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return t}(ad)}function ud(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(od(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},o}var dd=function(e){V(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=U(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=U(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 Hn(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?(Hn.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(Aa);dd.prototype.type=`group`;var fd=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),pd=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new fd},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);pd.prototype.type=`circle`;var md=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),hd=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new md},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);hd.prototype.type=`ellipse`;var gd=Math.PI,_d=gd*2,vd=Math.sin,yd=Math.cos,bd=Math.acos,xd=Math.atan2,Sd=Math.abs,Cd=Math.sqrt,wd=Math.max,Td=Math.min,Ed=1e-4;function Dd(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<Ed))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function Od(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/Cd(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)*Cd(wd(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 kd(e){var t;if(K(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 Ad(e,t){var n,r=wd(t.r,0),i=wd(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=Sd(c-s),p=f>_d&&f%_d;if(p>Ed&&(f=p),!(r>Ed))e.moveTo(l,u);else if(f>_d-Ed)e.moveTo(l+r*yd(s),u+r*vd(s)),e.arc(l,u,r,s,c,!d),i>Ed&&(e.moveTo(l+i*yd(c),u+i*vd(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*yd(s),j=r*vd(s),M=i*yd(c),N=i*vd(c),P=f>Ed;if(P){var ee=t.cornerRadius;ee&&(n=kd(ee),m=n[0],h=n[1],g=n[2],_=n[3]);var F=Sd(r-i)/2;if(v=Td(F,g),y=Td(F,_),b=Td(F,m),x=Td(F,h),w=S=wd(v,y),T=C=wd(b,x),(S>Ed||C>Ed)&&(E=r*yd(c),D=r*vd(c),O=i*yd(s),k=i*vd(s),f<gd)){var te=Dd(A,j,O,k,E,D,M,N);if(te){var I=A-te[0],L=j-te[1],ne=E-te[0],re=D-te[1],R=1/vd(bd((I*ne+L*re)/(Cd(I*I+L*L)*Cd(ne*ne+re*re)))/2),ie=Cd(te[0]*te[0]+te[1]*te[1]);w=Td(S,(r-ie)/(R+1)),T=Td(C,(i-ie)/(R-1))}}}if(!P)e.moveTo(l+A,u+j);else if(w>Ed){var ae=Td(g,w),oe=Td(_,w),z=Od(O,k,A,j,r,ae,d),B=Od(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,xd(z.y0,z.x0),xd(B.y0,B.x0),!d):(ae>0&&e.arc(l+z.cx,u+z.cy,ae,xd(z.y0,z.x0),xd(z.y1,z.x1),!d),e.arc(l,u,r,xd(z.cy+z.y1,z.cx+z.x1),xd(B.cy+B.y1,B.cx+B.x1),!d),oe>0&&e.arc(l+B.cx,u+B.cy,oe,xd(B.y1,B.x1),xd(B.y0,B.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>Ed)||!P)e.lineTo(l+M,u+N);else if(T>Ed){var ae=Td(m,T),oe=Td(h,T),z=Od(M,N,E,D,i,-oe,d),B=Od(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,xd(z.y0,z.x0),xd(B.y0,B.x0),!d):(oe>0&&e.arc(l+z.cx,u+z.cy,oe,xd(z.y0,z.x0),xd(z.y1,z.x1),!d),e.arc(l,u,i,xd(z.cy+z.y1,z.cx+z.x1),xd(B.cy+B.y1,B.cx+B.x1),d),ae>0&&e.arc(l+B.cx,u+B.cy,ae,xd(B.y1,B.x1),xd(B.y0,B.x0),!d))}else e.lineTo(l+M,u+N),e.arc(l,u,i,c,s,d)}e.closePath()}}}var jd=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}(),Md=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new jd},t.prototype.buildPath=function(e,t){Ad(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(es);Md.prototype.type=`sector`;var Nd=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),Pd=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Nd},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);Pd.prototype.type=`ring`;function Fd(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++)En(u,u,e[f]),Dn(d,d,e[f]);En(u,u,r[0]),Dn(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(fn(e[f]));continue}else c=e[f-1],l=e[f+1];hn(a,l,c),vn(a,a,t);var h=bn(m,c),g=bn(m,l),_=h+g;_!==0&&(h/=_,g/=_),vn(o,a,-h),vn(s,a,g);var v=mn([],m,o),y=mn([],m,s);r&&(Dn(v,v,u),En(v,v,d),Dn(y,y,u),En(y,y,d)),i.push(v),i.push(y)}return n&&i.push(i.shift()),i}function Id(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=Fd(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 Ld=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),Rd=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Ld},t.prototype.buildPath=function(e,t){Id(e,t,!0)},t}(es);Rd.prototype.type=`polygon`;var zd=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),Bd=function(e){V(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 zd},t.prototype.buildPath=function(e,t){Id(e,t,!1)},t}(es);Bd.prototype.type=`polyline`;var Vd={},Hd=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),Ud=function(e){V(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 Hd},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=ls(Vd,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);Ud.prototype.type=`line`;var Wd=[],Gd=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 Kd(e,t,n){var r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?si:oi)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?si:oi)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?mi:pi)(e.x1,e.cpx1,e.x2,t),(n?mi:pi)(e.y1,e.cpy1,e.y2,t)]}var qd=function(e){V(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 Gd},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&&(_i(n,o,i,u,Wd),o=Wd[1],i=Wd[2],_i(r,s,a,u,Wd),s=Wd[1],a=Wd[2]),e.quadraticCurveTo(o,s,i,a)):(u<1&&(ui(n,o,c,i,u,Wd),o=Wd[1],c=Wd[2],i=Wd[3],ui(r,s,l,a,u,Wd),s=Wd[1],l=Wd[2],a=Wd[3]),e.bezierCurveTo(o,s,c,l,i,a)))},t.prototype.pointAt=function(e){return Kd(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=Kd(this.shape,e,!0);return yn(t,t)},t}(es);qd.prototype.type=`bezier-curve`;var Jd=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}(),Yd=function(e){V(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 Jd},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);Yd.prototype.type=`arc`;var Xd=function(e){V(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),Zd=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),Qd=function(e){V(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}(Zd),$d=function(e){V(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}(Zd),ef=Math.min,tf=Math.max,nf=Math.abs,rf=[0,0],af=[0,0],of=$n(),sf=of.minTv,cf=of.maxTv,lf=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new On;for(var n=0;n<2;n++)this._axes[n]=new On;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);On.sub(r[0],n[1],n[0]),On.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&&On.set(t,0,0),of.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(r=!1,i)||!i&&!of.negativeSize&&On.copy(t,r?of.useDir?of.dirMinTv:sf:cf),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,rf),e._getProjMinMaxOnAxis(a,t._corners,af),of.negativeSize||rf[1]<af[0]||rf[0]>af[1]){if(i=!1,of.negativeSize||n)return i;var s=nf(af[0]-rf[1]),c=nf(rf[0]-af[1]);ef(s,c)>cf.len()&&(s<c?On.scale(cf,o,-s*r):On.scale(cf,o,c*r))}else if(!n){var s=nf(af[0]-rf[1]),c=nf(rf[0]-af[1]);(of.useDir||ef(s,c)<sf.len())&&((s<c||!of.bidirectional)&&(On.scale(sf,o,s*r),of.useDir&&of.calcDirMTV()),(s>=c||!of.bidirectional)&&(On.scale(sf,o,-c*r),of.useDir&&of.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=ef(l,o),s=tf(l,s)}n[0]=o+of.touchThreshold,n[1]=s-of.touchThreshold,of.negativeSize=n[1]<n[0]},e}(),uf=[],df=function(e){V(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 Hn(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(uf)),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}(Ka),ff=Jc();function pf(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)),q(d)&&(d=d(n,i)),q(l)&&(l=l(n)),{duration:l||0,delay:d,easing:u}}return null}function mf(e,t,n,r,i,a,o){var s=!1,c;q(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=pf(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 hf(e,t,n,r,i,a){mf(`update`,e,t,n,r,i,a)}function gf(e,t,n,r,i,a){mf(`enter`,e,t,n,r,i,a)}function _f(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 vf(e,t,n,r,i,a){_f(e)||mf(`leave`,e,t,n,r,i,a)}function yf(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),vf(e,{style:{opacity:0}},t,n,r)}function bf(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||yf(e,t,n,r)}):yf(e,t,n,r)}function xf(e){ff(e).oldStyle=e.style}var Sf=N({Arc:()=>Yd,BezierCurve:()=>qd,BoundingRect:()=>Hn,Circle:()=>pd,CompoundPath:()=>Xd,Ellipse:()=>hd,Group:()=>dd,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>os,IncrementalDisplayable:()=>df,Line:()=>Ud,LinearGradient:()=>Qd,OrientedBoundingRect:()=>lf,Path:()=>es,Point:()=>On,Polygon:()=>Rd,Polyline:()=>Bd,RadialGradient:()=>$d,Rect:()=>ms,Ring:()=>Pd,Sector:()=>Md,Text:()=>ys,WH:()=>Tf,XY:()=>wf,applyTransform:()=>Bf,calcZ2Range:()=>lp,clipPointsByRect:()=>Gf,clipRectByRect:()=>Kf,createIcon:()=>qf,decomposeTransform:()=>pp,ensureCopyRect:()=>op,ensureCopyTransform:()=>sp,expandOrShrinkRect:()=>Qf,extendPath:()=>Of,extendShape:()=>Ef,getCurrentCanvasPainter:()=>hp,getShapeClass:()=>Af,getTransform:()=>zf,groupTransition:()=>Wf,initProps:()=>gf,isBoundingRectAxisAligned:()=>ip,isElementRemoved:()=>_f,lineLineIntersect:()=>Yf,linePolygonIntersect:()=>Jf,makeImage:()=>Mf,makePath:()=>jf,mergePath:()=>Pf,payloadDisableAnimation:()=>fp,registerShape:()=>kf,removeElement:()=>vf,removeElementWithFadeOut:()=>bf,resizePath:()=>Ff,retrieveZInfo:()=>cp,setTooltipConfig:()=>tp,subPixelOptimize:()=>Rf,subPixelOptimizeLine:()=>If,subPixelOptimizeRect:()=>Lf,transformDirection:()=>Vf,traverseElements:()=>rp,traverseUpdateZ:()=>up,updateProps:()=>hf}),Cf={},wf=[`x`,`y`],Tf=[`width`,`height`];function Ef(e){return es.extend(e)}var Df=ld;function Of(e,t){return Df(e,t)}function kf(e,t){Cf[e]=t}function Af(e){if(Cf.hasOwnProperty(e))return Cf[e]}function jf(e,t,n,r){var i=cd(e,t);return n&&(r===`center`&&(n=Nf(n,i.getBoundingRect())),Ff(i,n)),i}function Mf(e,t,n){var r=new os({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(Nf(t,i))}}});return r}function Nf(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 Pf=ud;function Ff(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function If(e,t){return ls(e,e,{lineWidth:t}),e}function Lf(e,t){return us(e,e,t),e}var Rf=ds;function zf(e,t){for(var n=nn([]);e&&e!==t;)an(n,e.getLocalTransform(),n),e=e.parent;return n}function Bf(e,t,n){return t&&!Ke(t)&&(t=Ur.getLocalTransform(t)),n&&(t=ln([],t)),Tn([],e,t)}function Vf(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:Rs(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:Rs(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=Bf(a,t,n),Rs(a[0])>Rs(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function Hf(e){return!e.isGroup}function Uf(e){return e.shape!=null}function Wf(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){Hf(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return Uf(e)&&(t.shape=Be(e.shape)),t}var a=r(e);t.traverse(function(e){if(Hf(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),hf(e,r,n,Cl(e).dataIndex)}}})}function Gf(e,t){return G(e,function(e){var n=e[0];n=Ls(n,t.x),n=Is(n,t.x+t.width);var r=e[1];return r=Ls(r,t.y),r=Is(r,t.y+t.height),[n,r]})}function Kf(e,t){var n=Ls(e.x,t.x),r=Is(e.x+e.width,t.x+t.width),i=Ls(e.y,t.y),a=Is(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 qf(e,t,n){var r=H({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),Ue(i,n),new os(r)):jf(e.replace(`path://`,``),r,n,`center`)}function Jf(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Yf(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function Yf(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=Xf(u,d,c,l);if(Zf(f))return!1;var p=e-i,m=t-a,h=Xf(p,m,c,l)/f;if(h<0||h>1)return!1;var g=Xf(p,m,u,d)/f;return!(g<0||g>1)}function Xf(e,t,n,r){return e*r-n*t}function Zf(e){return e<=1e-6&&e>=-1e-6}function Qf(e,t,n,r,i){return t==null?e:(tt(t)?$f[0]=$f[1]=$f[2]=$f[3]=t:($f[0]=t[0],$f[1]=t[1],$f[2]=t[2],$f[3]=t[3]),r&&($f[0]=Ls(0,$f[0]),$f[1]=Ls(0,$f[1]),$f[2]=Ls(0,$f[2]),$f[3]=Ls(0,$f[3])),n&&($f[0]=-$f[0],$f[1]=-$f[1],$f[2]=-$f[2],$f[3]=-$f[3]),ep(e,$f,`x`,`width`,3,1,i&&i[0]||0),ep(e,$f,`y`,`height`,0,2,i&&i[1]||0),e)}var $f=[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=Ls(0,Is(o,c)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?c+t[a]:Rs(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function tp(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&&W(Xe(c),function(e){Z(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Cl(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:Ue({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function np(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function rp(e,t){if(e){if(K(e))for(var n=0;n<e.length;n++)np(e[n],t);else np(e,t)}}function ip(e){return!e||Rs(e[1])<ap&&Rs(e[2])<ap||Rs(e[0])<ap&&Rs(e[3])<ap}var ap=1e-5;function op(e,t){return e?Hn.copy(e,t):t.clone()}function sp(e,t){return t?rn(e||tn(),t):void 0}function cp(e){return{z:e.get(`z`)||0,zlevel:e.get(`zlevel`)||0}}function lp(e){var t=-1/0,n=1/0;np(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 up(e,t,n){dp(e,t,n,-1/0)}function dp(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=Ls(dp(o[s],t,n,r),r);else e.z=t,e.zlevel=n,r=Ls(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 fp(e){return e.animation={duration:0},e}function pp(e,t){return t?rn(mp.transform,t):nn(mp.transform),mp.decomposeTransform(),qr(e,mp),e}var mp=new Ur;mp.transform=tn();function hp(e){var t=e.getZr().painter;return t.getType()===`canvas`?t:null}kf(`circle`,pd),kf(`ellipse`,hd),kf(`sector`,Md),kf(`ring`,Pd),kf(`polygon`,Rd),kf(`polyline`,Bd),kf(`rect`,ms),kf(`line`,Ud),kf(`bezierCurve`,qd),kf(`arc`,Yd);var gp={};function _p(e,t){for(var n=0;n<Bl.length;n++){var r=Bl[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 vp(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??=q(e.defaultText)?e.defaultText(i,e,n):e.defaultText;for(var c={normal:s},l=0;l<Bl.length;l++){var u=Bl[l],d=t[u];c[u]=X(r?r.getFormattedLabel(i,u,null,a,d&&d.get(`formatter`)):null,s)}return c}function yp(e,t,n,r){n||=gp;for(var i=e instanceof ys,a=!1,o=0;o<Vl.length;o++){var s=t[Vl[o]];if(s&&s.getShallow(`show`)){a=!0;break}}var c=i?e:e.getTextContent();if(a){i||(c||(c=new ys,e.setTextContent(c)),e.stateProxy&&(c.stateProxy=e.stateProxy));var l=vp(n,t),u=t.normal,d=!!u.getShallow(`show`),f=xp(u,r&&r.normal,n,!1,!i);f.text=l.normal,i||e.setTextConfig(Sp(u,n,!1));for(var o=0;o<Bl.length;o++){var p=Bl[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=xp(s,r&&r[p],n,!0,!i),m.style.text=l[p],!i){var g=e.ensureState(p);g.textConfig=Sp(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&&(Ap(c).setLabelText=function(e){var r=vp(n,t,e);_p(c,r)})}else c&&(c.ignore=!0);e.dirty()}function bp(e,t){t||=`label`;for(var n={normal:e.getModel(t)},r=0;r<Bl.length;r++){var i=Bl[r];n[i]=e.getModel([i,t])}return n}function xp(e,t,n,r,i){var a={};return Cp(a,e,n,r,i),t&&H(a,t),a}function Sp(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 Cp(e,t,n,r,i){n||=gp;var a=t.ecModel,o=a&&a.option.textStyle,s=wp(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]);Op(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=jp.minMargin;else{var _=t.get(`textMargin`);_!=null&&(h.margin=dt(_),h.__marginType=jp.textMargin)}Op(e,t,o,null,null,n,r,i,!0,!1)}function wp(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||gp).rich;if(n){t||={};for(var r=Xe(n),i=0;i<r.length;i++){var a=r[i];t[a]=1}}e=e.parentModel}return t}var Tp=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`textShadowColor`,`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],Ep=[`align`,`lineHeight`,`width`,`height`,`tag`,`verticalAlign`,`ellipsis`],Dp=[`padding`,`borderWidth`,`borderRadius`,`borderDashOffset`,`backgroundColor`,`borderColor`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`];function Op(e,t,n,r,i,a,o,s,c,l){n=!o&&n||gp;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;_<Tp.length;_++){var v=Tp[_],y=i!==!1&&r?lt(t.getShallow(v),r.getShallow(v),n[v]):X(t.getShallow(v),n[v]);y!=null&&(e[v]=y)}for(var _=0;_<Ep.length;_++){var v=Ep[_],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;_<Dp.length;_++){var v=Dp[_],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 kp(e,t){var n=t&&t.getModel(`textStyle`);return pt([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 Ap=Jc(),jp={minMargin:1,textMargin:2},Mp=[`textStyle`,`color`],Np=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`padding`,`lineHeight`,`rich`,`width`,`height`,`overflow`],Pp=new ys,Fp=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow(`color`)||(!e&&t?t.get(Mp):null)},e.prototype.getFont=function(){return kp({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<Np.length;n++)t[Np[n]]=this.getShallow(Np[n]);return Pp.useStyle(t),Pp.update(),Pp.getBoundingRect()},e}(),Ip=[[`lineWidth`,`width`],[`stroke`,`color`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`type`],[`lineDashOffset`,`dashOffset`],[`lineCap`,`cap`],[`lineJoin`,`join`],[`miterLimit`]],Lp=Wt(Ip),Rp=function(){function e(){}return e.prototype.getLineStyle=function(e){return Lp(this,e)},e}(),zp=[[`fill`,`color`],[`stroke`,`borderColor`],[`lineWidth`,`borderWidth`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`borderType`],[`lineDashOffset`,`borderDashOffset`],[`lineCap`,`borderCap`],[`lineJoin`,`borderJoin`],[`miterLimit`,`borderMiterLimit`]],Bp=Wt(zp),Vp=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return Bp(this,e,t)},e}(),Hp=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){Ve(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(Be(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(!Ot.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}();It(Hp),Bt(Hp),Ge(Hp,Rp),Ge(Hp,Vp),Ge(Hp,Kt),Ge(Hp,Fp);function Up(e){return e==null?0:e.length||1}function Wp(e){return e}var Gp=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||Wp,this._newKeyGetter=r||Wp,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=Up(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=Up(c),d=Up(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=Up(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=Up(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},e}(),Kp={Must:1,Might:2,Not:3},qp=Jc();function Jp(e){qp(e).datasetMap=xt()}function Yp(e,t,n){var r={},i=Zp(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=qp(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),W(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});W(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 Xp(e,t,n){var r={};if(!Zp(e))return r;var i=t.sourceFormat,a=t.dimensionsDefine,o;(i===`objectRows`||i===`keyedColumns`)&&W(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=em(t.data,i,t.seriesLayoutBy,a,t.startIndex,c);s.push(u);var d=u===Kp.Not;if(d&&e.v==null&&c!==o&&(e.v=c),(e.n==null||e.n===e.v||!d&&s[e.n]===Kp.Not)&&(e.n=c),f(e)&&s[e.n]!==Kp.Not)return e;d||(u===Kp.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 Zp(e){if(!e.get(`data`,!0))return $c(e.ecModel,`dataset`,{index:e.get(`datasetIndex`,!0),id:e.get(`datasetId`,!0)},Qc).models[0]}function Qp(e){return!e.get(`transform`,!0)&&!e.get(`fromTransformResult`,!0)?[]:$c(e.ecModel,`dataset`,{index:e.get(`fromDatasetIndex`,!0),id:e.get(`fromDatasetId`,!0)},Qc).models}function $p(e,t){return em(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function em(e,t,n,r,i,a){var o,s=5;if(rt(e))return Kp.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`?Kp.Must:Kp.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 Kp.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 Kp.Not;var f=_[c];if(!f||rt(f))return Kp.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=jc(g);if(!K(y))return Kp.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?Kp.Might:Kp.Not;if(t&&e!==`-`)return Kp.Must}return Kp.Not}var tm=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&&$p(this,n)===Kp.Must&&(r.type=`ordinal`)}}return e}();function nm(e){return e instanceof tm}function rm(e,t,n){n||=om(e);var r=t.seriesLayoutBy,i=sm(e,n,r,t.sourceHeader,t.dimensions);return new tm({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:Be(t)})}function im(e){return new tm({data:e,sourceFormat:rt(e)?Al:El})}function am(e){return new tm({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:Be(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function om(e){var t=jl;if(rt(e))t=Al;else if(K(e)){e.length===0&&(t=Dl);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){if(K(i)||rt(i)){t=Dl;break}if(Y(i)){t=Ol;break}}}}else if(Y(e)){for(var a in e)if(Z(e,a)&&Ke(e[a])){t=kl;break}}return t}function sm(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:lm(i),startIndex:o,dimensionsDetectedCount:a};if(t===`arrayRows`){var s=e;r===`auto`||r==null?um(function(e){e!=null&&e!==`-`&&(J(e)?o??=1:o=0)},n,s,10):o=tt(r)?r:+!!r,!i&&o===1&&(i=[],um(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||=cm(e);else if(t===`keyedColumns`)i||(i=[],W(e,function(e,t){i.push(t)}));else if(t===`original`){var c=jc(e[0]);a=K(c)&&c.length||1}return{startIndex:o,dimensionsDefine:lm(i),dimensionsDetectedCount:a}}function cm(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return Xe(n)}function lm(e){if(e){var t=xt();return G(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 um(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 dm(e){var t=e.sourceFormat;return t===`objectRows`||t===`keyedColumns`}var fm,pm,mm,hm,gm,_m,vm=function(){function e(e,t){var n=nm(e)?e:im(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),_m(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;_m=function(e,i,a){var o=a.sourceFormat,s=a.seriesLayoutBy,c=a.startIndex,l=a.dimensionsDefine,u=gm[km(o,s)];H(e,u),o===`typedArray`?(e.getItem=t,e.count=r,e.fillStorage=n):(e.getItem=Qe(Sm(o,s),null,i,c,l),e.count=Qe(Tm(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};gm=(e={},e[Dl+`_`+Ml]={pure:!0,appendData:i},e[Dl+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[Ol]={pure:!0,appendData:i},e[kl]={pure:!0,appendData:function(e){var t=this._data;W(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[El]={appendData:i},e[Al]={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}(),ym=function(e){K(e)||Cc(`series.data or dataset.source must be an array.`)};fm={},fm[Dl+`_`+Ml]=ym,fm[Dl+`_row`]=ym,fm[Ol]=ym,fm[kl]=function(e,t){for(var n=0;n<t.length;n++)t[n].name??Cc(`dimension name must not be null/undefined.`)},fm[El]=ym;var bm=function(e,t,n,r){return e[r]},xm=(pm={},pm[Dl+`_`+Ml]=function(e,t,n,r){return e[r+t]},pm[Dl+`_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},pm[Ol]=bm,pm[kl]=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},pm[El]=bm,pm);function Sm(e,t){return xm[km(e,t)]}var Cm=function(e,t,n){return e.length},wm=(mm={},mm[Dl+`_`+Ml]=function(e,t,n){return Math.max(0,e.length-t)},mm[Dl+`_row`]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},mm[Ol]=Cm,mm[kl]=function(e,t,n){var r=n[0].name,i=r==null?null:e[r];return i?i.length:0},mm[El]=Cm,mm);function Tm(e,t){return wm[km(e,t)]}var Em=function(e,t,n){return e[t]},Dm=(hm={},hm[Dl]=Em,hm[Ol]=function(e,t,n){return e[n]},hm[kl]=Em,hm[El]=function(e,t,n){var r=jc(e);return r instanceof Array?r[t]:r},hm[Al]=Em,hm);function Om(e){return Dm[e]}function km(e,t){return e===`arrayRows`?e+`_`+t:e}function Am(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 Om(a)(r,o,s)}var c=r;return a===`original`&&(c=jc(r)),c}}}var jm=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 Mm(e,t){var n={},r=n.encode={},i=xt(),a=[],o=[],s={};W(e.dimensions,function(t){var n=e.getDimensionInfo(t),c=n.coordDim;if(c){var l=n.coordDimIndex;Nm(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),Fm(n.type)&&(a[0]=t),Nm(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}Tl.each(function(e,t){var i=Nm(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=G(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 jm(s,t),n}function Nm(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function Pm(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function Fm(e){return e!==`ordinal`&&e!==`time`}var Im=function(){function e(e){this.otherDims={},e!=null&&H(this,e)}return e}();function Lm(e,t){var n=t&&t.type;return n===`ordinal`?e:(n===`time`&&!tt(e)&&e!=null&&e!==`-`&&(e=+lc(e)),e==null||e===``?NaN:Number(e))}xt({number:function(e){return parseFloat(e)},time:function(e){return+lc(e)},trim:function(e){return J(e)?pt(e):e}});var Rm={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)||wc(``),this._opFn=Rm[e],this._rvalFloat=pc(t)}return e.prototype.evaluate=function(e){return tt(e)?this._opFn(e,this._rvalFloat):this._opFn(pc(e),this._rvalFloat)},e})();var zm=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:pc(e),r=tt(t)?t:pc(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=pc(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=pc(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function Bm(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 Vm(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}var Hm=typeof Uint32Array>`u`?Array:Uint32Array,Um=typeof Uint16Array>`u`?Array:Uint16Array,Wm=typeof Int32Array>`u`?Array:Int32Array,Gm=typeof Float64Array>`u`?Array:Float64Array,Km={float:Gm,int:Wm,ordinal:Array,number:Array,time:Gm},qm;function Jm(e){return e>65535?Hm:Um}function Ym(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Xm(e,t,n,r,i){var a=Km[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 Zm=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=xt()}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=qm[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],dm(r),this._dimensions=G(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 Km[t||`float`](this._rawCount),this._rawExtent[i]=al(),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]=al());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];Xm(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=qm.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=G(a,function(e){return e.property}),l=0;l<o;l++){var u=a[l];s[l]||(s[l]=al()),Xm(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)}),$s(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=Jm(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(Jm(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=Xe(e),i=r.length;if(!i)return this;var a=t.count(),o=new(Jm(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]]=al();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(Jm(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(Jm(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]=al(),d=new(Jm(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=al();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=Bm(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||Vm(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&&qe(t,function(e,t){return e[t]=!0,e},{});if(a)for(var o=0;o<i.length;o++)r._chunks[o]=a[o]?Ym(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=Be(this._extent),e._rawExtent=Be(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 Lm(e[r],this._dimensions[r])}qm={arrayRows:e,objectRows:function(e,t,n,r){return Lm(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return Lm(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),Qm=Jc(),$m={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},eh=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||=rh(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=dm(this.source),n=!ih(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+=$m[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 th(e){return e instanceof eh}function nh(e){for(var t=xt(),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 rh(e){var t=Qm(e);return t.dimNameMap||=nh(e.dimensionsDefine)}function ih(e){return e>30}var ah=Y,oh=G,sh=typeof Int32Array>`u`?Array:Int32Array,ch=`e\0\0`,lh=-1,uh=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],dh=[`_approximateExtent`],fh,ph,mh,hh,gh,_h,vh,yh=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;th(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 Im({name:u}):u instanceof Im?u:new Im(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=xt();W(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 Zm&&(i=e),!i){var a=this.dimensions,o=nm(e)||Ke(e)?new vm(e,a.length):e;i=new Zm;var s=oh(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=Mm(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&&vh(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&&Mc(s)&&(this.hasItemOption=!0),s){var c=s.name;r[o]==null&&c!=null&&(r[o]=Hc(c,null));var l=s.id;i[o]==null&&l!=null&&(i[o]=Hc(l,null))}}if(this._shouldMakeIdFromName())for(var o=e;o<t;o++)vh(this,o);fh(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){ah(e)?H(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=mh(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 ph(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 K(e)?r.getValues(oh(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)?lh:r},e.prototype.each=function(e,t,n){q(e)&&(n=t,t=e,e=[]);var r=n||this,i=oh(hh(e),this._getStoreDimIndex,this);this._store.each(i,r?Qe(t,r):t)},e.prototype.filterSelf=function(e,t,n){q(e)&&(n=t,t=e,e=[]);var r=n||this,i=oh(hh(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?Qe(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={},r=Xe(e),i=[];return W(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){q(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=oh(hh(e),this._getStoreDimIndex,this),o=_h(this);return o._store=this._store.map(a,i?Qe(t,i):t),o},e.prototype.modify=function(e,t,n,r){var i=n||r||this,a=oh(hh(e),this._getStoreDimIndex,this);this._store.modify(a,i?Qe(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=_h(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.minmaxDownSample=function(e,t){var n=_h(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=_h(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 Hp(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new Gp(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return ph(e,t)},function(e){return ph(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||{},ah(e)?H(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),K(i)?i=i.slice():ah(i)&&(i=H({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,ah(t)?H(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){ah(e)?H(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?H(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){wl(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){W(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:oh(this.dimensions,this._getDimInfo,this),this.hostModel),gh(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];q(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(ut(arguments)))})},e.internalField=function(){fh=function(e){var t=e._invertedIndicesMap;W(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new sh(a.categories.length);for(var s=0;s<n.length;s++)n[s]=lh;for(var s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},mh=function(e,t,n){return Hc(e._getCategory(t,n),null)},ph=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=mh(e,e._idDimIdx,t)),n??=ch+t,n},hh=function(e){return K(e)||(e=e==null?[]:[e]),e},_h=function(t){var n=new e(t._schema?t._schema:oh(t.dimensions,t._getDimInfo,t),t.hostModel);return gh(n,t),n},gh=function(e,t){W(uh.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,W(dh,function(n){e[n]=Be(t[n])}),e._calculationInfo=H({},t._calculationInfo)},vh=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=mh(e,i,t)),s==null&&a!=null&&(r[t]=s=mh(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 bh(e,t){nm(e)||(e=im(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=xt(),a=[],o=xh(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&ih(o),c=r===e.dimensionsDefine,l=c?rh(e):nh(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=xt(u),f=new Wm(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 Im,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=Oc(e).slice();if(n.length===1&&!J(n[0])&&n[0]<0){d.set(t,!1);return}var r=d.set(t,[]);W(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;W(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=H({},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=Oc(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++)}W(s,function(e,a){var o=m(e);if(c&&i.type!=null&&(o.type=i.type),g(Ue(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&&Ue(o.otherDims,r)})}});function g(e,t,n){Tl.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)W(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=Sh(b,i,y),C.coordDimIndex=0,(!_||v<=0)&&(C.isExtraCoord=!0),v--),x(C),C.type==null&&($p(e,S)===Kp.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type=`ordinal`)}return gl(a,function(e){return e.name},function(e,t){t>0&&(e.name+=t-1)}),new eh({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function xh(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return W(t,function(e){var t;Y(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function Sh(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 Ch={},wh={},Th=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Ch,!0),this._normalMasterList=n(wh,!1);function n(n,r){var i=[];return W(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){W(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`){Ch[e]=t;return}wh[e]=t},e.get=function(e){return wh[e]||Ch[e]},e}();function Eh(e){return!!Ch[e]}function Dh(e){Oh.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var Oh=xt();function kh(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=Oh.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function Ah(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&&!Eh(n)&&(i=0))}return{coordSysType:n,kind:i}}function jh(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=Ah(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 Mh=function(){function e(e){this.coordSysDims=[],this.axisMap=xt(),this.categoryAxisMap=xt(),this.coordSysName=e}return e}();function Nh(e){var t=e.get(`coordinateSystem`),n=new Mh(t),r=Ph[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var Ph={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Qc).models[0],a=e.getReferringComponents(`yAxis`,Qc).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),Fh(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),Fh(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Qc).models[0];t.coordSysDims=[`single`],n.set(`single`,i),Fh(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Qc).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),Fh(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),Fh(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();W(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),Fh(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Qc).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 Fh(e){return e.get(`type`)===`category`}function Ih(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;Lh(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(W(a,function(e,t){J(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),W(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;W(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 Lh(e){return!th(e.schema)}function Rh(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function zh(e,t){return Rh(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function Bh(e,t){var n=e.get(`coordinateSystem`),r=Th.get(n),i;return t&&t.coordSysDims&&(i=G(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=Pm(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function Vh(e,t,n){var r,i;return n&&W(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 Hh(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=im(e)):(i=r.getSource(),a=i.sourceFormat===El);var o=Nh(t),s=Bh(t,o),c=n.useEncodeDefaulter,l=q(c)?c:c?$e(Yp,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=bh(i,u),f=Vh(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=Ih(t,{schema:d,store:p}),h=new yh(d,t);h.setCalculationInfo(m);var g=f!=null&&Uh(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 Uh(e){if(e.sourceFormat===`original`)return!K(jc(Wh(e.data||[])))}function Wh(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var Gh=Math.round(Math.random()*10);function Kh(e){return[e||``,Gh++].join(`_`)}function qh(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=Nt(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var a=Nt(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}function Jh(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(W(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]),W(u.successor,d?p:f)}W(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 W(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),W(c,function(e){U(s.predecessor,e)<0&&s.predecessor.push(e);var t=r(n,e);U(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 W(e,function(e){U(t,e)>=0&&n.push(e)}),n}}function Yh(e,t){return Ve(Ve({},e,!0),t,!0)}var Xh=Math.log(2);function Zh(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)/Xh);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]*Zh(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function Qh(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=Zh(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)*Zh(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 $h=`___zrEVENTSAVED`,eg=[];function tg(e,t,n,r,i){return rg(eg,t,r,i,!0)&&rg(e,n,eg[0],eg[1])}function ng(e,t){e&&n(e),t&&n(t);function n(e){var t=e[$h];t&&(t.clearMarkers&&t.clearMarkers(),delete e[$h])}}function rg(e,t,n,r,i){if(t.getBoundingClientRect&&Ot.domSupported&&!og(t)){var a=t[$h]||(t[$h]={}),o=ag(ig(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function ig(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(){W(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function ag(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?Qh(s,o):Qh(o,s))}function og(e){return e.nodeName.toUpperCase()===`CANVAS`}var sg=/([&<>"'])/g,cg={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function lg(e){return e==null?``:(e+``).replace(sg,function(e,t){return cg[t]})}var ug={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:`. `}}}},dg={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:``}}}},fg=`ZH`,pg=`EN`,mg=pg,hg={},gg={},_g=Ot.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||mg).toUpperCase().indexOf(fg)>-1?fg:mg}():mg;function vg(e,t){e=e.toUpperCase(),gg[e]=new Hp(t),hg[e]=t}function yg(e){if(J(e)){var t=hg[e.toUpperCase()]||{};return e===fg||e===pg?Be(t):Ve(Be(t),Be(hg[mg]),!1)}return Ve(Be(e),Be(hg[mg]),!1)}function bg(e){return gg[e]}function xg(){return gg[mg]}vg(pg,ug),vg(fg,dg);var Sg=null;function Cg(){return Sg}function wg(e,t){var n=Cg(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function Tg(e){var t=e.brk;return t?t.breaks:[]}function Eg(e){var t=e.brk;return t?t.hasBreaks():!1}var Dg=1e3,Og=Dg*60,kg=Og*60,Ag=kg*24,jg=Ag*365,Mg={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})/},Ng={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},Pg=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,Fg=`{yyyy}-{MM}-{dd}`,Ig={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:Fg,hour:Fg+` `+Ng.hour,minute:Fg+` `+Ng.minute,second:Fg+` `+Ng.second,millisecond:Pg},Lg=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],Rg=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function zg(e){return!J(e)&&!q(e)?Bg(e):e}function Bg(e){e||={};var t={},n=!0;return W(Lg,function(t){n&&=e[t]==null}),W(Lg,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=Lg[s],l=Y(a)&&!K(a)?a[c]:a,u=void 0;K(l)?(u=l.slice(),o=u[0]||``):J(l)?(o=l,u=[o]):(o==null?o=Ng[r]:Mg[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function Vg(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function Hg(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 Ug(e){return e===Hg(e)}function Wg(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function Gg(e,t,n,r){var i=lc(e),a=i[Yg(n)](),o=i[Xg(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[Zg(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[Qg(n)](),d=(u-1)%12+1,f=i[$g(n)](),p=i[e_(n)](),m=i[t_(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof Hp?r:bg(r||_g)||xg()).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,Vg(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,Vg(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,Vg(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,Vg(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,Vg(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,Vg(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,Vg(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,Vg(m,3)).replace(/{S}/g,m+``)}function Kg(e,t,n,r,i){var a=null;if(J(n))a=n;else if(q(n)){var o={time:e.time,level:e.time?e.time.level:0},s=Cg();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=qg(e.value,i);a=n[u][u][0]}}return Gg(new Date(e.value),a,i,r)}function qg(e,t){var n=lc(e),r=n[Xg(t)]()+1,i=n[Zg(t)](),a=n[Qg(t)](),o=n[$g(t)](),s=n[e_(t)](),c=n[t_(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 Jg(e,t,n){switch(t){case`year`:e[r_(n)](0);case`month`:e[i_(n)](1);case`day`:e[a_(n)](0);case`hour`:e[o_(n)](0);case`minute`:e[s_(n)](0);case`second`:e[c_(n)](0)}return e}function Yg(e){return e?`getUTCFullYear`:`getFullYear`}function Xg(e){return e?`getUTCMonth`:`getMonth`}function Zg(e){return e?`getUTCDate`:`getDate`}function Qg(e){return e?`getUTCHours`:`getHours`}function $g(e){return e?`getUTCMinutes`:`getMinutes`}function e_(e){return e?`getUTCSeconds`:`getSeconds`}function t_(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function n_(e){return e?`setUTCFullYear`:`setFullYear`}function r_(e){return e?`setUTCMonth`:`setMonth`}function i_(e){return e?`setUTCDate`:`setDate`}function a_(e){return e?`setUTCHours`:`setHours`}function o_(e){return e?`setUTCMinutes`:`setMinutes`}function s_(e){return e?`setUTCSeconds`:`setSeconds`}function c_(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function l_(e){if(!mc(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 u_(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 d_=dt;function f_(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&pt(e)?e:`-`}function a(e){return vc(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?lc(e):e;if(!isNaN(+c))return Gg(c,r,n);if(s)return`-`}if(t===`ordinal`)return et(e)?i(e):tt(e)&&a(e)?e+``:`-`;var l=pc(e);return a(l)?l_(l):et(e)?i(e):typeof e==`boolean`?e+``:`-`}var p_=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],m_=function(e,t){return`{`+e+(t??``)+`}`};function h_(e,t,n){K(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=p_[a];e=e.replace(m_(o),m_(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(m_(p_[c],s),n?lg(l):l)}return e}function g_(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:`+lg(r)+`;`+(t||``)+`"></span>`:`<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:`+lg(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 __(e,t){return t||=`transparent`,J(e)?e:Y(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function v_(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var y_=W,b_=[`left`,`right`,`top`,`bottom`,`width`,`height`],x_=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function S_(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 C_=S_;$e(S_,`vertical`),$e(S_,`horizontal`);function w_(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 T_(e,t){var n=k_(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===O_.point)a=n.refPoint,i=D_(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=K(o)?o:[o,o];i=D_(r,n.refContainer),a=n.boxCoordFrom===2?n.refPoint:[Js(s[0],i.width)+i.x,Js(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function E_(e,t){var n=T_(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);K(a)||(a=[0,a]);var o=Js(r.width,t.getWidth()),s=Js(r.height,t.getHeight()),c=Math.min(o,s),l=Js(a[0],c/2),u=Js(a[1],c/2);return{cx:i[0],cy:i[1],r0:l,r:u,viewRect:r}}function D_(e,t,n){n=d_(n||0);var r=t.width,i=t.height,a=Js(e.left,r),o=Js(e.top,i),s=Js(e.right,r),c=Js(e.bottom,i),l=Js(e.width,r),u=Js(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 Hn((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var O_={rect:1,point:2};function k_(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=kh(e),l=c.coord,u=c.from;if(o.dataToLayout){a=O_.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=O_.point,s=u,i=o.dataToPoint(l))}return a??=O_.rect,a===O_.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 A_(e){var t=e.layoutMode||e.constructor.layoutMode;return Y(t)?t:t?{type:t}:null}function j_(e,t,n){var r=n&&n.ignoreSize;!K(r)&&(r=[r,r]);var i=o(x_[0],0),a=o(x_[1],1);c(x_[0],e,i),c(x_[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(y_(n,function(t){c[t]=e[t]}),y_(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){y_(e,function(e){t[e]=n[e]})}}function M_(e){return N_({},e)}function N_(e,t){return t&&e&&y_(b_,function(n){Z(t,n)&&(e[n]=t[n])}),e}var P_=Jc(),F_=function(e){V(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=Kh(`ec_cpt_model`),i}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=A_(this),r=n?M_(e):{};Ve(e,t.getTheme().get(this.mainType)),Ve(e,this.getDefaultOption()),n&&j_(e,r,n)},t.prototype.mergeOption=function(e,t){Ve(this.option,e,!0);var n=A_(this);n&&j_(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!Ft(e))return e.defaultOption;var t=P_(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=Ve(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return $c(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return w_(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}(Hp);Rt(F_,Hp),Ut(F_),qh(F_),Jh(F_,I_);function I_(e){var t=[];return W(F_.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=G(t,function(e){return Nt(e).main}),e!==`dataset`&&U(t,`dataset`)<=0&&t.unshift(`dataset`),t}var L_=Jc(),R_=Jc(),z_=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=Oc(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return H_(this,L_,r,i,e,t,n)},e.prototype.clearColorPalette=function(){U_(this,L_)},e}();function B_(e,t,n,r){return H_(e,R_,Oc(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function V_(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 H_(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:V_(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 U_(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var W_=/\{@(.+?)\}/g,G_=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&&K(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),q(i))return s.status=t,s.dimensionIndex=r,i(s);if(J(i))return h_(i,s).replace(W_,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=Am(o,e,i);if(a&&K(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return Am(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function K_(e){var t,n;return Y(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function q_(e){return new J_(e)}var J_=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(K(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){Y_.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:Y_.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),K(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}(),Y_=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}}(),X_=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 Lm(e,t)},e}();function Z_(e,t){var n=new X_,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex;e.seriesLayoutBy!==`column`&&wc(``);var o=[],s={},c=e.dimensionsDefine;if(c)W(c,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};o.push(r),n!=null&&(Z(s,n)&&wc(``),s[n]=r)});else for(var l=0;l<e.dimensionsDetectedCount;l++)o.push({index:l});var u=Sm(i,Ml);t.__isBuiltIn&&(n.getRawDataItem=function(e){return u(r,a,o,e)},n.getRawData=Qe(Q_,null,e)),n.cloneRawData=Qe($_,null,e),n.count=Qe(Tm(i,Ml),null,r,a,o);var d=Om(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=Qe(ev,null,o,s),n.cloneAllDimensionInfo=Qe(tv,null,o),n}function Q_(e){var t=e.sourceFormat;return ov(t)||wc(``),e.data}function $_(e){var t=e.sourceFormat,n=e.data;if(ov(t)||wc(``),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(H({},n[i]));return r}}function ev(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 tv(e){return Be(e)}var nv=xt();function rv(e){e=Be(e);var t=e.type,n=``;t||wc(n);var r=t.split(`:`);r.length!==2&&wc(n);var i=!1;r[0]===`echarts`&&(t=r[1],i=!0),e.__isBuiltIn=i,nv.set(t,e)}function iv(e,t,n){var r=Oc(e),i=r.length;i||wc(``);for(var a=0,o=i;a<o;a++){var s=r[a];t=av(s,t,n,i===1?null:a),a!==o-1&&(t.length=Math.max(t.length,1))}return t}function av(e,t,n,r){var i=``;t.length||wc(i),Y(e)||wc(i);var a=e.type,o=nv.get(a);o||wc(i);var s=G(t,function(e){return Z_(e,o)});return G(Oc(o.transform({upstream:s[0],upstreamList:s,config:Be(e.config)})),function(e,n){var r=``;Y(e)||wc(r),e.data||wc(r),ov(om(e.data))||wc(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:Ml,sourceHeader:o,dimensions:a.metaRawOption.dimensions}}else i={seriesLayoutBy:Ml,sourceHeader:0,dimensions:e.dimensions};return rm(e.data,i,null)})}function ov(e){return e===`arrayRows`||e===`objectRows`}var sv=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(cv(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=rt(o)?Al:El,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?[rm(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=[rm(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 W(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&lv(``),a.push(t),o.push(e._getVersionSign())}),n?i=iv(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[am(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];cv(this._sourceHost)&&s?o=s._innerGetDataStore(e,t,n):(o=new Zm,o.initData(new vm(t,e.length),e)),a[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(cv(e)){var t=Zp(e);return t?[t.getSourceManager()]:[]}return G(Qp(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,r;if(cv(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 cv(e){return e.mainType===`series`}function lv(e){throw Error(e)}var Q={color:{},darkColor:{},size:{}},uv=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 dv in H(uv,{primary:uv.neutral80,secondary:uv.neutral70,tertiary:uv.neutral60,quaternary:uv.neutral50,disabled:uv.neutral20,border:uv.neutral30,borderTint:uv.neutral20,borderShade:uv.neutral40,background:uv.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:uv.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:uv.neutral70,axisLineTint:uv.neutral40,axisTick:uv.neutral70,axisTickMinor:uv.neutral60,axisLabel:uv.neutral70,axisSplitLine:uv.neutral15,axisMinorSplitLine:uv.neutral05}),uv)if(uv.hasOwnProperty(dv)){var fv=uv[dv];dv===`theme`?Q.darkColor.theme=uv.theme.slice():dv===`highlight`?Q.darkColor.highlight=`rgba(255,231,130,0.4)`:dv.indexOf(`accent`)===0?Q.darkColor[dv]=Vi(fv,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Q.darkColor[dv]=Vi(fv,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 pv=`line-height:1`;function mv(e){var t=e.lineHeight;return t==null?pv:`line-height:`+lg(t+``)+`px`}function hv(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:`+lg(r+``)+`px;color:`+lg(n)+`;font-weight:`+lg(i+``),valueStyle:`font-size:`+lg(o+``)+`px;color:`+lg(a)+`;font-weight:`+lg(s+``)}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var gv=[0,10,20,30],_v=[``,`
|
|
9
|
+
`,`
|
|
10
|
+
|
|
11
|
+
`,`
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
`];function vv(e,t){return t.type=e,t}function yv(e){return e.type===`section`}function bv(e){return yv(e)?Sv:Cv}function xv(e){if(yv(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return W(e.blocks,function(e){var n=xv(e);n>=t&&(t=n+ +(r&&(!n||yv(e)&&!e.noHeader)))}),t}return 0}function Sv(e,t,n,r){var i=t.noHeader,a=Tv(xv(t)),o=[],s=t.blocks||[];ft(!s||K(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 zm(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}W(s,function(n,i){var s=t.valueFormatter,c=bv(n)(s?H(H({},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):Ev(r,o.join(``),i?n:a.html);if(i)return d;var f=f_(t.header,`ordinal`,e.useUTC),p=hv(r,e.renderMode).nameStyle,m=mv(r);return e.renderMode===`richText`?kv(e,f,p)+a.richText+d:Ev(r,`<div style="`+p+`;`+m+`;">`+lg(f)+`</div>`+d,n)}function Cv(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=K(e)?e:[e],G(e,function(e,t){return f_(e,K(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Q.color.secondary,i),f=a?``:f_(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=hv(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:kv(e,f,v))+(o?``:Av(e,m,h,g,y)):Ev(r,(s?``:d)+(a?``:Dv(f,!s,v))+(o?``:Ov(m,h,g,y)),n)}}function wv(e,t,n,r,i,a){if(e)return bv(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function Tv(e){return{html:gv[e],richText:_v[e]}}function Ev(e,t,n){var r=`<div style="clear:both"></div>`,i=`margin: `+n+`px 0 0`,a=mv(e);return`<div style="`+i+`;`+a+`;">`+t+r+`</div>`}function Dv(e,t,n){var r=t?`margin-left:2px`:``;return`<span style="`+n+`;`+r+`">`+lg(e)+`</span>`}function Ov(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=K(e)?e:[e],`<span style="`+i+`;`+r+`">`+G(e,function(e){return lg(e)}).join(` `)+`</span>`}function kv(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function Av(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(K(t)?t.join(` `):t,a)}function jv(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return __(n)}function Mv(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var Nv=function(){function e(){this.richTextStyles={},this._nextStyleNameId=hc()}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=g_({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={};K(t)?W(t,function(e){return H(n,e)}):H(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function Pv(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=K(s),l=jv(t,n),u,d,f,p;if(o>1||c&&!o){var m=Fv(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=Am(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=Uc(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return vv(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[vv(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!pt(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function Fv(e,t,n,r,i){var a=t.getData(),o=qe(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?W(r,function(e){u(Am(a,n,e),e)}):W(e,u);function u(e,t){var n=a.getDimensionInfo(t);!n||n.otherDims.tooltip===!1||(o?l.push(vv(`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 Iv=Jc();function Lv(e,t){return e.getName(t)||e.getId(t)}var Rv=function(e){V(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=q_({count:Vv,reset:Hv}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(Iv(this).sourceManager=new sv(this)).prepareSource();var r=this.getInitialData(e,n);Wv(r,this),this.dataTask.context.data=r,Iv(this).dataBeforeProcessed=r,zv(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=A_(this),r=n?M_(e):{},i=this.subType;F_.hasClass(i)&&(i+=`Series`),Ve(e,t.getTheme().get(this.subType)),Ve(e,this.getDefaultOption()),kc(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&j_(e,r,n)},t.prototype.mergeOption=function(e,t){e=Ve(this.option,e,!0),this.fillDataTextStyle(e.data);var n=A_(this);n&&j_(this.option,e,n);var r=Iv(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);Wv(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Iv(this).dataBeforeProcessed=i,zv(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!rt(e))for(var t=[`show`],n=0;n<e.length;n++)e[n]&&e[n].label&&kc(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=Kv(this);if(t){var n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}return Iv(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=Kv(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}Iv(this).data=e},t.prototype.getEncode=function(){var e=this.get(`encode`,!0);if(e)return xt(e)},t.prototype.getSourceManager=function(){return Iv(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return Iv(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 Pv({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Ot.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=z_.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=Lv(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=Xe(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[Lv(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=Lv(e,l);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(l)}}else if(a===`single`||a===!0){var d=t[o-1],u=Lv(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 F_.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}(F_);Ge(Rv,G_),Ge(Rv,z_),Rt(Rv,F_);function zv(e){var t=e.name;Uc(e)||(e.name=Bv(e)||t)}function Bv(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return W(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function Vv(e){return e.model.getRawData().count()}function Hv(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Uv}function Uv(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Wv(e,t){W(St(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,$e(Gv,t))})}function Gv(e,t){var n=Kv(e);return n&&n.setOutputEnd((t||this).count()),t}function Kv(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 qv=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()}}),Jv={line:Ud,rect:ms,roundRect:ms,square:ms,circle:pd,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:qv},Yv={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}},Xv={};W(Jv,function(e,t){Xv[t]=new e});var Zv=es.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=pr(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=Xv[r];i||=(r=`rect`,Xv[r]),Yv[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Qv(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 $v(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?Mf(e.slice(8),new Hn(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?jf(e.slice(7),{},new Hn(t,n,r,i),o?`center`:`cover`):new Zv({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Qv,a&&c.setColor(a),c}function ey(e){return K(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function ty(e,t){if(e!=null)return K(e)||(e=[e,e]),[Js(e[0],t[0])||0,Js(X(e[1],e[0]),t[1])||0]}var ny=function(e){V(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 Hh(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new dd,n=$v(`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=$v(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}(Rv);function ry(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=Am(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o<n.length;o++)a.push(Am(e,t,n[o]));return a.join(` `)}}function iy(e,t){var n=e.mapDimensionsAll(`defaultedLabel`);if(!K(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 ay=function(e){V(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=$v(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=oy,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(){pu(this.childAt(0))},t.prototype.downplay=function(){mu(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):hf(f,p,o,n),xf(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,gf(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=bp(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=ty(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 os){var S=a.style;a.useStyle(H({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(H({},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;yp(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):ry(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),Mu(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=Cl(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&vf(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();vf(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return ey(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(dd);function oy(e,t){this.parent.drift(e,t)}function sy(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 cy(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:bp(t),cursorStyle:t.get(`cursor`)}}function uy(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 dy=function(){function e(e){this.group=new dd,this._SymbolCtor=e||ay}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=cy(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);sy(e,i,r,t)&&uy(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!sy(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):hf(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);sy(t,s,i,e)?(o||=uy(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=cy(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(sy(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){rp(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 fy(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=py(i,n),o=r.dim,s=i.dim,c=t.mapDimension(s),l=t.mapDimension(o),u=+(s===`x`||s===`radius`),d=G(e.dimensions,function(e){return t.mapDimension(e)}),f=!1,p=t.getCalculationInfo(`stackResultDimension`);return Rh(t,d[0])&&(f=!0,d[0]=p),Rh(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 py(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 my(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 hy(e,t){return!isFinite(e)||!isFinite(t)}var gy=typeof Float32Array<`u`?Float32Array:void 0;function _y(e){return vy({ctor:gy},e).arr}function vy(e,t){var n=e.arr,r=e.ctor;if(t>ac&&(t=ac),!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 yy(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 by(e,t,n,r,i,a,o,s){for(var c=yy(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=fy(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=my(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=_y(M),P=_y(M),ee=_y(M),F=_y(M),te=[],y=0;y<m.length;y++){var I=m[y],L=y*2,ne=I*2;N[L]=l[ne],N[L+1]=l[ne+1],P[L]=u[ne],P[L+1]=u[ne+1],ee[L]=d[ne],ee[L+1]=d[ne+1],F[L]=f[ne],F[L+1]=f[ne+1],te[y]=p[I]}return{current:N,next:P,stackedOnCurrent:ee,stackedOnNext:F,status:te}}var xy=Math.min,Sy=Math.max;function Cy(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(hy(_,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(;hy(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||hy(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,ee=void 0;if(s===`x`){P=Math.abs(A),ee=Math.abs(j);var F=E>0?1:-1;p=_-F*P*o,m=v,O=_+F*ee*o,k=v}else if(s===`y`){P=Math.abs(M),ee=Math.abs(N);var te=D>0?1:-1;p=_,m=v-te*P*o,O=_,k=v+te*ee*o}else P=Math.sqrt(A*A+M*M),ee=Math.sqrt(j*j+N*N),T=ee/(ee+P),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=xy(O,Sy(S,_)),k=xy(k,Sy(C,v)),O=Sy(O,xy(S,_)),k=Sy(k,xy(C,v)),E=O-_,D=k-v,p=_-E*P/ee,m=v-D*P/ee,p=xy(p,Sy(l,_)),m=xy(m,Sy(u,v)),p=Sy(p,xy(l,_)),m=Sy(m,xy(u,v)),E=_-p,D=v-m,O=_+E*ee/P,k=v+D*ee/P}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var wy=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),Ty=function(e){V(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 wy},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&hy(n[i*2-2],n[i*2-1]);i--);for(;r<i&&hy(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=Cy(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=ko.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?ci(i,u,f,m,e,s):ci(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?oi(a,d,p,h,b):oi(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(es),Ey=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(wy),Dy=function(e){V(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 Ey},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&&hy(n[a*2-2],n[a*2-1]);a--);for(;i<a&&hy(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=Cy(e,n,i,a,a,1,t.smooth,o,t.connectNulls);Cy(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(es);function Oy(){var e=Jc();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 ky=Jc(),Ay=Oy(),jy=function(){function e(){this.group=new dd,this.uid=Kh(`viewChart`),this.renderTask=q_({plan:Py,reset:Fy}),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&&Ny(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&Ny(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){rp(this.group,e)},e.markUpdateMethod=function(e,t){ky(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function My(e,t,n){e&&Ru(e)&&(t===`emphasis`?pu:mu)(e,n)}function Ny(e,t,n){var r=qc(e,t),i=t&&t.highlightKey!=null?zu(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){My(e,n,i)}):W(Oc(r),function(t){My(e.getItemGraphicEl(t),n,i)})}It(jy,[`dispose`]),Ut(jy);function Py(e){return Ay(e.model)}function Fy(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&ky(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),Iy[c]}var Iy={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 Ly(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 ms({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=q(i)?function(e){i(e,d)}:null;gf(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function Ry(e,t,n){var r=e.getArea(),i=Qs(r.r0,1),a=Qs(r.r,1),o=new Md({shape:{cx:Qs(e.cx,1),cy:Qs(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,gf(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function zy(e,t,n,r,i){return e?e.type===`polar`?Ry(e,t,n):e.type===`cartesian2d`?Ly(e,t,n,r,i):null:null}function By(e,t){return e.type===t}function Vy(e,t,n,r){return e&&(e.legacy||e.legacy!==!1&&!n&&!r&&t!==`tspan`&&(t===`text`||Z(e,`text`)))}function Hy(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 Uy(o,e),W(o.rich,function(e){Uy(e,e)}),{textConfig:i,textContent:a}}function Uy(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 Wy(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;Gy(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,W(t.rich,function(e){Gy(e,e)}),r}function Gy(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 Ky=function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();Ut(Ky);var qy=0,Jy=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++qy,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&G(r,Yy);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||=xt(this.categories)},e}();function Yy(e){return Y(e)&&e.value!=null?e.value:e+``}var Xy=Xe({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 Zy(e,t,n){var r;e||={};var i=Cg();if(i){var a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(W(Xy,function(t){a[t]&&(e[t]=Qe(a[t],a))}),r=a)}return r??ib(e,n),{brk:r,mapper:e}}function Qy(e,t){W(Xy,function(n){e[n]=t[n]})}function $y(e,t){e.freeze=Tt}function eb(e){return e.getExtentUnsafe(0,2)}function tb(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function nb(e){var t=tb(e,3);return t[1]-t[0]}function rb(e){var t=e.getExtentUnsafe(0,3);return t[1]-t[0]}function ib(e,t){var n=e||{},r=[];return n._extents=r,r[0]=t?t.slice():al(),H(n,ab),n}var ab={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=tb(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){ob(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),ob(r,e,t,n)},freeze:function(){}};function ob(e,t,n,r){dl(n,r)&&(e[t][0]=n,e[t][1]=r)}function sb(e){return cb(e)||ub(e)}function cb(e){return e.type===`interval`}function lb(e){return e.type===`time`}function ub(e){return e.type===`log`}function db(e){return e.type===`ordinal`}function fb(e){var t=dc(e),n=Hs(10,t),r=zs(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,Qs(r*n,-t)}function pb(e){return ec(e)+2}function mb(e,t){return Us(e)/Us(t)}function hb(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 Hs(t,e)}function gb(e,t,n){var r=e.slice();if(r[0]===r[1]){var i=n&&n.ctnShp;if(r[0]!==0){var a=Rs(r[0]);t[1]||(r[1]+=a/2),r[0]-=a/2}else i&&(r[0]=-1),r[1]=1}return(!ul(r[0])||!ul(r[1]))&&(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function _b(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function vb(e,t){return e||=t,zs(Ls(e,1))}function yb(e,t,n){var r=eb(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 bb=function(e){V(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,Qy(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new Jy({}),K(i)&&(i=new Jy({categories:G(i,function(e){return Y(e)?e.value:e})})),r._ordinalMeta=i;var a=Zy(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,$y(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:J(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=zs(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=Is(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=eb(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(zs(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}(Ky);Ky.registerClass(bb);function xb(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=pb(f);u<t-1;){var m=Qs(l.value+(u+1)*f,p);m>o[0]&&m<o[1]&&d.push(m),u++}var h=Cg();h&&h.pruneTicksByBreak(`auto`,d,n,function(e){return e},r,o),a.push(d)}}return a}var Sb=function(e){V(t,e);function t(n){var r=e.call(this)||this;return r.type=`interval`,r.parse=t.parse,n||={},r.brk=Zy(r,wg(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 Be(this._cfg)},t.prototype.setConfig=function(e){var t=eb(this);this._cfg=e=Be(e),e.niceExtent??(e.niceExtent=t.slice()),e.intervalPrecision??(e.intervalPrecision=pb(e.interval))},t.prototype.getTicks=function(e){e||={};var t=this._cfg,n=t.interval,r=eb(this),i=t.niceExtent,a=t.intervalPrecision,o=Cg(),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?Qs(i[0]-n,a):r[0]});for(var d=function(e,t){return zs((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=Is(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=Qs(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=Qs(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?Qs(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 xb(this,e,Tg(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),l_(Qs(e.value,n,!0))},t.type=`interval`,t}(Ky);Ky.registerClass(Sb);var Cb=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},wb=function(e){V(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=Zy(r,wg(r,n),null).brk,r}return t.prototype.getLabel=function(e){return Gg(e.value,Ig[Wg(Hg(this._minLevelUnit))]||Ig.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,t,n){return Kg(e,t,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=eb(this),r=Cg(),i=this.brk,a=r&&i,o=[];if(!t)return o;var s=this._useUTC;if(a&&e.breakTicks===`only_break`)return Cg().addBreaksToTicks(o,i.breaks,n),o;o=Pb(this._minLevelUnit,this._approxInterval,s,n,rb(this),i);var c=Lg.length-1,l=0;return W(o,function(e){e.time&&(c=Math.min(c,U(Lg,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a&&Cg().pruneTicksByBreak(e.pruneByBreak,o,i.breaks,function(e){return e.value},this._approxInterval,n),a&&e.breakTicks!==`none`&&Cg().addBreaksToTicks(o,i.breaks,n,function(e){for(var t=Math.max(U(Lg,qg(e.vmin,s)),U(Lg,qg(e.vmax,s))),n=0,r=0;r<Lg.length;r++)if(!Eb(Lg[r],e.vmin,e.vmax,s)){n=r;break}var i=Math.min(n,c);return{level:l,lowerTimeUnit:Lg[Math.max(i,t)],upperTimeUnit:Lg[i]}}),o},t.prototype.getMinorTicks=function(e){return xb(this,e,Tg(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):+lc(e)},t.type=`time`,t}(Ky),Tb=[[`second`,Dg],[`minute`,Og],[`hour`,kg],[`quarter-day`,kg*6],[`half-day`,kg*12],[`day`,Ag*1.2],[`half-week`,Ag*3.5],[`week`,Ag*7],[`month`,Ag*31],[`quarter`,Ag*95],[`half-year`,jg/2],[`year`,jg]];function Eb(e,t,n,r){return Jg(new Date(t),e,r).getTime()===Jg(new Date(n),e,r).getTime()}function Db(e,t){return e/=Ag,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function Ob(e){var t=30*Ag;return e/=t,e>6?6:e>3?3:e>2?2:1}function kb(e){return e/=kg,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function Ab(e,t){return e/=t?Og:Dg,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function jb(e){return Ls(fc(e,!0),1)}function Mb(e,t,n){var r=Math.max(0,U(Lg,t)-1);return Jg(new Date(e),Lg[r],n).getTime()}function Nb(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 Pb(e,t,n,r,i,a){var o=Rg,s=0;function c(e,t,n,i,o,c,l){for(var u=Nb(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(!Eb(Hg(e),r[0],r[1],n)){s&&(i=[{value:Mb(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/Ag/365)),p=Yg(n),m=n_(n);break;case`half-year`:case`quarter`:case`month`:f=Ob(t),p=Xg(n),m=r_(n);break;case`week`:case`half-week`:case`day`:f=Db(t,31),p=Zg(n),m=i_(n),h=!0;break;case`half-day`:case`quarter-day`:case`hour`:f=kb(t),p=Qg(n),m=a_(n);break;case`minute`:f=Ab(t,!0),p=$g(n),m=o_(n);break;case`second`:f=Ab(t,!1),p=e_(n),m=s_(n);break;case`millisecond`:f=jb(t),p=t_(n),m=c_(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=Hg(o[m]);if(Ug(o[m])&&(l(o[m],u[u.length-1]||[],d),h!==(o[m+1]?Hg(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=Je(G(u,function(e){return Je(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=qg(C[w].value,n);S.push({value:C[w].value,time:{level:x-m,upperTimeUnit:T,lowerTimeUnit:T}})}gl(S,_l,null),S.sort(function(e,t){return e.value-t.value});var E=S[0],D=S[S.length-1],O=qg(r[0],n),k=qg(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 Fb=function(e,t){var n=e.getExtent();if(n[0]===n[1]&&(n[0]-=Ag,n[1]+=Ag),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]-Ag}e.setExtent(n[0],n[1]);var i=vb(t.splitNumber,10),a=rb(e)/i,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var c=Tb.length,l=Math.min(Cb(Tb,a,0,c),c-1),u=Tb[l][1],d=Tb[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};Ky.registerClass(wb);var Ib=0,Lb=1,Rb=2,zb=function(e){V(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=Sb.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[Ib]=i[Lb]=a[Ib]=a[Lb]=NaN,Qy(r,t.mapperMethods);var s=Cg(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},Rb,l),r.powStub=new Sb({breakParsed:l.original}),r.intervalStub=new Sb({breakParsed:l.transformed}),$y(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Cg(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return G(i.getTicks(e||{}),function(e){var i=e.value,o=hb(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,Tg(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return xb(this,e,Tg(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(mb(e,this.base))},scale:function(e){return hb(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=mb(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return Bb.depth=n,Vb.lookup=this._lookup,hb(n===2?e:this.intervalStub.transformOut(e,Bb),this.base,Vb)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!dl(t,n)||t<=0||n<=0)){var r=Hb,i=Hb;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[Ib]=t,r[Lb]=n);var o=this.base;this.intervalStub.setExtent2(e,i[Ib]=mb(t,o),i[Lb]=mb(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return dl(t[0],t[1])&&vc(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}(Ky);Ky.registerClass(zb);var Bb={},Vb={},Hb=[],Ub={value:1,category:1,time:1,log:1},Wb=Jc();function Gb(e){var t=e.get(`type`);return(t==null||!Z(Ub,t)&&!Ky.getClass(t))&&(t=`value`),t}function Kb(e,t,n){var r=Cg(),i;switch(r&&(i=rx(e,t,n)),t){case`category`:return new bb({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:al()});case`time`:return new wb({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new zb({logBase:e.get(`logBase`),breakOption:i});case`value`:return new Sb({breakOption:i});default:return new((Ky.getClass(t))||Sb)({})}}function qb(e,t,n){var r=n?tb(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return dl(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}function Jb(e){Wb(e).noOnMyZero=!0}function Yb(e){return Wb(e).noOnMyZero}function Xb(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=zg(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(q(t)){if(e.type===`category`)return function(n,r){return t(Zb(e,n),n.value-e.scale.getExtent()[0],null)};var r=Cg();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Zb(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function Zb(e,t){var n=e.scale;return db(n)?n.getLabel(t):t.value}function Qb(e){return e.get(`interval`)??`auto`}function $b(e){return e.type===`category`&&Qb(e.getLabelModel())===0}function ex(e,t){var n={};return W(e.mapDimensionsAll(t),function(t){n[zh(e,t)]=!0}),Xe(n)}function tx(e){return e===`middle`||e===`center`}function nx(e){return e.getShallow(`show`)}function rx(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Cg()||!n||!ix(t)?void 0:r}function ix(e){return e!==`category`}function ax(e,t,n,r,i,a){var o=ub(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=_b(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function ox(e,t){return db(e)?e.getRawOrdinalNumber(t.value):t.value}function sx(e,t){return db(e)&&!!t.get(`boundaryGap`)}function cx(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function lx(e){for(var t=al(),n=al(),r=0;r<e.length;){var i=e[r++],a=e[r++];hy(i,a)||(ol(t,i),ol(n,a))}return[t,n]}function ux(e,t){var n=lx(e),r=n[0],i=n[1],a=lx(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 dx(e){return tt(e)?e:e?.5:0}function fx(e,t,n){if(n.valueDim==null)return[];for(var r=t.count(),i=_y(r*2),a=0;a<r;a++){var o=my(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function px(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;hy(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 mx(e,t){var n=[],r=e.length,i,a;function o(e,t,n){var r=e.coord;return{coord:n,color:Bi((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 hx(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=G(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=mx(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`;W(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 Qd(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function gx(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&_x(a,t))){var o=t.mapDimension(a.dim),s={};return W(a.getViewLabels(),function(e){e.tick.offInterval||(s[ox(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function _x(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(ay.getSymbolSize(t,o)[+!!e.isHorizontal()]*1.5>r)return!1;return!0}function vx(e){for(var t=e.length/2;t>0&&hy(e[t*2-2],e[t*2-1]);t--);return t-1}function yx(e,t){return[e[t*2],e[t*2+1]]}function bx(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],!hy(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 xx(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<Bl.length;t++)if(e.get([Bl[t],`endLabel`,`show`]))return!0;return!1}function Sx(e,t,n,r){if(By(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=xx(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=Ly(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 Ry(t,n,r)}function Cx(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 Tx=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new dd,t=new dy;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=Qe(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=fy(r,a,_),y=g&&fx(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&gx(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=hx(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&&=px(y,c,r,w,x),c=px(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,__(E)),m.setClipPath(Sx(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,__(E));var D=m.getClipPath();D?gf(D,{shape:Sx(this,r,!1,e).shape},e):m.setClipPath(Sx(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]]}}),(!cx(this._stackedOnPoints,y)||!cx(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=px(y,c,r,w,x),c=px(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(Ue(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),Iu(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}Cl(f).seriesIndex=e.seriesIndex,Mu(f,k,A,j);var N=dx(e.get(`smooth`)),P=e.get(`smoothMonotone`);if(f.setShape({smooth:N,smoothMonotone:P,connectNulls:x}),p){var ee=a.getCalculationInfo(`stackedOnSeries`),F=0;p.useStyle(Ue(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),ee&&(F=dx(ee.get(`smooth`))),p.setShape({smooth:N,stackedOnSmooth:F,smoothMonotone:P,connectNulls:x}),Iu(p,e,`areaStyle`),Cl(p).seriesIndex=e.seriesIndex,Mu(p,k,A,j)}var te=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=te)}),this._polyline.onHoverStateChange=te,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var I=e.get(`triggerEvent`),L=e.get(`triggerLineEvent`),ne=L===!0||I===!0||I===`line`,re=L===!0||I===!0||I===`area`;this.packEventData(e,f,ne),p&&this.packEventData(e,p,re)},t.prototype.packEventData=function(e,t,n){Cl(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=qc(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(hy(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new ay(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 jy.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=qc(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 jy.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;iu(this._polyline,e),t&&iu(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new Ty({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 Dy({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`);q(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=q(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=q(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(xx(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 ys({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=vx(o);c>=0&&(yp(a,bp(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?ry(i,e):iy(i,n)},enableTextSetter:!0},Cx(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=bx(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=yx(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=il(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=yx(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=Ap(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=by(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=px(u.stackedOnCurrent,u.current,n,i,o),d=px(u.current,null,n,i,o),m=px(u.stackedOnNext,u.next,n,i,o),p=px(u.next,null,n,i,o)),ux(d,p)>3e3||c&&ux(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(),hf(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),hf(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}(jy);function Ex(e,t){return{seriesType:e,plan:Oy(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,a=t||i.large;if(r){var o=G(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=o.length,c=n.getCalculationInfo(`stackResultDimension`);Rh(n,o[0])&&(o[0]=c),Rh(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&&_y(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 Dx={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]}},Ox=function(e){return Math.round(e.length/2)};function kx(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=Dx[i]:q(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,Ox))}}}}}function Ax(e){e.registerChartView(Tx),e.registerSeriesModel(ny),e.registerLayout(Ex(`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,kx(`line`))}var jx=Jc(),Mx=Jc(),Nx={estimate:1,determine:2};function Px(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function Fx(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:G(Lx(n,r),function(t,n){return{formattedLabel:Xb(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?Rx(e,t):Vx(e)}function Ix(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:Lx(i,r)}:e.type===`category`?Bx(e,t):{ticks:r.getTicks(n)}}function Lx(e,t){var n=t.getExtent(),r=[];return W(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),gl(r,vl,null),$s(r),G(r,function(e){return{value:e}})}function Rx(e,t){var n=e.getLabelModel(),r=zx(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function zx(e,t,n){var r=Ux(e),i=Qb(t),a=n.kind===Nx.estimate;if(!a){var o=Gx(r,i);if(o)return o}var s,c;q(i)?s=Qx(e,i,!1):(c=i===`auto`?qx(e,n):i,s=Qx(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return Kx(r,i,l),!0}):Kx(r,i,l),l}function Bx(e,t){var n=Hx(e),r=Qb(t),i=Gx(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),q(r))a=Qx(e,r,!0);else if(r===`auto`){var s=zx(e,e.getLabelModel(),Px(Nx.determine));o=s.labelCategoryInterval,a=G(s.labels,function(e){return e.tick})}else o=r,a=Qx(e,o,!0);return Kx(n,r,{ticks:a,tickCategoryInterval:o})}function Vx(e){var t=e.scale.getTicks(),n=Xb(e);return{labels:G(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var Hx=Wx(`axisTick`),Ux=Wx(`axisLabel`);function Wx(e){return function(t){return Mx(t)[e]||(Mx(t)[e]={list:[]})}}function Gx(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function Kx(e,t,n){return e.list.push({key:t,value:n}),n}function qx(e,t){if(t.kind===Nx.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return Mx(e).autoInterval=n,!0}),n}return Mx(e).autoInterval??(Mx(e).autoInterval=e.calculateCategoryInterval(t))}function Jx(e,t){var n=t.kind,r=Zx(e),i=Xb(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=cr(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===Nx.estimate?(t.out.noPxChangeTryDetermine.push(Qe(Yx,null,e,S,c)),S):Xx(e,S,c)??S}function Yx(e,t,n){return Xx(e,t,n)==null}function Xx(e,t,n){var r=jx(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 Zx(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 Qx(e,t,n){var r=Xb(e),i=e.scale,a=[],o=q(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 $x=Jc();function eS(e){$x(e).prepare={}}function tS(e){$x(e).fullUpdate={}}function nS(e){return $x(e).fullUpdate}ml();var rS=Jc();Jc();function iS(e,t){var n=e.model,r=rS(nS(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function aS(e,t){return cS(iS(e,t))}function oS(e,t){var n=[];return sS(e.model.ecModel,function(e){for(var r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(cS(e))}),n}function sS(e,t){var n=rS(nS(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function cS(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function lS(e,t){var n=e.model.ecModel,r=rS(nS(n)).axSer;r&&uS(n,r.get(e.model.uid),t)}function uS(e,t,n){if(t)for(var r=0;r<t.length;r++){var i=t[r];e.isSeriesFiltered(i)||n(i)}}function dS(e,t){var n=e.model,r=rS(nS(n.ecModel)).keys;r&&W(r.get(n.uid),function(e){t(e)})}function fS(e,t,n){if(e){var r=t.ecModel,i=rS(nS(r)),a=e.model.uid,o=i.axSer||=xt();(o.get(a)||o.set(a,[])).push(t);var s=t.subType,c=t.getBaseAxis()===e,l=mS.get(pS(s,c,n))||mS.get(pS(s,c,null));if(l){var u=i.keyed||=xt(),d=i.keys||=xt(),f=l.key,p=u.get(f)||u.set(f,xt()),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 pS(e,t,n){return e+`|&`+X(t,!0)+`|&`+(n||``)}var mS=xt(),hS=.8;function gS(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=nb(r);vc(o)||(o=NaN);var s=e.getExtent(),c=Rs(s[1]-s[0]);return db(r)?_S(n,e,o,c):i&&vS(n,e,o,c,i),a!=null&&(n.w=vc(n.w)?Ls(a,n.w):a),n}function _S(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 vS(e,t,n,r,i){var a=!1,o=-1/0;W(i.key?[aS(t,i.key)]:oS(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),vc(n)&&n>0&&vc(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*hS,e.w2=e.w*n/r)}var yS=[0,1],bS=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)),qs(e,yS,xS(this),t)},e.prototype.coordToData=function(e,t){var n=qs(e,xS(this),yS,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=G(Ix(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(ox(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=SS(this,n,r);return G(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(db(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),G(this.scale.getMinorTicks(e),function(e){return G(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=Px(Nx.determine),Fx(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 gS(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=Px(Nx.determine),Jx(this,e)},e}();function xS(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 SS(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=gS(e).w;if(!i)return!1;W(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 CS=function(e){V(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}(bS),wS=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],TS=1,ES=2,DS=TS|ES;function OS(e,t,n){n||=DS,t?e.dirty|=n:e.dirty&=~n}function kS(e,t){return t||=DS,e.dirty==null||!!(e.dirty&t)}function AS(e){if(e)return kS(e)&&jS(e,e.label,e),e}function jS(e,t,n){var r=t.getComputedTransform();e.transform=sp(e.transform,r);var i=e.localRect=op(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=jp.textMargin);for(var d=0;d<4;d++)MS[d]=u===jp.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===jp.textMargin&&Qf(i,MS,!1,!1);var f=e.rect=op(e.rect,i);return r&&f.applyTransform(r),u===jp.minMargin&&Qf(f,MS,!1,!1),e.axisAligned=ip(r),(e.label=e.label||{}).ignore=t.ignore,OS(e,!1),OS(e,!0,ES),e}var MS=[0,0,0,0];function NS(e,t,n){return e.transform=sp(e.transform,n),e.localRect=op(e.localRect,t),e.rect=op(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=ip(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function PS(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 FS(e,t){for(var n=0;n<wS.length;n++){var r=wS[n];e[r]??(e[r]=t[r])}return AS(e)}function IS(e){var t=e.obb;return(!t||kS(e,ES))&&(e.obb=t||=new lf,t.fromBoundingRect(e.localRect,e.transform),OS(e,!1,ES)),t}function LS(e,t,n,r,i){var a=e.length,o=wf[t],s=Tf[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 RS(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=AS(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,c=0;c<t.length;c++)if(zS(i,t[c],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}}function zS(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:IS(e).intersect(IS(t),n,r)}var BS=null;function VS(){return BS}var HS=`expandAxisBreak`,US=Math.PI,WS=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],GS=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],KS=Jc(),qS=Jc(),JS=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 YS(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=yC(e.axisName)&&tx(e.nameLocation);W(r,function(e){var t=AS(e);if(!(!t||t.label.ignore)){o.push(t);var n=a.transGroup;c&&(n.transform?ln(XS,n.transform):nn(XS),t.transform&&an(XS,XS,t.transform),Hn.copy(ZS,t.localRect),ZS.applyTransform(XS),s?s.union(ZS):Hn.copy(s=new Hn(0,0,0,0),ZS))}});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 Hn(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var XS=tn(),ZS=new Hn(0,0,0,0),QS=function(e,t,n,r,i,a){if(tx(e.nameLocation)){var o=a.stOccupiedRect;o&&$S(NS({},o,a.transGroup.transform),r,i)}else eC(a.labelInfoList,a.dirVec,r,i)};function $S(e,t,n){var r=new On;zS(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&PS(t,r)}function eC(e,t,n,r){for(var i=On.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||$S(s,n,r)}}var tC=function(){function e(e,t,n,r){this.group=new dd,this._axisModel=e,this._api=t,this._local={},this._shared=r||new JS(QS),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:lt(t.get(`nameLocation`),n.nameLocation,`end`),shouldNameMoveOverlap:yC(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};this._cfg=a;var o=new dd({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 On(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},W(nC,function(r){e[r]&&rC[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=oc(t-e),i,a;return sc(r)?(a=n>0?`top`:`bottom`,i=`center`):sc(r-US)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<US?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}(),nC=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],rC={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&&(Tn(u,u,l),Tn(d,d,l));var p=H({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&Eg(r.axis.scale))VS().buildAxisBreakLine(r,i,a,m);else{var h=new Ud(H({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));If(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=ty(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];W([{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=$v(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){fC(t,i,s)&&iC(e,t,n,r,i,a,o,Nx.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){fC(t,i,s)&&iC(e,t,n,r,i,a,o,Nx.determine);var c=uC(e,i,a,r);sC(e,t.labelLayoutList,c),dC(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(yC(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 On(0,0),_=new On(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=tn();_.transform(sn(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*US/180);var b,x;tx(u)?b=tC.innerTextLayout(e.rotation,y??e.rotation,d):(b=aC(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=ct(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new ys({x:g.x,y:g.y,rotation:b.rotation,silent:tC.isLabelSilent(r),style:xp(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(tp({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=tC.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Cl(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=AS({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:tx(u)?WS[E]:GS[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 iC(e,t,n,r,i,a,o,s){mC(t)||pC(e,t,i,s,r,o);var c=t.labelLayoutList;gC(e,r,c,a),xC(r,e.rotation,c);var l=e.optionHideOverlap;oC(r,c,l),l&&RS(Je(c,function(e){return e&&!e.label.ignore})),YS(e,n,r,c)}function aC(e,t,n,r){var i=oc(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return sc(i-US/2)?(o=c?`bottom`:`top`,a=`center`):sc(i-US*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<US*1.5&&i>US/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function oC(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if($b(r))return;function a(e,a,o){var s=AS(t[a]),c=AS(t[o]),l=r.scale;if(!(!s||!c)){if(e==null){if(!n&&i)return;var u=KS(s.label).labelInfo.tick;if(lb(l)&&u.notNice||db(l)&&u.offInterval){cC(s.label);return}}if(e===!1||s.suggestIgnore){cC(s.label);return}if(c.suggestIgnore){cC(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=FS({marginForce:f},s),c=FS({marginForce:f},c)}zS(s,c,null,{touchThreshold:d})&&cC(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 sC(e,t,n){e.showMinorTicks||W(t,function(e){if(e&&e.label.ignore)for(var t=0;t<n.length;t++){var r=n[t],i=qS(r),a=KS(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.labelInfo.tick.value){cC(r);return}}})}function cC(e){e&&(e.ignore=!0)}function lC(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&&(Tn(o,o,t),Tn(s,s,t));var u=new Ud({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});If(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);var d=qS(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function uC(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=lC(i.getTicksCoords(),n.transform,c,Ue(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)t.add(l[u]);return l}function dC(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=Ue(c.getLineStyle(),Ue(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])})),d=0;d<s.length;d++)for(var f=lC(s[d],n.transform,l,u,`minorticks_`+d),p=0;p<f.length;p++)t.add(f[p])}}function fC(e,t,n){if(mC(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),hC(e,null,null,null))}return!0}function pC(e,t,n,r,i,a){var o=i.axis,s=ct(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new dd;n.add(c);var l=Px(r);if(!s||o.scale.isBlank()){hC(t,[],c,l);return}var u=i.getModel(`axisLabel`),d=o.getViewLabels(l),f=(ct(e.raw.labelRotate,u.get(`rotate`))||0)*US/180,p=tC.innerTextLayout(e.rotation,f,e.labelDirection),m=i.getCategories&&i.getCategories(!0),h=[],g=i.get(`triggerEvent`),_=1/0,v=-1/0;W(d,function(e,t){var n=e.tick,r=e.formattedLabel,s=e.rawLabel,l=u,f=ox(o.scale,n);if(m&&m[f]){var y=m[f];Y(y)&&y.textStyle&&(l=new Hp(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 ys({x:0,y:0,rotation:0,silent:tC.isLabelSilent(i),z2:D,style:xp(l,{text:r,align:t===0?S:t===d.length-1?C:x,verticalAlign:t===0?T:t===d.length-1?E:w,fill:q(b)?b(o.type===`category`?s:o.type===`value`?f+``:f,t):b})});O.anid=`label_`+f;var k=KS(O);if(k.labelInfo=e,k.layoutRotation=p.rotation,tp({el:O,componentModel:i,itemName:r,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:s,tickIndex:t}}),g){var A=tC.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),Cl(O).eventData=A,j&&bC(i,a,O,j)}h.push(O),c.add(O)}),hC(t,G(h,function(e){return{label:e,priority:KS(e).labelInfo.tick.break?e.z2+(v-_+1):e.z2,defaultAttr:{ignore:e.ignore}}}),c,l)}function mC(e){return!!e.labelLayoutList}function hC(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function gC(e,t,n,r){var i=t.get([`axisLabel`,`margin`]);W(n,function(n,a){var o=AS(n);if(o){var s=o.label,c=KS(s);o.suggestIgnore=s.ignore,s.ignore=!1,qr(_C,vC);var l=t.axis;_C.x=l.dataToCoord(ox(l.scale,c.labelInfo.tick)),_C.y=e.labelOffset+e.labelDirection*i,_C.rotation=c.layoutRotation,r.add(_C),_C.updateTransform(),r.remove(_C),_C.decomposeTransform(),qr(s,_C),s.markRedraw(),OS(o,!0),AS(o)}})}var _C=new ms,vC=new ms;function yC(e){return!!e}function bC(e,t,n,r){n.on(`click`,function(n){var i={type:HS,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+`AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function xC(e,t,n){var r=Cg();if(r){var i=r.retrieveAxisBreakPairs(n,function(e){return e&&KS(e.label).labelInfo.tick.break},!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&W(i,function(r){VS().adjustBreakLabelPair(e.axis.inverse,t,[AS(n[r[0]]),AS(n[r[1]])])})}}function SC(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),ct(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 CC(e){var t={xAxisModel:null,yAxisModel:null};return W(t,function(n,r){var i=r.replace(/Model$/,``);t[r]=e.getReferringComponents(i,Qc).models[0]}),t}function wC(e,t,n,r,i,a){for(var o=SC(e,n),s=!1,c=!1,l=0;l<t.length;l++)sb(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 tC(n,r,o,i)}function TC(e,t,n){var r=SC(t,n);e.updateCfg(r)}var EC=Jc(),DC=3,OC=function(){function e(e,t,n,r,i){var a=db(e),o=a?t.getCategories().length:null,s;if(a){var c=t.getCategories(!0);s=c&&!c.length}var l=n.slice();(cb(e)||ub(e)||lb(e))&&(sl(l,AC(e,t.get(`dataMin`,!0))),cl(l,AC(e,t.get(`dataMax`,!0)))),fl(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]=AC(e,q(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]=AC(e,q(p)?p({min:l[0],max:l[1]}):p),d[1]=u[1]!=null);var m=jC(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,!ul(u[0])&&(u[0]=NaN),!ul(u[1])&&(u[1]=NaN);var g=s||st(u[0])||st(u[1])||a&&!o,_=cb(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=AC(e,t.get(`startValue`,!0)),x=b!=null;!vc(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),vc(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)),kC(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),kC(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 kC(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),pl(t))}function AC(e,t){return t==null?null:st(t)?NaN:e.parse(t)}function jC(e,t){var n;if(db(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=K(r)?r:[r,r]}return[MC(n[0]),MC(n[1])]}function MC(e){return fr(typeof e==`boolean`?0:e,1)||0}function NC(e){var t=EC(e.scale);return t.extent||=al(),t}function PC(e,t){NC(e).dimIdxInCoord=t.get(e.dim)}function FC(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||IC(n,e,i,r,t)}function IC(e,t,n,r,i){var a=NC(t),o=a.extent,s=!1;lS(t,function(r){if(r.boxCoordinateSystem){var i=kh(r).coord,c=a.dimIdxInCoord;if(c>=0&&K(i)){var l=i[c];l!=null&&!K(l)&&ol(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;W(ex(u,n),function(e){ll(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=VC(e,t,r);RC(e,new OC(e,r,o,s,c),i),a.extent=null}function LC(e,t){var n=e.scale;RC(n,new OC(n,e.model,t,!1,!1),DC)}function RC(e,t,n){e.rawExtentInfo=t,t.from=n}var zC=xt();function BC(e,t,n,r,i){e.rawExtentInfo||LC({scale:e,model:t},i||al());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 VC(e,t,n){var r=sx(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return dS(t,function(e){a=!!zC.get(e)||a}),a}function HC(e,t,n,r){if(n.ctnShp){var i;if(dS(e,function(t){var n=zC.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],sl(i,a[0]),cl(i,a[1]),Jb(e))}}),i){var a=t.getExtent();if(db(t))e.onBand||t.setExtent2(1,Is(a[0],a[0]+i[0]),Ls(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=Is(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=Ls(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])}}}}var UC={left:0,right:0,top:0,bottom:0},WC=[`25%`,`25%`],GC=`cartesian2d`,KC=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=M_(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&j_(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&j_(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:UC,outerBoundsContain:`all`,outerBoundsClampWidth:WC[0],outerBoundsClampHeight:WC[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30},t}(F_);ml();var qC=`__ec_stack_`;function JC(e){if(db(e.axis.scale)){for(var t=gS(e.axis),n=[],r=0;r<e.count;r++)n.push(Ue({stackId:qC+r},e));for(var i=YC({bandWidthResult:t,seriesInfo:n}),a=[],r=0;r<e.count;r++){var o=i[qC+r];o.offsetCenter=o.offset+o.width/2,a.push(o)}return a}}function YC(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};W(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=Is(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??=Ls(35-o.length*4,15)+`%`;var c=Js(i,t),l=Js(a,1),u=(n-c)/(r+(r-1)*l);u=Ls(u,0),W(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=Is(o,i)),a&&(o=Ls(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&i<o&&(o=Is(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=Ls(u,0);var d=0,f;W(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 W(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}var XC=`\0__throttleOriginMethod`,ZC=`\0__throttleRate`,QC=`\0__throttleType`;function $C(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 ew(e,t,n,r){var i=e[t];if(i){var a=i[XC]||i,o=i[QC];if(i[ZC]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=$C(a,n,r===`debounce`),i[XC]=a,i[QC]=r,i[ZC]=n}return i}}function tw(e,t){var n=e[t];n&&n[XC]&&(n.clear&&n.clear(),e[t]=n[XC])}function nw(e,t,n){var r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;K(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:G(r,function(e){return fr(e,i)})}}function rw(e,t){function n(t,n){var r=[];return t.eachComponent({mainType:`series`,subType:e,query:n},function(e){r.push(e.seriesIndex)}),r}W([[e+`ToggleSelect`,`toggleSelect`],[e+`Select`,`select`],[e+`UnSelect`,`unselect`]],function(e){t(e[0],function(t,r,i){t=H({},t),i.dispatchAction(H(t,{type:e[1],seriesIndex:n(r,t)}))})})}function iw(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=qc(c,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:K(l)?c.getName(l[0]):c.getName(l),selected:J(r)?r:H({},r)})}})}function aw(e,t,n){e.on(`selectchanged`,function(e){var r=n.getModel();e.isFromClick?(iw(`map`,`selectchanged`,t,r,e),iw(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?(iw(`map`,`selected`,t,r,e),iw(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&(iw(`map`,`unselected`,t,r,e),iw(`pie`,`unselected`,t,r,e))})}function ow(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 sw(e,t,n){t=K(t)&&{coordDimensions:t}||H({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=bh(r,t).dimensions,a=new yh(i,e);return a.initData(r,n),a}var cw=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}(),lw=Jc(),uw=function(e){V(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 cw(Qe(this.getData,this),Qe(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return sw(this,{coordDimensions:[`value`],encodeDefaulter:$e(Xp,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=lw(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=rc(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){kc(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}(Rv);Dh({fullType:uw.type,getCoord2:function(e){return e.getShallow(`center`)}}),Math.PI*2,ko.CMD;function dw(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 fw=new On,pw=new On,mw=new On,hw=new On,gw=new On,_w=[],vw=new On;function yw(e,t){if(t<=180&&t>0){t=t/180*Math.PI,fw.fromArray(e[0]),pw.fromArray(e[1]),mw.fromArray(e[2]),On.sub(hw,fw,pw),On.sub(gw,mw,pw);var n=hw.len(),r=gw.len();if(!(n<.001||r<.001)){hw.scale(1/n),gw.scale(1/r);var i=hw.dot(gw);if(Math.cos(t)<i){var a=dw(pw.x,pw.y,mw.x,mw.y,fw.x,fw.y,_w,!1);vw.fromArray(_w),vw.scaleAndAdd(gw,a/Math.tan(Math.PI-t));var o=mw.x===pw.x?(vw.y-pw.y)/(mw.y-pw.y):(vw.x-pw.x)/(mw.x-pw.x);if(isNaN(o))return;o<0?On.copy(vw,pw):o>1&&On.copy(vw,mw),vw.toArray(e[1])}}}}function bw(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,fw.fromArray(e[0]),pw.fromArray(e[1]),mw.fromArray(e[2]),On.sub(hw,pw,fw),On.sub(gw,mw,pw);var r=hw.len(),i=gw.len();if(!(r<.001||i<.001)&&(hw.scale(1/r),gw.scale(1/i),hw.dot(t)<Math.cos(n))){var a=dw(pw.x,pw.y,mw.x,mw.y,fw.x,fw.y,_w,!1);vw.fromArray(_w);var o=Math.PI/2,s=o+Math.acos(gw.dot(t))-n;if(s>=o)On.copy(vw,mw);else{vw.scaleAndAdd(gw,a/Math.tan(Math.PI/2-s));var c=mw.x===pw.x?(vw.y-pw.y)/(mw.y-pw.y):(vw.x-pw.x)/(mw.x-pw.x);if(isNaN(c))return;c<0?On.copy(vw,pw):c>1&&On.copy(vw,mw)}vw.toArray(e[1])}}}function xw(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 Sw(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=xn(r[0],r[1]),a=xn(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=wn([],r[1],r[0],o/i),c=wn([],r[1],r[2],o/a),l=wn([],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 Cw(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<Vl.length;c++){var l=Vl[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&&xw(r,!0,l,u);continue}r||(r=new Bd,e.setTextGuideLine(r),!d&&(s||!o)&&xw(r,!0,`normal`,t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),xw(r,!1,l,u)}}if(r){Ue(r.style,n),r.style.fill=null;var m=a.get(`showAbove`),h=e.textGuideLineConfig=e.textGuideLineConfig||{};h.showAbove=m||!1,r.buildPath=Sw}}function ww(e,t){t||=`labelLine`;for(var n={normal:e.getModel(t)},r=0;r<Bl.length;r++){var i=Bl[r];n[i]=e.getModel([i,t])}return n}var Tw=Math.PI/180;function Ew(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;Ow(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}LS(e,1,c,c+o)&&d(e)}function Dw(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;Mw(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(!Mw(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,Ow(m,g,!1)}}Ew(l,t,n,r,1,i,a,o,s,d),Ew(c,t,n,r,-1,i,a,o,s,u);for(var f=0;f<e.length;f++){var m=e[f];if(!Mw(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 Ow(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)}kw(a,r)}}}function kw(e,t){jw.rect=e,jS(jw,t,Aw)}var Aw={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},jw={};function Mw(e){return e.position===`center`}function Nw(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*Tw,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=Js(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=Js(T,l);var E=w.get(`length2`);if(E=Js(E,l),Math.abs(d.endAngle-d.startAngle)<o){W(h.states,p),h.ignore=!0,g&&(W(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 ee=(P?(d.r+d.r0)/2*O:d.r*O)+r,F=(P?(d.r+d.r0)/2*k:d.r*k)+i;if(A=ee+O*3,j=F+k*3,!P){var te=ee+O*(T+c-d.r),I=F+k*(T+c-d.r),L=te+(O<0?-1:1)*E,ne=I;A=x===`edge`?O<0?u+S:u+l-S:L+(O<0?-b:b),j=ne,M=[[ee,F],[te,I],[L,ne]]}N=P?`center`:x===`edge`?O>0?`right`:`left`:O>0?`left`:`right`}var re=Math.PI,R=0,ie=v.get(`rotate`);if(tt(ie))R=re/180*ie;else if(y===`center`)R=0;else if(ie===`radial`||ie===!0)R=O<0?-D+re:-D;else if(ie===`tangential`||ie===`tangential-noflip`&&y!==`outside`&&y!==`outer`){var ae=Math.atan2(O,k);ae<0&&(ae=re*2+ae),k>0&&ie!==`tangential-noflip`&&(ae=re+ae),R=ae-re}if(a=!!R,h.x=A,h.y=j,h.rotation=R,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 Hn(0,0,0,0);kw(z,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new On(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`)&&Dw(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&&(W(_.states,p),_.ignore=!0);var b=_.states.select;b&&(b.x+=_.x,b.y+=_.y)}if(v){var x=g.linePoints;y||!x?(W(v.states,p),v.ignore=!0):(yw(x,g.minTurnAngle),bw(x,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:x}),_.__hostTarget.textGuideLineConfig={anchor:new On(x[0][0],x[0][1])})}}}var Pw=Math.PI*2,Fw=Math.PI/180,Iw=xl(`pie`,Lw);function Lw(e,t){e.eachSeriesByType(`pie`,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=E_(e,t),a=i.cx,o=i.cy,s=i.r,c=i.r0,l=i.viewRect,u=-e.get(`startAngle`)*Fw,d=e.get(`endAngle`),f=e.get(`padAngle`)*Fw;d=d===`auto`?u-Pw:-d*Fw;var p=e.get(`minAngle`)*Fw+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;Oo(S,!_),u=S[0],d=S[1];var w=Rw(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?qs(e,b,[c,s]):s}),O=i}),E<Pw&&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 Rw=Jc(),zw=function(e){V(t,e);function t(t,n,r){var i=e.call(this)||this;i.z2=2;var a=new ys;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=H(nw(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?(gf(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,gf(i,{shape:{r:c.r}},a,t)):n==null?(i.shape.endAngle=c.startAngle,hf(i,{shape:{endAngle:c.endAngle}},a,t)):(i.setShape({startAngle:n,endAngle:n}),gf(i,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},a,t))}else xf(i),hf(i,{shape:l},a,t);i.useStyle(e.getItemVisual(t,`style`)),Iu(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=H({r:c.r+(s.get(`scale`)&&s.get(`scaleSize`)||0)},nw(s.getModel(`itemStyle`),c)),H(i.ensureState(`select`),{x:p,y:m,shape:nw(o.getModel([`select`,`itemStyle`]),c)}),H(i.ensureState(`blur`),{shape:nw(o.getModel([`blur`,`itemStyle`]),c)});var g=i.getTextGuideLine(),_=i.getTextContent();g&&H(g.ensureState(`select`),{x:p,y:m}),H(_.ensureState(`select`),{x:p,y:m}),Mu(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;yp(r,bp(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 Bd,this.setTextGuideLine(d)),Cw(this,ww(i),{stroke:s,opacity:lt(a.get([`lineStyle`,`opacity`]),c,1)})}},t}(Md),Bw=function(e){V(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 Md({shape:Be(Rw(e))});u.useStyle(e.getModel(`emptyCircleStyle`).getItemStyle()),this._emptyCircleSector=u,o.add(u)}i.diff(a).add(function(e){var t=new zw(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){bf(a.getItemGraphicEl(t),e,t)}).execute(),Nw(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}(jy);function Vw(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 Hw(e){e.registerChartView(Bw),e.registerSeriesModel(uw),rw(`pie`,e.registerAction),e.registerLayout(Iw),e.registerProcessor(ow(`pie`)),e.registerProcessor(Vw(`pie`))}var Uw=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),Ww=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 Uw(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 Uw(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 Uw(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new Uw(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Uw(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new Uw(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),Gw=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Kw=[],qw=Ot.browser.firefox&&+Ot.browser.version.split(`.`)[0]<39;function Jw(e,t,n,r){return n||={},r?Yw(e,t,n):qw&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?Yw(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function Yw(e,t,n){if(Ot.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(og(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(rg(Kw,e,r,i)){n.zrX=Kw[0],n.zrY=Kw[1];return}}n.zrX=n.zrY=0}function Xw(e){return e||window.event}function Zw(e,t,n){if(t=Xw(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&&Jw(e,i,t,n)}else{Jw(e,t,t,n);var a=Qw(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Gw.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function Qw(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 $w(e,t,n,r){e.addEventListener(t,n,r)}function eT(e,t,n,r){e.removeEventListener(t,n,r)}var tT=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},nT=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=Jw(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 aT)if(aT.hasOwnProperty(t)){var n=aT[t](this._track,e);if(n)return n}},e}();function rT(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function iT(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var aT={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=rT(r)/rT(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=iT(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},oT=`silent`;function sT(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:cT}}function cT(){tT(this.event)}var lT=function(e){V(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}(_a),uT=function(){function e(e,t){this.x=e,this.y=t}return e}(),dT=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],fT=new Hn(0,0,0,0),pT=function(e){V(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new uT(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new lT,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Ww(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(W(dT,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=gT(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 uT(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 uT(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=sT(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 uT(e,t);if(hT(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new Hn(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)&&(fT.copy(u.getBoundingRect()),u.transform&&fT.applyTransform(u.transform),fT.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(hT(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 nT;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 uT;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(_a);W([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){pT.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=gT(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||xn(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function mT(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||oT}return!1}function hT(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=mT(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==oT)){t.target=o;break}}}function gT(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var _T=32,vT=7;function yT(e){for(var t=0;e>=_T;)t|=e&1,e>>=1;return e+t}function bT(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++;xT(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function xT(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function ST(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 CT(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 wT(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 TT(e,t){var n=vT,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=wT(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=CT(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=wT(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=CT(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>=vT||m>=vT);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-wT(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-CT(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>=vT||g>=vT);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 ET(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<_T){a=bT(e,n,r,t),ST(e,n,r,n+a,t);return}var o=TT(e,t),s=yT(i);do{if(a=bT(e,n,r,t),a<s){var c=i;c>s&&(c=s),ST(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 DT=!1;function OT(){DT||(DT=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function kT(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var AT=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=kT}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,ET(n,kT)},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)&&(OT(),p.z=0),isNaN(p.z2)&&(OT(),p.z2=0),isNaN(p.zlevel)&&(OT(),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=U(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}(),jT=Ot.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function MT(){return new Date().getTime()}var NT=function(e){V(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=MT()-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&&(jT(t),!e._paused&&e.update())}jT(t)},t.prototype.start=function(){this._running||(this._time=MT(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=MT(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=MT()-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 ga(e,t.loop);return this.addAnimator(n),n},t}(_a),PT=300,FT=Ot.domSupported,IT=(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:G(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),LT={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},RT=!1;function zT(e){var t=e.pointerType;return t===`pen`||t===`touch`}function BT(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 VT(e){e&&(e.zrByTouch=!0)}function HT(e,t){return Zw(e.dom,new WT(e,t),!0)}function UT(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 WT=function(){function e(e,t){this.stopPropagation=Tt,this.stopImmediatePropagation=Tt,this.preventDefault=Tt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),GT={mousedown:function(e){e=Zw(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=Zw(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=Zw(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=Zw(this.dom,e);var t=e.toElement||e.relatedTarget;UT(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){RT=!0,e=Zw(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){RT||(e=Zw(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=Zw(this.dom,e),VT(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),GT.mousemove.call(this,e),GT.mousedown.call(this,e)},touchmove:function(e){e=Zw(this.dom,e),VT(e),this.handler.processGesture(e,`change`),GT.mousemove.call(this,e)},touchend:function(e){e=Zw(this.dom,e),VT(e),this.handler.processGesture(e,`end`),GT.mouseup.call(this,e),+new Date-this.__lastTouchMoment<PT&>.click.call(this,e)},pointerdown:function(e){GT.mousedown.call(this,e)},pointermove:function(e){zT(e)||GT.mousemove.call(this,e)},pointerup:function(e){GT.mouseup.call(this,e)},pointerout:function(e){zT(e)||GT.mouseout.call(this,e)}};W([`click`,`dblclick`,`contextmenu`],function(e){GT[e]=function(t){t=Zw(this.dom,t),this.trigger(e,t)}});var KT={pointermove:function(e){zT(e)||KT.mousemove.call(this,e)},pointerup:function(e){KT.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 qT(e,t){var n=t.domHandlers;Ot.pointerEventsSupported?W(IT.pointer,function(r){YT(t,r,function(t){n[r].call(e,t)})}):(Ot.touchEventsSupported&&W(IT.touch,function(r){YT(t,r,function(i){n[r].call(e,i),BT(t)})}),W(IT.mouse,function(r){YT(t,r,function(i){i=Xw(i),t.touching||n[r].call(e,i)})}))}function JT(e,t){Ot.pointerEventsSupported?W(LT.pointer,n):Ot.touchEventsSupported||W(LT.mouse,n);function n(n){function r(r){r=Xw(r),UT(e,r.target)||(r=HT(e,r),t.domHandlers[n].call(e,r))}YT(t,n,r,{capture:!0})}}function YT(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,$w(e.domTarget,t,n,r)}function XT(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&eT(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var ZT=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),QT=function(e){V(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 ZT(t,GT),FT&&(r._globalHandlerScope=new ZT(document,KT)),qT(r,r._localHandlerScope),r}return t.prototype.dispose=function(){XT(this._localHandlerScope),FT&&XT(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,FT&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?JT(this,t):XT(t)}},t}(_a),$T={},eE={};function tE(e){delete eE[e]}function nE(e){if(!e)return!1;if(typeof e==`string`)return Ui(e,1)<ba;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Ui(t[i].color,1);return n/=r,n<ba}return!1}var rE=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 AT,a=n.renderer||`canvas`;$T[a]||(a=Xe($T)[0]),n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new $T[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!Ot.node&&!Ot.worker&&!s?new QT(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?Ot.touchEventsSupported:!!l,d=44,f;u&&(f=X(n.pointerSize,d)),this.handler=new pT(i,o,c,o.root,f),this.animation=new NT({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=nE(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=MT(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=MT();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 dd&&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,tE(this.id))},e}();function iE(e,t){var n=new rE(Re(),e,t);return eE[n.id]=n,n}function aE(e,t){$T[e]=t}var oE=``;typeof navigator<`u`&&(oE=navigator.platform||``);var sE=`rgba(0, 0, 0, 0.2)`,cE=Q.color.theme[0],lE=Vi(cE,null,null,.9),uE={darkMode:`auto`,colorBy:`series`,color:Q.color.theme,gradientColor:[lE,cE],aria:{decal:{decals:[{color:sE,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:sE,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:sE,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:sE,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:sE,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:sE,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:oE.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},dE=xt();function fE(e,t,n){var r=dE.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}var pE,mE,hE,gE=`\0_ec_inner`,_E=1,vE=function(e){V(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 Hp(r),this._locale=new Hp(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=CE(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,CE(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`?hE(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&&W(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=xt(),s=t&&t.replaceMergeMainTypeMap;Jp(this),W(e,function(e,t){e!=null&&(F_.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?Be(e):Ve(n[t],e,!0))}),s&&s.each(function(e,t){F_.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),F_.topologicalTravel(a,F_.getAllClassMainTypes(),c,this);function c(t){var a=fE(this,t,Oc(e[t])),o=r.get(t),c=Nc(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);Gc(c,t,F_),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;W(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=F_.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=H({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),H(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`&&pE(this)}this._seriesIndices||pE(this)},t.prototype.getOption=function(){var e=Be(this.option);return W(e,function(t,n){if(F_.hasClass(n)){for(var r=Oc(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!Wc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[gE],e},t.prototype.setTheme=function(e){this._theme=new Hp(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?Je(a,function(e){return!!e}):xE(`name`,i,a):xE(`id`,r,a):(o=[],W(Oc(n),function(e){a[e]&&o.push(a[e])})),SE(o,e)},t.prototype.findComponents=function(e){var t=e.query,n=e.mainType,r=i(t);return a(SE(r?this.queryComponents(r):Je(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?Je(t,e.filter):t}},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(q(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=Hc(e,null);return Je(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 Je(this._componentsMap.get(`series`),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return Je(this._componentsMap.get(`series`),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get(`series`)},t.prototype.eachSeries=function(e,t){mE(this),W(this._seriesIndices,function(n){var r=this._componentsMap.get(`series`)[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){W(this._componentsMap.get(`series`),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){mE(this),W(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 W(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return mE(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){mE(this);var n=[];W(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=xt(n)},t.prototype.restoreData=function(e){pE(this);var t=this._componentsMap,n=[];t.each(function(e,t){F_.hasClass(t)&&n.push(t)}),F_.topologicalTravel(n,F_.getAllClassMainTypes(),function(n){W(t.get(n),function(t){t&&(n!==`series`||!yE(t,e))&&t.restoreData()})})},t.internalField=function(){pE=function(e){var t=e._seriesIndices=[];W(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=xt(t)},mE=function(e){},hE=function(e,t){e.option={},e.option[gE]=_E,e._componentsMap=xt({series:[]}),e._componentsCount=xt();var n=t.aria;Y(n)&&n.enabled==null&&(n.enabled=!0),bE(t,e._theme.option),Ve(t,uE,!1),e._mergeOption(t,null)}}(),t}(Hp);function yE(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 bE(e,t){var n=e.color&&!e.colorLayer;W(t,function(t,r){r===`colorLayer`&&n||r===`color`&&e.color||F_.hasClass(r)||(typeof t==`object`?e[r]=e[r]?Ve(e[r],t,!1):Be(t):e[r]??(e[r]=t))})}function xE(e,t,n){if(K(t)){var r=xt();return W(t,function(e){e!=null&&Hc(e,null)!=null&&r.set(e,!0)}),Je(n,function(t){return t&&r.get(t[e])})}var i=Hc(t,null);return Je(n,function(t){return t&&i!=null&&t[e]===i})}function SE(e,t){return t.hasOwnProperty(`subType`)?Je(e,function(e){return e&&e.subType===t.subType}):e}function CE(e){var t=xt();return e&&W(Oc(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}Ge(vE,z_);var wE=/^(min|max)?(.+)$/,TE=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(W(Oc(e.series),function(e){e&&e.data&&rt(e.data)&&ht(e.data)}),W(Oc(e.dataset),function(e){e&&e.source&&rt(e.source)&&ht(e.source)})),e=Be(e);var r=this._optionBackup,i=EE(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=[],Be(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=Be(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++)DE(r[s].query,t,n)&&a.push(s);return!a.length&&i&&(a=[-1]),a.length&&!kE(a,this._currentMediaIndices)&&(o=G(a,function(e){return Be(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o},e}();function EE(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&&K(l)&&W(l,function(e){e&&e.option&&(e.query?r.push(e):i||=e)}),f(a),W(c,function(e){return f(e)}),W(r,function(e){return f(e.option)});function f(e){W(t,function(t){t(e,n)})}return{baseOption:a,timelineOptions:c||[],mediaDefault:i,mediaList:r}}function DE(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return W(e,function(e,t){var n=t.match(wE);if(!(!n||!n[1]||!n[2])){var a=n[1];OE(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}function OE(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function kE(e,t){return e.join(`,`)===t.join(`,`)}var AE=W,jE=Y,ME=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function NE(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=ME.length;n<r;n++){var i=ME[n],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?Ve(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?Ve(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function PE(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,Ue(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 FE(e){PE(e,`itemStyle`),PE(e,`lineStyle`),PE(e,`areaStyle`),PE(e,`label`),PE(e,`labelLine`),PE(e,`upperLabel`),PE(e,`edgeLabel`)}function IE(e,t){var n=jE(e)&&e[t],r=jE(n)&&n.textStyle;if(r)for(var i=0,a=Ac.length;i<a;i++){var o=Ac[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}function LE(e){e&&(FE(e),IE(e,`label`),e.emphasis&&IE(e.emphasis,`label`))}function RE(e){if(jE(e)){NE(e),FE(e),IE(e,`label`),IE(e,`upperLabel`),IE(e,`edgeLabel`),e.emphasis&&(IE(e.emphasis,`label`),IE(e.emphasis,`upperLabel`),IE(e.emphasis,`edgeLabel`));var t=e.markPoint;t&&(NE(t),LE(t));var n=e.markLine;n&&(NE(n),LE(n));var r=e.markArea;r&&LE(r);var i=e.data;if(e.type===`graph`){i||=e.nodes;var a=e.links||e.edges;if(a&&!rt(a))for(var o=0;o<a.length;o++)LE(a[o]);W(e.categories,function(e){FE(e)})}if(i&&!rt(i))for(var o=0;o<i.length;o++)LE(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)LE(s[o]);if(n=e.markLine,n&&n.data)for(var c=n.data,o=0;o<c.length;o++)K(c[o])?(LE(c[o][0]),LE(c[o][1])):LE(c[o]);e.type===`gauge`?(IE(e,`axisLabel`),IE(e,`title`),IE(e,`detail`)):e.type===`treemap`?(PE(e.breadcrumb,`itemStyle`),W(e.levels,function(e){FE(e)})):e.type===`tree`&&FE(e.leaves)}}function zE(e){return K(e)?e:e?[e]:[]}function BE(e){return(K(e)?e[0]:e)||{}}function VE(e,t){AE(zE(e.series),function(e){jE(e)&&RE(e)});var n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),AE(n,function(t){AE(zE(e[t]),function(e){e&&(IE(e,`axisLabel`),IE(e.axisPointer,`label`))})}),AE(zE(e.parallel),function(e){var t=e&&e.parallelAxisDefault;IE(t,`axisLabel`),IE(t&&t.axisPointer,`label`)}),AE(zE(e.calendar),function(e){PE(e,`itemStyle`),IE(e,`dayLabel`),IE(e,`monthLabel`),IE(e,`yearLabel`)}),AE(zE(e.radar),function(e){IE(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)}),AE(zE(e.geo),function(e){jE(e)&&(LE(e),AE(zE(e.regions),function(e){LE(e)}))}),AE(zE(e.timeline),function(e){LE(e),PE(e,`label`),PE(e,`itemStyle`),PE(e,`controlStyle`,!0);var t=e.data;K(t)&&W(t,function(e){Y(e)&&(PE(e,`label`),PE(e,`itemStyle`))})}),AE(zE(e.toolbox),function(e){PE(e,`iconStyle`),AE(e.feature,function(e){PE(e,`iconStyle`)})}),IE(BE(e.axisPointer),`label`),IE(BE(e.tooltip).axisPointer,`label`)}function HE(e,t){for(var n=t.split(`,`),r=e,i=0;i<n.length&&(r&&=r[n[i]],r!=null);i++);return r}function UE(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 WE(e){e&&W(GE,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var GE=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],KE=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],qE=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]];function JE(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<qE.length;n++){var r=qE[n][1],i=qE[n][0];t[r]!=null&&(t[i]=t[r])}}function YE(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function XE(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function ZE(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus??(e.emphasis.focus=`adjacency`))}function QE(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&QE(e[n].children,t)}function $E(e,t){VE(e,t),e.series=Oc(e.series),W(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),YE(e.label);var n=e.data;if(n&&!rt(n))for(var r=0;r<n.length;r++)YE(n[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){var i=HE(e,`pointer.color`);i!=null&&UE(e,`itemStyle.color`,i)}else if(t===`bar`){JE(e),JE(e.backgroundStyle),JE(e.emphasis);var n=e.data;if(n&&!rt(n))for(var r=0;r<n.length;r++)typeof n[r]==`object`&&(JE(n[r]),JE(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)),XE(e),QE(e.data,XE)}else t===`graph`||t===`sankey`?ZE(e):t===`map`&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&Ue(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),WE(e)}}),e.dataRange&&(e.visualMap=e.dataRange),W(KE,function(t){var n=e[t];n&&(K(n)||(n=[n]),W(n,function(e){WE(e)}))})}var eD=Sl(tD);function tD(e){var t=xt();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(),W(e,function(t,n){t.data.setCalculationInfo(`stackedOnSeries`,n>0?e[n-1].seriesModel:null)}),nD(e))})}function nD(e){W(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=ic(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var rD=function(){function e(){this.group=new dd,this.uid=Kh(`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}();It(rD),Ut(rD);var iD=Jc(),aD={itemStyle:Wt(zp,!0),lineStyle:Wt(Ip,!0)},oD={lineStyle:`stroke`,itemStyle:`fill`};function sD(e,t){return e.visualStyleMapper||aD[t]||(console.warn(`Unknown style type '`+t+`'.`),aD.itemStyle)}function cD(e,t){return e.visualDrawType||oD[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var lD={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=sD(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=cD(e,r),c=a[s],l=q(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`||q(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||q(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=H({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},uD=new Hp,dD={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=sD(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){uD.option=n[r];var o=i(uD);H(e.ensureUniqueItemVisual(t,`style`),o),uD.option.decal&&(e.setItemVisual(t,`decal`,uD.option.decal),uD.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},fD={performRawSeries:!0,overallReset:function(e){var t=xt();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();iD(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=iD(e).scope,a=cD(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)}})}})}},pD=Math.PI;function mD(e,t){t||={},Ue(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 dd,r=new ms({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new ys({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 ms({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 Yd({shape:{startAngle:-pD/2,endAngle:-pD/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:pD*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:pD*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 hD=function(){function e(e,t,n,r){this._stageTaskMap=xt(),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):bl(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=xt();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;W(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});ft(!(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;W(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=xt(),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)||q_({plan:bD,reset:xD,count:wD}));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||q_({reset:gD});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=xt(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;ft(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):W(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,q_({reset:_D,onDirty:yD})));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 q(e)&&(e={overallReset:e,seriesType:TD(e)}),e.uid=Kh(`stageHandler`),t&&(e.visualType=t),e},e}();function gD(e){e.overallReset(e.ecModel,e.api,e.payload)}function _D(e){return e.dirtyOnOverallProgress&&vD}function vD(){this.agent.dirty(),this.getDownstream().dirty()}function yD(){this.agent&&this.agent.dirty()}function bD(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function xD(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Oc(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?G(t,function(e,t){return CD(t)}):SD}var SD=CD(0);function CD(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 wD(e){return e.data.count()}function TD(e){OD=null;try{e(ED,DD)}catch{}return OD}var ED={},DD={},OD;kD(ED,vE),kD(DD,Pl),ED.eachSeriesByType=ED.eachRawSeriesByType=function(e){OD=e},ED.eachComponent=function(e){e.mainType===`series`&&e.subType&&(OD=e.subType)};function kD(e,t){for(var n in t.prototype)e[n]=Tt}var $=Q.darkColor,AD=$.background,jD=function(){return{axisLine:{lineStyle:{color:$.axisLine}},splitLine:{lineStyle:{color:$.axisSplitLine}},splitArea:{areaStyle:{color:[$.backgroundTint,$.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:$.axisMinorSplitLine}},axisLabel:{color:$.axisLabel},axisName:{}}},MD={label:{color:$.secondary},itemStyle:{borderColor:$.borderTint},dividerLineStyle:{color:$.border}},ND={darkMode:!0,color:$.theme,backgroundColor:AD,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:AD,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:MD,y:MD,backgroundColor:{borderColor:$.axisLine},body:{itemStyle:{borderColor:$.borderTint}}},timeAxis:jD(),logAxis:jD(),valueAxis:jD(),categoryAxis:jD(),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=jD();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}}}};ND.categoryAxis.splitLine.show=!1;var PD=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(J(e)){var i=Nt(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var a=[`Index`,`Name`,`Id`],o={name:1,dataIndex:1,dataType:1};W(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}(),FD=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],ID=FD.concat([`symbolKeepAspect`]),LD={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<FD.length;o++){var s=FD[o],c=e.get(s);q(c)?(a=!0,i[s]=c):r[s]=c}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(H({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get(`symbolKeepAspect`)},r)),t.isSeriesFiltered(e))return;var l=Xe(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}}},RD={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<ID.length;r++){var i=ID[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?r:null}}};function zD(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 BD(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 VD(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var HD=new _a,UD={};function WD(e,t){UD[e]=t}function GD(e){return UD[e]}var KD={};function qD(e,t){KD[e]=t}function JD(e){return KD[e]}var YD=Math.round(Math.random()*9),XD=typeof Object.defineProperty==`function`,ZD=function(){function e(){this._id=`__ec_inner_`+YD++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return XD?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 QD(e){return isFinite(e)}function $D(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=QD(r)?r:0,i=QD(i)?i:1,a=QD(a)?a:0,o=QD(o)?o:0,e.createLinearGradient(r,a,i,o)}function eO(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=QD(o)?o:.5,s=QD(s)?s:.5,c=c>=0&&QD(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function tO(e,t,n){for(var r=t.type===`radial`?eO(e,t,n):$D(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function nO(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 rO(e){return parseInt(e,10)}function iO(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]||rO(s[r])||rO(e.style[r]))-(rO(s[a])||0)-(rO(s[o])||0)||0}function aO(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:tt(e)?[e]:K(e)?e:null}function oO(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&aO(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=G(n,function(e){return e/i}),r/=i)}return[n,r]}var sO=new ko(!0);function cO(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function lO(e){return typeof e==`string`&&e!==`none`}function uO(e){var t=e.fill;return t!=null&&t!==`none`}function dO(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 fO(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 pO(e,t,n){var r=Qt(t.image,t.__image,n);if(en(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)*Et),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function mO(e,t,n,r,i){var a,o=cO(n),s=uO(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||sO,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?tO(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?tO(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?pO(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?pO(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=oO(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&&fO(e,n),s&&dO(e,n)):(s&&dO(e,n),o&&fO(e,n)),T&&e.setLineDash([])}function hO(e,t,n){var r=t.__image=Qt(n.image,t.__image,t,t.onload);if(!(!r||!en(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 gO(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=oO(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(cO(n)&&e.strokeText(i,n.x,n.y),uO(n)&&e.fillText(i,n.x,n.y)):(uO(n)&&e.fillText(i,n.x,n.y),cO(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var _O=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],vO=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function yO(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){AO(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Ha.opacity:o}(r||t.blend!==n.blend)&&(a||=(AO(e,i),!0),e.globalCompositeOperation=t.blend||Ha.blend);for(var s=0;s<_O.length;s++){var c=_O[s];(r||t[c]!==n[c])&&(a||=(AO(e,i),!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||=(AO(e,i),!0),e.shadowColor=t.shadowColor||Ha.shadowColor),a}function bO(e,t,n,r,i){var a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;var s=yO(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||=(AO(e,i),!0),lO(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||=(AO(e,i),!0),lO(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||=(AO(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||=(AO(e,i),!0),e.lineWidth=c)}for(var l=0;l<vO.length;l++){var u=vO[l],d=u[0];(r||a[d]!==o[d])&&(s||=(AO(e,i),!0),e[d]=a[d]||u[1])}return s}function xO(e,t,n,r,i){return yO(e,t.style,n&&n.style,r,i)}function SO(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 CO(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r||=a.isZeroArea(),SO(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function wO(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 TO=1,EO=2,DO=3,OO=4;function kO(e){var t=uO(e),n=cO(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 AO(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function jO(e,t){var n={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};MO(e,t,n),NO(e,n)}function MO(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||nO(i,a))&&(a&&(AO(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(AO(e,n),e.save(),CO(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&&kO(o);s||wO(r,l.transform)?(AO(e,n),SO(e,t)):u||AO(e,n),t instanceof es?(n.lastDrawType!==TO&&(c=!0,n.lastDrawType=TO),bO(e,t,l,c,n),(!u||!n.batchFill&&!n.batchStroke)&&e.beginPath(),mO(e,t,o,u,n)):t instanceof ns?(n.lastDrawType!==DO&&(c=!0,n.lastDrawType=DO),bO(e,t,l,c,n),gO(e,t,o)):t instanceof os?(n.lastDrawType!==EO&&(c=!0,n.lastDrawType=EO),xO(e,t,l,c,n),hO(e,t,o)):t.getTemporalDisplayables&&(n.lastDrawType!==OO&&(c=!0,n.lastDrawType=OO),PO(e,t,n)),t.innerAfterBrush(),t.afterBrush&&(u&&AO(e,n),t.afterBrush()),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}function NO(e,t){AO(e,t),t.prevElClipPaths&&e.restore()}function PO(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(),MO(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}NO(e,a);for(var l=0,u=i.length;l<u;l++){var c=i[l];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),MO(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}NO(e,a),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var FO=new ZD,IO=new Yt(100),LO=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`];function RO(e,t){if(e===`none`)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&FO.delete(e);var a=FO.get(e);if(a)return a;var o=Ue(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,FO.set(e,s),e.dirty=!1,s;function c(e){for(var t=[n],a=!0,s=0;s<LO.length;++s){var c=o[LO[s]];if(c!=null&&!K(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=IO.get(l);u&&(i?e.svgElement=u:e.image=u)}var d=BO(o.dashArrayX),f=VO(o.dashArrayY),p=zO(o.symbol),m=HO(d),h=UO(f),g=!i&&we.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&&IO.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=_c(e,m[t]);for(var r=1,t=0,n=p.length;t<n;++t)r=_c(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=$v(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 jO(y,u)}}}}function zO(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 zO([e]);for(var r=[],n=0;n<e.length;++n)J(e[n])?r.push([e[n]]):r.push(e[n]);return r}function BO(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 BO([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=G(e[r],function(e){return Math.ceil(e)});t.length%2==1?i.push(t.concat(t)):i.push(t)}return i}function VO(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=G(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}function HO(e){return G(e,function(e){return UO(e)})}function UO(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}var WO=Sl(GO);function GO(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=RO(n,t)}});var i=r.getVisual(`decal`);if(i){var a=r.getVisual(`style`);a.decal=RO(i,t)}}})}var KO=1,qO=800,JO=900,YO=920,XO=1e3,ZO=2e3,QO=5e3,$O=1e3,ek=1100,tk=2e3,nk=3e3,rk=4e3,ik=4500,ak=4600,ok=5e3,sk=6e3,ck=7e3,lk={PROCESSOR:{SERIES_FILTER:qO,AXIS_STATISTICS:YO,FILTER:XO,STATISTIC:QO,STATISTICS:QO},VISUAL:{LAYOUT:$O,PROGRESSIVE_LAYOUT:ek,GLOBAL:tk,CHART:nk,POST_CHART_LAYOUT:ak,COMPONENT:rk,BRUSH:ok,CHART_ITEM:ik,ARIA:sk,DECAL:ck}},uk=`__flagInMainProcess`,dk=`__mainProcessVersion`,fk=`__pendingUpdate`,pk=`__needsUpdateStatus`,mk=/^[a-zA-Z0-9_]+$/,hk=`__connectUpdateStatus`,gk=0,_k=1,vk=2;function yk(e){return function(){var t=[...arguments];if(this.isDisposed()){this.id;return}return xk(this,e,t)}}function bk(e){return function(){var t=[...arguments];return xk(this,e,t)}}function xk(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),_a.prototype[t].apply(e,n)}var Sk=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(_a),Ck=Sk.prototype;Ck.on=bk(`on`),Ck.off=bk(`off`);var wk,Tk,Ek,Dk,Ok,kk,Ak,jk,Mk,Nk,Pk,Fk,Ik,Lk,Rk,zk,Bk,Vk,Hk,Uk=function(e){V(t,e);function t(t,n,r){var i=e.call(this,new PD)||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[dk]=1,r.ssr;var c=i._zr=iE(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=$C(Qe(c.flush,c),17),i._updateTheme(n),i._locale=yg(r.locale||_g),i._coordSysMgr=new Th;var l=i._api=Rk(i);function u(e,t){return e.__prio-t.__prio}return ET(Zk,u),ET(Yk,u),i._scheduler=new hD(i,l,Yk,Zk),i._messageCenter=new Sk,i._initEvents(),i.resize=Qe(i.resize,i),c.animation.on(`frame`,i._onframe,i),Nk(c,i),Pk(c,i),ht(i),i}return t.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,t=this._model,n=this._api;if(Vk(this),this[fk]){var r=this[fk].silent;this[uk]=!0,Hk(this);try{wk(this),Dk.update.call(this,null,this[fk].updateParams)}catch(e){throw this[uk]=!1,this[fk]=null,e}this._zr.flush(),this[uk]=!1,this[fk]=null,jk.call(this,r),Mk.call(this,r)}else if(e.unfinished){var i=KO;do{e.unfinished=!1;var a=we.getTime();e.performSeriesTasks(t),e.performDataProcessorTasks(t),kk(this,t),e.performVisualTasks(t),Lk(this,this._model,n,`remain`,{}),i-=we.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[uk]){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[uk]=!0,Hk(this),!this._model||t){var o=new TE(this._api),s=this._theme,c=this._model=new vE;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},Xk);var l={seriesTransition:a,optionChanged:!0};if(n)this[fk]={silent:r,updateParams:l},this[uk]=!1,this.getZr().wakeUp();else{try{wk(this),Dk.update.call(this,null,l)}catch(e){throw this[fk]=null,this[uk]=!1,e}this._ssr||this._zr.flush(),this[fk]=null,this[uk]=!1,jk.call(this,r),Mk.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[uk]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[fk]&&(r??=this[fk].silent,i=this[fk].updateParams,this[fk]=null),this[uk]=!0,Hk(this);try{this._updateTheme(e),n.setTheme(this._theme),wk(this),Dk.update.call(this,{type:`setTheme`},i)}catch(e){throw this[uk]=!1,e}this[uk]=!1,jk.call(this,r),Mk.call(this,r)}}},t.prototype._updateTheme=function(e){J(e)&&(e=Qk[e]),e&&(e=Be(e),e&&$E(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||Ot.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 W(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;W(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 W(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(tA[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();W(eA,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(Be(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=we.createCanvas(),h=iE(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return W(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 ms({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),W(u,function(e){var t=new os({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 Ok(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return Ok(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return Ok(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return W(Xc(n,e),function(e,n){n.indexOf(`Models`)>=0&&W(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=Xc(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?BD(i,t):zD(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;W(Gk,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&VD(i,function(e){var t=Cl(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=H({},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;W(Jk,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),aw(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()&&tl(this.getDom(),rA,``);var e=this,t=e._api,n=e._model;W(e._componentsViews,function(e){e.dispose(n,t)}),W(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 eA[e.id]},t.prototype.resize=function(e){if(!this[uk]){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[fk]&&(r??=this[fk].silent,n=!0,this[fk]=null),this[uk]=!0,Hk(this);try{n&&wk(this),Dk.update.call(this,{type:`resize`,animation:H({duration:0},e&&e.animation)})}catch(e){throw this[uk]=!1,e}this[uk]=!1,jk.call(this,r),Mk.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(),$k[e]){var n=$k[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=H({},e);return t.type=qk[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(Y(t)||(t={silent:!!t}),Kk[e.type]&&this._model){if(this[uk]){this._pendingActions.push(e);return}var n=t.silent;Ak.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&Ot.browser.weChat&&this._throttledZrFlush(),jk.call(this,n),Mk.call(this,n)}},t.prototype.updateLabelLayout=function(){HD.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(){wk=function(e){eS(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),Tk(e,!0),Tk(e,!1),t.plan()},Tk=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=Nt(e.type);u=new(t?rD.getClass(d.main,d.sub):jy.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)}},Ek=function(e,t,n,r,i){var a=e._model;if(a.setUpdatePayload(n),!r){W([].concat(e._componentsViews,e._chartsViews),l);return}var o=el(n,r,i),s=n.excludeSeriesId,c;s!=null&&(c=xt(),W(Oc(s),function(e){var t=Hc(e,null);t!=null&&c.set(t,!0)})),a&&a.eachComponent(o,function(t){if(!(c&&c.get(t.id)!=null)){if(Vu(n)){if(t instanceof Rv)n.type===`highlight`&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&Cu(t,n,e._api);else{var r=wu(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===`highlight`&&i&&!n.notBlur&&Su(t.mainType,t.componentIndex,e._api),a&&W(a,function(e){n.type===`highlight`?pu(e):mu(e)})}}else Bu(n)&&t instanceof Rv&&(Du(t,n,e._api),Ou(t),Bk(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)}},Dk={prepareAndUpdate:function(e){wk(this),Dk.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){tS(r),r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),o.create(r,i),HD.trigger(`coordsys:aftercreate`,r,i),s.performDataProcessorTasks(r,e),kk(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),Fk(this,r,i,e,n),HD.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=xt();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}),Lk(t,n,r,e,{},a),HD.trigger(`afterupdate`,n,r)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),jy.markUpdateMethod(e,`updateView`),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),Fk(this,n,this._api,e,{}),HD.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()}),jy.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)}),HD.trigger(`afterupdate`,r,this._api))},updateLayout:function(e){Dk.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=Xc(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}}Ok=e,kk=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},Ak=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=Kk[i],s=(o.update||`update`).split(`:`),c=s.pop(),l=s[0]!=null&&Nt(s[0]);this[uk]=!0,Hk(this);var u=[e],d=!1;e.batch&&(d=!0,u=G(e.batch,function(t){return t=Ue(H({},t),e),t.batch=null,t}));var f=[],p,m=[],h=o.nonRefinedEventType,g=Bu(e),_=Vu(e);if(_&&bu(this._api),W(u,function(t){var i=o.action(t,r,n._api);if(o.refineEvent?m.push(i):p=i,p||=H({},t),p.type=h,f.push(p),_){var a=Zc(e),s=a.queryOptionMap,u=a.mainTypeSpecified?s.keys()[0]:`series`;Ek(n,c,t,u),Bk(n)}else g?(Ek(n,c,t,`series`),Bk(n)):l&&Ek(n,c,t,l.main,l.sub)}),c!==`none`&&!_&&!g&&!l)try{this[fk]?(wk(this),Dk.update.call(this,e),this[fk]=null):Dk[c].call(this,e)}catch(e){throw this[uk]=!1,e}if(p=d?{type:h,escapeConnect:a,batch:f}:f[0],this[uk]=!1,!t){var v=void 0;if(o.refineEvent){var y=o.refineEvent(m,e,r,this._api).eventContent;ft(Y(y)),v=Ue({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)}},jk=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();Ak.call(this,n,e)}},Mk=function(e){!e&&this.trigger(`updated`)},Nk=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[fk]&&!t._scheduler.unfinished&&!t._pendingActions.length?t.trigger(`finished`):e.refresh()})},Pk=function(e,t){e.on(`mouseover`,function(e){var n=e.target,r=VD(n,Ru);r&&(Tu(r,e,t._api),Bk(t))}).on(`mouseout`,function(e){var n=e.target,r=VD(n,Ru);r&&(Eu(r,e,t._api),Bk(t))}).on(`click`,function(e){var n=e.target,r=VD(n,function(e){return Cl(e).dataIndex!=null},!0);if(r){var i=r.selected?`unselect`:`select`,a=Cl(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;ET(i,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),W(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)})}}Fk=function(e,t,r,i,a){n(t),Ik(e,t,r,i,a),W(e._chartsViews,function(e){e.__alive=!1}),Lk(e,t,r,i,a),W(e._chartsViews,function(e){e.__alive||e.remove(t,r)})},Ik=function(e,t,n,r,i,a){W(a||e._componentsViews,function(e){var i=e.__model;s(i,e),e.render(i,t,n,r),o(i,e),c(i,e)})},Lk=function(e,t,n,r,l,u){var d=e._scheduler;l=H(l||{},{updatedSeries:t.getSeries()}),HD.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),Ou(t)}),d.unfinished=f||d.unfinished,HD.trigger(`series:layoutlabels`,t,n,l),HD.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),HD.trigger(`series:afterupdate`,t,n,l)},Bk=function(e){e[pk]=!0,e.getZr().wakeUp()},Hk=function(e){e[dk]=(e[dk]+1)%1e6},Vk=function(e){e[pk]&&(e.getZr().storage.traverse(function(e){_f(e)||r(e)}),e[pk]=!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`),uE.hoverLayerThreshold)&&!Ot.node&&!Ot.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=cp(e);t.eachRendered(function(e){return up(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!_f(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(_f(e))return;if(e instanceof es&&Hu(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)}})}Rk=function(e){return new(function(t){V(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){pu(t,n),Bk(e)},n.prototype.leaveEmphasis=function(t,n){mu(t,n),Bk(e)},n.prototype.enterBlur=function(t){hu(t),Bk(e)},n.prototype.leaveBlur=function(t){gu(t),Bk(e)},n.prototype.enterSelect=function(t){_u(t),Bk(e)},n.prototype.leaveSelect=function(t){vu(t),Bk(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[dk]},n.prototype.usingTHL=function(){return e._usingTHL},n}(Pl))(e)},zk=function(e){function t(e,t){for(var n=0;n<e.length;n++){var r=e[n];r[hk]=t}}W(qk,function(n,r){e._messageCenter.on(r,function(n){if(tA[e.group]&&e[hk]!==gk){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];W(eA,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,gk),W(i,function(e){e[hk]!==_k&&e.dispatchAction(r)}),t(i,vk)}})})}}(),t}(_a),Wk=Uk.prototype;Wk.on=yk(`on`),Wk.off=yk(`off`),Wk.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 Gk=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`],Kk={},qk={},Jk={},Yk=[],Xk=[],Zk=[],Qk={},$k={},eA={},tA={},nA=new Date-0;new Date-0;var rA=`_echarts_instance_`;function iA(e,t,n){var r=!(n&&n.ssr);if(r){var i=aA(e);if(i)return i}var a=new Uk(e,t,n);return a.id=`ec_`+nA++,eA[a.id]=a,r&&tl(e,rA,a.id),zk(a),HD.trigger(`afterinit`,a),a}function aA(e){return eA[nl(e,rA)]}function oA(e,t){Qk[e]=t}function sA(e){U(Xk,e)<0&&Xk.push(e)}function cA(e,t){_A(Yk,e,t,ZO)}function lA(e){dA(`afterinit`,e)}function uA(e){dA(`afterupdate`,e)}function dA(e,t){HD.on(e,t)}function fA(e,t,n){var r,i,a,o,s;q(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;Kk[r]||(ft(mk.test(r)&&mk.test(i)),a&&ft(i!==r),Kk[r]={actionType:r,refinedEventType:i,nonRefinedEventType:l,update:o,action:n,refineEvent:a},Jk[i]=1,a&&s&&(Jk[l]=1),qk[l]=r)}function pA(e,t){Th.register(e,t)}function mA(e,t){_A(Zk,e,t,$O,`layout`,!0)}function hA(e,t){_A(Zk,e,t,nk,`visual`,!0)}var gA=[];function _A(e,t,n,r,i,a){if((q(t)||Y(t))&&(n=t,t=r),!(U(gA,n)>=0)){gA.push(n);var o=hD.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function vA(e,t){$k[e]=t}function yA(e,t,n){var r=GD(`registerMap`);r&&r(e,t,n)}var bA=rv;hA(tk,lD),hA(ik,dD),hA(ik,fD),hA(tk,LD),hA(ik,RD),hA(ck,WO),sA($E),cA(JO,eD),vA(`default`,mD),fA({type:Hl,event:Hl,update:Hl},Tt),fA({type:Ul,event:Ul,update:Ul},Tt),fA({type:Wl,event:ql,update:Wl,action:Tt,refineEvent:xA,publishNonRefinedEvent:!0}),fA({type:Gl,event:ql,update:Gl,action:Tt,refineEvent:xA,publishNonRefinedEvent:!0}),fA({type:Kl,event:ql,update:Kl,action:Tt,refineEvent:xA,publishNonRefinedEvent:!0});function xA(e,t,n,r){return{eventContent:{selected:ku(n),isFromClick:t.isFromClick||!1}}}oA(`default`,{}),oA(`dark`,ND);var SA=[],CA={registerPreprocessor:sA,registerProcessor:cA,registerPostInit:lA,registerPostUpdate:uA,registerUpdateLifecycle:dA,registerAction:fA,registerCoordinateSystem:pA,registerLayout:mA,registerVisual:hA,registerTransform:bA,registerLoading:vA,registerMap:yA,registerImpl:WD,PRIORITY:lk,ComponentModel:F_,ComponentView:rD,SeriesModel:Rv,ChartView:jy,registerComponentModel:function(e){F_.registerClass(e)},registerComponentView:function(e){rD.registerClass(e)},registerSeriesModel:function(e){Rv.registerClass(e)},registerChartView:function(e){jy.registerClass(e)},registerCustomSeries:function(e,t){qD(e,t)},registerSubTypeDefaulter:function(e,t){F_.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){aE(e,t)}};function wA(e){if(K(e)){W(e,function(e){wA(e)});return}U(SA,e)>=0||(SA.push(e),q(e)&&(e={install:e}),e.install(CA))}var TA=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),EA=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Qc).models[0]},t.type=`cartesian2dAxis`,t}(F_);Ge(EA,TA);var DA={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`}},OA=Ve({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},DA),kA=Ve({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}}},DA),AA={category:OA,value:kA,time:Ve({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},kA),log:Ue({logBase:10},kA)};function jA(e,t,n,r){W(Ub,function(i,a){var o=Ve(Ve({},AA[a],!0),r,!0),s=function(e){V(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=A_(this),r=n?M_(e):{};Ve(e,t.getTheme().get(a+`Axis`)),Ve(e,this.getDefaultOption()),e.type=MA(e),n&&j_(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=Jy.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=VS();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,MA)}function MA(e){return e.type||(e.data?`category`:`value`)}var NA=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 G(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Je(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}(),PA=[`x`,`y`];function FA(e){return(e.type===`interval`||e.type===`time`)&&!Eg(e)}var IA=function(e){V(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=GC,t.dimensions=PA,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!FA(e)||!FA(t))){var n=tb(e,null),r=tb(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=ln([],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 Hn(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 Tn(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 Tn(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 Hn(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(NA);function LA(e,t){var n=e.scale,r=e.model,i=BC(n,r,r.ecModel,e,null),a=ub(n),o=ub(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=Rs(l[0].value-l[1].value),g=Rs(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=gb(S,b),w,T,E,D,O,k;function A(e){for(var t=50,n=0;n<t&&!e();n++)E=a?E*Ls(c,2):fb(E),D=pb(E)}function j(){w=Qs(k-E*f,D)}function M(){T=Qs(O+E*p,D)}function N(){k=f?Qs(w+E*f,D):w}function P(){O=p?Qs(T-E*p,D):T}if(b[0]&&b[1]){w=C[0],T=C[1],E=(T-w)/(m+f+p);var ee=e.getExtent(),F=Rs(ee[1]-ee[0]);D=nc([T,w],F,.5/m),N(),P(),vc(D)&&(E=Qs(E,D))}else{var te=C[1]-C[0];E=a?Ls(uc(te),1):fc(te/m,2),D=pb(E),b[0]?(w=C[0],A(function(){if(N(),O=Qs(k+E*m,D),M(),T>=C[1])return!0})):b[1]?(T=C[1],A(function(){if(P(),k=Qs(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=Qs(Vs(C[0]/E)*E,D),O=Qs(Bs(C[1]/E)*E,D);var e=zs((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=Bs(t/2);n=t%2==0?[o,o]:w+T<C[0]+C[1]?[o,o+1]:[o+1,o]}if(k=Qs(k-E*n[0],D),O=Qs(O+E*n[1],D),j(),M(),w<=C[0]&&T>=C[1])return!0}})}ax(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function RA(e,t){var n=ub(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=gb(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?BA(r,t):zA(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=pb(d)),i[0]||(s[0]=Qs(Bs(s[0]/u)*u,l)),i[1]||(s[1]=Qs(Vs(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),ax(e,i,o,s,a,c)}function zA(e,t){var n=vb(t.splitNumber,5),r=rb(e),i=t.minInterval,a=t.maxInterval,o=fc(r/n,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);var s=pb(o),c=e.getExtent(),l=[Qs(Vs(c[0]/o)*o,s),Qs(Bs(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function BA(e,t){var n=vb(t.splitNumber,10),r=e.getExtent(),i=rb(e),a=Ls(uc(i),1);n/i*a<=.5&&(a*=10);var o=pb(a),s=[Qs(Vs(r[0]/a)*a,o),Qs(Bs(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function VA(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;HA(t,n,r,i,null)}function HA(e,t,n,r,i){var a=BC(e,t,r,n,i),o=cb(e)||lb(e);UA(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&&HC(n,e,a,r)}function UA(e,t){WA[e.type](e,t)}var WA={interval:RA,log:RA,time:Fb,ordinal:Tt},GA=[[3,1],[0,2]],KA=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=PA,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;W(this._axesList,function(e){FC(e,1);var t=e.scale;db(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=Xe(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):VA(i)}W(n,function(e){ZA(e,e.__alignTo)?VA(e):LA(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};W(n.x,function(e){JA(n,`y`,e,i)}),W(n.y,function(e){JA(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=k_(e,t),i=this._rect=D_(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if($A(a,i),!n){var c=rj(i,o,a,s,t),l=void 0;if(s)tj?(tj(this._axesList,i),$A(a,i)):l=nj(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=aj(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=nj(d,f,p,i,a,c,r))}ij(i,a,Nx.determine,null,l,r),W(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`,Qc).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,Qc).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,U(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,W(o.x,function(t,n){W(o.y,function(i,a){var o=`x`+n+`y`+a,s=new IA(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})}),XA(o.x),XA(o.y);function c(t){return function(n,r){if(qA(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=Gb(n),u=new CS(t,Kb(n,l,!0),[0,0],l,c);u.onBand=sx(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 W(this.getCartesians(),function(r){var i=e!=null&&e!==`auto`?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(i);U(t,i)<0&&t.push(i),U(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),W(o._axesList,function(t){PC(t,e.dimIdxMap)})}),t.eachSeries(function(e){var t,n;jh({targetModel:e,coordSysType:GC,coordSysProvider:r});function r(){var r=CC(e),i=r.xAxisModel,a=r.yAxisModel;return t=i.axis,n=a.axis,i.getCoordSysModel().coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}t&&n&&(fS(t,e,GC),fS(n,e,GC))},this),r},e.dimensions=PA,e.dimIdxMap=nh(PA),e}();function qA(e,t){return e.getCoordSysModel()===t}function JA(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)YA(s,i[c])&&(a=i[c]);else for(var l in i)if(Z(i,l)&&YA(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 YA(e,t){if(!t)return!1;var n=t.scale,r=qb(n,0,!1),i=t&&t.type!==`category`&&t.type!==`time`&&r!==3;return i&&e===`auto`&&Yb(t)&&(i=!1),i}function XA(e){for(var t=Xe(e),n,r=[],i=t.length-1;i>=0;i--){var a=e[+t[i]];sb(a.scale)&&rx(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&W(r,function(e){e.__alignTo=n})}function ZA(e,t){return Eg(e.scale)||Eg(t.scale)||t.scale.getTicks().length<2}function QA(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 $A(e,t){W(e.x,function(e){return ej(e,t.x,t.width)}),W(e.y,function(e){return ej(e,t.y,t.height)})}function ej(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),QA(e,t)}var tj;function nj(e,t,n,r,i,a,o){ij(r,i,Nx.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=Ye(s,function(e){return e>0})==null;return Qf(r,s,!0,!0,n),$A(i,r),c;function l(e){W(i[wf[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(ox(t.scale,KS(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=tx(n.nameLocation)?.5:NaN;u(c.rect,e,s),u(c.rect,1-e,NaN)}}})}function u(t,n,r){var i=e[wf[n]]-t[wf[n]],a=t[Tf[n]]+t[wf[n]]-(e[Tf[n]]+e[wf[n]]);i=d(i,1-r),a=d(a,r);var o=GA[n][0],c=GA[n][1];s[o]=Ls(s[o],i),s[c]=Ls(s[c],a)}function d(e,t){return e>0&&!st(t)&&t>1e-4&&(e/=t),e}}function rj(e,t,n,r,i){var a=new JS(oj);return W(n,function(n){return W(n,function(n){if(nx(n.model)){var o=!r;n.axisBuilder=wC(e,t,n.model,i,a,o)}})}),a}function ij(e,t,n,r,i,a){var o=n===Nx.determine;W(t,function(t){return W(t,function(t){nx(t.model)&&(TC(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[wf[1-t]]=e[Tf[t]]<=a.refContainer[Tf[t]]*.5?0:1-t==1?2:1}W(t,function(e,t){return W(e,function(e){nx(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function aj(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=D_(e.get(`outerBounds`,!0)||UC,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||U([`all`,`axisLabel`],a)<0?`all`:a,s=[Xs(X(e.get(`outerBoundsClampWidth`,!0),WC[0]),t.width),Xs(X(e.get(`outerBoundsClampHeight`,!0),WC[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var oj=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;QS(e,t,n,r,i,a),tx(e.nameLocation)||W(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&eC(e.labelInfoList,e.dirVec,r,i)})};function sj(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return cj(n,e,t),n.seriesInvolved&&uj(n,e),n}function cj(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];W(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=_j(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(W(n.getAxes(),$e(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)&&W(f.baseAxes,$e(p,!d||`cross`,u)),d&&W(f.otherAxes,$e(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!gj(d))){s??=d.get(`triggerTooltip`),d=r?lj(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=_j(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:gj(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=dj(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function lj(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};W(s,function(e){c[e]=Be(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&&Ue(l,u.textStyle)}return e.model.getModel(`axisPointer`,new Hp(c,n,r))}function uj(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||W(e.coordSysAxesInfo[_j(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 dj(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(fj(a[r+`AxisId`],n.id)||fj(a[r+`AxisIndex`],n.componentIndex)||fj(a[r+`AxisName`],n.name))return i}}function fj(e,t){return e===`all`||K(e)&&U(e,t)>=0||e===t}function pj(e){var t=mj(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=gj(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 mj(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[_j(e)]}function hj(e){var t=mj(e);return t&&t.axisPointerModel}function gj(e){return!!e.get([`handle`,`show`])}function _j(e){return e.type+`||`+e.id}var vj={},yj=function(e){V(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&&pj(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=hj(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){vj[e]=t},t.getAxisPointerClass=function(e){return e&&vj[e]},t.type=`axis`,t}(rD),bj=Jc();function xj(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=bj(e).splitAreaColors,f=xt(),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=K(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 ms({anid:C==null?null:`area_`+C,shape:{x:y,y:b,width:x,height:S},style:Ue({fill:s[p]},_),autoBatch:!0,silent:!0})),p=(p+1)%u}bj(e).splitAreaColors=f}}}function Sj(e){bj(e).splitAreaColors=null}var Cj=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`],wj=function(e){V(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 dd,this.group.add(this._axisGroup),nx(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),W(Cj,function(e){t.get([e,`show`])&&Tj[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||Wf(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},t.prototype.remove=function(){Sj(this)},t.type=`cartesianAxis`,t}(yj),Tj={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=K(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 Ud({anid:b==null?null:`line_`+b,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},style:Ue({stroke:c[x]},_),silent:!0});If(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 Ud({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});If(g.shape,f.lineWidth),t.add(g)}},splitArea:function(e,t,n,r,i){xj(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=VS(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},Ej=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`xAxis`,t}(wj),Dj=function(e){V(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Ej.type,t}return t.type=`yAxis`,t}(wj),Oj=function(e){V(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 ms({shape:e.coordinateSystem.getRect(),style:Ue({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},t.type=`grid`,t}(rD),kj={offset:0};function Aj(e){e.registerComponentView(Oj),e.registerComponentModel(KC),e.registerCoordinateSystem(`cartesian2d`,KA),jA(e,`x`,EA,kj),jA(e,`y`,EA,kj),e.registerComponentView(Ej),e.registerComponentView(Dj),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function jj(e){return e}var Mj=`view`;(function(e){V(t,e);function t(t,n,r){var i=e.call(this)||this;i.type=Mj,i.dimensions=[`x`,`y`];var a=jj(i);a.invertY=t,a.lgCt=n,a.lgGeo=r;var o=a.trans=[];return o[0]=Gr(),o[1]=Gr(),o[2]=Gr(),a.mtRaw=tn(),a.mtRawInv=tn(),a.mtOverall=tn(),a.mtOverallInv=tn(),a.zoom=1,i}return t.prototype.getBoundingRect=function(){return Fj(null,this)},t.prototype.getViewRect=function(){return Ij(null,this)},t.prototype.getRoamTransform=function(){return Wr(jj(this).trans[1])},t.prototype.dataToPoint=function(e,t,n){var r=t?jj(this).mtRaw:jj(this).mtOverall;return n||=[],r?Tn(n,e,r):dn(n,e)},t.prototype.pointToData=function(e,t,n){n||=[];var r=jj(this).mtOverallInv;return r?Tn(n,e,r):dn(n,e)},t.prototype.convertToPixel=function(e,t,n){var r=Lj(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=Lj(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){var t=jj(this);return Gn(Nj,t.dataRect),qn(Nj,Nj,t.mtOverall),Jn(Nj,e[0],e[1])},t.dimensions=[`x`,`y`],t})(Ur);var Nj=Un();function Pj(e){return jj(e).zoom}function Fj(e,t){return Gn(e||Un(),jj(t).dataRect)}function Ij(e,t){return Gn(e||Un(),jj(t).viewRect)}Un();function Lj(e){var t=e.seriesModel;return t?t.coordinateSystem:null}Gr(),Gr();var Rj=Ud.prototype,zj=qd.prototype,Bj=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(Bj);function Vj(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var Hj=function(e){V(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 Bj},t.prototype.buildPath=function(e,t){Vj(t)?Rj.buildPath.call(this,e,t):zj.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return Vj(this.shape)?Rj.pointAt.call(this,e):zj.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=Vj(t)?[t.x2-t.x1,t.y2-t.y1]:zj.tangentAt.call(this,e);return yn(n,n)},t}(es),Uj=[`fromSymbol`,`toSymbol`];function Wj(e){return`_`+e+`Type`}function Gj(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=ey(i),l=ty(o||0,c);return r+c+l+(a||``)+(s||``)}function Kj(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=ey(i),l=ty(o||0,c),u=$v(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 qj(e){var t=new Hj({name:`line`,subPixelOptimize:!0});return Jj(t.shape,e),t}function Jj(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 Yj=function(e){V(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=qj(i);o.shape.percent=0,gf(o,{z2:X(a,0),shape:{percent:1}},r,t),this.add(o),W(Uj,function(n){var r=Kj(n,e,t);this.add(r),this[Wj(n)]=Gj(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:{}};Jj(o.shape,a),hf(i,o,r,t),W(Uj,function(n){var r=Gj(n,e,t),i=Wj(n);if(this[i]!==r){this.remove(this.childOfName(n));var a=Kj(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=bp(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,W(Uj,function(e){var t=this.childOfName(e);if(t){t.setColor(h),t.style.opacity=m.opacity;for(var n=0;n<Bl.length;n++){var r=Bl[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);yp(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)?Qs(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`);K(y)||(y=[y,y]),_.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),Mu(this,u,d,l)},t.prototype.highlight=function(){pu(this)},t.prototype.downplay=function(){mu(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`);Jj(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=hn([],l,c);yn(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}(dd),Xj=function(){function e(e){this.group=new dd,this._LineCtor=e||Yj}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=Qj(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=Qj(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!Zj(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i<e.end;i++)if(eM(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){rp(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(eM(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(!eM(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 Zj(e){return e.animators&&e.animators.length>0}function Qj(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:bp(t)}}function $j(e){return isNaN(e[0])||isNaN(e[1])}function eM(e){return e&&!$j(e[0])&&!$j(e[1])}var tM={color:`fill`,borderColor:`stroke`},nM={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},rM=Jc(),iM=function(e){V(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 Hh(null,this)},t.prototype.getDataParams=function(t,n,r){var i=e.prototype.getDataParams.call(this,t,n);return r&&(i.info=rM(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}(Rv);function aM(e,t){return t||=[0,0],G([`x`,`y`],function(n,r){var i=this.getAxis(n),a=t[r],o=e[r]/2;return i.type===`category`?gS(i).w:Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function oM(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:Qe(aM,e)}}}function sM(e,t){return t||=[0,0],G([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 cM(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:Pj(t)},api:{coord:function(t){return e.dataToPoint(t)},size:Qe(sM,e)}}}function lM(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`?gS(n).w:Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}function uM(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:Qe(lM,e)}}}function dM(e,t){return t||=[0,0],G([`Radius`,`Angle`],function(n,r){var i=`get`+n+`Axis`,a=this[i](),o=t[r],s=e[r]/2,c=a.type===`category`?gS(a).w:Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return n===`Angle`&&(c=c*Math.PI/180),c},this)}function fM(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:Qe(dM,e)}}}function pM(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 mM(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 hM={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},gM=Xe(hM);qe(Kr,function(e,t){return e[t]=1,e},{}),Kr.join(`, `);var _M=[``,`style`,`shape`,`extra`],vM=Jc();function yM(e,t,n,r,i){var a=e+`Animation`,o=pf(e,r,i)||{},s=vM(t).userDuring;return o.duration>0&&(o.during=s?Qe(kM,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),H(o,n[a]),o}function bM(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=vM(e),l=t.style;c.userDuring=t.during;var u={},d={};if(NM(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];jM(`shape`,h,f[m])}else jM(`shape`,t,d),jM(`extra`,t,d);if(!a&&s&&(MM(e,t,u),AM(`shape`,e,t,u),AM(`extra`,e,t,u),PM(e,t,l,u)),d.style=l,wM(e,d,o),EM(e,t),s){if(a){var g={};W(_M,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(g[e]=g[e]||{}),H(e?g[e]:g,n.enterFrom))});var _=yM(`enter`,e,t,n,i);_.duration>0&&e.animateFrom(g,_)}else TM(e,t,i||0,n,u)}xM(e,t),l?e.dirty():e.markRedraw()}function xM(e,t){for(var n=vM(e).leaveToProps,r=0;r<_M.length;r++){var i=_M[r],a=i?t[i]:t;a&&a.leaveTo&&(n||=vM(e).leaveToProps={},i&&(n[i]=n[i]||{}),H(i?n[i]:n,a.leaveTo))}}function SM(e,t,n,r){if(e){var i=e.parent,a=vM(e).leaveToProps;if(a){var o=yM(`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 CM(e){return e===`all`}function wM(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 TM(e,t,n,r,i){if(i){var a=yM(`update`,e,t,r,n);a.duration>0&&e.animateFrom(i,a)}}function EM(e,t){Z(t,`silent`)&&(e.silent=t.silent),Z(t,`ignore`)&&(e.ignore=t.ignore),e instanceof Ka&&Z(t,`invisible`)&&(e.invisible=t.invisible),e instanceof es&&Z(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}var DM={},OM={setTransform:function(e,t){return DM.el[e]=t,this},getTransform:function(e){return DM.el[e]},setShape:function(e,t){var n=DM.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=DM.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=DM.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=DM.el.style;if(t)return t[e]},setExtra:function(e,t){var n=DM.el.extra||(DM.el.extra={});return n[e]=t,this},getExtra:function(e){var t=DM.el.extra;if(t)return t[e]}};function kM(){var e=this,t=e.el;if(t){var n=vM(t).userDuring,r=e.userDuring;if(n!==r){e.el=e.userDuring=null;return}DM.el=t,r(OM)}}function AM(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]={}),CM(c))H(o,a);else for(var l=Oc(c),u=0;u<l.length;u++){var d=l[u],f=a[d];o[d]=f}}else if(CM(s)||U(s,e)>=0){!o&&(o=r[e]={});for(var p=Xe(a),u=0;u<p.length;u++){var d=p[u],f=a[d];FM(i[d],f)&&(o[d]=f)}}}}}function jM(e,t,n){var r=t[e];if(r)for(var i=n[e]={},a=Xe(r),o=0;o<a.length;o++){var s=a[o];i[s]=na(r[s])}}function MM(e,t,n){for(var r=t.transition,i=CM(r)?Kr:Oc(r||[]),a=0;a<i.length;a++){var o=i[a];o!==`style`&&o!==`shape`&&o!==`extra`&&(n[o]=e[o])}}function NM(e,t,n){for(var r=0;r<gM.length;r++){var i=gM[r],a=hM[i],o=t[i];o&&(n[a[0]]=o[0],n[a[1]]=o[1])}for(var r=0;r<Kr.length;r++){var s=Kr[r];t[s]!=null&&(n[s]=t[s])}}function PM(e,t,n,r){if(n){var i=e.style,a;if(i){var o=n.transition,s=t.transition;if(o&&!CM(o)){var c=Oc(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&&(CM(s)||CM(o)||U(s,`style`)>=0)){var f=e.getAnimationStyleProps(),p=f?f.style:null;if(p){!a&&(a=r.style={});for(var m=Xe(n),l=0;l<m.length;l++){var u=m[l];if(p[u]){var d=i[u];a[u]=d}}}}}}}function FM(e,t){return Ke(e)?e!==t:e!=null&&isFinite(e)}var IM=Jc(),LM=[`percent`,`easing`,`shape`,`style`,`extra`];function RM(e){e.stopAnimation(`keyframe`),e.attr(IM(e))}function zM(e,t,n){if(!(!n.isAnimationEnabled()||!t)){if(K(t)){W(t,function(t){zM(e,t,n)});return}var r=t.keyframes,i=t.duration;if(n&&i==null){var a=pf(`enter`,n,0);i=a&&a.duration}if(!(!r||!i)){var o=IM(e);W(_M,function(n){if(!(n&&!e[n])){var a;r.sort(function(e,t){return e.percent-t.percent}),W(r,function(r){var s=e.animators,c=n?r[n]:r;if(c){var l=Xe(c);if(n||(l=Je(l,function(e){return U(LM,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;W(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 BM=`emphasis`,VM=`normal`,HM=`blur`,UM=`select`,WM=[VM,BM,HM,UM],GM={normal:[`itemStyle`],emphasis:[BM,`itemStyle`],blur:[HM,`itemStyle`],select:[UM,`itemStyle`]},KM={normal:[`label`],emphasis:[BM,`label`],blur:[HM,`label`],select:[UM,`label`]},qM=[`x`,`y`],JM=`e\0\0`,YM={normal:{},emphasis:{},blur:{},select:{}},XM={cartesian2d:oM,geo:cM,single:uM,polar:fM,calendar:pM,matrix:mM};function ZM(e){return e instanceof es}function QM(e){return e instanceof Ka}function $M(e,t){t.copyTransform(e),QM(t)&&QM(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,ZM(t)&&ZM(e)&&t.setShape(e.shape))}var eN=function(e){V(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=oN(e,a,t,n);i||o.removeAll(),a.diff(i).add(function(t){cN(n,null,t,s(t,r),e,o,a)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&SM(n,rM(n).option,e)}).update(function(t,c){cN(n,i.getItemGraphicEl(c),t,s(t,r),e,o,a)}).execute();var c=e.get(`clip`,!0)?zy(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=oN(t,a,n,r),s=this._progressiveEls=[];function c(e){e.isGroup||(e.incremental=yl(t),e.ensureState(`emphasis`).hoverLayer=2)}for(var l=e.start;l<e.end;l++){var u=cN(null,null,l,o(l,i),t,this.group,a);u&&(u.traverse(c),s.push(u))}},t.prototype.eachRendered=function(e){rp(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}(jy);function tN(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=SN(r);n=jf(a,null,i,r.layout||`center`),rM(n).customPathData=a}else if(t===`image`)n=new os({}),rM(n).customImagePath=e.style.image;else if(t===`text`)n=new ys({});else if(t===`group`)n=new dd;else if(t===`compoundPath`){var r=e.shape;if(!r||!r.paths){var o=``;wc(o)}n=new Xd({shape:{paths:G(r.paths,function(e){if(e.type===`path`)return jf(e.shape.pathData,e,null);var t=Af(e.type);return t||wc(``),new t})}})}else{var s=Af(t);if(!s){var o=``;wc(o)}n=new s}return rM(n).customGraphicType=t,n.name=e.name,n.z2EmphasisLift=1,n.z2SelectLift=1,n}function nN(e,t,n,r,i,a,o){RM(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),r&&r.transition==null&&(r.transition=qM);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=ZM(t)?c.decal:null;e&&d&&(d.dirty=!0,u=RO(d,e)),c.__decalPattern=u}if(QM(t)&&c){var u=c.__decalPattern;u&&(c.decal=u)}bM(t,r,a,{dataIndex:n,isInit:o,clearStyle:!0}),zM(t,r.keyframeAnimation,a)}function rN(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),uu(a)}}function iN(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<WM.length;s++)aN(r,t,WM[s])}}function aN(e,t,n){var r=n===VM,i=r?t:mN(t,n),a=i?i.z2:null,o;a!=null&&(o=r?e:e.ensureState(n),o.z2=a||0)}function oN(e,t,n,r){var i=e.get(`renderItem`);if(typeof i==`string`){var a=JD(i);a&&(i=a)}var o=e.coordinateSystem,s={};o&&(s=o.prepareCustoms?o.prepareCustoms(o):XM[o.type](o));for(var c=Ue({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:sN(e.getData()),itemPayload:e.get(`itemPayload`)||{}},u,d,f={},p={},m={},h={},g=0;g<WM.length;g++){var _=WM[g];m[_]=e.getModel(GM[_]),h[_]=e.getModel(KM[_])}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(GM[n])):v(e).getModel(GM[n]):m[n]}function b(e,n){return t.hasItemOption?e===u?p[n]||(p[n]=v(e).getModel(KM[n])):v(e).getModel(KM[n]):h[n]}return function(e,n){return u=e,d=null,f={},p={},i&&i(Ue({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,VM).getItemStyle();a!=null&&(s.fill=a),o!=null&&(s.opacity=o);var c={inheritColor:J(a)?a:Q.color.neutral99},l=b(r,VM),d=xp(l,null,c,!1,!0);d.text=l.getShallow(`show`)?X(e.getFormattedLabel(r,VM),ry(t,r)):null;var f=Sp(l,c,!1);return E(n,s),s=Wy(s,d,f),n&&T(s,n),s.legacy=!0,s}function w(n,r){r??=u;var i=y(r,BM).getItemStyle(),a=b(r,BM),o=xp(a,null,null,!0,!0);o.text=a.getShallow(`show`)?lt(e.getFormattedLabel(r,BM),e.getFormattedLabel(r,VM),ry(t,r)):null;var s=Sp(a,null,!0);return E(n,i),i=Wy(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(tM,e)){var r=t.getItemVisual(n,`style`);return r?r[tM[e]]:null}if(Z(nM,e))return t.getItemVisual(n,e)}function O(e){if(o.type===`cartesian2d`)return JC(Ue({axis:o.getBaseAxis()},e))}function k(){return n.getCurrentSeriesIndices()}function A(e){return kp(e,n)}}function sN(e){var t={};return W(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 cN(e,t,n,r,i,a,o){if(!r){a.remove(t);return}var s=lN(e,t,n,r,i,a);return s&&o.setItemGraphicEl(n,s),s&&Mu(s,r.focus,r.blurScope,r.emphasisDisabled),s}function lN(e,t,n,r,i,a){var o=-1,s=t;t&&uN(t,r,i)&&(o=U(a.childrenRef(),t),t=null);var c=!t,l=t;l?l.clearStates():(l=tN(r),s&&$M(s,l)),r.morph===!1?l.disableMorphing=!0:l.disableMorphing&&(l.disableMorphing=!1),r.tooltipDisabled&&(l.tooltipDisabled=!0),YM.normal.cfg=YM.normal.conOpt=YM.emphasis.cfg=YM.emphasis.conOpt=YM.blur.cfg=YM.blur.conOpt=YM.select.cfg=YM.select.conOpt=null,YM.isLegacy=!1,fN(l,n,r,i,c,YM),dN(l,n,r,i,c),nN(e,l,n,r,YM,i,c),Z(r,`info`)&&(rM(l).info=r.info);for(var u=0;u<WM.length;u++){var d=WM[u];if(d!==VM){var f=mN(r,d),p=hN(r,f,d);rN(d,l,f,p,YM)}}return iN(l,r,i),r.type===`group`&&gN(e,l,n,r,i),o>=0?a.replaceAt(l,o):a.add(l),l}function uN(e,t,n){var r=rM(e),i=t.type,a=t.shape,o=t.style;return n.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i===`path`&&CN(a)&&SN(a)!==r.customPathData||i===`image`&&Z(o,`image`)&&o.image!==r.customImagePath}function dN(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&&uN(o,a,r)&&(o=null),o||(o=tN(a),e.setClipPath(o)),nN(null,o,t,a,null,r,i)}}function fN(e,t,n,r,i,a){if(!(e.isGroup||e.type===`compoundPath`)){pN(n,null,a),pN(n,BM,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=tN(o),e.setTextContent(u)),nN(null,u,t,o,null,r,i);for(var d=o&&o.style,f=0;f<WM.length;f++){var p=WM[f];if(p!==VM){var m=a[p].conOpt;rN(p,u,m,hN(o,m,p),null)}}d?u.dirty():u.markRedraw()}}}}function pN(e,t,n){var r=t?mN(e,t):e,i=t?hN(e,r,BM):e.style,a=e.type,o=r?r.textConfig:null,s=e.textContent,c=s?t?mN(s,t):s:null;if(i&&(n.isLegacy||Vy(i,a,!!o,!!c))){n.isLegacy=!0;var l=Hy(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 mN(e,t){return t?e?e[t]:null:e}function hN(e,t,n){var r=t&&t.style;return r==null&&n===BM&&e&&(r=e.styleEmphasis),r}function gN(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){vN({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,lN(e,f,n,d,i,t)):f.ignore=!0}for(var p=t.childCount()-1;p>=u;p--)_N(t,t.childAt(p),i)}}function _N(e,t,n){t&&SM(t,rM(e).option,n)}function vN(e){new Gp(e.oldChildren,e.newChildren,yN,yN,e).add(bN).update(bN).remove(xN).execute()}function yN(e,t){return(e&&e.name)??JM+t}function bN(e,t){var n=this.context,r=e==null?null:n.newChildren[e],i=t==null?null:n.oldChildren[t];lN(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function xN(e){var t=this.context,n=t.oldChildren[e];n&&SM(n,rM(n).option,t.seriesModel)}function SN(e){return e&&(e.pathData||e.d)}function CN(e){return e&&(Z(e,`pathData`)||Z(e,`d`))}function wN(e){e.registerChartView(eN),e.registerSeriesModel(iM)}var TN=Jc(),EN=Be,DN=Qe,ON=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 dd,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=$e(kN,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}NN(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&&gS(r).w>o)return!0;if(a){var s=mj(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=TN(e).pointerEl=new Sf[i.type](EN(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=TN(e).labelEl=new ys(EN(t.label));e.add(i),jN(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=TN(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=TN(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),jN(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=qf(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){tT(e.event)},onmousedown:DN(this._onHandleDragMove,this,0,0),drift:DN(this._onHandleDragMove,this),ondragend:DN(this._onHandleDragEnd,this)}),n.add(r)),NN(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);K(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,ew(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){kN(this._axisPointerModel,!t&&this._moveAnimation,this._handle,MN(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(MN(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(MN(r)),TN(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),tw(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 kN(e,t,n,r){AN(TN(n).lastProp,r)||(TN(n).lastProp=r,t?hf(n,r,e):(n.stopAnimation(),n.attr(r)))}function AN(e,t){if(Y(e)&&Y(t)){var n=!0;return W(t,function(t,r){n&&=AN(e[r],t)}),!!n}return e===t}function jN(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function MN(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function NN(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 PN(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 FN(e,t,n,r,i){var a=LN(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=d_(o.get(`padding`)||0),c=o.getFont(),l=cr(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),IN(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:xp(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function IN(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 LN(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:Zb(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};W(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):q(o)&&(a=o(s))}return a}function RN(e,t,n){var r=tn();return sn(r,r,n.rotation),on(r,r,n.position),Bf([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function zN(e,t,n,r,i,a){var o=tC.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),FN(t,r,i,a,{position:RN(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function BN(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function VN(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function HN(e,t,n){return gS(e,{fromStat:{sers:G(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function UN(e,t,n){return[Ls(Is(t[0],t[1]),e-n/2),Is(e+n/2,Ls(t[0],t[1]))]}var WN=function(e){V(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=GN(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=PN(r),f=KN[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}zN(t,e,SC(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=SC(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=RN(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=GN(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=Is(o[1],l[c]),l[c]=Ls(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}(ON);function GN(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var KN={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:BN([t,r[0]],[t,r[1]],qN(e))}},shadow:function(e,t,n,r,i,a){var o=HN(e,i,a),s=r[1]-r[0],c=UN(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:VN([l,r[0]],[u-l,s],qN(e))}}};function qN(e){return e.dim===`x`?0:1}var JN=function(e){V(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}(F_),YN=Jc(),XN=W;function ZN(e,t,n){if(!Ot.node){var r=t.getZr();YN(r).records||(YN(r).records={}),QN(r,t);var i=YN(r).records[e]||(YN(r).records[e]={});i.handler=n}}function QN(e,t){if(YN(e).initialized)return;YN(e).initialized=!0,n(`click`,$e(tP,`click`)),n(`mousemove`,$e(tP,`mousemove`)),n(`mousewheel`,$e(tP,`mousewheel`)),n(`globalout`,eP);function n(n,r){e.on(n,function(n){var i=nP(t);XN(YN(e).records,function(e){e&&r(e,n,i.dispatchAction)}),$N(i.pendings,t)})}}function $N(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 eP(e,t,n){e.handler(`leave`,null,n)}function tP(e,t,n,r){t.handler(e,n,r)}function nP(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 rP(e,t){if(!Ot.node){var n=t.getZr();(YN(n).records||{})[e]&&(YN(n).records[e]=null)}}var iP=function(e){V(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`;ZN(`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){rP(`axisPointer`,t)},t.prototype.dispose=function(e,t){rP(`axisPointer`,t)},t.type=`axisPointer`,t}(rD);function aP(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=qc(a,e);if(o==null||o<0||K(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(G(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 oP=Jc();function sP(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||Qe(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){_P(i)&&(i=aP({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=_P(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||_P(i),f={},p={},m={list:[],map:{}},h={showPointer:$e(uP,p),showTooltip:$e(dP,m)};W(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);W(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=hP(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&cP(e,o,h,!1,f)}})});var g={};return W(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&W(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,gP(t),gP(e)))),g[e.key]=a}})}),W(g,function(e,t){cP(u[t],e,h,!0,f)}),fP(p,u,f),pP(m,i,e,o),mP(u,o,n),f}}function cP(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=lP(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&H(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function lP(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return W(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(vc(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),W(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function uP(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function dP(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=_j(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 fP(e,t,n){var r=n.axesInfo=[];W(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 pP(e,t,n,r){if(_P(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 mP(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=oP(r)[i]||{},o=oP(r)[i]={};W(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&W(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}W(a,function(e,t){!o[t]&&c.push(l(e))}),W(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 hP(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 gP(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 _P(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function vP(e){yj.registerAxisPointerClass(`CartesianAxisPointer`,WN),e.registerComponentModel(JN),e.registerComponentView(iP),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!K(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=sj(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},sP)}function yP(e){wA(Aj),wA(vP)}function bP(e,t){var n=d_(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new ms({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 xP=function(e){V(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}(F_);function SP(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function CP(e){if(Ot.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var wP=CP([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),TP=CP([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function EP(e,t){if(!e)return t;t=u_(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function DP(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}var OP=EP(TP,`transition`),kP=EP(wP,`transform`),AP=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(Ot.transform3dSupported?`will-change:transform;`:``);function jP(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function MP(e,t,n){if(!J(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=__(t);var a=jP(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=kP+`:`,l;U([`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 NP(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?`,`:``)+(Ot.transformSupported?``+kP+i:`,left`+i+`,top`+i)),OP+`:`+a}function PP(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!Ot.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=Ot.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+kP+`:`+o+`;`:[[`top`,0],[`left`,0],[wP,o]]}function FP(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),W([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function IP(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=Mv(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(NP(a,n,r)),o&&i.push(`background-color:`+o),W([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=u_(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(FP(d)),f!=null&&i.push(`padding:`+d_(f).join(`px `)+`px`),i.join(`;`)+`;`}function LP(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&tg(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 RP=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,Ot.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):it(i)?i:q(i)&&i(e.getDom()));LP(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;Zw(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=DP(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=AP+IP(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+PP(i[0],i[1],!0)+(`border-color:`+__(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`&&!SP(n)&&(o=MP(n,r,i)),J(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,K(e)||(e=[e]);for(var s=0;s<e.length;s++)it(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(LP(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;W(PP(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`,Ot.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(Qe(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;ng(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}(),zP=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),HP(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)&&wc(``),this.el&&this._zr.remove(this.el);var o=n.getModel(`textStyle`);this.el=new ys({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:Mv(n,`richText`),verticalAlign:`top`,align:`left`},z:n.get(`z`)}),W([`backgroundColor`,`borderRadius`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],function(e){a.el.style[e]=n.get(e)}),W([`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=VP(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;HP(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=BP(i.borderWidth||0),o=VP(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(Qe(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function BP(e){return Math.max(0,e)}function VP(e){var t=BP(e.shadowBlur||0),n=BP(e.shadowOffsetX||0),r=BP(e.shadowOffsetY||0);return{left:BP(t-n),right:BP(t+n),top:BP(t-r),bottom:BP(t+r)}}function HP(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var UP=new ms({shape:{x:-1,y:-1,width:2,height:2}}),WP=function(e){V(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(!(Ot.node||!t.getDom())){var n=e.getComponent(`tooltip`),r=this._renderMode=rl(n.get(`renderMode`));this._tooltipContent=r===`richText`?new zP(t):new RP(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}},t.prototype.render=function(e,t,n){if(!(Ot.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`)?ew(this,`_updatePosition`,50,`fixRate`):tw(this,`_updatePosition`)}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);ZN(`itemTooltip`,this._api,Qe(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||Ot.node||!n.getDom())){var i=KP(r,n);this._ticket=``;var a=r.dataByCoordSys,o=ZP(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=UP;c.x=r.x,c.y=r.y,c.update(),Cl(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=aP(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(KP(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&&GP([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(Cl(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;VD(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Cl(e).dataIndex==null?Cl(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=Qe(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=GP([t.tooltipOption],r),o=this._renderMode,s=[],c=vv(`section`,{blocks:[],noHeader:!0}),l=[],u=new Nv;W(e,function(e){W(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=LN(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=vv(`section`,{header:f,noHeader:!pt(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),W(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=Zb(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,__(m.color),o);var h=K_(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=GP([a],r).get(`valueFormatter`);p.blocks.push(_?H({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=wv(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=Cl(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=GP([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 Nv;h.marker=g.makeTooltipMarker(`item`,__(h.color),d);var _=K_(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?wv(y?H({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=Cl(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=Be(a),a.content=lg(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=GP(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new Nv;this._showOrMove(d,function(){var n=Be(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=K(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=Gg(m.axisValue,d,p)),d=h_(d,n,!0)}else if(q(u)){var g=Qe(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`||K(t))return{color:r||i};if(!K(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),q(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),K(t))n=Js(t[0],s),r=Js(t[1],c);else if(Y(t)){var p=t;p.width=l[0],p.height=l[1];var m=D_(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(J(t)&&o){var h=YP(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=qP(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=XP(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=XP(d)?l[1]/2:d===`bottom`?l[1]:0),SP(e)){var h=JP(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&&W(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&W(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&&W(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&W(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){Ot.node||!t.getDom()||(tw(this,`_updatePosition`),this._tooltipContent.dispose(),rP(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(rD);function GP(e,t,n){var r=t.ecModel,i;n?(i=new Hp(n,r,r),i=new Hp(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Hp&&(o=o.get(`tooltip`,!0)),J(o)&&(o={formatter:o}),o&&(i=new Hp(o,i,r)))}return i}function KP(e,t){return e.dispatchAction||Qe(t.dispatchAction,t)}function qP(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 JP(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 YP(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 XP(e){return e===`center`||e===`middle`}function ZP(e,t,n){var r=Zc(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=$c(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=Cl(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function QP(e){wA(vP),e.registerComponentModel(xP),e.registerComponentView(WP),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Tt),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Tt)}var $P=function(e){V(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}(F_),eF=function(e){V(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 ys({style:xp(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new ys({style:xp(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(){v_(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){v_(p,`_`+e.get(`subtarget`))}),Cl(c).eventData=Cl(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 _=D_(g,k_(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 ms({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}(rD);function tF(e){e.registerComponentModel($P),e.registerComponentView(eF)}function nF(e,t){if(!e)return!1;for(var n=K(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function rF(e){kc(e,`label`,[`show`])}var iF=Jc(),aF=function(e){V(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(Ot.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=iF(e)[i];if(!n||!n.data){iF(e)[i]=null;return}a?a._mergeOption(n,t,!0):(r&&rF(n),W(n.data,function(e){e instanceof Array?(rF(e[0]),rF(e[1])):rF(e)}),a=this.createMarkerModelFromSeries(n,this,t),H(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),iF(e)[i]=a},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return vv(`section`,{header:this.name,blocks:[vv(`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=G_.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 iF(e)[t]},t.type=`marker`,t.dependencies=[`series`,`grid`,`polar`,`geo`],t}(F_);Ge(aF,G_.prototype);function oF(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function sF(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function cF(e,t,n,r,i,a,o){var s=[],c=Rh(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=hF(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 lF={min:$e(cF,`min`),max:$e(cF,`max`),average:$e(cF,`average`),median:$e(cF,`median`)};function uF(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!sF(t)&&!K(t.coord)&&K(i)){var a=dF(t,n,r,e);if(t=Be(t),t.type&&lF[t.type]&&a.baseAxis&&a.valueAxis){var o=U(i,a.baseAxis.dim),s=U(i,a.valueAxis.dim),c=lF[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||!K(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&lF[t.type]){var u=r.getOtherAxis(l);u&&(t.value=hF(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)lF[d[f]]&&(d[f]=hF(n,n.mapDimension(i[f]),d[f]));return t}}function dF(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(fF(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 fF(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function pF(e,t){return e&&e.containData&&t.coord&&!oF(t)?e.containData(t.coord):!0}function mF(e,t){return e?function(e,n,r,i){return Lm(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return Lm(e.value,t[i])}}function hF(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 gF=Jc(),_F=function(e){V(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=xt()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){gF(e).keep=!1}),t.eachSeries(function(e){var i=aF.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!gF(e).keep&&r.group.remove(e.group)}),vF(t,i,this.type)},t.prototype.markKeep=function(e){gF(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;W(e,function(e){var r=aF.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?hu(e):gu(e))})})},t.type=`marker`,t}(rD);function vF(e,t,n){e.eachSeries(function(e){var r=aF.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=cp(r),o=a.z,s=a.zlevel;up(i.group,o,s)}})}var yF=function(e){V(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}(aF),bF=Jc(),xF=function(e,t,n,r){var i=e.getData(),a;if(K(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=ct(r.yAxis,r.xAxis);else{var l=dF(r,i,t,e);s=l.valueAxis,c=hF(i,zh(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=Be(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=[uF(e,a[0]),uF(e,a[1]),H({},a[2])];return h[2].type=h[2].type||null,Ve(h[2],h[0]),Ve(h[2],h[1]),h};function SF(e){return!isNaN(e)&&!isFinite(e)}function CF(e,t,n,r){var i=1-e,a=r.dimensions[e];return SF(t[i])&&SF(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function wF(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(CF(1,n,r,e)||CF(0,n,r,e)))return!0}return pF(e,t[0])&&pF(e,t[1])}function TF(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=Js(o.get(`x`),i.getWidth()),l=Js(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(By(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;SF(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):SF(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 EF=function(e){V(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=aF.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=bF(t).from,a=bF(t).to;i.each(function(t){TF(i,t,!0,e,n),TF(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 Xj);this.group.add(c.group);var l=DF(i,e,t),u=l.from,d=l.to,f=l.line;bF(t).from=u,bF(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);K(p)||(p=[p,p]),K(m)||(m=[m,m]),K(h)||(h=[h,h]),K(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){Cl(e).dataModel=t,e.traverse(function(e){Cl(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);TF(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=BD(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}(_F);function DF(e,t,n){var r=e?G(e&&e.dimensions,function(e){var n=t.getData();return H(H({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new yh(r,n),a=new yh(r,n),o=new yh([],n),s=G(n.get(`data`),$e(xF,t,e,n));e&&(s=Je(s,$e(wF,e)));var c=mF(!!e,r);return i.initData(G(s,function(e){return e[0]}),null,c),a.initData(G(s,function(e){return e[1]}),null,c),o.initData(G(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function OF(e){e.registerComponentModel(yF),e.registerComponentView(EF),e.registerPreprocessor(function(e){nF(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var kF=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`])}},AF=function(e){V(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`]),K(t)&&W(t,function(e,r){J(e)&&(e={type:e}),t[r]=Ve(e,kF(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&&Uc(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=xt(),a=G(r,function(e){return(J(e)||tt(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new Hp(e,this,this.ecModel))},this);this._data=Je(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;W(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;W(e,function(e){t[e.get(`name`,!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;W(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])&&U(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}(F_),jF=$e,MF=W,NF=dd,PF=function(e){V(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 NF),this.group.add(this._selectorGroup=new NF),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=k_(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=D_(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=D_(Ue({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=bP(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=xt(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),MF(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
|
|
17
|
+
`)){var p=new NF;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`,jF(LF,f,null,r,d)).on(`mouseover`,jF(RF,m.name,null,r,d)).on(`mouseout`,jF(zF,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Cl(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`),_=Ii(h.fill);_&&_[3]===0&&(_[3]=.2,h=H(H({},h),{fill:Hi(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,jF(LF,null,f,r,d)).on(`mouseover`,jF(RF,null,f,r,d)).on(`mouseout`,jF(zF,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Cl(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};Cl(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();MF(e,function(e){var r=e.type,i=new ys({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),yp(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),Au(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=FF(c,r,o,s,d,m,u),y=new NF,b=r.getModel(`textStyle`);if(q(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(IF({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??``):q(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new ys({style:xp(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new ms({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&tp({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),Au(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();C_(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){C_(`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}(rD);function FF(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),MF(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:RO(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 IF(e){var t=e.icon||`roundRect`,n=$v(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 LF(e,t,n,r){zF(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),RF(e,t,n,r)}function RF(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function zF(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function BF(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),VF(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){W(i,function(t,n){e[t?`select`:`unSelect`](n)}),VF(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function VF(e,t){var n=t||{};return W(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 HF(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,$e(BF,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,$e(BF,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,$e(BF,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,$e(BF,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,$e(BF,`unSelect`))}var UF=Sl(WF);function WF(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 GF(e){e.registerComponentModel(AF),e.registerComponentView(PF),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,UF),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),HF(e)}var KF=function(e){V(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=M_(t);e.prototype.init.call(this,t,n,r),qF(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),qF(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=Yh(AF.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}(AF);function qF(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,j_(t,n,{type:`box`,ignoreSize:!!i})}var JF=dd,YF=[`width`,`height`],XF=[`x`,`y`],ZF=function(e){V(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 JF),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new JF)},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=K(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new ys({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=qf(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:Qe(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=YF[s],l=XF[s],u=YF[1-s],d=XF[1-s];i&&C_(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=Be(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;C_(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),C_(`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 ms({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&&hf(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;W([`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=YF[i],o=XF[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}(PF);function QF(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 $F(e){wA(GF),e.registerComponentModel(KF),e.registerComponentView(ZF),QF(e)}function eI(e){wA(GF),wA($F)}var tI={label:{enabled:!0},decal:{show:!1}},nI=Jc(),rI=Jc(),iI=Sl(aI);function aI(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=rI(e).scope||(rI(e).scope={}),i=Be(tI);Ve(i.label,e.getLocaleModel().get(`aria`),!1),Ve(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=xt();e.eachSeries(function(e){e.isColorBySeries()||(nI(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(q(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=B_(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=nI(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=B_(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?H(H({},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=Ue(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?Je(i.getValues(_),function(e,t){return U(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 W(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 oI(e){if(!(!e||!e.aria)){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},W([`description`,`general`,`series`,`data`],function(e){t[e]!=null&&(t.label[e]=t[e])})}}function sI(e){e.registerPreprocessor(oI),e.registerVisual(e.PRIORITY.VISUAL.ARIA,iI)}function cI(e,t,n){var r=we.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 lI(e){return!e.__cursors.get(0)}function uI(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var dI=function(e){V(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||=ya,typeof t==`string`?a=cI(t,n,r):Y(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(wt(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=uI(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=cI(`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 Hn(0,0,0,0);function c(e){if(!(!e.isFinite()||e.isZero())){if(i.length===0){var t=new Hn(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 Hn(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 Hn(0,0,0,0);t.copy(e),i.push(t)}o||=i.length>=a}}}for(var l=uI(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;at(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||tO(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):ot(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=pO(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&&W(n,function(e){f(e.x*l,e.y*l,e.width*l,e.height*l)})},t}(_a),fI=1e5,pI=314159,mI=void 0,hI=1,gI=2;function _I(e){return e?e.__builtin__?!0:typeof e.resize==`function`&&typeof e.refresh==`function`:!1}function vI(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 yI(e,t,n,r){var i=new dI(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,bI(i),i}function bI(e){e.__cursorStack=[],e.__cursors=xt()}function xI(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function SI(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,xI({key:r})))}function CI(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function wI(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function TI(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&EI)||s.__builtin__)&&(!(n&DI)||!s.__builtin__)&&(!(n&OI)||s!==e.hoverlayer))&&t(s,a,o,i)}}var EI=1,DI=2,OI=4,kI=EI|OI,AI=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=H({},n||{}),this.dpr=n.devicePixelRatio||ya,this._singleCanvas=i,this.root=e,e.style&&(wt(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=yI(a,this,pI,0);c.initContext(),this._insertLayer(c,pI,0,!0),this._domRoot=e}else{this._width=iO(e,0,n),this._height=iO(e,1,n);var l=this._domRoot=vI(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=gI),!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 TI(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},DI),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=mI,n!==mI&&(!t&&n===gI&&(t=this._i.hoverlayer=this._ensureLayer(fI)),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),MO(i,s,r),c&&(s.style=l)}}i&&(NO(i,r),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(fI)},e.prototype.paintOne=function(e,t){jO(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)TI(this._i,function(e){e.afterBrush&&e.afterBrush()},kI),this._paintHoverList(e);else{var i=this;jT(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(pI).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),TI(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},EI)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return TI(this._i,function(i){var a=!1;if(CI(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),!(!a&&!i.__dirty)){var o=n._opts.useDirtyRect&&!lI(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)}CI(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},kI),Ot.wxa&&TI(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=lI(e),c=s&&we.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=gI),r!=null){var p=f.getPaintRect();p&&p.intersect(r)&&(MO(o,f,a),f.setPrevPaintRect(p))}else MO(o,f,a);if(s&&we.getTime()-c>15){d++;break}}}NO(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=pI,t=0);var i=wI(this._i,e)[t];return i||(i=yI(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&Ve(i,this._layerConfig[e],!0),(n||r&&e!==pI)&&(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])&&_I(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=wI(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),wI(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 TI(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return TI(this._i,function(n,r){e.call(t,n,r)},EI)},e.prototype.eachOtherLayer=function(e,t){return TI(this._i,function(n,r){e.call(t,n,r)},DI)},e.prototype.getLayers=function(){var e={};return TI(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}}TI(n._i,function(e){e.__dirty=!1,CI(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},kI);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__)){ze(`ZLevel `+d+` has been used by unknown layer `+o.id);continue}if((!s||f!==s.key)&&(s=SI(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))}TI(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;(lI(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&&(CI(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===mI&&(n._hoverLayerDirty=hI))},kI)},e.prototype.clear=function(){return TI(this._i,function(e){e.clear(),bI(e)},EI),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,TI(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?Ve(n[e],t,!0):n[e]=t,TI(this._i,function(e,t){Ve(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=iO(i,0,r),t=iO(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,TI(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(pI).resize(e,t)}return this},e.prototype.clearLayer=function(e){W(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[pI][0].dom;var t=new dI(`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;TI(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];MO(n,l,a)}NO(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function jI(e){e.registerPainter(`canvas`,AI)}function MI(e,t,n,r,i,a){return e.flatMap(e=>{let o=t===`tokens`?e.recordedTokens:e.retailEquivalent.amount,s=t===`tokens`?e.tokenShare:e.retailShare;return e.includedInHeadline===!1||o===null||s===null||o<=0||s<=0?[]:[{key:`${e.providerId}:${e.billingDomainId}`,name:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,value:o,share:s,color:n(e.providerId,e.billingDomainId),formattedValue:r(o),formattedShare:i(s),formattedEvidence:a(e,t)}]})}function NI(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=>II(FI(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=>II(PI(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 PI(e){if(!e||typeof e!=`object`||!(`data`in e))return null;let t=e.data;return!t||typeof t!=`object`?null:t}function FI(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 II(e,t,n){return e?[`<strong>${LI(e.name)}</strong>`,`<span style="color:${LI(t.muted)}">${LI(e.billingDomainDisplayName)}</span>`,`<span>${LI(e.formattedValue)} · ${LI(e.formattedShare)}</span>`,`<span style="color:${LI(t.muted)}">${LI(e.formattedEvidence)}</span>`].join(`<br>`):n}function LI(e){return e.replace(/[&<>'"]/g,e=>({"&":`&`,"<":`<`,">":`>`,"'":`'`,'"':`"`})[e]??e)}var RI=2.5,zI=[10,7],BI=`rgba(122, 136, 164, 0.16)`,VI=`#697386`,HI=`Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,UI={codex:`#78a7ff`,"claude-code":`#d69b73`,opencode:`#55c89d`,"opencode-go":`#73d4b2`,"grok:grok-build-subscription":`#b28cff`,"grok:xai-api":`#f07f9a`};function WI(e,t){return UI[`${e}:${t}`]??UI[e]??`#9aa5b8`}function GI(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 KI(e,t,n,r,i=.5){if(e<=1)return{start:t,size:n};let a=GI(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 qI(e,t,n,r){let i=GI(e,t,n);return Math.max(0,Math.min(e-i.size,i.start+r))}function JI(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 YI(e,t,n){return e?t===`tokens`?e.recordedTokens:n===`reported-estimate`?e.reportedEstimate?.amount??null:e.retailEquivalent.amount:null}function XI(e,t){return JI(e,t).map(n=>({...n,key:`${n.providerId}:${n.billingDomainId}:${n.costPurpose??`tokens`}`,values:e.map(e=>e.gap?null:YI(e.segments.find(e=>e.providerId===n.providerId&&e.billingDomainId===n.billingDomainId),t,n.costPurpose))}))}function ZI(e){let t=e.flatMap(e=>e.values.filter(e=>e!==null));return t.length>0?Math.max(...t):null}function QI(e,t){return e[t]!=null&&e[t-1]==null&&e[t+1]==null}function $I(e,t){return t<=1?50:Math.max(8,Math.min(92,e/(t-1)*100))}function eL(e){let t=WI(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)=>QI(e.values,n)),symbol:`circle`,symbolSize:(t,n)=>QI(e.values,n.dataIndex)?8:0,lineStyle:{width:RI,color:t,type:n?zI:`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 tL(e,t,n,r,i,a=e=>String(e)){let o=Math.max(1,n??0),s={color:r.label,fontFamily:HI,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(eL)}}var nL=h(`<tr><td> </td><td> </td><td> </td><td> </td></tr>`),rL=h(`<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><th> </th></tr></thead><tbody></tbody></table></div></div>`);function iL(e,n){p(n,!1);let r=v(),o=v();wA([Hw,eI,QP,tF,sI,jI]);let c=b(n,`providers`,8),u=b(n,`metric`,8),h=b(n,`currency`,8),x=b(n,`locale`,24,()=>he(``)),w=b(n,`formatUsageMetric`,8),T=b(n,`formatPercent`,8),E=b(n,`displayAuthorities`,8),D=b(n,`formatReset`,8),A=v(null),j=v(null),M=v(null),N=null,ee=null,F=v({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`});function I(e){return ge(x(),e)}function ne(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function re(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 R(){let e=k(j)??k(A);e&&a(F,{text:re(e,`--text-strong`,k(F).text),muted:re(e,`--muted`,k(F).muted),surface:re(e,`--surface-subtle`,k(F).surface),border:re(e,`--border`,k(F).border)})}async function ae(e){k(M)&&(k(M).setOption(e,{notMerge:!0,lazyUpdate:!1}),await O(),k(M).resize())}te(()=>{if(k(A))return R(),a(M,iA(k(A),void 0,{renderer:`canvas`,useDirtyRect:!0})),k(M).getDom().setAttribute(`aria-hidden`,`true`),N=new ResizeObserver(()=>k(M)?.resize()),N.observe(k(A)),ee=window.matchMedia(`(prefers-color-scheme: dark)`),ee.addEventListener(`change`,R),()=>{ee?.removeEventListener(`change`,R),ee=null,N?.disconnect(),N=null,k(M)?.dispose(),a(M,null)}}),f(()=>(d(c()),d(u()),d(w()),d(h()),d(T()),d(E()),d(D())),()=>{a(r,MI(c(),u(),WI,e=>w()(e,h(),u()),T(),(e,t)=>{let n=t===`tokens`?e.authorities:e.retailEquivalent.authorities,r=t===`tokens`?e.lastObservedAt:e.retailEquivalent.observedAt;return`${I(`source`)}: ${E()(n)} · ${D()(r)}`}))}),f(()=>(k(r),k(F)),()=>{a(o,NI(k(r),k(F),I(`notAvailable`),!ne()))}),f(()=>(k(M),k(o)),()=>{k(M)&&ae(k(o))}),i(),P();var oe=rL(),z=_(oe);S(z,e=>a(A,e),()=>k(A));var B=g(z,2),se=_(B),ce=_(se),le=_(ce),ue=_(le),de=_(ue,!0);L(ue);var fe=g(ue),pe=_(fe,!0);L(fe);var me=g(fe),_e=_(me,!0);L(me);var V=g(me),ve=_(V,!0);L(V),L(le),L(ce);var ye=g(ce);ie(ye,5,()=>k(r),e=>e.key,(e,n)=>{var r=nL(),i=_(r),a=_(i);L(i);var o=g(i),c=_(o,!0);L(o);var u=g(o),d=_(u,!0);L(u);var f=g(u),p=_(f,!0);L(f),L(r),s(()=>{m(a,`${k(n),l(()=>k(n).name)??``} · ${k(n),l(()=>k(n).billingDomainDisplayName)??``}`),m(c,(k(n),l(()=>k(n).formattedValue))),m(d,(k(n),l(()=>k(n).formattedShare))),m(p,(k(n),l(()=>k(n).formattedEvidence)))}),t(e,r)}),L(ye),L(se),L(B),L(oe),S(oe,e=>a(j,e),()=>k(j)),s((e,t,n,r,i)=>{C(se,`aria-label`,e),m(de,t),m(pe,n),m(_e,r),m(ve,i)},[()=>l(()=>I(`providerShare`)),()=>l(()=>I(`providersLabel`)),()=>(d(u()),l(()=>u()===`tokens`?I(`tokens`):I(`cost`))),()=>(d(u()),l(()=>u()===`tokens`?I(`tokenShare`):I(`costShare`))),()=>l(()=>I(`providerEvidence`))]),t(e,oe),y()}var aL=6e4,oL=300,sL=1440,cL=20160;function lL(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 oL;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 uL(e,t,n,r,i=`UTC`){let a=dL(t,n,r,i),o=e.flatMap(e=>{let n=gL(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=>vL(e,a,r)),nowMs:r}}function dL(e,t,n,r=`UTC`){let i=fL(n,r);if(e===`session`){let e=pL(i,t),n=pL(e,3);return{startMs:mL(e,r),endMs:mL(n,r)}}let a=pL(i,-new Date(Date.UTC(i.year,i.month-1,i.day)).getUTCDay()+t*7),o=pL(a,14);return{startMs:mL(a,r),endMs:mL(o,r)}}function fL(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 pL(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 mL(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=hL(r,t),i=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second);r+=n-i}return r}function hL(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 gL(e,t){return e.quotaBuckets.flatMap(e=>{let n=lL(e),r=e.resetsAt?Date.parse(e.resetsAt):NaN;return!n||!Number.isFinite(r)||t===`session`&&n!==oL||t===`weekly`&&(n<sL||n>cL)?[]:[{bucket:e,durationMinutes:n}]}).sort((e,t)=>{let n=t.durationMinutes-e.durationMinutes;if(n!==0)return n;let r=_L(e.bucket)-_L(t.bucket);return r===0?e.bucket.id.localeCompare(t.bucket.id):r})[0]??null}function _L(e){let t=e.label.toLowerCase();return/all models|^week$|^weekly limit$/.test(t)?0:/fable|spark|model/.test(t)?2:1}function vL(e,t,n){let r=Date.parse(e.resetsAt),i=e.durationMinutes*aL;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 yL=h(`<p class="quota-timeline-empty svelte-1oyi7sq" role="status"> </p>`),bL=h(`<div class="quota-timeline-scroll svelte-1oyi7sq"><div class="quota-timeline-chart svelte-1oyi7sq"></div></div>`),xL=h(`<tr><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>`),SL=h(`<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-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 CL(e,r){p(r,!1);let c=v(),u=v(),h=v(),x=v(),w=v(),T=`agent-usage:theme-changed`;wA([wN,yP,OF,QP,sI,jI]);let E=b(r,`providers`,8),D=b(r,`locale`,24,()=>he(``)),A=b(r,`timeZone`,8,`UTC`),M=b(r,`now`,24,()=>Date.now()),N=v(null),ee=v(null),F=v(null),I=null,ne=v(`weekly`),ae=v(0),oe=v({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`,grid:`rgba(122, 136, 164, 0.16)`});function z(e){return ge(D(),e)}function B(e,t){let n=new Intl.DateTimeFormat(D(),{month:`2-digit`,day:`2-digit`,timeZone:A()});return`${n.format(e)} – ${n.format(t-1)}`}function se(e){return new Intl.DateTimeFormat(D(),{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1,timeZone:A()}).format(e)}function ce(e){return new Intl.DateTimeFormat(D(),{month:`2-digit`,day:`2-digit`,...k(ne)===`session`?{hour:`2-digit`}:{},hour12:!1,timeZone:A()}).format(e)}function le(e){return z({elapsed:`quotaTimelineElapsed`,current:`quotaTimelineCurrent`,upcoming:`quotaTimelineUpcoming`}[e])}function ue(e){return z({"official-account":`authorityOfficialAccount`,"official-client":`authorityOfficialClient`,"local-observation":`authorityLocalObservation`,estimate:`authorityEstimate`,unavailable:`authorityUnavailable`}[e])}function de(e){a(ne,e),a(ae,0)}function fe(e){return e===`current`?.34:e===`upcoming`?.12:.08}function pe(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:WI(t.providerId,e.lanes[n].billingDomainId)}}),s=a>=e.range.startMs&&a<e.range.endMs;return{animation:!ye(),animationDuration:ye()?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=me(e);if(!t)return``;let n=t.usedPercent===null?``:`<br/><strong>${_e(t.usedPercent)}% ${ve(z(`used`))}</strong>`,r=t.observedAt?se(Date.parse(t.observedAt)):`—`;return`<strong>${ve(t.providerDisplayName)}</strong> · ${ve(t.billingDomainDisplayName)}<br/>${ve(t.label)} · ${ve(le(t.state))}<br/>${ve(se(t.startMs))} → ${ve(se(t.endMs))}${n}<br/>${ve(z(`source`))}: ${ve(ue(t.authority))} · ${ve(z(`updated`))}: ${ve(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:ce},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?WI(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:z(`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:V(u.color,fe(u.window.state)),stroke:V(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:V(u.color,.58)}}),l>86&&u.window.state===`current`&&d.push({type:`text`,style:{x:a[0]+8,y:a[1],text:`${_e(u.window.usedPercent)}% · ${se(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 me(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 _e(e){return e===null?`—`:new Intl.NumberFormat(D(),{maximumFractionDigits:1}).format(e)}function V(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 ve(e){return e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`).replaceAll(`'`,`'`)}function ye(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function be(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 xe(){let e=k(ee)??k(N);e&&a(oe,{text:be(e,`--text-strong`,k(oe).text),muted:be(e,`--muted`,k(oe).muted),surface:be(e,`--surface-subtle`,k(oe).surface),border:be(e,`--border`,k(oe).border),grid:be(e,`--border-soft`,k(oe).grid)})}async function Se(){k(F)&&(k(F).setOption(k(w),{notMerge:!0,lazyUpdate:!1}),await O(),k(F).resize())}te(()=>{if(k(N))return xe(),a(F,iA(k(N),void 0,{renderer:`canvas`,useDirtyRect:!0})),k(F).getDom().setAttribute(`aria-hidden`,`true`),I=new ResizeObserver(()=>k(F)?.resize()),I.observe(k(N)),window.addEventListener(T,xe),()=>{window.removeEventListener(T,xe),I?.disconnect(),I=null,k(F)?.dispose(),a(F,null)}}),f(()=>(d(E()),d(M()),d(A())),()=>{a(c,uL(E(),`weekly`,0,M(),A()))}),f(()=>(d(E()),k(ne),k(ae),d(M()),d(A())),()=>{a(u,uL(E(),k(ne),k(ae),M(),A()))}),f(()=>k(u),()=>{a(h,B(k(u).range.startMs,k(u).range.endMs))}),f(()=>k(u),()=>{a(x,Math.max(188,70+k(u).lanes.length*48))}),f(()=>(k(u),k(oe),d(D()),d(A()),k(ne),d(M())),()=>{a(w,pe(k(u),k(oe),D(),A(),k(ne),M()))}),f(()=>k(F),()=>{k(F)&&Se()}),i(),P();var Ce=re(),we=o(Ce),Te=e=>{var r=SL(),i=_(r),o=_(i),c=_(o),d=_(c,!0);L(c);var f=g(c,2),p=_(f);L(f),L(o);var v=g(o,2),y=_(v),b=_(y),w=g(b,2),T=_(w,!0);L(w);var E=g(w,2);L(y);var D=g(y,2),O=_(D),A=_(O,!0);L(O);var M=g(O,2),P=_(M,!0);L(M),L(D),L(v),L(i);var F=g(i,2),te=e=>{var n=yL(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>z(`quotaTimelineEmpty`))]),t(e,n)},I=e=>{var n=bL(),r=_(n);S(r,e=>a(N,e),()=>k(N)),L(n),s(()=>j(r,`height: ${k(x)}px`)),t(e,n)};R(F,e=>{k(u),l(()=>k(u).lanes.length===0)?e(te):e(I,-1)});var re=g(F,2),oe=_(re),B=_(oe),ce=_(B),le=_(ce),fe=_(le,!0);L(le);var pe=g(le),me=_(pe,!0);L(pe);var he=g(pe),ge=_(he,!0);L(he);var V=g(he),ve=_(V,!0);L(V);var ye=g(V),be=_(ye,!0);L(ye);var xe=g(ye),Se=_(xe,!0);L(xe);var Ce=g(xe),we=_(Ce,!0);L(Ce),L(ce),L(B);var Te=g(B);ie(Te,5,()=>(k(u),l(()=>k(u).lanes)),e=>e.id,(e,n)=>{var r=xL(),i=_(r),a=_(i,!0);L(i);var o=g(i),c=_(o,!0);L(o);var u=g(o),d=_(u,!0);L(u);var f=g(u),p=_(f,!0);L(f);var h=g(f),v=_(h,!0);L(h);var y=g(h),b=_(y,!0);L(y);var x=g(y),S=_(x,!0);L(x),L(r),s((e,t,r,i)=>{m(a,(k(n),l(()=>k(n).providerDisplayName))),m(c,(k(n),l(()=>k(n).billingDomainDisplayName))),m(d,(k(n),l(()=>k(n).selectedLabel))),m(p,e),m(v,t),m(b,r),m(S,i)},[()=>(k(n),l(()=>k(n).usedPercent===null?`—`:`${_e(k(n).usedPercent)}%`)),()=>(k(n),l(()=>se(Date.parse(k(n).resetsAt)))),()=>(k(n),l(()=>ue(k(n).authority))),()=>(k(n),l(()=>k(n).observedAt?se(Date.parse(k(n).observedAt)):`—`))]),t(e,r)}),L(Te),L(oe),L(re),L(r),S(r,e=>a(ee,e),()=>k(ee)),s((e,t,n,i,a,o,s,c,f,g,_,v,y,x,S,j,N)=>{C(r,`data-lane-count`,(k(u),l(()=>k(u).lanes.length))),m(d,e),m(p,`${k(h)??``} · ${t??``}`),C(b,`aria-label`,n),w.disabled=k(ae)===0,C(w,`aria-label`,i),m(T,a),C(E,`aria-label`,o),C(D,`aria-label`,s),C(O,`aria-pressed`,k(ne)===`weekly`),m(A,c),C(M,`aria-pressed`,k(ne)===`session`),m(P,f),C(oe,`aria-label`,g),m(fe,_),m(me,v),m(ge,y),m(ve,x),m(be,S),m(Se,j),m(we,N)},[()=>l(()=>z(`quotaTimelineTitle`)),()=>l(()=>z(`quotaTimelineCurrentRange`)),()=>l(()=>z(`quotaTimelinePrevious`)),()=>l(()=>z(`quotaTimelineToday`)),()=>l(()=>z(`quotaTimelineToday`)),()=>l(()=>z(`quotaTimelineNext`)),()=>l(()=>z(`quotaTimelineModes`)),()=>l(()=>z(`quotaTimelineWeekly`)),()=>l(()=>z(`quotaTimelineFiveHour`)),()=>l(()=>z(`quotaTimelineData`)),()=>l(()=>z(`providersLabel`)),()=>l(()=>z(`quotaTimelineAccount`)),()=>l(()=>z(`quota`)),()=>l(()=>z(`used`)),()=>l(()=>z(`resets`)),()=>l(()=>z(`source`)),()=>l(()=>z(`updated`))]),n(`click`,b,()=>a(ae,k(ae)-1)),n(`click`,w,()=>a(ae,0)),n(`click`,E,()=>a(ae,k(ae)+1)),n(`click`,O,()=>de(`weekly`)),n(`click`,M,()=>de(`session`)),t(e,r)};R(we,e=>{k(c),l(()=>k(c).lanes.length>0)&&e(Te)}),t(e,Ce),y()}var wL=h(`<span></span>`),TL=h(`<div class="trend-hover-line svelte-1axsv0d"></div>`),EL=h(`<span class="svelte-1axsv0d"> </span>`),DL=h(`<span class="svelte-1axsv0d"><b class="svelte-1axsv0d"> </b> <small class="svelte-1axsv0d"> </small></span>`),OL=h(`<div class="trend-tooltip svelte-1axsv0d" data-testid="trend-tooltip" role="tooltip"><strong class="svelte-1axsv0d"> </strong> <!></div>`),kL=h(`<span class="svelte-1axsv0d"><i class="svelte-1axsv0d"></i> <!> <!></span>`),AL=h(`<tr><td> </td><td> </td></tr>`),jL=h(`<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 ML(e,c){p(c,!1);let u=v(),h=v(),x=v(),w=v(),T=v(),E=v();wA([Ax,yP,jI]);let A=b(c,`buckets`,8),M=b(c,`metric`,8),N=b(c,`currency`,8),ee=b(c,`locale`,24,()=>he(``)),F=b(c,`selectedWindow`,8),ne=b(c,`timeZone`,8),ae=b(c,`granularity`,8),oe=b(c,`rangeLabel`,8),z=b(c,`formatUsageMetric`,8),B=b(c,`describeSegment`,8),se=v(null),ce=v(null),le=v(null),ue=null,de=null,fe=v(0),pe=v(null),me=v(null),_e=v(null),V=v(!1),ve=v(BI),ye=v(VI);function be(e){return ge(ee(),e)}function xe(){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=k(ce)??k(se);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):``;a(ve,r&&r!==`rgba(0, 0, 0, 0)`?r:BI),a(ye,i&&i!==`rgba(0, 0, 0, 0)`?i:VI)}function we(e){if(k(le)){let t=k(le).convertToPixel({xAxisIndex:0},e),n=k(le).convertToPixel({yAxisIndex:0},Math.max(1,k(w)??1)),r=k(le).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: ${$I(e,k(h).length)}%; top: 16px; bottom: 28px`}function Te(){a(fe,0),a(pe,null),a(me,null),a(_e,null),a(V,!1)}function Ee(e,t=.5){let n=KI(A().length,k(fe),k(pe),e,t);a(fe,n.start),a(pe,n.size),a(me,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)||k(h).length===0)return;let t=e.currentTarget.getBoundingClientRect(),n=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width));a(me,Math.round(n*Math.max(0,k(h).length-1)))}function ke(e){!(e.currentTarget instanceof HTMLElement)||k(u).size>=A().length||(e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),a(_e,{clientX:e.clientX,viewportStart:k(u).start}),a(V,!0))}function Ae(e){if(Oe(e),!k(_e)||!(e.currentTarget instanceof HTMLElement))return;let t=e.currentTarget.getBoundingClientRect(),n=Math.round((k(_e).clientX-e.clientX)/t.width*k(u).size);a(fe,Math.max(0,Math.min(A().length-k(u).size,k(_e).viewportStart+n)))}function je(e){e.currentTarget instanceof HTMLElement&&e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),a(_e,null),a(V,!1)}function Me(e){a(fe,qI(A().length,k(fe),k(pe),e)),a(me,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){k(le)&&(k(le).setOption(e,{notMerge:!0,lazyUpdate:!1}),await O(),k(le).resize())}te(()=>{if(k(se))return Ce(),a(le,iA(k(se),void 0,{renderer:`canvas`,useDirtyRect:!0})),k(le).getDom().setAttribute(`aria-hidden`,`true`),ue=new ResizeObserver(()=>k(le)?.resize()),ue.observe(k(se)),de=window.matchMedia(`(prefers-color-scheme: dark)`),de.addEventListener(`change`,Ce),()=>{de?.removeEventListener(`change`,Ce),de=null,ue?.disconnect(),ue=null,k(le)?.dispose(),a(le,null)}}),f(()=>(d(A()),k(fe),k(pe)),()=>{a(u,GI(A().length,k(fe),k(pe)))}),f(()=>(d(A()),k(u)),()=>{a(h,A().slice(k(u).start,k(u).start+k(u).size))}),f(()=>(k(h),d(M())),()=>{a(x,XI(k(h),M()))}),f(()=>k(x),()=>{a(w,ZI(k(x)))}),f(()=>(k(me),k(h)),()=>{a(T,k(me)===null?null:k(h)[k(me)])}),f(()=>(k(h),k(x),k(w),k(ve),k(ye),k(V),d(z()),d(N()),d(M())),()=>{a(E,tL(k(h).map(e=>e.label),k(x),k(w),{gridLine:k(ve),label:k(ye)},!k(V)&&!xe(),e=>z()(e,N(),M())))}),f(()=>(k(le),k(E)),()=>{k(le)&&Pe(k(E))}),i(),P();var Fe=jL(),Ie=_(Fe),Le=_(Ie),Re=_(Le),ze=_(Re,!0);L(Re);var Be=g(Re,2),Ve=_(Be,!0);L(Be),L(Le);var H=g(Le,2),He=_(H),Ue=_(He,!0);L(He);var U=g(He,2),We=_(U),Ge=g(We,2),Ke=g(Ge,2);L(U),L(H),L(Ie);var W=g(Ie,2),G=_(W);let qe;var Je=_(G);S(Je,e=>a(se,e),()=>k(se));var Ye=g(Je,2);ie(Ye,5,()=>k(x),e=>e.key,(e,n)=>{var r=wL();s(e=>{C(r,`data-cost-purpose`,(k(n),l(()=>k(n).costPurpose??`tokens`))),j(r,e)},[()=>(k(n),d(WI),l(()=>k(n).costPurpose===`reported-estimate`?`fill: transparent; stroke: ${WI(k(n).providerId,k(n).billingDomainId)}`:`fill: ${WI(k(n).providerId,k(n).billingDomainId)}`))]),t(e,r)}),L(Ye);var Xe=g(Ye,2),Ze=e=>{var n=TL();s(e=>j(n,e),[()=>(k(me),l(()=>we(k(me))))]),t(e,n)};R(Xe,e=>{k(me),k(h),l(()=>k(me)!==null&&k(h).length>0)&&e(Ze)});var Qe=g(Xe,2),$e=e=>{var n=OL(),r=_(n),i=_(r,!0);L(r);var a=g(r,2),c=e=>{var n=EL(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>be(`gap`))]),t(e,n)},u=e=>{var n=re(),r=o(n);ie(r,1,()=>(k(T),l(()=>k(T).segments)),e=>`${e.providerId}:${e.billingDomainId}`,(e,n)=>{var r=DL(),i=_(r),a=_(i,!0);L(i);var o=g(i,2),c=_(o,!0);L(o),L(r),s(e=>{m(a,(k(n),l(()=>k(n).providerDisplayName))),m(c,e)},[()=>(d(B()),k(n),d(M()),l(()=>B()(k(n),M())))]),t(e,r)}),t(e,n)};R(a,e=>{k(T),l(()=>k(T).gap||k(T).segments.length===0)?e(c):e(u,-1)}),L(n),s(e=>{j(n,e),m(i,(k(T),l(()=>k(T).label)))},[()=>(d($I),k(me),k(h),l(()=>`left: ${$I(k(me)??0,k(h).length)}%`))]),t(e,n)};R(Qe,e=>{k(T)&&e($e)}),L(G),L(W);var K=g(W,2);ie(K,5,()=>k(x),e=>e.key,(e,n)=>{var i=kL(),a=_(i),o=g(a),c=g(o),u=e=>{var i=r();s(e=>m(i,`· ${e??``}`),[()=>(k(n),l(()=>k(n).costPurpose===`reported-estimate`?be(`providerReportedEstimate`):be(`apiRetailEquivalent`)))]),t(e,i)};R(c,e=>{k(n),l(()=>k(n).costPurpose)&&e(u)});var f=g(c,2),p=e=>{var n=r();s(e=>m(n,`· ${e??``}`),[()=>l(()=>be(`separateFromHeadline`))]),t(e,n)};R(f,e=>{k(n),l(()=>k(n).includedInHeadline===!1)&&e(p)}),L(i),s(e=>{j(a,e),m(o,` ${k(n),l(()=>k(n).providerDisplayName)??``} · ${k(n),l(()=>k(n).billingDomainDisplayName)??``} `)},[()=>(k(n),d(WI),l(()=>k(n).costPurpose===`reported-estimate`?`background: repeating-linear-gradient(90deg, ${WI(k(n).providerId,k(n).billingDomainId)} 0 5px, transparent 5px 9px)`:`background: ${WI(k(n).providerId,k(n).billingDomainId)}`))]),t(e,i)}),L(K);var q=g(K,2),J=_(q),et=_(J),tt=_(et),Y=_(tt),nt=_(Y,!0);L(Y);var rt=g(Y),it=_(rt,!0);L(rt),L(tt),L(et);var at=g(et);ie(at,5,A,e=>e.start,(e,n)=>{var r=AL(),i=_(r),a=_(i,!0);L(i);var o=g(i),c=_(o,!0);L(o),L(r),s(e=>{m(a,(k(n),l(()=>k(n).label))),m(c,e)},[()=>(k(n),d(B()),d(M()),l(()=>k(n).gap?be(`gap`):k(n).segments.map(e=>B()(e,M())).join(`; `)))]),t(e,r)}),L(at),L(J),L(q),L(Fe),S(Fe,e=>a(ce,e),()=>k(ce)),s((e,t,n,r,i,a,o,s,c,f,p,h,g)=>{m(ze,e),m(Ve,oe()),m(Ue,t),C(U,`aria-label`,n),C(We,`aria-label`,r),We.disabled=k(pe)===null,C(Ge,`aria-label`,i),Ge.disabled=a,C(Ke,`aria-label`,o),Ke.disabled=k(pe)===null&&k(fe)===0,qe=D(G,1,`trend-plot svelte-1axsv0d`,null,qe,{"trend-panning":k(V)}),C(G,`data-total-buckets`,(d(A()),l(()=>A().length))),C(G,`data-visible-buckets`,(k(u),l(()=>k(u).size))),C(G,`data-viewport-start`,(k(u),l(()=>k(u).start))),C(G,`aria-label`,s),C(G,`aria-valuemax`,c),C(G,`aria-valuenow`,(k(u),l(()=>k(u).start))),C(G,`aria-valuetext`,f),C(J,`aria-label`,p),m(nt,h),m(it,g)},[()=>(d(M()),l(()=>M()===`tokens`?be(`tokenTrend`):be(`costTrend`))),()=>l(()=>be(`trendInteractionHint`)),()=>l(()=>be(`timeAxisControls`)),()=>l(()=>be(`zoomOutTimeAxis`)),()=>l(()=>be(`zoomInTimeAxis`)),()=>(k(pe),d(A()),d(4),l(()=>(k(pe)??A().length)<=Math.min(4,A().length))),()=>l(()=>be(`resetTimeAxis`)),()=>l(()=>be(`interactiveTrend`)),()=>(d(A()),k(u),l(()=>Math.max(0,A().length-k(u).size))),()=>(k(h),l(()=>`${k(h)[0]?.label??`—`} – ${k(h).at(-1)?.label??`—`}`)),()=>(d(F()),d(ne()),d(ae()),l(()=>`${be(`trendData`)} · ${F()} · ${ne()} · ${ae()===`hour`?be(`precisionHour`):be(`precisionDay`)} · ${be(`trendSummary`)}`)),()=>l(()=>be(`interval`)),()=>l(()=>be(`providerEvidence`))]),n(`click`,We,()=>Ee(`out`)),n(`click`,Ge,()=>Ee(`in`)),n(`click`,Ke,()=>Te()),n(`wheel`,G,I(De)),n(`pointerdown`,G,ke),n(`pointermove`,G,Ae),n(`pointerup`,G,je),n(`pointercancel`,G,je),n(`pointerleave`,G,()=>{k(_e)||a(me,null)}),n(`keydown`,G,Ne),t(e,Fe),y()}var NL=h(`<link rel="icon" href="/brand/agent-usage-logo.svg"/> <meta name="description"/>`,1),PL=h(`<div class="state section-loading svelte-1uha8ag" aria-live="polite"> </div>`),FL=h(`<div class="state error svelte-1uha8ag" role="alert"> </div>`),IL=h(`<div class="inline-error svelte-1uha8ag" role="status"> </div>`),LL=h(`<div class="state compact svelte-1uha8ag"> </div>`),RL=h(`<p class="module-progress svelte-1uha8ag" role="status"> </p>`),zL=h(`<picture class="provider-logo svelte-1uha8ag"><source media="(prefers-color-scheme: light)"/> <source media="(prefers-color-scheme: dark)"/> <img alt="" class="svelte-1uha8ag"/></picture>`),BL=h(`<button type="button" role="tab" class="svelte-1uha8ag"> </button>`),VL=h(`<div class="domain-tabs svelte-1uha8ag" role="tablist"></div>`),HL=h(`<div class="connected-summary svelte-1uha8ag"><span class="svelte-1uha8ag"><strong> </strong> <small class="svelte-1uha8ag"> </small></span> <button class="svelte-1uha8ag"> </button></div>`),UL=h(`<small class="svelte-1uha8ag"> </small>`),WL=h(`<label class="secret-field svelte-1uha8ag"><span> </span> <input type="password" autocomplete="off" class="svelte-1uha8ag"/></label>`),GL=h(`<button class="primary-action svelte-1uha8ag"> </button>`),KL=h(`<button class="svelte-1uha8ag"> </button>`),qL=h(`<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>`),JL=h(`<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>`),YL=h(`<!> <div class="section-label svelte-1uha8ag"> </div> <div class="quotas"></div>`,1),XL=h(`<article class="provider-card svelte-1uha8ag"><div class="provider-heading svelte-1uha8ag"><div class="svelte-1uha8ag"><!> <div><h2 class="svelte-1uha8ag"> </h2> <p class="freshness svelte-1uha8ag"><span class="svelte-1uha8ag"></span> </p></div></div> <div class="coverage svelte-1uha8ag"> </div></div> <!> <!></article>`),ZL=h(`<div id="agent-usage-panel" data-testid="agent-usage-panel" role="tabpanel" aria-labelledby="agent-usage-tab"><!> <section class="providers svelte-1uha8ag"></section> <!></div>`),QL=h(`<button type="button" class="svelte-1uha8ag"> </button>`),$L=h(`<i class="skeleton-block svelte-1uha8ag"></i>`),eR=h(`<i class="skeleton-block skeleton-row svelte-1uha8ag"></i>`),tR=h(`<div class="workbench-skeleton svelte-1uha8ag" data-testid="workbench-skeleton" role="status"><span class="visually-hidden svelte-1uha8ag"> </span> <div class="skeleton-overview svelte-1uha8ag"><div class="skeleton-summary svelte-1uha8ag"><i class="skeleton-block skeleton-headline svelte-1uha8ag"></i> <i class="skeleton-block skeleton-copy svelte-1uha8ag"></i> <i class="skeleton-block skeleton-copy skeleton-copy-short svelte-1uha8ag"></i> <i class="skeleton-block skeleton-provider svelte-1uha8ag"></i> <i class="skeleton-block skeleton-provider svelte-1uha8ag"></i></div> <div class="skeleton-chart svelte-1uha8ag"><i class="skeleton-block skeleton-copy skeleton-copy-short svelte-1uha8ag"></i> <i class="skeleton-block skeleton-graph svelte-1uha8ag"></i></div></div> <div class="skeleton-totals svelte-1uha8ag"></div> <div class="skeleton-ranking svelte-1uha8ag"><i class="skeleton-block skeleton-copy skeleton-copy-short svelte-1uha8ag"></i> <!></div></div>`),nR=h(`<picture class="ranking-logo svelte-1uha8ag"><source media="(prefers-color-scheme: light)"/> <source media="(prefers-color-scheme: dark)"/> <img alt="" class="svelte-1uha8ag"/></picture>`),rR=h(`<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>`),iR=h(`<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> <!> <small class="svelte-1uha8ag"> </small> <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>`),aR=h(`<span class="svelte-1uha8ag"> <!> <b class="svelte-1uha8ag"> </b> <small class="svelte-1uha8ag"> </small> <small class="svelte-1uha8ag"> </small></span>`),oR=h(`<div class="unclassified-usage svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <!></div>`),sR=h(`<ol class="ranking-list svelte-1uha8ag"></ol> <!>`,1),cR=h(`<li data-testid="day-breakdown-row" class="svelte-1uha8ag"><span class="day-identity svelte-1uha8ag"><strong> </strong> <small class="svelte-1uha8ag"> </small> <small class="svelte-1uha8ag"> </small></span> <span class="day-value svelte-1uha8ag"> </span> <span class="day-value svelte-1uha8ag"> </span> <span class="day-value svelte-1uha8ag"> </span></li>`),lR=h(`<ol class="day-breakdown-list svelte-1uha8ag"></ol>`),uR=h(`<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 data-testid="usage-summary-board"><div class="usage-headline svelte-1uha8ag" data-testid="usage-headline"><strong class="svelte-1uha8ag"> </strong> <span data-testid="trend-mode" class="svelte-1uha8ag"> </span> <!></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> <small class="usage-totals-evidence svelte-1uha8ag"> </small></div></section> <div 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 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="group"><button type="button" class="svelte-1uha8ag"> </button> <button type="button" 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>`),dR=h(`<div id="token-model-costs-panel" data-testid="token-model-costs-panel" role="tabpanel" aria-labelledby="token-model-costs-tab"><!> <!></div>`),fR=h(`<!> <!> <!>`,1),pR=h(`<p class="settings-error svelte-1uha8ag" role="status"> </p>`),mR=h(`<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>`),hR=h(`<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>`),gR=h(`<p class="svelte-1uha8ag"> </p>`),_R=h(`<code class="svelte-1uha8ag"> </code>`),vR=h(`<article tabindex="-1"><div class="svelte-1uha8ag"><strong> </strong> <span class="svelte-1uha8ag"> </span></div> <small class="svelte-1uha8ag"> </small> <!> <!></article>`),yR=h(`<div class="diagnostics-grid svelte-1uha8ag"></div>`),bR=h(`<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 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>`),xR=h(`<article class="svelte-1uha8ag"><strong> </strong> <span class="svelte-1uha8ag"> </span> <small class="svelte-1uha8ag"> </small> <small class="svelte-1uha8ag"> </small> <small class="svelte-1uha8ag"> </small> <small class="svelte-1uha8ag"> </small> <small class="svelte-1uha8ag"> </small> <small class="svelte-1uha8ag"> </small> <small class="svelte-1uha8ag"> </small></article>`),SR=h(`<p class="model-evidence-empty svelte-1uha8ag"> </p>`),CR=h(`<p class="svelte-1uha8ag"> <small class="svelte-1uha8ag"> </small></p>`),wR=h(`<article class="model-price-evidence svelte-1uha8ag"><div class="svelte-1uha8ag"><strong> </strong> <span class="svelte-1uha8ag"> </span></div> <!> <!> <!></article>`),TR=h(`<td colspan="3" class="svelte-1uha8ag"> </td>`),ER=h(`<br/> `,1),DR=h(`<td class="svelte-1uha8ag"> </td> <td class="svelte-1uha8ag"> </td> <td class="svelte-1uha8ag"> <!></td>`,1),OR=h(`<tr><td class="svelte-1uha8ag"> </td><!></tr>`),kR=h(`<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"><span class="svelte-1uha8ag"> <b class="svelte-1uha8ag"> </b></span> <span class="svelte-1uha8ag"> <b class="svelte-1uha8ag"> <!></b></span> <span class="svelte-1uha8ag"> <b class="svelte-1uha8ag"> </b></span> <span class="svelte-1uha8ag"> <b class="svelte-1uha8ag"> </b></span></div> <p class="model-detail-evidence svelte-1uha8ag"> </p> <dl class="model-token-breakdown 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></dl> <section aria-labelledby="model-observations-heading" class="svelte-1uha8ag"><h3 id="model-observations-heading" class="svelte-1uha8ag"> </h3> <div class="model-observations svelte-1uha8ag"></div></section> <section aria-labelledby="model-pricing-heading" class="svelte-1uha8ag"><h3 id="model-pricing-heading" class="svelte-1uha8ag"> </h3> <!></section> <section aria-labelledby="model-trend-heading" class="svelte-1uha8ag"><h3 id="model-trend-heading" class="svelte-1uha8ag"> </h3> <table class="model-trend-table svelte-1uha8ag"><thead><tr><th class="svelte-1uha8ag"> </th><th class="svelte-1uha8ag"> </th><th class="svelte-1uha8ag"> </th><th class="svelte-1uha8ag"> </th></tr></thead><tbody></tbody></table></section></div></div></div>`),AR=h(`<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="locale-toggle svelte-1uha8ag"> </button> <button class="refresh svelte-1uha8ag"><span aria-hidden="true">↻</span> </button></div></header> <!></main> <!> <!>`,1);function jR(h,b){p(b,!1);let w=v(`en`),N=v(),I=v(null),oe=v(!0),z=v(!1),B=v(!1),ce=v(!1),le=v(!1),ue=v(!1),de=v(!1),fe=v(!1),me=v(!1),_e=v([]),V=v(null),ve=v({}),ye=v({}),be=v(`agents`),xe=v(`7d`),Se=v(`CNY`),Ce=v(`retail-equivalent`),we=v(`model`),Te=v(null),Ee=null,De=v(null),Oe=v(`UTC`),ke=v(null),Ae=v(null),je=v(null),Me=v(!1),Ne=v(!1),Pe=v(!1),Fe=v(!1),Ie=v(!1),Le=v(null),Re=null,ze=v(!1),Be=v(null),Ve=v(null),H=null,He=v(null),Ue=v(),U=!1,We=0,Ge=0,Ke=pe(()=>Xe());te(async()=>{a(w,he(navigator.language)),document.documentElement.lang=k(w),a(Oe,Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`),a(xe,Mt()),a(Se,Nt()),await Promise.all([Je(),$e(),K(),J(),et()]),k(Ae)||await q(),tt();let e=new URL(window.location.href).searchParams.get(`settings`);e&&await st(e,!1)}),M(()=>{U=!0,Re&&clearInterval(Re),Ke.dispose()});function W(e){return ge(k(w),e)}function G(e){return k(Ce)===`tokens`?W(`tokenShare`):W(e===`model`?`costShare`:`retailShare`)}function qe(){a(w,k(w)===`en`?`zh-CN`:`en`),document.documentElement.lang=k(w)}async function Je(){let e=++We,t=k(xe),n=k(Se);try{let r=new URLSearchParams({window:t,timeZone:k(Oe),currency:n}),i=await fetch(`/api/overview?${r}`);if(!i.ok)throw Error(`HTTP ${i.status}`);let o=await i.json();if(U||e!==We)return;a(I,o),a(B,!1),Qe()}catch{e===We&&a(B,!0)}finally{!U&&e===We&&a(oe,!1)}}async function Ye(){await Ze(`manual`)}async function Xe(){await Ze(`automatic`)}async function Ze(e){a(z,!0);try{let t=await fetch(e===`automatic`?`/api/refresh?mode=automatic`:`/api/refresh`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);await Promise.all([Je(),q()]),a(ce,!1)}catch{a(ce,!0)}finally{U||(a(z,!1),Qe())}}function Qe(){U||!k(I)||Ke.schedule(k(I),k(Ae),k(z))}async function $e(){try{let e=await fetch(`/api/connectors`);if(!e.ok)throw Error(`HTTP ${e.status}`);a(_e,await e.json()),a(le,!1)}catch{a(le,!0)}}async function K(){try{let e=await fetch(`/api/monitoring`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();a(ke,t.settings),a(ue,!1)}catch{a(ue,!0)}}async function q(){try{let e=await fetch(`/api/doctor`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();if(U)return;a(Ae,t),a(de,!1),Qe()}catch{a(de,!0)}}async function J(){try{let e=await fetch(`/api/retention`);if(!e.ok)throw Error(`HTTP ${e.status}`);a(je,await e.json()),a(fe,!1)}catch{a(fe,!0)}}async function et(){try{let e=await fetch(`/api/processing`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json(),n=k(Le);a(Le,t),t.modules.discovery.state===`running`&&$e(),t.modules.usage.state===`running`&&Je(),n?.modules.discovery.state!==`ready`&&t.modules.discovery.state===`ready`&&$e(),(n?.modules.usage.state!==`ready`&&t.modules.usage.state===`ready`||n?.modules.pricing.state!==`ready`&&t.modules.pricing.state===`ready`)&&Je(),n?.modules.retention.state!==`ready`&&t.modules.retention.state===`ready`&&J(),a(Fe,t.hardRebuild&&Object.values(t.modules).some(e=>e.state===`pending`||e.state===`running`)),Re&&Object.values(t.modules).every(e=>e.state===`ready`||e.state===`failed`)&&(clearInterval(Re),Re=null)}catch{}}function tt(){Re||k(Le)&&Object.values(k(Le).modules).every(e=>e.state===`ready`||e.state===`failed`)||(Re=setInterval(()=>void et(),1e3))}async function Y(){if(window.confirm(W(`hardRebuildConfirmation`))){a(Fe,!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 et(),tt(),a(me,!1)}catch{a(Fe,!1),a(me,!0)}}}function nt(e){return`/api/export?${new URLSearchParams({format:e,window:k(xe),timeZone:k(Oe),currency:k(Se),includeAccountIdentifiers:String(k(Ne))})}`}async function rt(e){try{let t=await fetch(nt(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-${k(xe)}.${e}`,r.click(),URL.revokeObjectURL(n),a(me,!1)}catch{a(me,!0)}}async function it(){if(window.confirm(W(`clearConfirmation`))){a(Pe,!0);try{let e=await fetch(`/api/data`,{method:`DELETE`,headers:{"content-type":`application/json`},body:JSON.stringify({deleteProductSecrets:k(Me)})});if(!e.ok)throw Error(`HTTP ${e.status}`);a(Me,!1),await Promise.all([Je(),$e(),q(),J()]),a(me,!1)}catch{a(me,!0)}finally{a(Pe,!1)}}}async function at(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}`);a(ke,await t.json()),a(ue,!1)}catch{a(ue,!0)}}async function ot(e,t){a(V,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`&&k(ve)[e]?{secret:k(ve)[e]}:{}})});if(!n.ok)throw Error(`HTTP ${n.status}`);await n.json(),a(ve,{...k(ve),[e]:``}),await Promise.all([$e(),Je(),q()])}catch{a(le,!0)}finally{a(V,null)}}async function st(e=null,t=!0){if(!k(ze)){let e=document.activeElement;H=e instanceof HTMLElement&&e!==document.body?e:null}if(a(ze,!0),a(Be,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 O(),((e?[...document.querySelectorAll(`[data-settings-target]`)].find(t=>t.dataset.settingsTarget===e):null)??k(He))?.focus()}async function ct(){let e=H;a(ze,!1),a(Be,null),H=null;let t=new URL(window.location.href);t.searchParams.delete(`settings`),window.history.replaceState(null,``,t),await O(),(e?.isConnected?e:k(Ve))?.focus()}function X(e){let t=k(Te)?k(De):k(ze)?k(He):null;e.key===`Tab`&&t?lt(e,t):k(Te)&&e.key===`Escape`?en():k(ze)&&e.key===`Escape`&&ct()}function lt(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 ut(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 dt(e){return W({"not-checked":`notChecked`,"not-installed":`notInstalled`,discovered:`discovered`,connected:`connected`,skipped:`skipped`,error:`connectionError`}[e])}function ft(e){return W(e===`official-client`?`officialClient`:e===`agent-usage`?`managedSecret`:`noCredential`)}function pt(e){let t={codex:`codexPermission`,"claude-code":`claudePermission`,"opencode-go":`openCodePermission`,grok:`grokPermission`,"xai-api":`xaiPermission`}[e.id];return t?W(t):e.permissionDescription}function mt(e){return e.status===`healthy`?W(`healthy`):e.category?W({"missing-binary":`diagnosticMissingBinary`,"not-configured":`diagnosticNotConfigured`,unauthorized:`diagnosticUnauthorized`,unsupported:`diagnosticUnsupported`,"schema-mismatch":`diagnosticSchemaMismatch`,"rate-limited":`diagnosticRateLimited`,timeout:`diagnosticTimeout`,stale:`diagnosticStale`,unavailable:`diagnosticUnavailable`}[e.category]):W(`diagnosticUnavailable`)}function ht(e){return!e.recovery||k(w)===`en`?e.recovery:e.category?W({"missing-binary":`recoveryMissingBinary`,"not-configured":`recoveryNotConfigured`,unauthorized:`recoveryUnauthorized`,unsupported:`recoveryUnsupported`,"schema-mismatch":`recoverySchemaMismatch`,"rate-limited":`recoveryRateLimited`,timeout:`recoveryTimeout`,stale:`recoveryStale`,unavailable:`recoveryUnavailable`}[e.category]):W(`recoveryUnavailable`)}function gt(e){return new Intl.NumberFormat(k(w)).format(e)}function _t(e){return Math.abs(e)<1e4?gt(e):new Intl.NumberFormat(k(w),{compactDisplay:`short`,maximumFractionDigits:1,notation:`compact`}).format(e)}function vt(e){return`${gt(e)} ${W(`tokens`)}`}function yt(e){return e===null?W(`notAvailable`):new Intl.NumberFormat(k(w),{style:`percent`,maximumFractionDigits:1}).format(e)}function bt(e){return e?new Intl.DateTimeFormat(k(w),{hour:`2-digit`,minute:`2-digit`,month:`short`,day:`numeric`}).format(new Date(e)):`—`}function xt(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(k(w),{numeric:`auto`}).format(Math.round(t/r),i)}function St(e){return W({"official-account":`authorityOfficialAccount`,"official-client":`authorityOfficialClient`,"local-observation":`authorityLocalObservation`,estimate:`authorityEstimate`,unavailable:`authorityUnavailable`,mixed:`authorityMixed`}[e])}function Ct(e){return W({complete:`coverageComplete`,partial:`coveragePartial`,unavailable:`coverageUnavailable`}[e])}function wt(e){return W({event:`precisionEvent`,hour:`precisionHour`,day:`precisionDay`,"billing-period":`precisionBillingPeriod`,unknown:`precisionUnknown`}[e])}function Z(e){return W(e===`account-wide`?`accountWide`:e===`this-mac`?`localOnly`:`unknown`)}function Tt(e){return W(e===`delta`?`temporalityDelta`:e===`cumulative`?`temporalityCumulative`:`temporalityUnknown`)}function Et(e){let t=e.reasoning===`included-in-output`?W(`includedInOutput`):W(`separateCategory`),n=e.cacheRead===`included-in-input`?W(`includedInInput`):W(`separateCategory`),r=e.cacheWrite===`included-in-input`?W(`includedInInput`):W(`separateCategory`);return`${W(`reasoning`)}: ${t} · ${W(`cacheRead`)}: ${n} · ${W(`cacheWrite`)}: ${r}`}function Dt(e){return W({quota:`quota`,tokens:`tokens`,"actual-cost":`actualCost`,history:`history`}[e])}function Ot(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:kt(e.tokenTotals,[],e.tokenAuthority,e.tokenEvidence),forecasts:[],forecastCoverage:e.forecastCoverage}}function kt(e,t,n,r=Ut()){return{window:k(xe),start:``,end:``,timeZone:k(Oe),tokenTotals:e,tokenEvidence:r,models:[],unclassified:{tokenTotals:Ht(),tokenEvidence:Ut(),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 At(e){if(k(xe)===e&&!k(Ie))return;a(xe,e);try{localStorage.setItem(`agent-usage:history-window`,e)}catch{}let t=++Ge;a(Ie,!0);try{await Je()}finally{t===Ge&&a(Ie,!1)}}async function jt(e){if(k(Se)===e)return;a(Se,e);try{localStorage.setItem(`agent-usage:comparison-currency`,e)}catch{}let t=++Ge;a(Ie,!0);try{await Je()}finally{t===Ge&&a(Ie,!1)}}function Mt(){try{let e=localStorage.getItem(`agent-usage:history-window`);return e===`24h`||e===`7d`||e===`30d`?e:`7d`}catch{return`7d`}}function Nt(){try{let e=localStorage.getItem(`agent-usage:comparison-currency`);return e===`USD`||e===`CNY`?e:`CNY`}catch{return`CNY`}}function Pt(e,t){a(ye,{...k(ye),[e]:t})}function Ft(e,t,n){return e.find(e=>e.target.provider.id===t&&e.target.billingDomain.id===n)}function It(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 Lt(e,t){let n=e.providers.filter(e=>e.id!==`opencode`).map(e=>({...e,billingDomains:[...e.billingDomains]}));for(let e of t){let{provider:t,billingDomain:r}=e.target,i=n.find(e=>e.id===t.id);i||(i=Bt(t.id,t.displayName),n.push(i)),i.billingDomains.some(e=>e.id===r.id)||i.billingDomains.push(Vt(r.id,r.displayName))}let r={codex:0,"claude-code":1,"opencode-go":2,grok:3};return n.sort((e,t)=>(r[e.id]??100)-(r[t.id]??100)||e.displayName.localeCompare(t.displayName))}function Rt(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 zt(e,t){return Lt(e,t).flatMap(e=>e.billingDomains.flatMap(t=>{let n=Rt(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 Bt(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:Ht(),tokenEvidence:Ut(),tokenAuthority:null,billingDomains:[],forecasts:[],forecastCoverage:`insufficient`}}function Vt(e,t){let n=Ht();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:Ut(),tokenAuthority:null,costs:[],balances:[],invoices:[],history:kt(n,[],null),forecasts:[],forecastCoverage:`insufficient`}}function Ht(){return{total:0,input:0,output:0,reasoning:0,cacheRead:0,cacheWrite:0}}function Ut(){return{recordedTokens:0,sourceReportedTokens:0,sourceReportedObservationCount:0,observationCount:0,unclassifiedTokens:0,classifiedTokens:0,classificationCoverage:null,totalDerivations:[],timePrecisions:[],usageScopes:[],aggregationTemporalities:[]}}function Wt(e,t){return e===null?`—`:new Intl.NumberFormat(k(w),{style:`currency`,currency:t,minimumFractionDigits:2,maximumFractionDigits:Math.abs(e)>0&&Math.abs(e)<.01?8:2}).format(e)}function Gt(e){a(Ce,e)}function Kt(e){let t=new Intl.DateTimeFormat(k(w),{month:`short`,day:`numeric`,timeZone:e.timeZone});return`${t.format(new Date(e.start))} – ${t.format(new Date(e.end))}`}function qt(e,t,n){return e===null?W(`notAvailable`):n===`tokens`?`${_t(e)} ${W(`tokens`)}`:Wt(e,t)}function Jt(e,t){return e.includedInHeadline===!1?null:t===`tokens`?e.tokenShare:e.retailEquivalent.amount===null&&e.reportedEstimate.amount!==null?e.reportedShare:e.retailShare}function Yt(e,t){let n=t===`tokens`?`${gt(e.recordedTokens)} ${W(`tokens`)}`:[...e.retailEquivalent.amount===null?[]:[`${W(`apiRetailEquivalent`)}: ${Wt(e.retailEquivalent.amount,e.retailEquivalent.currency)}`],...e.reportedEstimate?.amount==null?[]:[`${W(`providerReportedEstimate`)}: ${Wt(e.reportedEstimate.amount,e.reportedEstimate.currency)}`]].join(`; `)||W(`notAvailable`),r=e.timePrecisions.map(wt).join(` + `)||W(`unknown`),i=e.authorities&&e.authorities.length>0?e.authorities.map(St).join(` + `):St(`unavailable`),a=e.includedInHeadline===!1?` · ${W(`separateFromHeadline`)}`:``;return`${e.providerDisplayName} · ${e.billingDomainDisplayName}${a}: ${n} · ${W(`timePrecision`)}: ${r} · ${W(`source`)}: ${i} · ${bt(e.lastObservedAt??null)}`}function Xt(e){let t=e.providers.flatMap(e=>e.billingDomains.filter(t=>t.id===e.summaryBillingDomainId).map(e=>e.history));return{authorities:[...new Set(t.flatMap(e=>e.authorities??[]))].sort(),lastObservedAt:t.flatMap(e=>e.lastObservedAt?[e.lastObservedAt]:[]).sort((e,t)=>t.localeCompare(e))[0]??null}}function Zt(e){return e&&e.length>0?e.map(St).join(` + `):St(`unavailable`)}function Qt(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 $t(e,t){a(Te,e),Ee=t,await O(),k(De)?.focus()}async function en(){a(Te,null),await O(),Ee?.focus()}function tn(e){return W({input:`input`,output:`output`,reasoning:`reasoning`,"cache-read":`cacheRead`,"cache-write":`cacheWrite`}[e]??`unknown`)}f(()=>k(w),()=>{a(N,ge(k(w),`metaDescription`))}),f(()=>(k(I),k(Te)),()=>{a(Ue,k(I)?.workbench?.modelRanking.entries.find(e=>e.id===k(Te))??null)}),i(),P();var nn=re();E(`1uha8ag`,e=>{var n=NL(),r=g(o(n),2);s(()=>C(r,`content`,k(N))),u(()=>{ae.title=`Agent Usage`}),t(e,n)}),n(`keydown`,e,X);var rn=o(nn);x(rn,()=>k(w),e=>{var i=AR(),u=o(i),f=_(u),p=_(f),h=g(p,2),v=_(h,!0);L(h);var y=g(h,2),b=_(y),E=_(b,!0);L(b);var O=g(b,2),M=_(O,!0);L(O),L(y);var N=g(y,2),P=_(N),te=_(P,!0);L(P),S(P,e=>a(Ve,e),()=>k(Ve));var ae=g(P,2),pe=_(ae,!0);L(ae);var he=g(ae,2),ge=_(he);let Te;var Ee=g(ge);L(he),L(N),L(f);var Re=g(f,2),H=e=>{var n=PL(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>(k(be),l(()=>k(be)===`agents`?W(`loadingAgentUsage`):W(`loadingModelCosts`)))]),t(e,n)},U=e=>{var n=FL(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>W(`error`))]),t(e,n)},We=e=>{let i=F(()=>(k(I),l(()=>Xt(k(I)))));var c=fR(),u=o(c),f=e=>{var n=IL(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>W(`refreshUnavailable`))]),t(e,n)};R(u,e=>{k(ce)&&e(f)});var p=g(u,2),h=e=>{var n=LL(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>W(`noProviders`))]),t(e,n)};R(p,e=>{k(I),l(()=>k(I).providers.length===0)&&e(h)});var v=g(p,2),y=e=>{var r=ZL(),i=_(r),c=e=>{var n=RL(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>W(`updatingAgentUsage`))]),t(e,n)};R(i,e=>{k(Le),l(()=>k(Le)?.modules.usage.state===`running`)&&e(c)});var u=g(i,2);ie(u,5,()=>(k(I),k(_e),l(()=>Lt(k(I),k(_e)))),e=>e.id,(e,r)=>{let i=F(()=>(k(r),l(()=>It(k(r).id)))),c=F(()=>(k(r),k(ye),l(()=>Ot(k(r),k(ye)[k(r).id])))),u=F(()=>(d(k(c)),k(r),l(()=>k(c).freshness??k(r).freshness))),f=F(()=>(d(k(c)),k(r),l(()=>k(c).coverage??k(r).coverage)));var p=XL(),h=_(p),v=_(h),y=_(v),b=e=>{var n=zL(),a=_(n),o=g(a,2),c=g(o,2);L(n),s(()=>{C(n,`data-provider-logo`,(k(r),l(()=>k(r).id))),C(a,`srcset`,(d(k(i)),l(()=>k(i).light))),C(o,`srcset`,(d(k(i)),l(()=>k(i).dark))),C(c,`src`,(d(k(i)),l(()=>k(i).dark)))}),t(e,n)};R(y,e=>{k(i)&&e(b)});var x=g(y,2),S=_(x),w=_(S,!0);L(S);var T=g(S,2),E=g(_(T));L(T),L(x),L(v);var O=g(v,2),A=_(O,!0);L(O),L(h);var M=g(h,2),N=e=>{var i=VL();ie(i,5,()=>(k(r),l(()=>k(r).billingDomains)),e=>e.id,(e,i)=>{let a=F(()=>(d(k(c)),k(i),l(()=>k(c).id===k(i).id)));var o=BL(),u=_(o,!0);L(o),s(()=>{C(o,`aria-selected`,k(a)),C(o,`tabindex`,k(a)?0:-1),m(u,(k(i),l(()=>k(i).displayName)))}),n(`click`,o,()=>Pt(k(r).id,k(i).id)),n(`keydown`,o,ut),t(e,o)}),L(i),s(e=>C(i,`aria-label`,e),[()=>(k(r),l(()=>`${k(r).displayName} ${W(`billingDomainTabs`)}`))]),t(e,i)};R(M,e=>{k(r),l(()=>(k(r).billingDomains?.length??0)>1)&&e(N)});var P=g(M,2);ie(P,1,()=>[k(c)],e=>e.id,(e,i)=>{let c=F(()=>(k(_e),k(r),k(i),l(()=>Ft(k(_e),k(r).id,k(i).id))));var u=YL(),f=o(u),p=e=>{var r=re(),i=o(r),u=e=>{var r=HL(),i=_(r),a=_(i),o=_(a,!0);L(a);var u=g(a,2),f=_(u,!0);L(u),L(i);var p=g(i,2),h=_(p,!0);L(p),L(r),s((e,t)=>{C(r,`data-testid`,(d(k(c)),l(()=>`connector-${k(c).id}`))),m(o,e),m(f,(d(k(c)),l(()=>k(c).target.billingDomain.displayName))),m(h,t)},[()=>(d(k(c)),l(()=>dt(k(c).state))),()=>l(()=>W(`manageConnection`))]),n(`click`,p,()=>st(`connector:${k(c).id}`)),t(e,r)},f=e=>{var r=qL();let i;var o=_(r),u=_(o),f=_(u),p=_(f,!0);L(f);var h=g(f,2),v=e=>{var n=UL(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>W(`experimental`))]),t(e,n)};R(h,e=>{d(k(c)),l(()=>k(c).experimental)&&e(v)}),L(u);var y=g(u);L(o);var b=g(o,2),x=_(b),S=_(x,!0);L(x);var w=g(x,2),T=_(w),E=_(T,!0);L(T);var O=g(T,2),A=_(O,!0);L(O),L(w);var j=g(w,2),M=_(j),N=_(M,!0);L(M);var P=g(M,2),F=_(P,!0);L(P),L(j);var te=g(j,2),I=e=>{var r=WL(),i=_(r),o=_(i,!0);L(i);var u=g(i,2);ne(u),L(r),s((e,t)=>{m(o,e),C(u,`aria-label`,t),ee(u,(k(ve),d(k(c)),l(()=>k(ve)[k(c).id]??``)))},[()=>l(()=>W(`managementKey`)),()=>(d(k(c)),l(()=>`${k(c).displayName} ${W(`managementKey`)}`))]),n(`input`,u,e=>a(ve,{...k(ve),[k(c).id]:e.currentTarget.value})),t(e,r)};R(te,e=>{d(k(c)),l(()=>k(c).credentialOwner===`agent-usage`)&&e(I)});var re=g(te,2),ie=_(re),ae=e=>{var r=GL(),i=_(r,!0);L(r),s(e=>{r.disabled=(d(k(c)),k(V),k(ve),l(()=>!k(c).installed||k(V)===k(c).id||k(c).credentialOwner===`agent-usage`&&!k(ve)[k(c).id])),m(i,e)},[()=>l(()=>W(`connect`))]),n(`click`,r,()=>ot(k(c).id,`connect`)),t(e,r)};R(ie,e=>{d(k(c)),l(()=>k(c).state===`discovered`||k(c).state===`skipped`)&&e(ae)});var oe=g(ie,2),z=e=>{var r=KL(),i=_(r,!0);L(r),s(e=>{r.disabled=(k(V),d(k(c)),l(()=>k(V)===k(c).id)),m(i,e)},[()=>l(()=>W(`retry`))]),n(`click`,r,()=>ot(k(c).id,`retry`)),t(e,r)};R(oe,e=>{d(k(c)),l(()=>k(c).state===`error`||k(c).state===`not-installed`)&&e(z)});var B=g(oe,2),se=e=>{var r=KL(),i=_(r,!0);L(r),s(e=>{r.disabled=(k(V),d(k(c)),l(()=>k(V)===k(c).id)),m(i,e)},[()=>l(()=>W(`skip`))]),n(`click`,r,()=>ot(k(c).id,`skip`)),t(e,r)};R(B,e=>{d(k(c)),l(()=>k(c).state!==`skipped`)&&e(se)}),L(re),L(b),L(r),s((e,t,n,a,o,s,u)=>{i=D(r,1,`inline-connection svelte-1uha8ag`,null,i,{"connection-pending":k(V)===k(c).id}),C(r,`data-testid`,(d(k(c)),l(()=>`connector-${k(c).id}`))),C(r,`aria-busy`,(k(V),d(k(c)),l(()=>k(V)===k(c).id))),m(p,e),m(y,` ${t??``}`),m(S,n),m(E,a),m(A,o),m(N,s),m(F,u)},[()=>(d(k(c)),l(()=>dt(k(c).state))),()=>l(()=>W(`connectionSetup`)),()=>(d(k(c)),l(()=>pt(k(c)))),()=>(d(k(c)),l(()=>k(c).installed?W(`installed`):W(`notInstalled`))),()=>(d(k(c)),l(()=>ft(k(c).credentialOwner))),()=>l(()=>W(`coverageLabel`)),()=>(d(k(c)),l(()=>k(c).expectedCoverage.map(Dt).join(` · `)))]),t(e,r)};R(i,e=>{d(k(c)),l(()=>k(c).state===`connected`)?e(u):e(f,-1)}),t(e,r)};R(f,e=>{k(c)&&e(p)});var h=g(f,2),v=_(h,!0);L(h);var y=g(h,2);ie(y,5,()=>(k(i),l(()=>Rt(k(i).quotaBuckets))),e=>e.id,(e,n)=>{var a=JL(),o=_(a),c=_(o),u=_(c,!0);L(c);var d=g(c,2),f=_(d);L(d),L(o);var p=g(o,2);let h;var v=_(p);L(p);var y=g(p,2),b=_(y);L(y);var x=g(y,2),S=_(x),w=_(S);L(S),L(x),L(a),s((e,t,a,o,s,c,d,g,_)=>{m(u,(k(n),l(()=>k(n).label))),m(f,`${k(n),l(()=>k(n).usedPercent??`—`)??``}% ${e??``}`),h=D(p,1,`progress svelte-1uha8ag`,null,h,{"progress-warning":(k(n).usedPercent??0)>=70&&(k(n).usedPercent??0)<90,"progress-critical":(k(n).usedPercent??0)>=90}),C(p,`aria-label`,(k(n),l(()=>k(n).label))),C(p,`aria-valuenow`,(k(n),l(()=>k(n).usedPercent??void 0))),C(p,`aria-valuetext`,t),C(p,`aria-describedby`,(k(r),k(i),k(n),l(()=>`quota-evidence-${k(r).id}-${k(i).id}-${k(n).id}`))),j(v,a),C(y,`id`,(k(r),k(i),k(n),l(()=>`quota-evidence-${k(r).id}-${k(i).id}-${k(n).id}`))),m(b,`${o??``}: ${s??``} ·
|
|
19
|
+
${c??``}`),m(w,`${d??``}
|
|
20
|
+
${g??``} · ${_??``}`)},[()=>l(()=>W(`used`)),()=>(k(n),l(()=>k(n).usedPercent===null?W(`notAvailable`):`${gt(k(n).usedPercent)}% ${W(`used`)}`)),()=>(k(n),l(()=>`width: ${Math.min(100,Math.max(0,k(n).usedPercent??0))}%`)),()=>l(()=>W(`source`)),()=>(k(n),l(()=>St(k(n).authority))),()=>(k(n),k(i),k(r),l(()=>bt(k(n).observedAt??k(i).freshness?.lastSuccessAt??k(r).freshness.lastSuccessAt))),()=>l(()=>W(`resets`)),()=>(k(n),l(()=>bt(k(n).resetsAt))),()=>(k(n),l(()=>xt(k(n).resetsAt)))]),t(e,a)}),L(y),s(e=>m(v,e),[()=>l(()=>W(`quota`))]),t(e,u)}),L(p),s((e,t,n)=>{C(S,`data-provider-logo`,(d(k(i)),k(r),l(()=>k(i)?void 0:k(r).id))),m(w,(k(r),l(()=>k(r).displayName))),C(T,`data-status`,(d(k(u)),l(()=>k(u).status===`unavailable`?`unavailable`:`available`))),m(E,` ${e??``}
|
|
21
|
+
${t??``}`),m(A,n)},[()=>(d(k(u)),l(()=>k(u).status===`fresh`?W(`updatedNow`):k(u).lastSuccessAt?W(`updated`):W(`unavailable`))),()=>(d(k(u)),l(()=>k(u).lastSuccessAt?` · ${bt(k(u).lastSuccessAt)}`:``)),()=>(d(k(f)),l(()=>Ct(k(f).quota)))]),t(e,p)}),L(u);var f=g(u,2);{let e=F(()=>(k(I),k(_e),l(()=>zt(k(I),k(_e))))),t=F(()=>(k(I),l(()=>Date.parse(k(I).generatedAt))));CL(f,{get providers(){return k(e)},get locale(){return k(w)},get timeZone(){return k(Oe)},get now(){return k(t)}})}L(r),s(e=>C(u,`aria-label`,e),[()=>l(()=>W(`providersLabel`))]),t(e,r)},b=e=>{var c=dR(),u=_(c),f=e=>{var n=RL(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>W(`updatingModelCosts`))]),t(e,n)};R(u,e=>{k(Le),k(Ie),l(()=>k(Le)?.modules.pricing.state===`running`&&!k(Ie))&&e(f)});var p=g(u,2),h=e=>{let c=F(()=>(k(I),l(()=>k(I).workbench)));var u=uR(),f=_(u),p=_(f),h=_(p),v=_(h,!0);L(h);var y=g(h,2),b=_(y),S=_(b,!0);L(b);var T=g(b,2,!0);L(y),L(p);var E=g(p,2),O=_(E),A=_(O),M=_(A,!0);L(A);var N=g(A,2),P=_(N,!0);L(N),L(O);var ee=g(O,2);ie(ee,4,()=>[`24h`,`7d`,`30d`],e=>e,(e,r)=>{var i=QL(),a=_(i,!0);L(i),s(()=>{C(i,`aria-pressed`,k(xe)===r),m(a,r)}),n(`click`,i,()=>At(r)),t(e,i)}),L(ee);var te=g(ee,2);ie(te,4,()=>[`CNY`,`USD`],e=>e,(e,r)=>{var i=QL(),a=_(i,!0);L(i),s(()=>{C(i,`aria-pressed`,k(Se)===r),m(a,r)}),n(`click`,i,()=>jt(r)),t(e,i)}),L(te),L(E),L(f);var ne=g(f,2),re=e=>{var n=tR(),r=_(n),i=_(r,!0);L(r);var a=g(r,4);ie(a,4,()=>[0,1,2,3,4,5],e=>e,(e,n)=>{var r=$L();t(e,r)}),L(a);var o=g(a,2),c=g(_(o),2);ie(c,0,()=>[0,1,2,3],e=>e,(e,n)=>{var r=eR();t(e,r)}),L(o),L(n),s((e,t)=>{C(n,`aria-label`,e),m(i,t)},[()=>l(()=>W(`updatingModelCosts`)),()=>l(()=>W(`updatingModelCosts`))]),t(e,n)};R(ne,e=>{k(Ie)&&e(re)});var ae=g(ne,2);let oe;var z=_(ae),B=_(z),se=_(B,!0);L(B);var ce=g(B,2),le=_(ce,!0);L(ce);var ue=g(ce,2),de=e=>{var n=UL(),r=_(n);L(n),s((e,t,n,i,a)=>m(r,`${e??``} · ${t??``}
|
|
22
|
+
${n??``} ·
|
|
23
|
+
${i??``} ·
|
|
24
|
+
${a??``}`),[()=>l(()=>W(`apiRateEstimate`)),()=>l(()=>W(`pricingCoverage`)),()=>(d(k(c)),l(()=>yt(k(c).costs.retailEquivalent.pricingCoverage))),()=>(d(k(c)),l(()=>Zt(k(c).costs.retailEquivalent.authorities))),()=>(d(k(c)),l(()=>bt(k(c).costs.retailEquivalent.observedAt)))]),t(e,n)},fe=e=>{var n=UL(),r=_(n);L(n),s((e,t)=>m(r,`${e??``} ·
|
|
25
|
+
${t??``}`),[()=>(d(k(i)),l(()=>Zt(k(i).authorities))),()=>(d(k(i)),l(()=>bt(k(i).lastObservedAt)))]),t(e,n)};R(ue,e=>{k(Ce)===`retail-equivalent`?e(de):e(fe,-1)}),L(z);var pe=g(z,2),me=_(pe),he=_(me,!0);L(me);var ge=g(me,2),_e=_(ge),V=_(_e),ve=_(V,!0);L(V);var ye=g(V,2),be=_(ye,!0);L(ye),L(_e);var Te=g(_e,2),Ee=_(Te),De=_(Ee,!0);L(Ee);var Oe=g(Ee,2),ke=_(Oe,!0);L(Oe),L(Te);var Ae=g(Te,2),je=_(Ae),Me=_(je,!0);L(je);var Ne=g(je,2),Pe=_(Ne,!0);L(Ne),L(Ae);var Fe=g(Ae,2),Le=_(Fe),Re=_(Le,!0);L(Le);var ze=g(Le,2),Be=_(ze,!0);L(ze),L(Fe);var Ve=g(Fe,2),H=_(Ve),He=_(H,!0);L(H);var Ue=g(H,2),U=_(Ue,!0);L(Ue),L(Ve);var We=g(Ve,2),Ge=_(We),Ke=_(Ge,!0);L(Ge);var qe=g(Ge,2),Je=_(qe,!0);L(qe),L(We),L(ge);var Ye=g(ge,2),Xe=_(Ye);L(Ye),L(pe),L(ae);var Ze=g(ae,2);let Qe;var $e=_(Ze),K=_($e),q=_(K),J=_(q,!0);L(q);var et=g(q,2),tt=_(et,!0);L(et),L(K),iL(g(K,2),{get providers(){return d(k(c)),l(()=>k(c).providerSummary)},get metric(){return k(Ce)},get currency(){return d(k(c)),l(()=>k(c).comparisonCurrency)},get locale(){return k(w)},formatUsageMetric:qt,formatPercent:yt,displayAuthorities:Zt,formatReset:bt}),L($e);var Y=g($e,2);x(Y,()=>k(xe),e=>{{let t=F(()=>(d(k(c)),l(()=>Kt(k(c)))));ML(e,{get buckets(){return d(k(c)),l(()=>k(c).trend.buckets)},get metric(){return k(Ce)},get currency(){return d(k(c)),l(()=>k(c).comparisonCurrency)},get locale(){return k(w)},get selectedWindow(){return k(xe)},get timeZone(){return d(k(c)),l(()=>k(c).timeZone)},get granularity(){return d(k(c)),l(()=>k(c).trend.granularity)},get rangeLabel(){return k(t)},formatUsageMetric:qt,describeSegment:Yt})}}),L(Ze);var nt=g(Ze,2);let rt;var it=_(nt),at=_(it),ot=_(at),st=_(ot,!0);L(ot),L(at);var ct=g(at,2),X=_(ct),lt=_(X,!0);L(X);var ut=g(X,2),dt=_(ut,!0);L(ut),L(ct),L(it);var ft=g(it,2),pt=_(ft),mt=_(pt,!0);L(pt);var ht=g(pt,2),gt=_(ht,!0);L(ht);var xt=g(ht,2),St=_(xt,!0);L(xt);var Ct=g(xt,2),wt=_(Ct,!0);L(Ct),L(ft);var Z=g(ft,2),Tt=e=>{var i=sR(),a=o(i);ie(a,5,()=>(d(k(c)),k(Ce),l(()=>Qt(k(c),k(Ce)))),e=>e.id,(e,r)=>{let i=F(()=>(k(r),l(()=>It(k(r).providerId)))),a=F(()=>(k(r),l(()=>k(r).retailEquivalent.amount===null?k(r).reportedEstimate??k(r).retailEquivalent:k(r).retailEquivalent))),o=F(()=>(k(r),l(()=>k(r).retailEquivalent.amount===null&&k(r).reportedEstimate?.amount!=null))),c=F(()=>(k(r),k(Ce),l(()=>Jt(k(r),k(Ce)))));var u=iR(),f=_(u),p=_(f),h=_(p),v=e=>{var n=nR(),a=_(n),o=g(a,2),c=g(o,2);L(n),s(()=>{C(n,`data-provider-logo`,(k(r),l(()=>k(r).providerId))),C(a,`srcset`,(d(k(i)),l(()=>k(i).light))),C(o,`srcset`,(d(k(i)),l(()=>k(i).dark))),C(c,`src`,(d(k(i)),l(()=>k(i).dark)))}),t(e,n)};R(h,e=>{k(i)&&e(v)});var y=g(h,2),b=_(y),x=_(b,!0);L(b);var S=g(b,2),w=_(S);L(S);var T=g(S,2),E=e=>{var n=UL(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>W(`separateFromHeadline`))]),t(e,n)};R(T,e=>{k(r),l(()=>k(r).includedInHeadline===!1)&&e(E)});var D=g(T,2),O=_(D);L(D);var A=g(D,2),M=_(A);L(A),L(y),L(p);var N=g(p,2),P=_(N),ee=_(P,!0);L(P),L(N);var te=g(N,2),I=_(te),ne=_(I,!0);L(I);var re=g(I,2),ie=e=>{var n=rR(),i=_(n);L(n),s((e,t,r)=>{C(n,`aria-label`,e),C(n,`aria-valuenow`,t),j(i,r)},[()=>(k(r),l(()=>`${k(r).model} ${G(`model`)}`)),()=>(d(k(c)),l(()=>Math.round(k(c)*1e3)/10)),()=>(d(k(c)),l(()=>`width: ${Math.max(2,Math.min(100,k(c)*100))}%`))]),t(e,n)};R(re,e=>{k(c)!==null&&e(ie)}),L(te);var ae=g(te,2),oe=_(ae),z=_(oe,!0);L(oe),L(ae),L(f),L(u),s((e,t,n,i,a,o,s,c,u,d,f,p,h)=>{m(x,(k(r),l(()=>k(r).model))),m(w,`${k(r),l(()=>k(r).providerDisplayName)??``} · ${k(r),l(()=>k(r).billingDomainDisplayName)??``}`),m(O,`${e??``}: ${t??``} ·
|
|
26
|
+
${n??``}`),m(M,`${i??``}: ${a??``} · ${o??``}`),C(N,`data-label`,s),m(ee,c),C(te,`data-label`,u),m(ne,d),C(ae,`data-label`,f),C(oe,`aria-label`,p),m(z,h)},[()=>l(()=>W(`tokens`)),()=>(k(r),l(()=>Zt(k(r).authorities))),()=>(k(r),l(()=>bt(k(r).lastObservedAt))),()=>(d(k(o)),l(()=>k(o)?W(`providerReportedEstimate`):W(`apiRetailEquivalent`))),()=>(d(k(a)),l(()=>Zt(k(a).authorities))),()=>(d(k(a)),l(()=>bt(k(a).observedAt))),()=>l(()=>W(`cost`)),()=>(d(k(a)),l(()=>k(a).amount===null?W(`notAvailable`):Wt(k(a).amount,k(a).comparisonCurrency))),()=>l(()=>G(`model`)),()=>(k(r),d(k(c)),l(()=>k(r).includedInHeadline===!1?W(`headlineShareNotApplicable`):yt(k(c)))),()=>l(()=>W(`tokens`)),()=>(k(r),l(()=>vt(k(r).tokenTotals.total))),()=>(k(r),l(()=>_t(k(r).tokenTotals.total)))]),n(`click`,f,e=>$t(k(r).id,e.currentTarget)),n(`keydown`,f,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),$t(k(r).id,e.currentTarget))}),t(e,u)}),L(a);var u=g(a,2),f=e=>{var n=oR(),i=_(n),a=_(i,!0);L(i);var o=g(i,2);ie(o,1,()=>(d(k(c)),l(()=>k(c).modelRanking.unclassified)),e=>`${e.providerId}:${e.billingDomainId}`,(e,n)=>{var i=aR(),a=_(i),o=g(a),c=e=>{var n=r();s(e=>m(n,`· ${e??``}`),[()=>l(()=>W(`separateFromHeadline`))]),t(e,n)};R(o,e=>{k(n),l(()=>k(n).includedInHeadline===!1)&&e(c)});var u=g(o,2),d=_(u);L(u);var f=g(u,2),p=_(f,!0);L(f);var h=g(f,2),v=_(h);L(h),L(i),s((e,t,r,i,o,s)=>{m(a,`${k(n),l(()=>k(n).providerDisplayName)??``} · ${k(n),l(()=>k(n).billingDomainDisplayName)??``} `),C(u,`aria-label`,e),m(d,`${t??``} ${r??``}`),m(p,i),m(v,`${o??``} ·
|
|
27
|
+
${s??``}`)},[()=>(k(n),l(()=>vt(k(n).tokenTotals.total))),()=>(k(n),l(()=>_t(k(n).tokenTotals.total))),()=>l(()=>W(`tokens`)),()=>(k(n),l(()=>k(n).includedInHeadline===!1?W(`headlineShareNotApplicable`):yt(k(n).tokenShare))),()=>(k(n),l(()=>Zt(k(n).authorities))),()=>(k(n),l(()=>bt(k(n).lastObservedAt)))]),t(e,i)}),L(n),s(e=>m(a,e),[()=>l(()=>W(`unclassifiedUsage`))]),t(e,n)};R(u,e=>{d(k(c)),l(()=>k(c).modelRanking.unclassified.length>0)&&e(f)}),t(e,i)},Et=e=>{var n=lR();ie(n,5,()=>(d(k(c)),k(Ce),l(()=>[...k(c).dayBreakdown].filter(e=>k(Ce)===`tokens`?!e.gap:!e.gap||e.retailEquivalent.records>0).reverse())),e=>e.start,(e,n)=>{var r=cR(),i=_(r),a=_(i),o=_(a,!0);L(a);var u=g(a,2),f=_(u);L(u);var p=g(u,2),h=_(p);L(p),L(i);var v=g(i,2),y=_(v,!0);L(v);var b=g(v,2),x=_(b,!0);L(b);var S=g(b,2),w=_(S,!0);L(S),L(r),s((e,t,r,i,a,s,c,u,d,p,g,_)=>{m(o,(k(n),l(()=>k(n).label))),m(f,`${e??``}: ${t??``} ·
|
|
28
|
+
${r??``}`),m(h,`${i??``}: ${a??``} · ${s??``}`),C(v,`data-label`,c),m(y,u),C(b,`data-label`,d),m(x,p),C(S,`data-label`,g),m(w,_)},[()=>l(()=>W(`tokens`)),()=>(k(n),l(()=>Zt(k(n).authorities))),()=>(k(n),l(()=>bt(k(n).lastObservedAt))),()=>l(()=>W(`cost`)),()=>(k(n),l(()=>Zt(k(n).retailEquivalent.authorities))),()=>(k(n),l(()=>bt(k(n).retailEquivalent.observedAt))),()=>l(()=>W(`cost`)),()=>(k(n),d(k(c)),l(()=>Wt(k(n).retailEquivalent.amount,k(c).comparisonCurrency))),()=>l(()=>G(`day`)),()=>(k(Ce),k(n),l(()=>yt(k(Ce)===`tokens`?k(n).tokenShare:k(n).retailShare))),()=>l(()=>W(`tokens`)),()=>(k(n),l(()=>k(n).recordedTokens===null?W(`notAvailable`):_t(k(n).recordedTokens)))]),t(e,r)}),L(n),t(e,n)};R(Z,e=>{k(we)===`model`?e(Tt):e(Et,-1)}),L(nt),L(u),s((e,t,n,r,i,a,o,s,c,l,u,d,f,p,h,g,_,y,b,x,w,E,j,F,I,L,ne,re,R,ie,z,ce,ue,de,fe,pe,me,ge,_e)=>{m(v,e),m(S,t),m(T,n),C(O,`aria-label`,r),C(A,`aria-pressed`,k(Ce)===`retail-equivalent`),m(M,i),C(N,`aria-pressed`,k(Ce)===`tokens`),m(P,a),C(ee,`aria-label`,o),C(te,`aria-label`,s),oe=D(ae,1,`usage-summary-board svelte-1uha8ag`,null,oe,{"workbench-data-hidden":k(Ie)}),C(ae,`aria-label`,c),C(B,`aria-label`,l),m(se,u),m(le,d),m(he,f),m(ve,p),m(be,h),m(De,g),m(ke,_),m(Me,y),m(Pe,b),m(Re,x),m(Be,w),m(He,E),m(U,j),m(Ke,F),m(Je,I),m(Xe,`${L??``}
|
|
29
|
+
${ne??``} ·
|
|
30
|
+
${re??``} ·
|
|
31
|
+
${R??``}`),Qe=D(Ze,1,`usage-overview-grid svelte-1uha8ag`,null,Qe,{"workbench-data-hidden":k(Ie)}),m(J,ie),m(tt,z),rt=D(nt,1,`model-ranking svelte-1uha8ag`,null,rt,{"workbench-data-hidden":k(Ie)}),m(st,ce),C(ct,`aria-label`,ue),C(X,`aria-pressed`,k(we)===`model`),m(lt,de),C(ut,`aria-pressed`,k(we)===`day`),m(dt,fe),m(mt,pe),m(gt,me),m(St,ge),m(wt,_e)},[()=>l(()=>W(`tokenMoneyWorkbench`)),()=>l(()=>W(`usage`)),()=>(d(k(c)),l(()=>Kt(k(c)))),()=>l(()=>W(`trendMetric`)),()=>l(()=>W(`cost`)),()=>l(()=>W(`tokens`)),()=>l(()=>W(`history`)),()=>l(()=>W(`displayCurrency`)),()=>l(()=>W(`usageOverview`)),()=>(k(Ce),d(k(c)),l(()=>k(Ce)===`tokens`?k(c).recordedTokens===null?W(`notAvailable`):vt(k(c).recordedTokens):Wt(k(c).costs.retailEquivalent.amount,k(c).comparisonCurrency))),()=>(k(Ce),d(k(c)),l(()=>k(Ce)===`tokens`?k(c).recordedTokens===null?W(`notAvailable`):_t(k(c).recordedTokens):Wt(k(c).costs.retailEquivalent.amount,k(c).comparisonCurrency))),()=>(k(Ce),l(()=>k(Ce)===`tokens`?W(`recordedTokens`):W(`apiRetailEquivalent`))),()=>l(()=>W(`usageTotals`)),()=>l(()=>W(`recordedTokens`)),()=>(d(k(c)),l(()=>k(c).recordedTokens===null?W(`notAvailable`):_t(k(c).recordedTokens))),()=>l(()=>W(`input`)),()=>(d(k(c)),l(()=>k(c).tokenBreakdown.status===`unavailable`?W(`notAvailable`):_t(k(c).tokenBreakdown.tokenTotals.input))),()=>l(()=>W(`output`)),()=>(d(k(c)),l(()=>k(c).tokenBreakdown.status===`unavailable`?W(`notAvailable`):_t(k(c).tokenBreakdown.tokenTotals.output))),()=>l(()=>W(`reasoning`)),()=>(d(k(c)),l(()=>k(c).tokenBreakdown.status===`unavailable`?W(`notAvailable`):_t(k(c).tokenBreakdown.tokenTotals.reasoning))),()=>l(()=>W(`cacheRead`)),()=>(d(k(c)),l(()=>k(c).tokenBreakdown.status===`unavailable`?W(`notAvailable`):_t(k(c).tokenBreakdown.tokenTotals.cacheRead))),()=>l(()=>W(`cacheWrite`)),()=>(d(k(c)),l(()=>k(c).tokenBreakdown.status===`unavailable`?W(`notAvailable`):_t(k(c).tokenBreakdown.tokenTotals.cacheWrite))),()=>l(()=>W(`classificationCoverage`)),()=>(d(k(c)),l(()=>yt(k(c).tokenBreakdown.classificationCoverage))),()=>(d(k(c)),l(()=>Zt(k(c).tokenBreakdown.authorities))),()=>(d(k(c)),l(()=>bt(k(c).tokenBreakdown.lastObservedAt))),()=>l(()=>W(`providerShare`)),()=>l(()=>W(`providerShareSubtitle`)),()=>l(()=>W(`breakdown`)),()=>l(()=>W(`breakdown`)),()=>l(()=>W(`model`)),()=>l(()=>W(`day`)),()=>(k(we),l(()=>k(we)===`model`?W(`model`):W(`day`))),()=>l(()=>W(`cost`)),()=>(k(we),l(()=>G(k(we)))),()=>l(()=>W(`tokens`))]),n(`click`,A,()=>Gt(`retail-equivalent`)),n(`click`,N,()=>Gt(`tokens`)),n(`click`,X,()=>a(we,`model`)),n(`click`,ut,()=>a(we,`day`)),t(e,u)};R(p,e=>{k(I),l(()=>k(I).workbench)&&e(h)}),L(c),t(e,c)};R(v,e=>{k(be)===`agents`?e(y):e(b,-1)}),t(e,c)};R(Re,e=>{k(oe)?e(H):k(B)&&!k(I)?e(U,1):k(I)&&e(We,2)}),L(u);var Ge=g(u,2),Ke=e=>{var r=bR(),i=_(r),o=_(i),u=_(o),f=_(u),p=_(f,!0);L(f);var h=g(f,2),v=_(h,!0);L(h);var y=g(h,2),b=_(y,!0);L(y),L(u);var x=g(u,2);L(o);var w=g(o,2),E=_(w),O=_(E),j=_(O),M=_(j,!0);L(j);var N=g(j,2),P=_(N,!0);L(N),L(O);var F=g(O,2),te=e=>{var n=pR(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>W(`connectorsUnavailable`))]),t(e,n)};R(F,e=>{k(le)&&e(te)});var I=g(F,2);ie(I,5,()=>k(_e),e=>e.id,(e,r)=>{var i=mR();let o;var c=_(i),u=_(c),d=_(u,!0);L(u);var f=g(u,2),p=_(f,!0);L(f),L(c);var h=g(c,2),v=_(h,!0);L(h);var y=g(h,2),b=_(y);L(y);var x=g(y,2),S=e=>{var i=WL(),o=_(i),c=_(o,!0);L(o);var u=g(o,2);ne(u),L(i),s((e,t)=>{m(c,e),C(u,`aria-label`,t),ee(u,(k(ve),k(r),l(()=>k(ve)[k(r).id]??``)))},[()=>l(()=>W(`managementKey`)),()=>(k(r),l(()=>`${k(r).displayName} ${W(`managementKey`)}`))]),n(`input`,u,e=>a(ve,{...k(ve),[k(r).id]:e.currentTarget.value})),t(e,i)};R(x,e=>{k(r),l(()=>k(r).credentialOwner===`agent-usage`)&&e(S)});var w=g(x,2),T=_(w),E=e=>{var i=GL(),a=_(i,!0);L(i),s(e=>{i.disabled=(k(V),k(r),k(ve),l(()=>k(V)===k(r).id||!k(ve)[k(r).id])),m(a,e)},[()=>l(()=>W(`replaceCredential`))]),n(`click`,i,()=>ot(k(r).id,`connect`)),t(e,i)};R(T,e=>{k(r),l(()=>k(r).state===`connected`&&k(r).credentialOwner===`agent-usage`)&&e(E)});var O=g(T,2),A=e=>{var i=GL(),a=_(i,!0);L(i),s(e=>{i.disabled=(k(r),k(V),k(ve),l(()=>!k(r).installed||k(V)===k(r).id||k(r).credentialOwner===`agent-usage`&&!k(ve)[k(r).id])),m(a,e)},[()=>l(()=>W(`connect`))]),n(`click`,i,()=>ot(k(r).id,`connect`)),t(e,i)};R(O,e=>{k(r),l(()=>k(r).state===`discovered`||k(r).state===`skipped`)&&e(A)});var j=g(O,2),M=e=>{var i=KL(),a=_(i,!0);L(i),s(e=>{i.disabled=(k(V),k(r),l(()=>k(V)===k(r).id)),m(a,e)},[()=>l(()=>W(`retry`))]),n(`click`,i,()=>ot(k(r).id,`retry`)),t(e,i)};R(j,e=>{k(r),l(()=>k(r).state===`error`||k(r).state===`not-installed`||k(r).state===`connected`)&&e(M)});var N=g(j,2),P=e=>{var i=KL(),a=_(i,!0);L(i),s(e=>{i.disabled=(k(V),k(r),l(()=>k(V)===k(r).id)),m(a,e)},[()=>l(()=>W(`skip`))]),n(`click`,i,()=>ot(k(r).id,`skip`)),t(e,i)};R(N,e=>{k(r),l(()=>k(r).state!==`skipped`)&&e(P)}),L(w),L(i),s((e,t,n)=>{C(i,`data-settings-target`,(k(r),l(()=>`connector:${k(r).id}`))),C(i,`data-testid`,(k(r),l(()=>`settings-connector-${k(r).id}`))),o=D(i,1,`svelte-1uha8ag`,null,o,{"settings-target-active":k(Be)===`connector:${k(r).id}`}),m(d,(k(r),l(()=>k(r).displayName))),m(p,e),m(v,t),m(b,`${n??``} · ${k(r),l(()=>k(r).target.billingDomain.displayName)??``}`)},[()=>(k(r),l(()=>dt(k(r).state))),()=>(k(r),l(()=>pt(k(r)))),()=>(k(r),l(()=>ft(k(r).credentialOwner)))]),t(e,i)}),L(I),L(E);var re=g(E,2),ae=_(re),oe=_(ae),z=_(oe,!0);L(oe);var B=g(oe,2),ce=_(B,!0);L(B),L(ae);var pe=g(ae,2),he=e=>{var n=pR(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>W(`monitoringUnavailable`))]),t(e,n)};R(pe,e=>{k(ue)&&e(he)});var ge=g(pe,2),ye=e=>{var r=hR(),i=_(r),a=_(i);ne(a);var o=g(a);L(i);var c=g(i,2),u=_(c);ne(u);var d=g(u);L(c);var f=g(c,2),p=_(f);ne(p);var h=g(p);L(f),L(r),s((e,t,n)=>{T(a,(k(ke),l(()=>k(ke).backgroundCollectionEnabled))),m(o,` ${e??``}`),T(u,(k(ke),l(()=>k(ke).notificationsEnabled))),m(d,` ${t??``}`),T(p,(k(ke),l(()=>k(ke).startAtLogin))),m(h,` ${n??``}`)},[()=>l(()=>W(`backgroundCollection`)),()=>l(()=>W(`notifications`)),()=>l(()=>W(`startAtLogin`))]),n(`change`,a,e=>at({backgroundCollectionEnabled:e.currentTarget.checked})),n(`change`,u,e=>at({notificationsEnabled:e.currentTarget.checked})),n(`change`,p,e=>at({startAtLogin:e.currentTarget.checked})),t(e,r)};R(ge,e=>{k(ke)&&e(ye)}),L(re);var be=g(re,2),xe=_(be),Se=_(xe),Ce=_(Se,!0);L(Se);var we=g(Se,2),Te=_(we,!0);L(we),L(xe);var Ee=g(xe,2),De=e=>{var n=pR(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>W(`diagnosticsUnavailable`))]),t(e,n)};R(Ee,e=>{k(de)&&e(De)});var Oe=g(Ee,2),Ie=e=>{var n=yR();ie(n,5,()=>(k(Ae),d(se),l(()=>k(Ae).connectors.filter(e=>!se(e.category)))),e=>e.id,(e,n)=>{var r=vR();let i;var a=_(r),o=_(a),u=_(o,!0);L(o);var d=g(o,2),f=_(d,!0);L(d),L(a);var p=g(a,2),h=_(p,!0);L(p);var v=g(p,2),y=e=>{var r=gR(),i=_(r,!0);L(r),s(e=>m(i,e),[()=>(k(n),l(()=>k(n).affectedCoverage.map(Dt).join(` · `)))]),t(e,r)};R(v,e=>{k(n),l(()=>k(n).affectedCoverage.length>0)&&e(y)});var b=g(v,2),x=e=>{var r=_R(),i=_(r,!0);L(r),s(e=>m(i,e),[()=>(k(n),l(()=>ht(k(n))))]),t(e,r)},S=c(()=>(k(n),l(()=>ht(k(n)))));R(b,e=>{k(S)&&e(x)}),L(r),s((e,t)=>{C(r,`data-settings-target`,(k(n),l(()=>`diagnostic:${k(n).id}`))),C(r,`data-testid`,(k(n),l(()=>`settings-diagnostic-${k(n).id}`))),i=D(r,1,`svelte-1uha8ag`,null,i,{"diagnostic-degraded":k(n).status===`degraded`,"settings-target-active":k(Be)===`diagnostic:${k(n).id}`}),m(u,(k(n),l(()=>k(n).id))),m(f,e),m(h,t)},[()=>(k(n),l(()=>mt(k(n)))),()=>(k(n),l(()=>k(n).billingDomainId??W(`unknown`)))]),t(e,r)}),L(n),t(e,n)};R(Oe,e=>{k(Ae)&&e(Ie)}),L(be);var Le=g(be,2),Re=_(Le),ze=_(Re),Ve=_(ze,!0);L(ze);var H=g(ze,2),Ue=_(H,!0);L(H),L(Re);var U=g(Re,2),We=e=>{var n=pR(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>W(`retentionUnavailable`))]),t(e,n)},Ge=e=>{var n=UL(),r=_(n);L(n),s((e,t,n)=>m(r,`${k(je),l(()=>k(je).rawRetentionDays)??``}
|
|
32
|
+
${e??``} · ${k(je),l(()=>k(je).rawObservations)??``}
|
|
33
|
+
${t??``} · ${k(je),l(()=>k(je).dailyAggregates)??``}
|
|
34
|
+
${n??``}`),[()=>l(()=>W(`retentionDays`)),()=>l(()=>W(`rawObservations`)),()=>l(()=>W(`dailyAggregates`))]),t(e,n)};R(U,e=>{k(fe)?e(We):k(je)&&e(Ge,1)});var Ke=g(U,2),G=e=>{var n=pR(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>W(`privacyActionUnavailable`))]),t(e,n)};R(Ke,e=>{k(me)&&e(G)});var qe=g(Ke,2),Je=_(qe),Ye=_(Je,!0);L(Je);var Xe=g(Je,2),Ze=_(Xe,!0);L(Xe);var Qe=g(Xe,2),$e=_(Qe);ne($e);var K=g($e);L(Qe);var q=g(Qe,2),J=_(q);ne(J);var et=g(J);L(q);var tt=g(q,2),nt=_(tt,!0);L(tt);var st=g(tt,2),X=_(st,!0);L(st);var lt=g(st,2),ut=_(lt,!0);L(lt),L(qe),L(Le),L(w),L(i),S(i,e=>a(He,e),()=>k(He)),L(r),s((e,t,n,r,i,a,o,s,c,l,u,d,f,h,g,_,y,S,w)=>{m(p,e),m(v,t),m(b,n),C(x,`aria-label`,r),m(M,i),m(P,a),m(z,o),m(ce,s),m(Ce,c),m(Te,l),m(Ve,u),m(Ue,d),m(Ye,f),m(Ze,h),m(K,` ${g??``}`),m(et,` ${_??``}`),tt.disabled=k(Fe),m(nt,y),m(X,S),lt.disabled=k(Pe),m(ut,w)},[()=>l(()=>W(`settings`)),()=>l(()=>W(`settings`)),()=>l(()=>W(`settingsSubtitle`)),()=>l(()=>W(`closeSettings`)),()=>l(()=>W(`connections`)),()=>l(()=>W(`connectionsSubtitle`)),()=>l(()=>W(`monitoring`)),()=>l(()=>W(`monitoringSubtitle`)),()=>l(()=>W(`diagnostics`)),()=>l(()=>W(`diagnosticsSubtitle`)),()=>l(()=>W(`privacy`)),()=>l(()=>W(`privacySubtitle`)),()=>l(()=>W(`exportJson`)),()=>l(()=>W(`exportCsv`)),()=>l(()=>W(`includeAccountIdentifiers`)),()=>l(()=>W(`deleteProductSecrets`)),()=>(k(Fe),l(()=>k(Fe)?W(`hardRebuilding`):W(`hardRebuild`))),()=>l(()=>W(`hardRebuildWarning`)),()=>(k(Pe),l(()=>k(Pe)?W(`clearing`):W(`clearData`)))]),n(`click`,x,ct),n(`click`,Je,()=>rt(`json`)),n(`click`,Xe,()=>rt(`csv`)),A($e,()=>k(Ne),e=>a(Ne,e)),A(J,()=>k(Me),e=>a(Me,e)),n(`click`,tt,Y),n(`click`,lt,it),t(e,r)};R(Ge,e=>{k(ze)&&e(Ke)});var Je=g(Ge,2),Xe=e=>{let i=F(()=>k(Ue));var c=kR(),u=_(c),f=_(u),p=_(f),h=_(p),v=_(h);L(h);var y=g(h,2),b=e=>{var n=gR(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>W(`separateFromHeadline`))]),t(e,n)};R(y,e=>{d(k(i)),l(()=>k(i).includedInHeadline===!1)&&e(b)});var x=g(y,2),w=_(x);L(x),L(p);var T=g(p,2);L(f);var E=g(f,2),D=_(E),O=_(D),A=_(O),j=g(A),M=_(j,!0);L(j),L(O);var N=g(O,2),P=_(N),ee=g(P),te=_(ee),I=g(te),ne=e=>{var n=r();s(e=>m(n,`· ${e??``}`),[()=>l(()=>W(`coveragePartial`))]),t(e,n)};R(I,e=>{d(k(i)),l(()=>k(i).tokenEvidence.sourceReportedObservationCount>0&&k(i).tokenEvidence.sourceReportedObservationCount<k(i).tokenEvidence.observationCount)&&e(ne)}),L(ee),L(N);var ae=g(N,2),oe=_(ae),z=g(oe),B=_(z,!0);L(z),L(ae);var se=g(ae,2),ce=_(se),le=g(ce),ue=_(le,!0);L(le),L(se),L(D);var de=g(D,2),fe=_(de);L(de);var pe=g(de,2),me=_(pe),he=_(me),ge=_(he,!0);L(he);var _e=g(he,2),V=_(_e,!0);L(_e),L(me);var ve=g(me,2),ye=_(ve),be=_(ye,!0);L(ye);var xe=g(ye,2),Se=_(xe,!0);L(xe),L(ve);var Ce=g(ve,2),we=_(Ce),Te=_(we,!0);L(we);var Ee=g(we,2),Oe=_(Ee,!0);L(Ee),L(Ce);var ke=g(Ce,2),Ae=_(ke),je=_(Ae,!0);L(Ae);var Me=g(Ae,2),Ne=_(Me,!0);L(Me),L(ke);var Pe=g(ke,2),Fe=_(Pe),Ie=_(Fe,!0);L(Fe);var Le=g(Fe,2),Re=_(Le,!0);L(Le),L(Pe),L(pe);var ze=g(pe,2),Be=_(ze),Ve=_(Be,!0);L(Be);var H=g(Be,2);ie(H,5,()=>(d(k(i)),l(()=>k(i).observations)),e=>e.id,(e,n)=>{var r=xR(),i=_(r),a=_(i);L(i);var o=g(i,2),c=_(o,!0);L(o);var u=g(o,2),d=_(u);L(u);var f=g(u,2),p=_(f);L(f);var h=g(f,2),v=_(h);L(h);var y=g(h,2),b=_(y);L(y);var x=g(y,2),S=_(x);L(x);var C=g(x,2),w=_(C);L(C);var T=g(C,2),E=_(T);L(T),L(r),s((e,t,n,r,i,o,s,l,u,f,h,g,_,y,x,C,T)=>{m(a,`${e??``} ·
|
|
35
|
+
${t??``}`),m(c,n),m(d,`${r??``} ${i??``}`),m(p,`${o??``}
|
|
36
|
+
${s??``}`),m(v,`${l??``} ${u??``}`),m(b,`${f??``} ${h??``}`),m(S,`${g??``} ${_??``}`),m(w,`${y??``}
|
|
37
|
+
${x??``}`),m(E,`${C??``} · ${T??``}`)},[()=>(k(n),l(()=>St(k(n).authority))),()=>(k(n),l(()=>wt(k(n).timePrecision))),()=>(k(n),l(()=>bt(k(n).observedAt))),()=>l(()=>W(`scope`)),()=>(k(n),l(()=>Z(k(n).usageScope))),()=>l(()=>W(`aggregationTemporality`)),()=>(k(n),l(()=>Tt(k(n).aggregationTemporality))),()=>l(()=>W(`recordedTotal`)),()=>(k(n),l(()=>gt(k(n).recordedTokens))),()=>l(()=>W(`classified`)),()=>(k(n),l(()=>gt(k(n).classifiedTokens))),()=>l(()=>W(`unclassified`)),()=>(k(n),l(()=>gt(k(n).unclassifiedTokens))),()=>l(()=>W(`sourceReportedTotal`)),()=>(k(n),l(()=>k(n).sourceReportedTotalTokens===null?W(`notAvailable`):gt(k(n).sourceReportedTotalTokens))),()=>l(()=>W(`semantics`)),()=>(k(n),l(()=>Et(k(n).tokenSemantics)))]),t(e,r)}),L(H),L(ze);var He=g(ze,2),U=_(He),We=_(U,!0);L(U);var Ge=g(U,2),Ke=e=>{var n=SR(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>W(`noPriceEvidence`))]),t(e,n)},G=e=>{var n=re(),r=o(n);ie(r,1,()=>(d(k(i)),l(()=>k(i).priceEvidence)),e=>e.id,(e,n)=>{var r=wR(),i=_(r),a=_(i),o=_(a,!0);L(a);var c=g(a,2),u=_(c);L(c),L(i);var d=g(i,2);ie(d,1,()=>(k(n),l(()=>k(n).lineItems)),e=>`${k(n).id}:${e.tokenKind}`,(e,r)=>{var i=CR(),a=_(i),o=g(a),c=_(o);L(o),L(i),s((e,t,n,r)=>{m(a,`${e??``} · ${t??``} ·
|
|
38
|
+
${n??``} `),m(c,`${r??``} / 1M`)},[()=>(k(r),l(()=>tn(k(r).tokenKind))),()=>(k(r),l(()=>gt(k(r).tokens))),()=>(k(r),k(n),l(()=>Wt(k(r).amount,k(n).currency))),()=>(k(r),k(n),l(()=>Wt(k(r).ratePerMillion,k(n).currency)))]),t(e,i)});var f=g(d,2),p=e=>{var r=UL(),i=_(r);L(r),s((e,t)=>m(i,`${k(n),l(()=>k(n).priceSnapshot.version)??``} · ${k(n),l(()=>k(n).priceSnapshot.source)??``} ·
|
|
39
|
+
${e??``}
|
|
40
|
+
${t??``}`),[()=>l(()=>W(`priceEffective`)),()=>(k(n),l(()=>bt(k(n).priceSnapshot.effectiveAt)))]),t(e,r)};R(f,e=>{k(n),l(()=>k(n).priceSnapshot)&&e(p)});var h=g(f,2),v=e=>{var r=UL(),i=_(r);L(r),s((e,t)=>m(i,`${e??``}: ${t??``}`),[()=>l(()=>W(`calculatedAt`)),()=>(k(n),l(()=>bt(k(n).calculatedAt)))]),t(e,r)};R(h,e=>{k(n),l(()=>k(n).calculatedAt)&&e(v)}),L(r),s((e,t,n,r)=>{m(o,e),m(u,`${t??``} · ${n??``} · ${r??``}`)},[()=>(k(n),l(()=>Wt(k(n).amount,k(n).currency))),()=>(k(n),l(()=>k(n).kind===`reported-estimate`?W(`providerReportedEstimate`):W(`apiRetailEquivalent`))),()=>(k(n),l(()=>St(k(n).authority))),()=>(k(n),l(()=>bt(k(n).observedAt??null)))]),t(e,r)}),t(e,n)};R(Ge,e=>{d(k(i)),l(()=>k(i).priceEvidence.length===0)?e(Ke):e(G,-1)}),L(He);var qe=g(He,2),Je=_(qe),Ye=_(Je,!0);L(Je);var Xe=g(Je,2),Ze=_(Xe),Qe=_(Ze),$e=_(Qe),K=_($e,!0);L($e);var q=g($e),J=_(q,!0);L(q);var et=g(q),tt=_(et,!0);L(et);var Y=g(et),nt=_(Y,!0);L(Y),L(Qe),L(Ze);var rt=g(Ze);ie(rt,5,()=>(d(k(i)),l(()=>k(i).trend)),e=>e.start,(e,n)=>{let r=F(()=>(k(n),l(()=>k(n).retailEquivalent.status===`available`?k(n).retailEquivalent:k(n).reportedEstimate??k(n).retailEquivalent))),i=F(()=>(k(n),l(()=>k(n).retailEquivalent.status!==`available`&&k(n).reportedEstimate?.status===`available`)));var a=OR(),c=_(a),u=_(c,!0);L(c);var f=g(c),p=e=>{var n=TR(),r=_(n,!0);L(n),s(e=>m(r,e),[()=>l(()=>W(`gap`))]),t(e,n)},h=e=>{var a=DR(),c=o(a),u=_(c,!0);L(c);var f=g(c,2),p=_(f,!0);L(f);var h=g(f,2),v=_(h),y=g(v),b=e=>{var n=ER(),a=g(o(n));s((e,t,n)=>m(a,`${e??``} · ${t??``} ·
|
|
41
|
+
${n??``}`),[()=>(d(k(i)),l(()=>k(i)?W(`providerReportedEstimate`):W(`apiRetailEquivalent`))),()=>(d(k(r)),l(()=>Zt(k(r).authorities))),()=>(d(k(r)),l(()=>bt(k(r).observedAt??null)))]),t(e,n)};R(y,e=>{d(k(r)),l(()=>k(r).status===`available`)&&e(b)}),L(h),s((e,t,n,r)=>{m(u,e),m(p,t),m(v,`${n??``} ·
|
|
42
|
+
${r??``} `)},[()=>(k(n),l(()=>gt(k(n).tokenTotals.total))),()=>(d(k(r)),l(()=>k(r).status===`available`?Wt(k(r).amount,k(r).comparisonCurrency):W(`notAvailable`))),()=>(k(n),l(()=>Zt(k(n).authorities))),()=>(k(n),l(()=>bt(k(n).lastObservedAt??null)))]),t(e,a)};R(f,e=>{k(n),l(()=>k(n).gap)?e(p):e(h,-1)}),L(a),s(()=>m(u,(k(n),l(()=>k(n).label)))),t(e,a)}),L(rt),L(Xe),L(qe),L(E),L(u),S(u,e=>a(De,e),()=>k(De)),L(c),s((e,t,n,r,a,o,s,c,f,p,h,g,_,y,b,x,S,E,D,O,j,N,ee,F,I,L,ne,re,R,ie,ae,z)=>{C(u,`aria-label`,e),m(v,`${d(k(i)),l(()=>k(i).providerDisplayName)??``} · ${d(k(i)),l(()=>k(i).billingDomainDisplayName)??``}`),m(w,`${t??``}: ${d(k(i)),l(()=>k(i).model)??``}`),C(T,`aria-label`,n),m(A,`${r??``} `),m(M,a),m(P,`${o??``} `),m(te,`${s??``} `),m(oe,`${c??``} `),m(B,f),m(ce,`${p??``} `),m(ue,h),m(fe,`${g??``}: ${_??``} ·
|
|
43
|
+
${y??``}`),m(ge,b),m(V,x),m(be,S),m(Se,E),m(Te,D),m(Oe,O),m(je,j),m(Ne,N),m(Ie,ee),m(Re,F),m(Ve,I),m(We,L),m(Ye,ne),C(Xe,`aria-label`,re),m(K,R),m(J,ie),m(tt,ae),m(nt,z)},[()=>(d(k(i)),l(()=>`${W(`modelDetail`)}: ${k(i).model}`)),()=>l(()=>W(`modelDetail`)),()=>l(()=>W(`closeModelDetail`)),()=>l(()=>W(`recordedTotal`)),()=>(d(k(i)),l(()=>gt(k(i).tokenTotals.total))),()=>l(()=>W(`sourceReportedTotal`)),()=>(d(k(i)),l(()=>k(i).tokenEvidence.sourceReportedObservationCount===0?W(`notAvailable`):gt(k(i).tokenEvidence.sourceReportedTokens))),()=>l(()=>W(`totalDerivation`)),()=>(d(k(i)),l(()=>k(i).tokenEvidence.totalDerivations.join(` + `)||W(`unknown`))),()=>l(()=>W(`pricingCoverage`)),()=>(d(k(i)),l(()=>yt(k(i).retailEquivalent.pricingCoverage))),()=>l(()=>W(`source`)),()=>(d(k(i)),l(()=>Zt(k(i).authorities))),()=>(d(k(i)),l(()=>bt(k(i).lastObservedAt))),()=>l(()=>W(`input`)),()=>(d(k(i)),l(()=>gt(k(i).tokenTotals.input))),()=>l(()=>W(`output`)),()=>(d(k(i)),l(()=>gt(k(i).tokenTotals.output))),()=>l(()=>W(`reasoning`)),()=>(d(k(i)),l(()=>gt(k(i).tokenTotals.reasoning))),()=>l(()=>W(`cacheRead`)),()=>(d(k(i)),l(()=>gt(k(i).tokenTotals.cacheRead))),()=>l(()=>W(`cacheWrite`)),()=>(d(k(i)),l(()=>gt(k(i).tokenTotals.cacheWrite))),()=>l(()=>W(`providerEvidence`)),()=>l(()=>W(`priceLineItems`)),()=>l(()=>W(`modelTrend`)),()=>l(()=>W(`modelTrend`)),()=>l(()=>W(`interval`)),()=>l(()=>W(`tokens`)),()=>l(()=>W(`cost`)),()=>l(()=>W(`providerEvidence`))]),n(`click`,T,en),t(e,c)};R(Je,e=>{k(Ue)&&e(Xe)}),s((e,t,n,r,i,a,o)=>{u.inert=k(ze)||k(Ue)!==null,C(p,`alt`,e),m(v,t),C(y,`aria-label`,n),C(b,`aria-selected`,k(be)===`agents`),C(b,`tabindex`,k(be)===`agents`?0:-1),m(E,r),C(O,`aria-selected`,k(be)===`models`),C(O,`tabindex`,k(be)===`models`?0:-1),m(M,i),m(te,a),m(pe,k(w)===`en`?`中文`:`EN`),he.disabled=k(z),Te=D(ge,1,`svelte-1uha8ag`,null,Te,{spin:k(z)}),m(Ee,` ${o??``}`)},[()=>l(()=>W(`bannerAlt`)),()=>l(()=>W(`title`)),()=>l(()=>W(`mainViews`)),()=>l(()=>W(`agentUsageTab`)),()=>l(()=>W(`tokenModelCostsTab`)),()=>l(()=>W(`settings`)),()=>(k(z),l(()=>k(z)?W(`refreshing`):W(`refresh`)))]),n(`click`,b,()=>a(be,`agents`)),n(`keydown`,b,ut),n(`click`,O,()=>a(be,`models`)),n(`keydown`,O,ut),n(`click`,P,()=>st()),n(`click`,ae,qe),n(`click`,he,Ye),t(e,i)}),t(h,nn),y()}export{jR as component};
|