agent-usage-all-in-one 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/README.zh-CN.md +2 -2
- package/dist/cli.js +37 -11
- package/dist/cli.js.map +1 -1
- package/dist/web/_app/immutable/chunks/BxFVQ2kE.js +1 -0
- package/dist/web/_app/immutable/entry/{app.Cum34GuE.js → app.DoE5iRPD.js} +2 -2
- package/dist/web/_app/immutable/entry/start.-kFQj1Re.js +1 -0
- package/dist/web/_app/immutable/nodes/{1.DfK51mq1.js → 1.CO2k9heq.js} +1 -1
- package/dist/web/_app/immutable/nodes/2.C49HhYIP.js +28 -0
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +6 -6
- package/package.json +1 -1
- package/dist/web/_app/immutable/chunks/D5pAC-T7.js +0 -1
- package/dist/web/_app/immutable/entry/start.C5EjL_LL.js +0 -1
- package/dist/web/_app/immutable/nodes/2.DJI_veG-.js +0 -28
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{$ as e,A as t,B as n,D as r,E as i,G as a,I as o,J as s,K as c,L as l,M as u,N as d,O as f,P as p,R as m,T as h,V as g,W as _,X as v,Y as y,Z as b,_ as x,a as S,at as C,b as w,c as T,ct as E,d as D,et as O,f as k,g as A,h as j,j as M,k as N,l as P,lt as F,m as ee,n as I,nt as te,o as L,ot as ne,p as R,q as re,r as ie,rt as ae,s as oe,tt as z,u as B,ut as se,v as ce,w as le,x as ue,y as de,z as fe}from"../chunks/CkDl_J6h.js";import"../chunks/YtE49JQT.js";import"../chunks/xihTtKlq.js";E();function pe(e){return e==null||!Number.isFinite(e)?null:Math.min(100,Math.max(0,e))}function me(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 he=new Set([`stale`,`timeout`,`unavailable`]),ge=new Set([...he,`rate-limited`]);function _e(e){return e!==null&&ge.has(e)}function ve(e){return e?me(e,``):null}function ye(e,t){return`${e}:${t}`}function be(e,t,n){return!n&&(t===`stale`||t===`unavailable`)?[`${e}:freshness:${t}`]:[]}function xe(e,t){let n=ve(t);return n&&he.has(n)?[`${e}:health:${n}`]:[]}function Se(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=>ye(e.providerId,e.billingDomainId??``)));for(let t of e.providers){ve(t.health.errorCode)===`rate-limited`&&(t.summaryBillingDomainId?r.add(ye(t.id,t.summaryBillingDomainId)):n.add(t.id));for(let e of t.billingDomains)e.health&&ve(e.health.errorCode)===`rate-limited`&&r.add(ye(t.id,e.id))}let i=e.providers.flatMap(e=>{let t=n.has(e.id)||(e.summaryBillingDomainId?r.has(ye(e.id,e.summaryBillingDomainId)):!1),i=[...be(`provider:${e.id}`,e.freshness.status,t)];t||i.push(...xe(`provider:${e.id}`,e.health.errorCode));let a=e.billingDomains.flatMap(t=>{let i=t.freshness??e.freshness,a=t.health??e.health,o=n.has(e.id)||r.has(ye(e.id,t.id))||ve(a.errorCode)===`rate-limited`;return[...be(`domain:${e.id}:${t.id}`,i.status,o),...o?[]:xe(`domain:${e.id}:${t.id}`,a.errorCode)]});return[...i,...a]}),a=(t?.connectors??[]).filter(e=>e.category!==null&&he.has(e.category)&&!n.has(e.providerId)&&!(e.billingDomainId&&r.has(ye(e.providerId,e.billingDomainId)))).map(e=>`diagnostic:${e.id}:${e.billingDomainId??`provider`}:${e.category}`),o=[...new Set([...i,...a])].sort();return o.length>0?o.join(`|`):null}function Ce(e){let t=null,n=null,r=!1;return{schedule(i,a,o){if(r)return;let s=Se(i,a);if(!s){n=null,t&&clearTimeout(t),t=null;return}if(!t){if(o){n=s;return}s!==n&&(n=s,t=setTimeout(()=>{t=null,!r&&e()},0))}},dispose(){r=!0,t&&clearTimeout(t),t=null}}}var we={en:{eyebrow:`LOCAL USAGE CENTER`,title:`Agent Usage`,bannerAlt:`Agent Usage — one local view for quota, tokens, and equivalent API cost`,metaDescription:`A private local dashboard for coding-agent quota, token, and cost usage.`,subtitle:`Quota, tokens, and freshness in one private local view.`,mainViews:`Main views`,agentUsageTab:`Agent usage`,tokenModelCostsTab:`Tokens & model costs`,refresh:`Refresh`,refreshing:`Refreshing…`,settings:`Settings`,closeSettings:`Close settings`,settingsSubtitle:`Connections, automation, diagnostics, and local data controls.`,themeSystem:`System`,themeLight:`Light`,themeDark:`Dark`,themeToggleAria:`Toggle color theme (system, light, dark)`,reviewInSettings:`Review in settings`,connectorsUnavailable:`Connection settings are unavailable.`,monitoringUnavailable:`Monitoring settings are unavailable.`,diagnosticsUnavailable:`Diagnostics are unavailable.`,retentionUnavailable:`Retention data is unavailable.`,privacyActionUnavailable:`The local data action could not be completed.`,refreshUnavailable:`Refresh failed. Existing usage is still shown.`,loading:`Loading provider usage…`,loadingAgentUsage:`Loading cached agent usage…`,loadingModelCosts:`Loading cached token and model cost data…`,updating:`Updating`,updatingModelCosts:`Updating token and model cost calculations in the background. Cached results remain available.`,error:`Usage data could not be loaded.`,updatedNow:`Updated just now`,updated:`Updated`,unavailable:`Never updated`,quota:`Quota windows`,noQuotaWindow:`No quota window`,noQuotaWindowDetail:`This Provider meters each request instead of an allowance. Its Tokens and API retail equivalent are in Tokens & model costs.`,noQuotaReported:`No quota window reported yet. Only the official client states this allowance; Tokens and cost stay complete without it.`,quotaTimelineTitle:`Quota timeline`,quotaTimelineCurrentRange:`current`,quotaTimelineWeekly:`Weekly`,quotaTimelineFiveHour:`5 hour`,quotaTimelinePrevious:`Previous period`,quotaTimelineNext:`Next period`,quotaTimelineToday:`Today`,quotaTimelineModes:`Quota timeline range`,quotaTimelineElapsed:`Elapsed window`,quotaTimelineCurrent:`Current window`,quotaTimelineUpcoming:`Upcoming window`,quotaTimelineEmpty:`No provider reports a five-hour quota window.`,quotaTimelineData:`Quota timeline data`,quotaTimelineAccount:`Account / billing domain`,tokens:`Tokens`,total:`Total`,input:`Input`,output:`Output`,reasoning:`Reasoning`,cacheRead:`Cache read`,cacheWrite:`Cache write`,classified:`Classified`,unclassified:`Unclassified`,semantics:`Semantics`,includedInOutput:`Included in output`,includedInInput:`Included in input`,separateCategory:`Separate`,precisionHour:`Hour`,precisionDay:`Day`,aggregationTemporality:`Aggregation`,temporalityDelta:`Delta`,temporalityCumulative:`Cumulative`,temporalityUnknown:`Unknown`,used:`used`,resets:`Resets`,source:`Source`,scope:`Scope`,plan:`Plan`,accountWide:`Account-wide`,localOnly:`This Mac only`,limit:`Limit`,fallback:`Use balance`,unknown:`Unknown`,noProviders:`No providers have reported usage yet.`,providersLabel:`Providers`,billingDomainTabs:`billing domains`,connections:`Connections`,connectionsSubtitle:`Discover local clients, review access, and connect each provider independently.`,connect:`Connect`,skip:`Skip`,retry:`Retry`,experimental:`Experimental`,stable:`Stable`,officialClient:`Official client`,managedSecret:`Agent Usage Keychain`,noCredential:`No credential required`,installed:`Installed`,notInstalled:`Not installed`,notChecked:`Not checked`,discovered:`Ready to connect`,connected:`Connected`,manageConnection:`Manage connection`,connectionSetup:`Connection setup`,skipped:`Skipped`,connectionError:`Discovery failed`,coverageLabel:`Expected coverage`,managementKey:`Management API key`,replaceCredential:`Replace credential`,tokenBreakdown:`Token breakdown`,billing:`Billing`,actualCost:`Actual cost`,prepaid:`Prepaid balance`,spendingLimit:`Spending limit`,currentInvoice:`Current invoice`,invoices:`Invoices`,history:`History`,recordedTokens:`Recorded tokens`,unpricedTokens:`unpriced Tokens`,latestData:`Latest observed data`,generatedAt:`Summary generated`,noObservations:`No token observations in this window`,notAvailable:`Unavailable`,domainContributions:`Token contributions by billing domain`,separateFromHeadline:`Separate domain · not included in headline`,headlineShareNotApplicable:`Not applicable to headline`,topModels:`Top models`,topDays:`Top days`,nativeAmount:`Native`,comparison:`Comparison`,rateUnavailable:`Rate unavailable`,unknownAmount:`Unknown amount`,priceVersion:`Price version`,exchangeRate:`Exchange rate`,tokenMoneyWorkbench:`Tokens & model costs`,workbenchSubtitle:`Token consumption and API-equivalent cost by model for the selected time range.`,usage:`Usage`,usageOverview:`Usage overview`,providerShare:`Provider share`,providerShareSubtitle:`Distribution within the selected headline metric`,cost:`Cost`,model:`Model`,breakdown:`Breakdown`,breakdownView:`Breakdown view`,list:`List`,treemap:`Treemap`,trendStacked:`Stacked trend`,modelTrendStacked:`Stacked model trend`,usageTotals:`Totals`,costTrend:`Cost over time`,tokenTrend:`Tokens over time`,displayCurrency:`Display currency`,trendMetric:`Trend metric`,recordedTokenTrend:`Recorded Token trend`,retailEquivalentTrend:`API retail equivalent trend`,trendData:`Trend data`,trendSummary:`Selected window and Provider series, including gaps and time precision`,timeAxisControls:`Time axis controls`,zoomInTimeAxis:`Zoom in time axis`,zoomOutTimeAxis:`Zoom out time axis`,resetTimeAxis:`Reset time axis`,interactiveTrend:`Interactive usage trend`,trendInteractionHint:`Scroll to zoom · drag to pan`,interval:`Interval`,gap:`Gap`,amountCoverage:`Amount coverage`,conversionEvidence:`Conversion evidence`,noConversionNeeded:`Native currency; no conversion required`,modelRankingSubtitle:`Known models stay separate by Provider and billing domain. Select a row to audit its evidence.`,modelBreakdownTreemap:`Model breakdown treemap`,treemapHint:`Block area shows the share of the selected metric. Click a block to audit a model.`,sortByTokens:`Sort by recorded Tokens`,sortByRetailEquivalent:`Sort by API retail equivalent`,tokenShare:`Token share`,costShare:`Cost share`,modelDetail:`Model detail`,closeModelDetail:`Close model detail`,activityOverview:`Activity overview`,observations:`Observations`,evidenceSummary:`Evidence summary`,auditDetails:`Audit details`,priceSnapshot:`Price snapshot`,ratePerMillion:`Rate / 1M`,derivationSourceReported:`Source-reported`,derivationReconciledRemainder:`Reconciled remainder`,derivationCategorized:`Categorized fields`,derivationLegacyTotal:`Legacy total`,recordedTotal:`Recorded total`,sourceReportedTotal:`Source-reported total`,totalDerivation:`Total derivation`,priceLineItems:`Price line items`,priceEffective:`Price effective`,modelTrend:`Model trend`,calculatedAt:`Calculated`,noPriceEvidence:`No eligible retail price evidence`,mostConstrained:`Most constrained`,recommendation:`Recommended agent`,remaining:`remaining`,predictedExhaustion:`Predicted exhaustion`,lastsUntilReset:`Expected to last until reset`,exhaustsBeforeReset:`Expected to exhaust before reset`,readOnlyAdvice:`Advice only · never switches agents`,highestSafeCapacity:`Highest safe capacity among fresh providers`,forecastSupports:`Forecast lasts through the next reset`,samples:`samples`,monitoring:`Monitoring`,backgroundCollection:`Collect every 5 minutes`,notifications:`Local notifications`,startAtLogin:`Start at login`,monitoringSubtitle:`Opt-in local controls; provider backoff is always respected.`,diagnostics:`Diagnostics`,diagnosticsSubtitle:`Connector and billing-domain health with actionable recovery.`,healthy:`Healthy`,providerDegraded:`Provider data is degraded`,providerRecovery:`Run doctor, check this provider connection, and refresh.`,coverageComplete:`Complete`,coveragePartial:`Partial`,coverageUnavailable:`Unavailable`,authorityOfficialAccount:`Official account`,authorityOfficialClient:`Official client`,authorityLocalObservation:`Local observation`,authorityEstimate:`Estimate`,authorityUnavailable:`Unavailable`,authorityMixed:`Mixed sources`,confidenceHigh:`High confidence`,confidenceMedium:`Medium confidence`,costActual:`Actual`,costSubscription:`Subscription`,costReportedEstimate:`Reported estimate`,costRetailEquivalent:`API retail equivalent`,costLegacyUnknown:`Legacy purpose unknown`,enabled:`Enabled`,disabled:`Disabled`,onboardingEyebrow:`ONBOARDING`,automationEyebrow:`LOCAL AUTOMATION`,healthEyebrow:`LOCAL HEALTH`,privacyEyebrow:`LOCAL PRIVACY`,codexPermission:`Read quota and usage through the installed official Codex client.`,claudePermission:`Read opt-in telemetry and usage exposed by the official Claude client.`,openCodePermission:`Read account quota and local exports through official OpenCode surfaces.`,grokPermission:`Read opt-in Grok Build telemetry and official client billing capability.`,xaiPermission:`Store a dedicated management key for official xAI billing data.`,dshPermission:`Read local dsh session logs for token history. No credential file is opened.`,diagnosticMissingBinary:`Missing binary`,diagnosticNotConfigured:`Not configured`,diagnosticUnauthorized:`Unauthorized`,diagnosticUnsupported:`Unsupported`,diagnosticSchemaMismatch:`Schema mismatch`,diagnosticRateLimited:`Rate limited`,diagnosticTimeout:`Timeout`,diagnosticStale:`Automatic refresh pending`,diagnosticUnavailable:`Unavailable`,recoveryMissingBinary:`Install the official client, then retry discovery.`,recoveryNotConfigured:`Connect this provider in onboarding, then refresh.`,recoveryUnauthorized:`Sign in again or replace the credential, then refresh.`,recoveryUnsupported:`Upgrade the official client or disable this unsupported capability.`,recoverySchemaMismatch:`Upgrade Agent Usage or the official client, then retry.`,recoveryRateLimited:`Wait for the provider backoff, then retry.`,recoveryTimeout:`Check the client process and network, then retry.`,recoveryStale:`Agent Usage will retry this connector automatically.`,recoveryUnavailable:`Run doctor, check the connector, and retry refresh.`,planValue:`Subscription value`,planValueSubtitle:`What each plan costs for this window against the API retail equivalent of the Tokens it produced.`,planValueChartLabel:`Subscription value map`,planValueRankingLabel:`Value multiple ranking`,planValueRatio:`Value multiple`,planValueBreakEven:`Break-even 1x`,planValuePaid:`Prorated plan cost`,planValueWorth:`Retail equivalent`,planValueAtLeast:`at least`,planValueEffectiveUnitPrice:`Your unit price`,planValueRetailUnitPrice:`Market unit price`,planValueSavings:`Saved`,planValueOverpaid:`Overpaid`,planValuePerMillion:`per million Tokens`,planValueWindowNote:`Plan price prorated to the selected window`,planValuePartial:`Some Tokens are unpriced, so this multiple is a lower bound.`,planValueEmpty:`No plan price is set yet.`,planValueEmptyAction:`Set your plan price in settings`,planValueMetered:`Metered billing · no plan price`,planValueUnconfigured:`No plan price set`,planValueUnavailable:`Value multiple unavailable`,planPeriodLabel:`This billing period`,planPeriodDays:`days`,planPeriodEarnedBack:`Earned back`,planPeriodOnPace:`On pace to pay for itself`,planPeriodBehindPace:`Behind the pace to pay for itself`,planPeriodUnknown:`Add a renewal date to read this billing period`,planAnchorDate:`Renewal date`,planAnchorHint:`Any past or future renewal date. It sets the billing period boundaries.`,plans:`Subscription plans`,plansSubtitle:`Declare what each plan costs. The price stays on this Mac, is never collected, and is only compared with the API retail equivalent.`,plansUnavailable:`Subscription plan settings are unavailable.`,planPreset:`Plan`,planCustom:`Custom price`,planNone:`Not set`,planAmount:`Price`,planCurrency:`Currency`,planPeriod:`Billing period`,planPeriodMonthly:`Monthly`,planPeriodAnnual:`Annual`,planSave:`Save`,planClear:`Clear`,planPresetSource:`Preset price · confirm it against your invoice`,planUserEntered:`Price you entered`,customRates:`Custom model rates`,customRatesSubtitle:`Configure per-million token rates for custom endpoint models. Custom rates take precedence over the built-in catalog and automatically backfill unpriced history.`,customRatesUnavailable:`Custom model rates are unavailable.`,customRateProvider:`Provider`,customRateDomain:`Billing domain`,customRateDomainWildcard:`All routes (wildcard)`,customRateModel:`Model`,customRateInput:`Input ($/M)`,customRateOutput:`Output ($/M)`,customRateCacheRead:`Cache read ($/M)`,customRateAdd:`Add custom rate`,customRateSave:`Save rate`,customRateEdit:`Edit`,customRateCancel:`Cancel`,customRateUpdating:`Saving…`,customRateDelete:`Delete`,customRateDeleting:`Deleting…`,customRateRefresh:`Refresh`,customRateRefreshTitle:`Refresh custom rates`,customRateProviderOther:`Other provider…`,customRateProviderCustomPlaceholder:`Enter provider ID`,customRateDeleteConfirm:`Delete this rate?`,customRateUpdated:`Updated`,setCustomRateForModel:`Set custom rate`,customRatesNav:`Rates`,customRateEmpty:`No custom model rates configured.`,privacy:`Privacy & data`,privacySubtitle:`Exports omit account identifiers and secrets. Raw data stays local.`,retentionDays:`day raw retention`,rawObservations:`raw observations`,dailyAggregates:`daily aggregates`,exportJson:`Export JSON`,exportCsv:`Export CSV`,includeAccountIdentifiers:`Include available account identifiers`,deleteProductSecrets:`Also delete product Keychain entries`,clearData:`Clear local usage`,clearing:`Clearing…`,clearConfirmation:`Clear all local usage history? Official-client credentials are preserved.`,hardRebuild:`Hard rebuild all data`,hardRebuilding:`Hard rebuild running…`,hardRebuildWarning:`High-cost operation: ignores scan and pricing caches. It can take a long time, but the dashboard remains usable.`,hardRebuildConfirmation:`Hard rebuild all local usage and cost data? This ignores caches, is resource-intensive, and may take a long time.`},"zh-CN":{eyebrow:`本地用量中心`,title:`Agent Usage`,bannerAlt:`Agent Usage——在一个本地视图中查看额度、Token 和 API 对等费用`,metaDescription:`在本地私密查看编程 Agent 的额度、Token 和费用用量。`,subtitle:`在一个私密的本地视图中查看额度、Token 与数据新鲜度。`,mainViews:`主要视图`,agentUsageTab:`Agent 用量`,tokenModelCostsTab:`Token 与模型费用`,refresh:`刷新`,refreshing:`刷新中…`,settings:`设置`,closeSettings:`关闭设置`,settingsSubtitle:`连接、自动化、诊断与本地数据控制。`,themeSystem:`跟随系统`,themeLight:`浅色`,themeDark:`深色`,themeToggleAria:`切换颜色主题(跟随系统、浅色、深色)`,reviewInSettings:`在设置中查看`,connectorsUnavailable:`连接设置暂不可用。`,monitoringUnavailable:`监控设置暂不可用。`,diagnosticsUnavailable:`诊断信息暂不可用。`,retentionUnavailable:`保留策略数据暂不可用。`,privacyActionUnavailable:`无法完成本地数据操作。`,refreshUnavailable:`刷新失败,继续显示已有用量。`,loading:`正在加载 provider 用量…`,loadingAgentUsage:`正在加载已缓存的 Agent 用量…`,loadingModelCosts:`正在加载已缓存的 Token 与模型费用…`,updating:`更新中`,updatingModelCosts:`正在后台更新 Token 与模型费用,已缓存的结果仍可查看。`,error:`无法加载用量数据。`,updatedNow:`刚刚更新`,updated:`更新于`,unavailable:`从未更新`,quota:`额度窗口`,noQuotaWindow:`没有额度窗口`,noQuotaWindowDetail:`该 Provider 按请求计量,没有额度。Token 与 API 对等零售价见「Token 与模型费用」。`,noQuotaReported:`暂未获取到额度窗口。只有官方客户端会给出该额度;即使拿不到,Token 与费用依然完整。`,quotaTimelineTitle:`额度时序`,quotaTimelineCurrentRange:`当前`,quotaTimelineWeekly:`按周`,quotaTimelineFiveHour:`5 小时`,quotaTimelinePrevious:`上一周期`,quotaTimelineNext:`下一周期`,quotaTimelineToday:`今天`,quotaTimelineModes:`额度时序范围`,quotaTimelineElapsed:`已结束窗口`,quotaTimelineCurrent:`当前窗口`,quotaTimelineUpcoming:`后续窗口`,quotaTimelineEmpty:`当前没有 Provider 提供 5 小时额度窗口。`,quotaTimelineData:`额度时序数据`,quotaTimelineAccount:`账户 / 计费域`,tokens:`Token`,total:`总计`,input:`输入`,output:`输出`,reasoning:`推理`,cacheRead:`缓存读取`,cacheWrite:`缓存写入`,classified:`已分类`,unclassified:`未分类`,semantics:`Token 语义`,includedInOutput:`包含在输出中`,includedInInput:`包含在输入中`,separateCategory:`独立计算`,precisionHour:`小时级`,precisionDay:`日级`,aggregationTemporality:`聚合方式`,temporalityDelta:`增量`,temporalityCumulative:`累计`,temporalityUnknown:`未知`,used:`已使用`,resets:`刷新于`,source:`来源`,scope:`范围`,plan:`计划`,accountWide:`账户全局`,localOnly:`仅此 Mac`,limit:`额度`,fallback:`超额使用余额`,unknown:`未知`,noProviders:`尚无 provider 上报用量。`,providersLabel:`Provider`,billingDomainTabs:`计费域`,connections:`连接`,connectionsSubtitle:`发现本地客户端、检查访问权限,并独立连接每个 provider。`,connect:`连接`,skip:`跳过`,retry:`重试`,experimental:`实验性`,stable:`稳定`,officialClient:`官方客户端`,managedSecret:`Agent Usage 钥匙串`,noCredential:`无需凭据`,installed:`已安装`,notInstalled:`未安装`,notChecked:`尚未检查`,discovered:`可以连接`,connected:`已连接`,manageConnection:`管理连接`,connectionSetup:`连接设置`,skipped:`已跳过`,connectionError:`发现失败`,coverageLabel:`预期覆盖`,managementKey:`Management API 密钥`,replaceCredential:`替换凭据`,tokenBreakdown:`Token 分类明细`,billing:`计费`,actualCost:`实际费用`,prepaid:`预付余额`,spendingLimit:`消费上限`,currentInvoice:`当前账单`,invoices:`历史账单`,history:`历史`,recordedTokens:`已记录 Token`,unpricedTokens:`未定价 Token`,latestData:`最新观测数据`,generatedAt:`摘要生成时间`,noObservations:`当前时间范围内没有 Token 观测`,notAvailable:`不可用`,domainContributions:`按计费域划分的 Token 贡献`,separateFromHeadline:`独立计费域 · 不计入摘要总量`,headlineShareNotApplicable:`不适用于摘要占比`,topModels:`模型排行`,topDays:`日期排行`,nativeAmount:`原币`,comparison:`对比币种`,rateUnavailable:`汇率不可用`,unknownAmount:`金额未知`,priceVersion:`价格版本`,exchangeRate:`汇率`,tokenMoneyWorkbench:`Token 与模型费用`,workbenchSubtitle:`按所选时间范围查看各模型的 Token 消耗与 API 对等费用。`,usage:`用量`,usageOverview:`用量总览`,providerShare:`Provider 占比`,providerShareSubtitle:`按当前摘要指标展示所选范围内的分布`,cost:`费用`,model:`模型`,breakdown:`明细`,breakdownView:`明细视图`,list:`列表`,treemap:`矩形树图`,trendStacked:`趋势堆叠`,modelTrendStacked:`模型趋势堆叠图`,usageTotals:`汇总`,costTrend:`费用趋势`,tokenTrend:`Token 趋势`,displayCurrency:`显示币种`,trendMetric:`趋势指标`,recordedTokenTrend:`已记录 Token 趋势`,retailEquivalentTrend:`API 等价零售价趋势`,trendData:`趋势数据`,trendSummary:`选中时间范围与 Provider 序列,包含数据缺口和时间精度`,timeAxisControls:`时间轴控制`,zoomInTimeAxis:`放大时间轴`,zoomOutTimeAxis:`缩小时间轴`,resetTimeAxis:`重置时间轴`,interactiveTrend:`交互式用量趋势`,trendInteractionHint:`滚轮缩放 · 拖拽平移`,interval:`区间`,gap:`数据缺口`,amountCoverage:`金额覆盖率`,conversionEvidence:`换算证据`,noConversionNeeded:`原币显示,无需换算`,modelRankingSubtitle:`已知模型按 Provider 与计费域分开;选择一行可审计完整证据。`,modelBreakdownTreemap:`模型明细矩形树图`,treemapHint:`色块面积表示所选指标的占比。点击色块可查看该模型的详情。`,sortByTokens:`按已记录 Token 排序`,sortByRetailEquivalent:`按 API 等价零售价排序`,tokenShare:`Token 占比`,costShare:`费用占比`,modelDetail:`模型详情`,closeModelDetail:`关闭模型详情`,activityOverview:`活动概览`,observations:`观测次数`,evidenceSummary:`证据摘要`,auditDetails:`审计详情`,priceSnapshot:`价格快照`,ratePerMillion:`每百万 Token 单价`,derivationSourceReported:`来源报告`,derivationReconciledRemainder:`对账余量`,derivationCategorized:`分类字段汇总`,derivationLegacyTotal:`旧版总量`,recordedTotal:`已记录总量`,sourceReportedTotal:`来源报告总量`,totalDerivation:`总量推导`,priceLineItems:`价格行项目`,priceEffective:`价格生效`,modelTrend:`模型趋势`,calculatedAt:`计算时间`,noPriceEvidence:`没有符合条件的零售价格证据`,mostConstrained:`最紧张额度`,recommendation:`推荐使用`,remaining:`剩余`,predictedExhaustion:`预计耗尽`,lastsUntilReset:`预计可坚持到刷新`,exhaustsBeforeReset:`预计会在刷新前耗尽`,readOnlyAdvice:`仅提供建议 · 永不自动切换 agent`,highestSafeCapacity:`新鲜数据中安全余量最高`,forecastSupports:`预测可坚持到下一次刷新`,samples:`个样本`,monitoring:`持续监控`,backgroundCollection:`每 5 分钟采集`,notifications:`本机通知`,startAtLogin:`登录时启动`,monitoringSubtitle:`本地显式控制;始终遵守 provider 退避。`,diagnostics:`诊断与恢复`,diagnosticsSubtitle:`连接器与计费域健康状态,以及可执行的恢复建议。`,healthy:`健康`,providerDegraded:`Provider 数据已降级`,providerRecovery:`运行 doctor、检查该 provider 连接,然后刷新。`,coverageComplete:`完整`,coveragePartial:`部分`,coverageUnavailable:`不可用`,authorityOfficialAccount:`官方账户`,authorityOfficialClient:`官方客户端`,authorityLocalObservation:`本机观测`,authorityEstimate:`估算`,authorityUnavailable:`不可用`,authorityMixed:`混合来源`,confidenceHigh:`高置信度`,confidenceMedium:`中等置信度`,costActual:`实际费用`,costSubscription:`订阅费用`,costReportedEstimate:`来源报告估算`,costRetailEquivalent:`API 等价零售价`,costLegacyUnknown:`旧数据用途未知`,enabled:`已启用`,disabled:`已停用`,onboardingEyebrow:`连接引导`,automationEyebrow:`本地自动化`,healthEyebrow:`本地健康状态`,privacyEyebrow:`本地隐私`,codexPermission:`通过已安装的官方 Codex 客户端读取额度与用量。`,claudePermission:`读取用户主动开启的 telemetry 与官方 Claude 客户端提供的用量。`,openCodePermission:`通过 OpenCode 官方入口读取账户额度与本机导出。`,grokPermission:`读取用户主动开启的 Grok Build telemetry 与官方客户端计费能力。`,xaiPermission:`保存独立 Management key,用于读取官方 xAI 计费数据。`,dshPermission:`读取本机 dsh 会话日志中的 Token 历史,不会打开任何凭据文件。`,diagnosticMissingBinary:`缺少客户端`,diagnosticNotConfigured:`尚未配置`,diagnosticUnauthorized:`授权失效`,diagnosticUnsupported:`能力不支持`,diagnosticSchemaMismatch:`数据格式不兼容`,diagnosticRateLimited:`请求受限`,diagnosticTimeout:`请求超时`,diagnosticStale:`等待自动刷新`,diagnosticUnavailable:`不可用`,recoveryMissingBinary:`安装官方客户端,然后重新发现。`,recoveryNotConfigured:`在连接引导中连接该 provider,然后刷新。`,recoveryUnauthorized:`重新登录或替换凭据,然后刷新。`,recoveryUnsupported:`升级官方客户端,或停用当前不支持的能力。`,recoverySchemaMismatch:`升级 Agent Usage 或官方客户端,然后重试。`,recoveryRateLimited:`等待 provider 退避结束,然后重试。`,recoveryTimeout:`检查客户端进程与网络,然后重试。`,recoveryStale:`Agent Usage 将自动重试该连接。`,recoveryUnavailable:`运行 doctor、检查 connector,然后重试刷新。`,planValue:`订阅性价比`,planValueSubtitle:`本窗口内每个订阅摊销了多少钱,对比它产出的 Token 的 API 对等市场价。`,planValueChartLabel:`订阅性价比图谱`,planValueRankingLabel:`价值倍数排行`,planValueRatio:`价值倍数`,planValueBreakEven:`保本线 1x`,planValuePaid:`摊销订阅费`,planValueWorth:`对等市场价`,planValueAtLeast:`至少`,planValueEffectiveUnitPrice:`你的实际单价`,planValueRetailUnitPrice:`市场单价`,planValueSavings:`节省`,planValueOverpaid:`多付`,planValuePerMillion:`每百万 Token`,planValueWindowNote:`订阅价已按当前时间窗摊销`,planValuePartial:`部分 Token 未定价,因此该倍数是下限。`,planValueEmpty:`还没有设置订阅价格。`,planValueEmptyAction:`在设置中填写订阅价格`,planValueMetered:`按量计费 · 无订阅价`,planValueUnconfigured:`未设置订阅价`,planValueUnavailable:`无法计算价值倍数`,planPeriodLabel:`本计费周期`,planPeriodDays:`天`,planPeriodEarnedBack:`已回本`,planPeriodOnPace:`按当前进度可以回本`,planPeriodBehindPace:`按当前进度回不了本`,planPeriodUnknown:`填写续费日后可查看本计费周期`,planAnchorDate:`续费日`,planAnchorHint:`填任意一次续费日期,过去或将来都可以,用于确定计费周期的起止。`,plans:`订阅计划`,plansSubtitle:`填写每个订阅的价格。价格只保存在本机,不会被采集,只用于和 API 对等市场价做对比。`,plansUnavailable:`订阅计划设置不可用。`,planPreset:`档位`,planCustom:`自定义价格`,planNone:`未设置`,planAmount:`价格`,planCurrency:`币种`,planPeriod:`计费周期`,planPeriodMonthly:`按月`,planPeriodAnnual:`按年`,planSave:`保存`,planClear:`清除`,planPresetSource:`预置价格 · 请对照账单确认`,planUserEntered:`你填写的价格`,customRates:`自定义模型费率`,customRatesSubtitle:`为自定义端点模型设置每百万 Token 单价(美元)。自定义费率优先于官方目录,并自动重新计算历史未定价会话。`,customRatesUnavailable:`自定义模型费率不可用。`,customRateProvider:`Provider`,customRateDomain:`计费域 / 路由`,customRateDomainWildcard:`全部路由(通配)`,customRateModel:`模型名称`,customRateInput:`输入单价 ($/M)`,customRateOutput:`输出单价 ($/M)`,customRateCacheRead:`缓存读单价 ($/M)`,customRateAdd:`添加自定义费率`,customRateSave:`保存费率`,customRateEdit:`编辑`,customRateCancel:`取消`,customRateUpdating:`保存中…`,customRateDelete:`删除`,customRateDeleting:`删除中…`,customRateRefresh:`刷新`,customRateRefreshTitle:`刷新自定义费率`,customRateProviderOther:`其他 Provider…`,customRateProviderCustomPlaceholder:`输入 Provider ID`,customRateDeleteConfirm:`确定删除此费率?`,customRateUpdated:`更新于`,setCustomRateForModel:`设置自定义费率`,customRatesNav:`自定义费率`,customRateEmpty:`暂未配置任何自定义模型费率。`,privacy:`隐私与数据`,privacySubtitle:`导出会移除账户标识与密钥;原始数据只保存在本机。`,retentionDays:`天原始数据保留期`,rawObservations:`条原始记录`,dailyAggregates:`条每日聚合`,exportJson:`导出 JSON`,exportCsv:`导出 CSV`,includeAccountIdentifiers:`导出可得的账户标识`,deleteProductSecrets:`同时删除产品 Keychain 条目`,clearData:`清除本地用量`,clearing:`清除中…`,clearConfirmation:`清除全部本地用量历史?官方客户端凭据会保留。`,hardRebuild:`硬重算全部数据`,hardRebuilding:`硬重算进行中…`,hardRebuildWarning:`高代价操作:忽略扫描与定价缓存,可能等待很久,但不会阻塞页面使用。`,hardRebuildConfirmation:`确定硬重算全部本地用量与费用数据吗?该操作会忽略缓存、消耗较多资源,并且可能需要等待很长时间。`}};function Te(e){return e.toLowerCase().startsWith(`zh`)?`zh-CN`:`en`}function Ee(e,t){return we[e][t]}var De=`agent-usage:theme-changed`,Oe=`agent-usage:theme`,ke=`(prefers-color-scheme: dark)`;function Ae(){if(typeof window>`u`)return`system`;try{let e=window.localStorage.getItem(Oe);return e===`light`||e===`dark`||e===`system`?e:`system`}catch{return`system`}}function je(){if(typeof window>`u`)return!1;try{return window.matchMedia(ke).matches}catch{return!1}}function Me(e){return e===`light`||e===`dark`?e:je()?`dark`:`light`}var Ne=ae(Ae()),Pe=ae(`light`),Fe=Ne,Ie=Pe,Le=Ae(),Re=!1;function ze(e){if(typeof window>`u`)return;let t=window.document.documentElement;t.dataset.theme=e;try{t.style.colorScheme=e}catch{}}function Be(e){typeof window>`u`||window.dispatchEvent(new CustomEvent(De,{detail:{theme:e}}))}function Ve(){let e=Me(Le);Ne.set(Le),Pe.set(e),ze(e)}function He(){Re||typeof window>`u`||(Re=!0,window.matchMedia(ke).addEventListener(`change`,()=>{if(Le!==`system`)return;let e=Me(`system`);Pe.set(e),ze(e),Be(e)}))}function Ue(){Le=Ae(),Ve(),He()}function We(e){if(Le=e,typeof window<`u`)try{window.localStorage.setItem(Oe,e)}catch{}Ve(),Be(Me(e))}var Ge=function(e,t){return Ge=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])},Ge(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`);Ge(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ke=`12px sans-serif`,qe=20,Je=100,Ye=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function Xe(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)-qe)/Je}return t}var Ze=Xe(Ye),Qe={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=Qe.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=Ze[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}},$e=xt([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),et=xt([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),tt=Object.prototype.toString,nt=Array.prototype,rt=nt.forEach,it=nt.filter,at=nt.slice,ot=nt.map,st=function(){}.constructor,ct=st?st.prototype:null,lt=`__proto__`,ut=2311,dt=2**53-1;function ft(){return ut>=dt&&(ut=0),ut++}function pt(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function mt(e){if(typeof e!=`object`||!e)return e;var t=e,n=tt.call(e);if(n===`[object Array]`){if(!Wt(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=mt(e[r])}}else if(et[n]){if(!Wt(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(!$e[n]&&!Wt(e)&&!Nt(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==lt&&(t[o]=mt(e[o]));return t}function H(e,t,n){if(!J(t)||!J(e))return n?mt(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==lt){var i=e[r],a=t[r];J(a)&&J(i)&&!K(a)&&!K(i)&&!Nt(a)&&!Nt(i)&&!jt(a)&&!jt(i)&&!Wt(a)&&!Wt(i)?H(i,a,n):(n||!(r in e))&&(e[r]=mt(t[r]))}return e}function U(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==lt&&(e[n]=t[n]);return e}function ht(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function gt(e,t,n){for(var r=wt(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}Qe.createCanvas;function _t(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 vt(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 yt(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 gt(e,t,n)}function bt(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function W(e,t,n){if(e&&t){if(e.forEach&&e.forEach===rt)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 Rt(e);if(e.map&&e.map===ot)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 xt(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 St(e,t,n){if(!e)return[];if(!t)return Rt(e);if(e.filter&&e.filter===it)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 Ct(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 wt(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 Tt(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(at.call(arguments)))}}var Et=ct&&Ot(ct.bind)?ct.call.bind(ct.bind):Tt;function Dt(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(at.call(arguments)))}}function K(e){return Array.isArray?Array.isArray(e):tt.call(e)===`[object Array]`}function Ot(e){return typeof e==`function`}function q(e){return typeof e==`string`}function kt(e){return tt.call(e)===`[object String]`}function At(e){return typeof e==`number`}function J(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function jt(e){return!!$e[tt.call(e)]}function Mt(e){return!!et[tt.call(e)]}function Nt(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function Pt(e){return e.colorStops!=null}function Ft(e){return e.image!=null}function It(e){return e!==e}function Y(){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 Rt(e){var t=[...arguments].slice(1);return at.apply(e,t)}function zt(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 Bt(e,t){if(!e)throw Error(t)}function Vt(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var Ht=`__ec_primitive__`;function Ut(e){e[Ht]=!0}function Wt(e){return e[Ht]}var Gt=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 wt(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Kt=typeof Map==`function`;function qt(){return Kt?new Map:new Gt}var Jt=function(){function e(t){var n=K(t);this.data=qt();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 Kt?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function Yt(e){return new Jt(e)}function Xt(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 Zt(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&U(n,t),n}function Qt(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 $t(){}var en=180/Math.PI,tn=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),nn=new(function(){function e(){this.browser=new tn,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`?(nn.wxa=!0,nn.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?nn.worker=!0:!nn.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(nn.node=!0,nn.svgSupported=!0):rn(navigator.userAgent,nn);function rn(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 an=`.`,on=`___EC__COMPONENT__CONTAINER___`,sn=`___EC__EXTENDED_CLASS___`;function cn(e){var t={main:``,sub:``};if(e){var n=e.split(an);t.main=n[0]||``,t.sub=n[1]||``}return t}function ln(e){Bt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function un(e){return!!(e&&e[sn])}function dn(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return fn(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)},vt(n,this)),U(n.prototype,e),n[sn]=!0,n.extend=this.extend,n.superCall=gn,n.superApply=_n,n.superClass=t,n}}function fn(e){return Ot(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function pn(e,t){e.extend=t.extend}var mn=Math.round(Math.random()*10);function hn(e){var t=[`__\0is_clz`,mn++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function gn(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function _n(e,t,n){return this.superClass.prototype[t].apply(e,n)}function vn(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){ln(r),e.prototype.type=r;var i=cn(r);if(!i.sub)t[i.main]=e;else if(i.sub!==on){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[on]&&(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=cn(e),r=[],i=t[n.main];return i&&i[on]?W(i,function(e,t){t!==on&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[cn(e).main]},e.getAllClassMainTypes=function(){var e=[];return W(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[cn(e).main];return n&&n[on]};function n(e){var n=t[e.main];return(!n||!n[on])&&(n=t[e.main]={},n[on]=!0),n}}function yn(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&&_t(r,s)>=0||i&&_t(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var bn=yn([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),xn=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return bn(this,e,t)},e}(),Sn=function(){function e(e){this.value=e}return e}(),Cn=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Sn(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}(),wn=function(){function e(e){this._list=new Cn,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 Sn(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}(),Tn=new wn(50);function En(e){if(typeof e==`string`){var t=Tn.get(e);return t&&t.image}return e}function Dn(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=Tn.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!kn(t)&&a.pending.push(o)):(t=Qe.loadImage(e,On,On),t.__zrImageSrc=e,Tn.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function On(){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 kn(e){return e&&e.width&&e.height}function An(){return[1,0,0,1,0,0]}function jn(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Mn(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 Nn(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 Pn(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 Fn(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 In(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 Rn(e,t){return e??=0,t??=0,[e,t]}function zn(e,t){return e[0]=t[0],e[1]=t[1],e}function Bn(e){return[e[0],e[1]]}function Vn(e,t,n){return e[0]=t,e[1]=n,e}function Hn(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Un(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Wn(e){return Math.sqrt(Gn(e))}function Gn(e){return e[0]*e[0]+e[1]*e[1]}function Kn(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function qn(e,t){var n=Wn(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Jn(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Yn=Jn;function Xn(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Zn=Xn;function Qn(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 $n(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 er(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function tr(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var nr=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}(),rr=Math.min,ir=Math.max,ar=Math.abs,or=[`x`,`y`],sr=[`width`,`height`],cr=new nr,lr=new nr,ur=new nr,dr=new nr,fr=Dr(),pr=fr.minTv,mr=fr.maxTv,hr=[0,0],gr=function(){function e(e,t,n,r){vr(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=rr(e.x,this.x),n=rr(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?ir(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?ir(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 br(An(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&nr.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=vr(Cr,t.x,t.y,t.width,t.height)),n instanceof e||(n=vr(wr,n.x,n.y,n.width,n.height));var s=!!r;fr.reset(i,s);var c=fr.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)&&(hr[0]=1/0,hr[1]=0,Er(l,u,p,m,0,s,a,o),Er(d,f,h,g,1,s,a,o),s&&nr.copy(r,_?fr.useDir?fr.dirMinTv:pr:mr)),_},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){yr(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&&yr(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}cr.x=ur.x=t.x,cr.y=dr.y=t.y,lr.x=dr.x=t.x+t.width,lr.y=ur.y=t.y+t.height,cr.transform(n),dr.transform(n),lr.transform(n),ur.transform(n),e.x=rr(cr.x,lr.x,ur.x,dr.x),e.y=rr(cr.y,lr.y,ur.y,dr.y);var s=ir(cr.x,lr.x,ur.x,dr.x),c=ir(cr.y,lr.y,ur.y,dr.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=jn(e||[]),Pn(e,e,Vn(Tr,-t.x,-t.y)),In(e,e,Vn(Tr,r,i)),Pn(e,e,Vn(Tr,n.x,n.y)),e},e}(),_r=gr.create,vr=gr.set,yr=gr.copy,br=gr.calculateTransform,xr=gr.applyTransform,Sr=gr.contain,Cr=new gr(0,0,0,0),wr=new gr(0,0,0,0),Tr=[];function Er(e,t,n,r,i,a,o,s){var c=ar(t-n),l=ar(r-e),u=rr(c,l),d=or[i],f=or[1-i],p=sr[i];t<n||r<e?c<l?(a&&(mr[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(mr[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=ir(e,n),o[p]=rr(t,r)-o[d]),a&&(u<hr[0]||fr.useDir)&&(hr[0]=rr(u,hr[0]),(c<l||!fr.bidirectional)&&(pr[d]=c,pr[f]=0,fr.useDir&&fr.calcDirMTV()),(c>=l||!fr.bidirectional)&&(pr[d]=-l,pr[f]=0,fr.useDir&&fr.calcDirMTV())))}function Dr(){var e=0,t=new nr,n=new nr,r={minTv:new nr,maxTv:new nr,useDir:!1,dirMinTv:new nr,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=ir(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 ar(e)<1e-10}return r}function Or(e){kr||=new wn(100),e||=`12px sans-serif`;var t=kr.get(e);return t||(t={font:e,strWidthCache:new wn(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Qe.measureText(`国`,e).width,asciiCharWidth:Qe.measureText(`a`,e).width},kr.put(e,t)),t}var kr;function Ar(e){if(!(jr>=Mr)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=Qe.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?jr=Mr:i>2&&jr++,t}}var jr=0,Mr=5;function Nr(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=Ar(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function Pr(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=Qe.measureText(t,e.font).width,n.put(t,r)),r}function Fr(e,t,n,r){var i=Pr(Or(t),e),a=zr(t);return new gr(Lr(0,i,n),Rr(0,a,r),i,a)}function Ir(e,t,n,r){var i=((e||``)+``).split(`
|
|
2
|
+
`);if(i.length===1)return Fr(i[0],t,n,r);for(var a=new gr(0,0,0,0),o=0;o<i.length;o++){var s=Fr(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 Rr(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function zr(e){return Or(e).stWideCharWidth}function Br(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function Vr(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+=Br(r[0],n.width),l+=Br(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 Hr=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Ur(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(`
|
|
3
|
+
`);a=Wr(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)Gr(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
|
|
4
|
+
`),e.isTruncated=s}function Wr(e,t,n,r){r||={};var i=U({},r);n=X(n,`...`),i.maxIterations=X(r.maxIterations,2);var a=i.minChar=X(r.minChar,0),o=i.fontMeasureInfo=Or(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=Pr(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 Gr(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=Pr(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?Kr(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=Pr(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Kr(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=Nr(n,e.charCodeAt(i));return i}function qr(e,t,n,r){var i=oi(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=zr(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?ni(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=Wr(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)Gr(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=Or(l),S=0;S<_.length;S++)w=Math.max(Pr(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 Jr=function(){function e(){}return e}(),Yr=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Xr=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 Zr(e,t,n,r,i){var a=new Xr,o=oi(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=Hr.lastIndex=0,h;(h=Hr.exec(o))!=null;){var g=h.index;g>m&&Qr(a,o.substring(m,g),t,p),Qr(a,h[2],t,p,h[1]),m=Hr.lastIndex}m<o.length&&Qr(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=zr(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 F=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length<F;break outer}var ee=A.width,I=ee==null||ee===`auto`;if(typeof ee==`string`&&ee.charAt(ee.length-1)===`%`)k.percentWidth=ee,_.push(k),k.contentWidth=Pr(Or(N),k.text);else{if(I){var te=A.backgroundColor,L=te&&te.image;L&&(L=En(L),kn(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?!I||ne<M?(k.text=``,k.width=k.contentWidth=0):(Ur(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=Pr(Or(N),k.text)):k.contentWidth=Pr(Or(N),k.text)}k.width+=M,D+=k.width,A&&(E=Math.max(E,k.lineHeight))}C(T,D,E)}a.outerWidth=a.width=X(u,y),a.outerHeight=a.height=X(d,v),a.contentHeight=v,a.contentWidth=y,a.outerWidth+=c,a.outerHeight+=l;for(var w=0;w<_.length;w++){var k=_[w],R=k.percentWidth;k.width=parseInt(R,10)/100*a.width}return a}function Qr(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=Br(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=ni(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=Or(c),_=0;_<u.length;_++){var v=u[_],y=new Jr;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!a,y.width=typeof o.width==`number`?o.width:d?d[_]:Pr(g,v),!_&&!l){var b=(s[s.length-1]||(s[0]=new Yr)).tokens,x=b.length;x===1&&b[0].isLineHolder?b[0]=y:(v||!x||a)&&b.push(y)}else s.push(new Yr([y]))}}function $r(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var ei=xt(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function ti(e){return!$r(e)||!!ei[e]}function ni(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=Or(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=Nr(d,p.charCodeAt(0)),h=!r&&!ti(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 ri(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;gr.set(ii,Lr(n,o,i),Rr(r,s,a),o,s),gr.intersect(t,ii,null,ai);var c=ai.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=Lr(c.x,c.width,i,!0),e.baseY=Rr(c.y,c.height,a,!0)}}var ii=new gr(0,0,0,0),ai={outIntersectRect:{},clamp:!0};function oi(e){return e==null?e=``:e+=``}function si(e){var t=oi(e.text),n=e.font;return ci(e,Pr(Or(n),t),zr(n),null)}function ci(e,t,n,r){var i=new gr(Lr(e.x||0,t,e.textAlign),Rr(e.y||0,n,e.textBaseline),t,n),a=r??(li(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function li(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var ui=jn,di=5e-5;function fi(e){return e>di||e<-di}var pi=[],mi=[],hi=An(),gi=Math.abs,_i=function(){function e(){}return e.prototype.getLocalTransform=function(e){return vi(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 fi(this.rotation)||fi(this.x)||fi(this.y)||fi(this.scaleX-1)||fi(this.scaleY-1)||fi(this.skewX)||fi(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(ui(n),this.invTransform=null);return}n||=An(),t?this.getLocalTransform(n):ui(n),e&&(t?Nn(n,e,n):Mn(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||An(),Ln(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(pi);var n=pi[0]<0?-1:1,r=pi[1]<0?-1:1,i=((pi[0]-n)*t+n)/pi[0]||0,a=((pi[1]-r)*t+r)/pi[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||An(),Nn(mi,e.invTransform,t),t=mi);var n=this.originX,r=this.originY;(n||r)&&(hi[4]=n,hi[5]=r,Nn(mi,t,hi),mi[4]-=n,mi[5]-=r,t=mi),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&&$n(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&$n(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&gi(e[0]-1)>1e-10&&gi(e[3]-1)>1e-10?Math.sqrt(gi(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){xi(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&&Fn(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}(),vi=_i.getLocalTransform;function yi(){return new _i}var bi=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function xi(e,t){return ht(e,t,bi)}var Si={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-Si.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?Si.bounceIn(e*2)*.5:Si.bounceOut(e*2-1)*.5+.5}},Ci=Math.pow,wi=Math.sqrt,Ti=1e-8,Ei=1e-4,Di=wi(3),Oi=1/3,ki=Rn(),Ai=Rn(),ji=Rn();function Mi(e){return e>-Ti&&e<Ti}function Ni(e){return e>Ti||e<-Ti}function Pi(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 Fi(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function Ii(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(Mi(u)&&Mi(d)){if(Mi(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(Mi(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=wi(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Ci(-y,Oi):Ci(y,Oi),b=b<0?-Ci(-b,Oi):Ci(b,Oi);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*wi(u*u*u)),S=Math.acos(x)/3,C=wi(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+Di*Math.sin(S)))/(3*o),T=(-s+C*(w-Di*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(Mi(o)){if(Ni(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(Mi(u))i[0]=-a/(2*o);else if(u>0){var d=wi(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 Ri(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 zi(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;ki[0]=c,ki[1]=l;for(var v=0;v<1;v+=.05)Ai[0]=Pi(e,n,i,o,v),Ai[1]=Pi(t,r,a,s,v),g=Zn(ki,Ai),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<Ei);y++)m=d-f,h=d+f,Ai[0]=Pi(e,n,i,o,m),Ai[1]=Pi(t,r,a,s,m),g=Zn(Ai,ki),m>=0&&g<p?(d=m,p=g):(ji[0]=Pi(e,n,i,o,h),ji[1]=Pi(t,r,a,s,h),_=Zn(ji,ki),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=Pi(e,n,i,o,d),u[1]=Pi(t,r,a,s,d)),wi(p)}function Bi(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=Pi(e,n,i,o,m),g=Pi(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function Vi(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function Hi(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function Ui(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(Mi(a)){if(Ni(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(Mi(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=wi(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 Wi(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Gi(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 Ki(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;ki[0]=o,ki[1]=s;for(var f=0;f<1;f+=.05){Ai[0]=Vi(e,n,i,f),Ai[1]=Vi(t,r,a,f);var p=Zn(ki,Ai);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<Ei);m++){var h=l-u,g=l+u;Ai[0]=Vi(e,n,i,h),Ai[1]=Vi(t,r,a,h);var p=Zn(Ai,ki);if(h>=0&&p<d)l=h,d=p;else{ji[0]=Vi(e,n,i,g),ji[1]=Vi(t,r,a,g);var _=Zn(ji,ki);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=Vi(e,n,i,l),c[1]=Vi(t,r,a,l)),wi(d)}function qi(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=Vi(e,n,i,f),m=Vi(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var Ji=/cubic-bezier\(([0-9,\.e ]+)\)/;function Yi(e){var t=e&&Ji.exec(e);if(t){var n=t[1].split(`,`),r=+Vt(n[0]),i=+Vt(n[1]),a=+Vt(n[2]),o=+Vt(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:Ii(0,r,a,1,e,s)&&Pi(0,i,o,1,s[0])}}}var Xi=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||$t,this.ondestroy=e.ondestroy||$t,this.onrestart=e.onrestart||$t,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=Ot(e)?e:Si[e]||Yi(e)},e}(),Zi={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 Qi(e){return e=Math.round(e),e<0?0:e>255?255:e}function $i(e){return e=Math.round(e),e<0?0:e>360?360:e}function ea(e){return e<0?0:e>1?1:e}function ta(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Qi(parseFloat(t)/100*255):Qi(parseInt(t,10))}function na(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?ea(parseFloat(t)/100):ea(parseFloat(t))}function ra(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 ia(e,t,n){return e+(t-e)*n}function aa(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function oa(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var sa=new wn(20),ca=null;function la(e,t){ca&&oa(ca,t),ca=sa.put(e,ca||t.slice())}function ua(e,t){if(e){t||=[];var n=sa.get(e);if(n)return oa(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Zi)return oa(t,Zi[r]),la(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)){aa(t,0,0,0,1);return}return aa(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),la(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){aa(t,0,0,0,1);return}return aa(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),la(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?aa(t,+l[0],+l[1],+l[2],1):aa(t,0,0,0,1);u=na(l.pop());case`rgb`:if(l.length>=3)return aa(t,ta(l[0]),ta(l[1]),ta(l[2]),l.length===3?u:na(l[3])),la(e,t),t;aa(t,0,0,0,1);return;case`hsla`:if(l.length!==4){aa(t,0,0,0,1);return}return l[3]=na(l[3]),da(l,t),la(e,t),t;case`hsl`:if(l.length!==3){aa(t,0,0,0,1);return}return da(l,t),la(e,t),t;default:return}}aa(t,0,0,0,1)}}function da(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=na(e[1]),i=na(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],aa(t,Qi(ra(o,a,n+1/3)*255),Qi(ra(o,a,n)*255),Qi(ra(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function fa(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 pa(e,t){var n=ua(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 va(n,n.length===4?`rgba`:`rgb`)}}function ma(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Qi(ia(o[0],s[0],c)),n[1]=Qi(ia(o[1],s[1],c)),n[2]=Qi(ia(o[2],s[2],c)),n[3]=ea(ia(o[3],s[3],c)),n}}function ha(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=ua(t[i]),s=ua(t[a]),c=r-i,l=va([Qi(ia(o[0],s[0],c)),Qi(ia(o[1],s[1],c)),Qi(ia(o[2],s[2],c)),ea(ia(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function ga(e,t,n,r){var i=ua(e);if(e)return i=fa(i),t!=null&&(i[0]=$i(Ot(t)?t(i[0]):t)),n!=null&&(i[1]=na(Ot(n)?n(i[1]):n)),r!=null&&(i[2]=na(Ot(r)?r(i[2]):r)),va(da(i),`rgba`)}function _a(e,t){var n=ua(e);if(n&&t!=null)return n[3]=ea(t),va(n,`rgba`)}function va(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 ya(e,t){var n=ua(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var ba=new wn(100);function xa(e){if(q(e)){var t=ba.get(e);return t||(t=pa(e,-.1),ba.put(e,t)),t}if(Pt(e)){var n=U({},e);return n.colorStops=G(e.colorStops,function(e){return{offset:e.offset,color:pa(e.color,-.1)}}),n}return e}function Sa(e){return e.type===`linear`}function Ca(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 wa=Array.prototype.slice;function Ta(e,t,n){return(t-e)*n+e}function Ea(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=Ta(t[a],n[a],r);return e}function Da(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]=Ta(t[o][s],n[o][s],r)}return e}function Oa(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function ka(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 Aa(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 ja(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]:wa.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 Ma(e){if(bt(e)){var t=e.length;if(bt(e[0])){for(var n=[],r=0;r<t;r++)n.push(wa.call(e[r]));return n}return wa.call(e)}return e}function Na(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 Pa(e){return bt(e&&e[0])?2:1}var Fa=0,Ia=1,La=2,Ra=3,za=4,Ba=5,Va=6;function Ha(e){return e===za||e===Ba}function Ua(e){return e===Ia||e===La}var Wa=[0,0,0,0],Ga=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=Va,s=t;if(bt(t)){var c=Pa(t);o=c,(c===1&&!At(t[0])||c===2&&!At(t[0][0]))&&(a=!0)}else if(At(t)&&!It(t))o=Fa;else if(q(t)){if(!isNaN(+t))o=Fa;else{var l=ua(t);l&&(s=l,o=Ra)}}else if(Pt(t)){var u=U({},s);u.colorStops=G(t.colorStops,function(e){return{offset:e.offset,color:ua(e.color)}}),Sa(t)?o=za:Ca(t)&&(o=Ba),s=u}i===0?this.valType=o:(o!==this.valType||o===Va)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=Ot(n)?n:Si[n]||Yi(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=Ua(r),c=Ha(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?ja(d,f,r):c&&Aa(d.colorStops,f.colorStops))}if(!o&&r!==Ba&&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===Fa?n[l].additiveValue=n[l].value-p:r===Ra?n[l].additiveValue=Oa([],n[l].value,p,-1):Ua(r)&&(n[l].additiveValue=r===Ia?Oa([],n[l].value,p,-1):ka([],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===Ra,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?Wa:e[s];if((Ua(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Ua(i))i===Ia?Ea(g,f[r],p[r],h):Da(g,f[r],p[r],h);else if(Ha(i)){var _=f[r],v=p[r],y=i===za;e[s]={type:y?`linear`:`radial`,x:Ta(_.x,v.x,h),y:Ta(_.y,v.y,h),colorStops:G(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Ta(e.offset,n.offset,h),color:Na(Ea([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Ta(_.x2,v.x2,h),e[s].y2=Ta(_.y2,v.y2,h)):e[s].r=Ta(_.r,v.r,h)}else if(c)Ea(g,f[r],p[r],h),n||(e[s]=Na(g));else{var b=Ta(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===Fa?e[n]=e[n]+r:t===Ra?(ua(e[n],Wa),Oa(Wa,Wa,r,1),e[n]=Na(Wa)):t===Ia?Oa(e[n],e[n],r,1):t===La&&ka(e[n],e[n],r,1)},e}(),Ka=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){pt(`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,wt(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 Ga(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===Ra&&c&&(c=Na(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,Ma(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Ma(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 Xi({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]=Ma(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=wt(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}(),qa=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}(),Ja=1;nn.hasGlobalWindow&&(Ja=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Ya=Ja,Xa=.4,Za=`#333`,Qa=`#ccc`,$a=`#eee`,eo=`__zr_normal__`,to=bi.concat([`ignore`]),no=xt(bi,function(e,t){return e[t]=!0,e},{ignore:!1}),ro={},io=new gr(0,0,0,0),ao=[],oo=function(){function e(e){this.id=ft(),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=io,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(ro,n,d):Vr(ro,n,d),i.x=ro.x,i.y=ro.y,a=ro.align,o=ro.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=Br(f[0],d.width),m=Br(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 gr(0,0,0,0);i.getLocalTransform(ao),Ln(ao,ao),gr.copy(_,d),_.applyTransform(ao)}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()?Qa:Za},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&ua(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,va(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||{},U(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(J(e))for(var n=wt(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,to)},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(eo,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===eo;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(_t(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){pt(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=ho(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,_o(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=ho(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,_o(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=_t(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=_t(r,e),a=_t(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];U(t,i),i.textConfig&&(n||={},U(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=U({},r?this.textConfig:n.textConfig),U(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<to.length;l++){var u=to[l],d=i&&no[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 _i,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},U(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 Ka(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=_t(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){so(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){so(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=so(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}();yt(oo,qa),yt(oo,_i);function so(e,t,n,r,i){n||={};var a=[];mo(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 co(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function lo(e){return bt(e[0])}function uo(e,t,n){if(bt(t[n])){if(bt(e[n])||(e[n]=[]),Mt(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),co(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(lo(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?co(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else co(a,i,o);a.length=i.length}}else e[n]=t[n]}function fo(e,t){return e===t||bt(e)&&bt(t)&&po(e,t)}function po(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 mo(e,t,n,r,i,a,o,s){for(var c=wt(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!J(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_])){if(J(v)&&!bt(v)&&!Pt(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}mo(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=_t(m,x);m.splice(S,1)}}if(i.force||(h=St(h,function(e){return!fo(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[_]=Ma(n[_]),uo(n,r,_)}}var x=new Ka(n,!1,!1,d?St(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 ho(e,t,n,r){return!(n&&n.hoverLayer||r)||go(e)||t&&go(t)?0:1}function go(e){return e.type===`text`||e.type===`tspan`}function _o(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var vo=`__zr_style_`+Math.round(Math.random()*10),yo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},bo={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};yo[vo]=!0;var xo=[`z`,`z2`,`invisible`],So=[`invisible`],Co=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=wt(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&&Eo(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 gr(0,0,0,0),t?gr.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 gr(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:U(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 Zt(yo,e)},t.prototype.useStyle=function(e){e[vo]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()},t.prototype._useHoverStyle=function(e){this.__hoverStyle=e},t.prototype.isStyleObject=function(e){return e[vo]},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,xo)},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=wt(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=wt(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?So:xo,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 U(e,t),e},t.prototype.getAnimationStyleProps=function(){return bo},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}(oo),wo=new gr(0,0,0,0),To=new gr(0,0,0,0);function Eo(e,t,n){return wo.copy(e.getBoundingRect()),e.transform&&wo.applyTransform(e.transform),To.width=t,To.height=n,!wo.intersect(To)}var Do=Math.min,Oo=Math.max,ko=Math.sin,Ao=Math.cos,jo=Math.PI*2,Mo=Rn(),No=Rn(),Po=Rn();function Fo(e,t,n,r,i,a){i[0]=Do(e,n),i[1]=Do(t,r),a[0]=Oo(e,n),a[1]=Oo(t,r)}var Io=[],Lo=[];function Ro(e,t,n,r,i,a,o,s,c,l){var u=Li,d=Pi,f=u(e,n,i,o,Io);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,Io[p]);c[0]=Do(m,c[0]),l[0]=Oo(m,l[0])}f=u(t,r,a,s,Lo);for(var p=0;p<f;p++){var h=d(t,r,a,s,Lo[p]);c[1]=Do(h,c[1]),l[1]=Oo(h,l[1])}c[0]=Do(e,c[0]),l[0]=Oo(e,l[0]),c[0]=Do(o,c[0]),l[0]=Oo(o,l[0]),c[1]=Do(t,c[1]),l[1]=Oo(t,l[1]),c[1]=Do(s,c[1]),l[1]=Oo(s,l[1])}function zo(e,t,n,r,i,a,o,s){var c=Wi,l=Vi,u=Oo(Do(c(e,n,i),1),0),d=Oo(Do(c(t,r,a),1),0),f=l(e,n,i,u),p=l(t,r,a,d);o[0]=Do(e,i,f),o[1]=Do(t,a,p),s[0]=Oo(e,i,f),s[1]=Oo(t,a,p)}function Bo(e,t,n,r,i,a,o,s,c){var l=er,u=tr,d=Math.abs(i-a);if(d%jo<1e-4&&d>1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(Mo[0]=Ao(i)*n+e,Mo[1]=ko(i)*r+t,No[0]=Ao(a)*n+e,No[1]=ko(a)*r+t,l(s,Mo,No),u(c,Mo,No),i%=jo,i<0&&(i+=jo),a%=jo,a<0&&(a+=jo),i>a&&!o?a+=jo:i<a&&o&&(i+=jo),o){var f=a;a=i,i=f}for(var p=0;p<a;p+=Math.PI/2)p>i&&(Po[0]=Ao(p)*n+e,Po[1]=ko(p)*r+t,l(s,Po,s),u(c,Po,c))}var Vo={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ho=[],Uo=[],Wo=[],Go=[],Ko=[],qo=[],Jo=Math.min,Yo=Math.max,Xo=Math.cos,Zo=Math.sin,Qo=Math.abs,$o=Math.PI,es=$o*2,ts=typeof Float32Array<`u`,ns=[];function rs(e){return Math.round(e/$o*1e8)/1e8%2*$o}function is(e,t){var n=rs(e[0]);n<0&&(n+=es);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=es?i=n+es:t&&n-i>=es?i=n-es:!t&&n>i?i=n+(es-rs(n-i)):t&&n<i&&(i=n-(es-rs(i-n))),e[0]=n,e[1]=i}var as=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=Qo(n/Ya/e)||0,this._uy=Qo(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(Vo.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=Qo(e-this._xi),r=Qo(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Vo.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(Vo.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(Vo.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(),ns[0]=r,ns[1]=i,is(ns,a),r=ns[0],i=ns[1];var o=i-r;return this.addData(Vo.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Xo(i)*n+e,this._yi=Zo(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(Vo.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Vo.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)&&ts&&(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(ts&&(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,ts&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Wo[0]=Wo[1]=Ko[0]=Ko[1]=Number.MAX_VALUE,Go[0]=Go[1]=qo[0]=qo[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 Vo.M:t=r=e[a++],n=i=e[a++],Ko[0]=r,Ko[1]=i,qo[0]=r,qo[1]=i;break;case Vo.L:Fo(t,n,e[a],e[a+1],Ko,qo),t=e[a++],n=e[a++];break;case Vo.C:Ro(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],Ko,qo),t=e[a++],n=e[a++];break;case Vo.Q:zo(t,n,e[a++],e[a++],e[a],e[a+1],Ko,qo),t=e[a++],n=e[a++];break;case Vo.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=Xo(f)*u+c,i=Zo(f)*d+l),Bo(c,l,u,d,f,p,m,Ko,qo),t=Xo(p)*u+c,n=Zo(p)*d+l;break;case Vo.R:r=t=e[a++],i=n=e[a++];var h=e[a++],g=e[a++];Fo(r,i,r+h,i+g,Ko,qo);break;case Vo.Z:t=r,n=i}er(Wo,Wo,Ko),tr(Go,Go,qo)}return a===0&&(Wo[0]=Wo[1]=Go[0]=Go[1]=0),new gr(Wo[0],Wo[1],Go[0]-Wo[0],Go[1]-Wo[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 Vo.M:i=o=e[d++],a=s=e[d++];break;case Vo.L:var h=e[d++],g=e[d++],_=h-i,v=g-a;(Qo(_)>n||Qo(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Vo.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=Bi(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Vo.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=qi(i,a,y,b,h,g,10),i=h,a=g;break;case Vo.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=Xo(D)*T+C,s=Zo(D)*E+w),m=Yo(T,E)*Jo(es,Math.abs(O)),i=Xo(k)*T+C,a=Zo(k)*E+w;break;case Vo.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Vo.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!==Vo.L&&v>0&&(e.lineTo(y,b),v=0),S){case Vo.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Vo.L:u=n[x++],d=n[x++];var w=Qo(u-c),T=Qo(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 Vo.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;Ri(c,k,j,N,D,Ho),Ri(l,A,M,P,D,Uo),e.bezierCurveTo(Ho[1],Uo[1],Ho[2],Uo[2],Ho[3],Uo[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,N,P),c=N,l=P;break;case Vo.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;Gi(c,k,j,D,Ho),Gi(l,A,M,D,Uo),e.quadraticCurveTo(Ho[1],Uo[1],Ho[2],Uo[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case Vo.A:var F=n[x++],ee=n[x++],I=n[x++],te=n[x++],L=n[x++],ne=n[x++],R=n[x++],re=!n[x++],ie=I>te?I:te,ae=Qo(I-te)>.001,oe=L+ne,z=!1;if(f){var E=p[g++];h+E>_&&(oe=L+ne*(_-h)/E,z=!0),h+=E}if(ae&&e.ellipse?e.ellipse(F,ee,I,te,R,L,oe,re):e.arc(F,ee,ie,L,oe,re),z)break lo;C&&(o=Xo(L)*I+F,s=Zo(L)*te+ee),c=Xo(oe)*I+F,l=Zo(oe)*te+ee;break;case Vo.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+Jo(ce,B),d),ce-=B,ce>0&&e.lineTo(u+B,d+Jo(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 Vo.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=Vo,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function os(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 ss(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:zi(e,t,n,r,i,a,o,s,l,u,null)<=d/2}function cs(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:Ki(e,t,n,r,i,a,s,c,null)<=l/2}var ls=Math.PI*2;function us(e){return e%=ls,e<0&&(e+=ls),e}var ds=Math.PI*2;function fs(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)%ds<1e-4)return!0;if(a){var d=r;r=us(i),i=us(d)}else r=us(r),i=us(i);r>i&&(i+=ds);var f=Math.atan2(c,s);return f<0&&(f+=ds),f>=r&&f<=i||f+ds>=r&&f+ds<=i}function ps(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 ms=as.CMD,hs=Math.PI*2,gs=1e-4;function _s(e,t){return Math.abs(e-t)<gs}var vs=[-1,-1,-1],ys=[-1,-1];function bs(){var e=ys[0];ys[0]=ys[1],ys[1]=e}function xs(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=Ii(t,r,a,s,l,vs);if(u===0)return 0;for(var d=0,f=-1,p=void 0,m=void 0,h=0;h<u;h++){var g=vs[h],_=g===0||g===1?.5:1;Pi(e,n,i,o,g)<c||(f<0&&(f=Li(t,r,a,s,ys),ys[1]<ys[0]&&f>1&&bs(),p=Pi(t,r,a,s,ys[0]),f>1&&(m=Pi(t,r,a,s,ys[1]))),f===2?g<ys[0]?d+=p<t?_:-_:g<ys[1]?d+=m<p?_:-_:d+=s<m?_:-_:g<ys[0]?d+=p<t?_:-_:d+=s<p?_:-_)}return d}function Ss(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=Ui(t,r,a,s,vs);if(c===0)return 0;var l=Wi(t,r,a);if(l>=0&&l<=1){for(var u=0,d=Vi(t,r,a,l),f=0;f<c;f++){var p=vs[f]===0||vs[f]===1?.5:1,m=Vi(e,n,i,vs[f]);m<o||(vs[f]<l?u+=d<t?p:-p:u+=a<d?p:-p)}return u}var p=vs[0]===0||vs[0]===1?.5:1,m=Vi(e,n,i,vs[0]);return m<o?0:a<t?p:-p}function Cs(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);vs[0]=-c,vs[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=hs-1e-4){r=0,i=hs;var u=a?1:-1;return o>=vs[0]+e&&o<=vs[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=hs,i+=hs);for(var f=0,p=0;p<2;p++){var m=vs[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=hs+h),(h>=r&&h<=i||h+hs>=r&&h+hs<=i)&&(h>Math.PI/2&&h<Math.PI*1.5&&(u=-u),f+=u)}}return f}function ws(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===ms.M&&m>1&&(n||(s+=ps(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case ms.M:u=a[m++],d=a[m++],c=u,l=d;break;case ms.L:if(n){if(os(c,l,a[m],a[m+1],t,r,i))return!0}else s+=ps(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ms.C:if(n){if(ss(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=xs(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 ms.Q:if(n){if(cs(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Ss(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ms.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+=ps(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(fs(_,v,b,x,x+S,C,t,w,i))return!0}else s+=Cs(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case ms.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(os(u,d,f,d,t,r,i)||os(f,d,f,p,t,r,i)||os(f,p,u,p,t,r,i)||os(u,p,u,d,t,r,i))return!0}else s+=ps(f,d,f,p,r,i),s+=ps(u,p,u,d,r,i);break;case ms.Z:if(n){if(os(c,l,u,d,t,r,i))return!0}else s+=ps(c,l,u,d,r,i);c=u,l=d}}return!n&&!_s(l,d)&&(s+=ps(c,l,u,d,r,i)||0),s!==0}function Ts(e,t,n){return ws(e,0,!1,t,n)}function Es(e,t,n,r){return ws(e,t,!0,n,r)}var Ds=gt({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},yo),Os={style:gt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},bo.style)},ks=bi.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),As=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<ks.length;++s)i[ks[s]]=this[ks[s]];i.__dirty|=1}else this._decalEl&&=null},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=wt(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?U(this.style,o):this.useStyle(o):a===`shape`?U(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(q(e)){var t=ya(e,0);return t>.5?Za:t>.2?$a:Qa}if(e)return Qa}return Za},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(q(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==ya(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 as(!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)),Es(a,o/s,e,t)))return!0}if(this.hasFill())return Ts(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:U(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return Zt(Ds,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=U({},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=U({},r.shape),U(c,n.shape)):(c=U({},i?this.shape:r.shape),U(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=U({},this.shape);for(var l={},u=wt(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 Os},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 mt(e.style)},n.prototype.getDefaultShape=function(){return mt(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}(Co),js=gt({strokeFirst:!0,font:Ke,x:0,y:0,textAlign:`left`,textBaseline:`top`,miterLimit:2},Ds),Ms=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return li(this.style)},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.createStyle=function(e){return Zt(js,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||=si(this.style),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t}(Co);Ms.prototype.type=`tspan`;var Ns=gt({x:0,y:0},yo),Ps={style:gt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},bo.style)};function Fs(e){return!!(e&&typeof e!=`string`&&e.width&&e.height)}var Is=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return Zt(Ns,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(n!=null)return n;var r=Fs(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 Ps},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||=new gr(e.x||0,e.y||0,this.getWidth(),this.getHeight()),this._rect},t}(Co);Is.prototype.type=`image`;function Ls(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 Rs=Math.round;function zs(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?(Rs(r*2)===Rs(i*2)&&(e.x1=e.x2=Vs(r,s,!0)),Rs(a*2)===Rs(o*2)&&(e.y1=e.y2=Vs(a,s,!0)),e):e}}function Bs(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=Vs(r,s,!0),e.y=Vs(i,s,!0),e.width=Math.max(Vs(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Vs(i+o,s,!1)-e.y,o===0?0:1),e):e}}function Vs(e,t,n){if(!t)return e;var r=Rs(e*2);return(r+Rs(t))%2==0?r/2:(r+(n?1:-1))/2}var Hs=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Us={},Ws=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Hs},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Bs(Us,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?Ls(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(As);Ws.prototype.type=`rect`;var Gs={fill:`#000`},Ks=2,qs={},Js={style:gt({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},bo.style)},Ys=function(e){V(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Gs,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,nc(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 gr(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||Gs},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return U(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=wt(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},U(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return Js},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`;ri(qs,r.overflowRect,i,a,o,s),i=qs.baseX,a=qs.baseY;var c=qr(sc(e),e,qs.outerWidth,qs.outerHeight),l=cc(e),u=!!e.backgroundColor,d=c.outerHeight,f=c.outerWidth,p=c.lines,m=c.lineHeight;this.isTruncated=!!c.isTruncated;var h=i,g=Rr(a,c.contentHeight,s);if(l||n){var _=Lr(i,f,o),v=Rr(a,d,s);l&&this._renderBackground(e,e,_,v,f,d)}g+=m/2,n&&(h=oc(i,o,n),s===`top`?g+=n[0]:s===`bottom`&&(g-=n[2]));for(var y=0,b=!1,x=!1,S=ac(`fill`in e?e.fill:(x=!0,r.fill)),C=ic(`stroke`in e?e.stroke:!u&&(!r.autoStroke||x)?(y=Ks,b=!0,r.stroke):null),w=e.textShadowBlur>0,T=0;T<p.length;T++){var E=this._getOrCreateChild(Ms),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,ec(D,e),g+=m,E.setBoundingRect(ci(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;ri(qs,t.overflowRect,i,a,n,r),i=qs.baseX,a=qs.baseY;var o=Zr(sc(e),e,qs.outerWidth,qs.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=Rr(a,l,r),p=d,m=f;u&&(p+=u[3],m+=u[0]);var h=p+s;cc(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&&cc(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=oc(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Ms),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=ac(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=ic(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Ks,_=!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),ec(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(ci(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(Ws),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(Is),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 tc(e)&&(t=[e.fontStyle,e.fontWeight,$s(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&Vt(t)||e.textFont||e.font},t}(Co),Xs={left:!0,right:1,center:1},Zs={top:1,bottom:1,middle:1},Qs=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function $s(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function ec(e,t){for(var n=0;n<Qs.length;n++){var r=Qs[n],i=t[r];i!=null&&(e[r]=i)}}function tc(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function nc(e){return rc(e),W(e.rich,rc),e}function rc(e){if(e){e.font=Ys.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||Xs[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||Zs[n]?n:`top`,e.padding&&=zt(e.padding)}}function ic(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function ac(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function oc(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function sc(e){var t=e.text;return t!=null&&(t+=``),t}function cc(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var lc=1e-4,uc=20;function dc(e){return e.replace(/^\s+|\s+$/g,``)}var fc=Math.min,pc=Math.max,mc=Math.abs,hc=Math.round,gc=Math.floor,_c=Math.ceil,vc=Math.pow,yc=Math.log,bc=Math.LN10,xc=Math.PI,Sc=Math.random;function Cc(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 wc=Tc;function Tc(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 Ec(e,t,n)}function Ec(e,t,n){return q(e)?Dc(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Dc(e){return!!dc(e).match(/%$/)}function Oc(e,t,n){return isNaN(t)?n?``+e:+e:(t=fc(pc(0,t),uc),e=(+e).toFixed(t),n?e:+e)}function kc(e){return e.sort(function(e,t){return e-t}),e}function Ac(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(hc(e*t)/t===e)return n}return jc(e)}function jc(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 pc(0,(a<0?0:i-1-a)-r)}function Mc(e,t,n){var r=mc(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=yc(2*mc(n||1)*mc(r))/bc,a=yc(mc(t))/bc,o=pc(0,_c(-i+a));return isFinite(o)||(o=NaN),o}function Nc(e,t){var n=xt(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=vc(10,t),i=G(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=G(i,function(e){return gc(e)}),s=xt(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 Pc(e,t){var n=pc(Ac(e),Ac(t)),r=e+t;return n>uc?r:Oc(r,n)}var Fc=vc(2,53)-1;function Ic(e){var t=xc*2;return(e%t+t)%t}function Lc(e){return e>-lc&&e<lc}var Rc=/^(?:(\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 zc(e){if(e instanceof Date)return e;if(q(e)){var t=Rc.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(hc(e))}function Bc(e){return vc(10,Vc(e))}function Vc(e){if(e===0)return 0;var t=gc(yc(e)/bc);return e/vc(10,t)>=10&&t++,t}function Hc(e,t){var n=Vc(e),r=vc(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,Oc(e,-n)}function Uc(e){var t=parseFloat(e);return t==e&&(t!==0||!q(e)||e.indexOf(`x`)<=0)?t:NaN}function Wc(e){return!isNaN(Uc(e))}function Gc(){return hc(Sc()*9)}function Kc(e,t){return t===0?e:Kc(t,e%t)}function qc(e,t){return e==null?t:t==null?e:e*t/Kc(e,t)}function Jc(e){return e!=null&&isFinite(e)}var Yc=`[ECharts] `,Xc={},Zc=typeof console<`u`&&console.warn&&console.log;function Qc(e,t,n){if(Zc){if(n){if(Xc[t])return;Xc[t]=!0}console[e](Yc+t)}}function $c(e,t){Qc(`error`,e,t)}function el(e){throw Error(e)}function tl(e,t,n){return(t-e)*n+e}var nl=`series\0`,rl=`\0_ec_\0`;function il(e){return e instanceof Array?e:e==null?[]:[e]}function al(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 ol=`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 sl(e){return J(e)&&!K(e)&&!(e instanceof Date)?e.value:e}function cl(e){return J(e)&&!(e instanceof Array)}function ll(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=Yt();W(t,function(e,n){if(!J(e)){t[n]=null;return}});var s=ul(e,o,n);return(r||i)&&dl(s,e,o,t),r&&fl(s,t),r||i?pl(s,t,i):a&&ml(s,t),hl(s),s}function ul(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`||bl(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function dl(e,t,n,r){W(r,function(i,a){if(!(!i||i.id==null)){var o=_l(i.id),s=n.get(o);if(s!=null){var c=e[s];Bt(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function fl(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)&&!bl(n)&&!bl(a)&&gl(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function pl(e,t,n){W(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||bl(r.existing)||r.existing&&t.id!=null&&!gl(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function ml(e,t){W(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function hl(e){var t=Yt();W(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),W(e,function(e){var n=e.newOption;Bt(!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(J(i)){if(a.name=i.name==null?r?r.name:nl+n:_l(i.name),r)a.id=_l(r.id);else if(i.id!=null)a.id=_l(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 gl(e,t,n){var r=vl(t[e],null),i=vl(n[e],null);return r!=null&&i!=null&&r===i}function _l(e){return vl(e,``)}function vl(e,t){return e==null?t:q(e)?e:At(e)||kt(e)?e+``:t}function yl(e){var t=e.name;return!!(t&&t.indexOf(nl))}function bl(e){return e&&e.id!=null&&_l(e.id).indexOf(rl)===0}function xl(e,t,n){W(e,function(e){var r=e.newOption;J(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=Sl(t,r,e.existing,n))})}function Sl(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function Cl(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 wl(){var e=`__ec_inner_`+Tl++;return function(t){return t[e]||(t[e]={})}}var Tl=Gc();function El(e,t,n){var r=Dl(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=kl(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 Dl(e,t){var n;if(q(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=Yt(),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&&_t(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Ol={useDefault:!0,enableAll:!1,enableNone:!1};function kl(e,t,n,r){r||=Ol;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 Al(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 jl(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Ml(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function Nl(e){return e===`auto`?nn.domSupported?`html`:`richText`:e||`html`}function Pl(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(At(r)){var o=tl(n||0,r,i);return Oc(o,a?Math.max(Ac(n||0),Ac(r)):t)}if(q(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=tl(p,m,i);s[d]=Oc(o,a?Math.max(Ac(p),Ac(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 Fl(){return[1/0,-1/0]}function Il(e,t){Bl(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function Ll(e,t){Bl(t)&&t<e[0]&&(e[0]=t)}function Rl(e,t){Bl(t)&&t>e[1]&&(e[1]=t)}function zl(e,t){Vl(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function Bl(e){return e!=null&&isFinite(e)}function Vl(e,t){return Bl(e)&&Bl(t)&&e<=t}function Hl(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Ul(e){Vl(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Wl(){var e=`__ec_once_`+Gl++;return function(t,n){Z(t,e)||(t[e]=1,n())}}var Gl=Gc();function Kl(e,t,n){var r=Yt(),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 ql(e){return e.value+``}function Jl(e){return e+``}function Yl(e,t){return X(t,!0)?e.seriesIndex+2:0}function Xl(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 Zl(e,t){return{seriesType:e,overallReset:t}}function Ql(e){return{overallReset:e}}var $l=wl(),eu=function(e,t,n,r){if(r){var i=$l(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=$l(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},tu=Yt([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),nu=`original`,ru=`arrayRows`,iu=`objectRows`,au=`keyedColumns`,ou=`typedArray`,su=`unknown`,cu=`column`,lu=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],uu=function(){function e(e){W(lu,function(t){this[t]=Et(e[t],e)},this)}return e}();function du(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var fu=1,pu={},mu=wl(),hu=wl(),gu=[`emphasis`,`blur`,`select`],_u=[`normal`,`emphasis`,`blur`,`select`],vu=`highlight`,yu=`downplay`,bu=`select`,xu=`unselect`,Su=`toggleSelect`,Cu=`selectchanged`;function wu(e){return e!=null&&e!==`none`}function Tu(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Eu(e){Tu(e,`emphasis`,2)}function Du(e){e.hoverState===2&&Tu(e,`normal`,0)}function Ou(e){Tu(e,`blur`,1)}function ku(e){e.hoverState===1&&Tu(e,`normal`,0)}function Au(e){e.selected=!0}function ju(e){e.selected=!1}function Mu(e,t,n){t(e,n)}function Nu(e,t,n){Mu(e,t,n),e.isGroup&&e.traverse(function(e){Mu(e,t,n)})}function Pu(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 Fu(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 Iu(e,t,n,r){var i=n&&_t(n,`select`)>=0,a=!1;if(e instanceof As){var o=mu(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(wu(s)||wu(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=U({},r),l=U({},l),l.fill=s):!wu(l.fill)&&wu(s)?(a=!0,r=U({},r),l=U({},l),l.fill=xa(s)):!wu(l.stroke)&&wu(c)&&(a||(r=U({},r),l=U({},l)),l.stroke=xa(c)),r.style=l}}if(r&&r.z2==null){a||(r=U({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Lu(e,t,n){if(n&&n.z2==null){n=U({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Ru(e,t,n){var r=_t(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Fu(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=U({},n),o=U({opacity:r?i:a.opacity*.1},o),n.style=o),n}function zu(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Iu(this,e,t,n);if(e===`blur`)return Ru(this,e,n);if(e===`select`)return Lu(this,e,n)}return n}function Bu(e){e.stateProxy=zu;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=zu),n&&(n.stateProxy=zu)}function Vu(e,t){!Yu(e,t)&&!e.__highByOuter&&Nu(e,Eu)}function Hu(e,t){!Yu(e,t)&&!e.__highByOuter&&Nu(e,Du)}function Uu(e,t){e.__highByOuter|=1<<(t||0),Nu(e,Eu)}function Wu(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Nu(e,Du)}function Gu(e){Nu(e,Ou)}function Ku(e){Nu(e,ku)}function qu(e){Nu(e,Au)}function Ju(e){Nu(e,ju)}function Yu(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Xu(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=hu(i),o=du(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){ku(e)}),s&&n.push(i)),a.isBlured=!1}),W(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Zu(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&&Ku(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`||Ou(e)}),bt(t))a(e.getData(),t);else if(J(t))for(var u=wt(t),d=0;d<u.length;d++)a(e.getData(u[d]),t[u[d]]);c.push(e),hu(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 Qu(e,t,n){if(e!=null&&t!=null){var r=n.getModel().getComponent(e,t);if(r){hu(r).isBlured=!0;var i=n.getViewOfComponentModel(r);!i||!i.focusBlurEnabled||i.group.traverse(function(e){Ou(e)})}}}function $u(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=Cl(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=$l(o);Zu(r,l.focus,l.blurScope,n)}else{var u=e.get([`emphasis`,`focus`]),d=e.get([`emphasis`,`blurScope`]);u!=null&&Zu(r,u,d,n)}}}function ed(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($l(s[l]).focus===`self`){c=!0;break}return{focusSelf:c,dispatchers:s}}function td(e,t,n){var r=$l(e),i=ed(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&Qu(r.componentMainType,r.componentIndex,n),W(a,function(e){return Vu(e,t)})):(Zu(r.seriesIndex,r.focus,r.blurScope,n),r.focus===`self`&&Qu(r.componentMainType,r.componentIndex,n),Vu(e,t))}function nd(e,t,n){Xu(n);var r=$l(e),i=ed(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?W(i,function(e){return Hu(e,t)}):Hu(e,t)}function rd(e,t,n){if(gd(t)){var r=t.dataType,i=Cl(e.getData(r),t);K(i)||(i=[i]),e[t.type===`toggleSelect`?`toggleSelect`:t.type===`select`?`select`:`unselect`](i,r)}}function id(e){W(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?qu(t):Ju(t)})})}function ad(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 od(e,t,n){pd(e,!0),Nu(e,Bu),ld(e,t,n)}function sd(e){pd(e,!1)}function cd(e,t,n,r){r?sd(e):od(e,t,n)}function ld(e,t,n){var r=$l(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var ud=[`emphasis`,`blur`,`select`],dd={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function fd(e,t,n,r){n||=`itemStyle`;for(var i=0;i<ud.length;i++){var a=ud[i],o=t.getModel([a,n]),s=e.ensureState(a);s.style=r?r(o):o[dd[n]]()}}function pd(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 md(e){return!!(e&&e.__highDownDispatcher)}function hd(e){var t=pu[e];return t==null&&fu<=32&&(t=pu[e]=fu++),t}function gd(e){var t=e.type;return t===`select`||t===`unselect`||t===`toggleSelect`}function _d(e){var t=e.type;return t===`highlight`||t===`downplay`}function vd(e){var t=mu(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 yd=as.CMD,bd=[[],[],[]],xd=Math.sqrt,Sd=Math.atan2;function Cd(e,t){if(t){var n=e.data,r=e.len(),i,a,o,s,c,l,u=yd.M,d=yd.C,f=yd.L,p=yd.R,m=yd.A,h=yd.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=xd(t[0]*t[0]+t[1]*t[1]),y=xd(t[2]*t[2]+t[3]*t[3]),b=Sd(-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++],$n(l,l,t),n[s++]=l[0],n[s++]=l[1],l[0]+=n[o++],l[1]+=n[o++],$n(l,l,t),n[s++]=l[0],n[s++]=l[1]}for(c=0;c<a;c++){var x=bd[c];x[0]=n[o++],x[1]=n[o++],$n(x,x,t),n[s++]=x[0],n[s++]=x[1]}}e.increaseVersion()}}var wd=Math.sqrt,Td=Math.sin,Ed=Math.cos,Dd=Math.PI;function Od(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function kd(e,t){return(e[0]*t[0]+e[1]*t[1])/(Od(e)*Od(t))}function Ad(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(kd(e,t))}function jd(e,t,n,r,i,a,o,s,c,l,u){var d=Dd/180*c,f=Ed(d)*(e-n)/2+Td(d)*(t-r)/2,p=-1*Td(d)*(e-n)/2+Ed(d)*(t-r)/2,m=f*f/(o*o)+p*p/(s*s);m>1&&(o*=wd(m),s*=wd(m));var h=(i===a?-1:1)*wd((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+Ed(d)*g-Td(d)*_,y=(t+r)/2+Td(d)*g+Ed(d)*_,b=Ad([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=Ad(x,S);if(kd(x,S)<=-1&&(C=Dd),kd(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Dd*1e6)/1e6;C=Dd*2+w%2*Dd}u.addData(l,v,y,o,s,b,C,d,a)}var Md=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Nd=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Pd(e){var t=new as;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=as.CMD,c=e.match(Md);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(Nd)||[],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,jd(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,jd(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 Fd=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(As);function Id(e){return e.setData!=null}function Ld(e,t){var n=Pd(e),r=U({},t);return r.buildPath=function(e){var t=Id(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){Cd(n,e),this.dirtyShape()},r}function Rd(e,t){return new Fd(Ld(e,t))}function zd(e,t){var n=Ld(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}(Fd)}function Bd(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 As(t);return o.createPathProxy(),o.buildPath=function(e){if(Id(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},o}var Vd=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=_t(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=_t(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 gr(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?(gr.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(oo);Vd.prototype.type=`group`;var Hd=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),Ud=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Hd},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}(As);Ud.prototype.type=`circle`;var Wd=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),Gd=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Wd},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}(As);Gd.prototype.type=`ellipse`;var Kd=Math.PI,qd=Kd*2,Jd=Math.sin,Yd=Math.cos,Xd=Math.acos,Zd=Math.atan2,Qd=Math.abs,$d=Math.sqrt,ef=Math.max,tf=Math.min,nf=1e-4;function rf(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<nf))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function af(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/$d(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)*$d(ef(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 of(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 sf(e,t){var n,r=ef(t.r,0),i=ef(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=Qd(c-s),p=f>qd&&f%qd;if(p>nf&&(f=p),!(r>nf))e.moveTo(l,u);else if(f>qd-nf)e.moveTo(l+r*Yd(s),u+r*Jd(s)),e.arc(l,u,r,s,c,!d),i>nf&&(e.moveTo(l+i*Yd(c),u+i*Jd(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*Jd(s),M=i*Yd(c),N=i*Jd(c),P=f>nf;if(P){var F=t.cornerRadius;F&&(n=of(F),m=n[0],h=n[1],g=n[2],_=n[3]);var ee=Qd(r-i)/2;if(v=tf(ee,g),y=tf(ee,_),b=tf(ee,m),x=tf(ee,h),w=S=ef(v,y),T=C=ef(b,x),(S>nf||C>nf)&&(E=r*Yd(c),D=r*Jd(c),O=i*Yd(s),k=i*Jd(s),f<Kd)){var I=rf(A,j,O,k,E,D,M,N);if(I){var te=A-I[0],L=j-I[1],ne=E-I[0],R=D-I[1],re=1/Jd(Xd((te*ne+L*R)/($d(te*te+L*L)*$d(ne*ne+R*R)))/2),ie=$d(I[0]*I[0]+I[1]*I[1]);w=tf(S,(r-ie)/(re+1)),T=tf(C,(i-ie)/(re-1))}}}if(!P)e.moveTo(l+A,u+j);else if(w>nf){var ae=tf(g,w),oe=tf(_,w),z=af(O,k,A,j,r,ae,d),B=af(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,Zd(z.y0,z.x0),Zd(B.y0,B.x0),!d):(ae>0&&e.arc(l+z.cx,u+z.cy,ae,Zd(z.y0,z.x0),Zd(z.y1,z.x1),!d),e.arc(l,u,r,Zd(z.cy+z.y1,z.cx+z.x1),Zd(B.cy+B.y1,B.cx+B.x1),!d),oe>0&&e.arc(l+B.cx,u+B.cy,oe,Zd(B.y1,B.x1),Zd(B.y0,B.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>nf)||!P)e.lineTo(l+M,u+N);else if(T>nf){var ae=tf(m,T),oe=tf(h,T),z=af(M,N,E,D,i,-oe,d),B=af(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,Zd(z.y0,z.x0),Zd(B.y0,B.x0),!d):(oe>0&&e.arc(l+z.cx,u+z.cy,oe,Zd(z.y0,z.x0),Zd(z.y1,z.x1),!d),e.arc(l,u,i,Zd(z.cy+z.y1,z.cx+z.x1),Zd(B.cy+B.y1,B.cx+B.x1),d),ae>0&&e.arc(l+B.cx,u+B.cy,ae,Zd(B.y1,B.x1),Zd(B.y0,B.x0),!d))}else e.lineTo(l+M,u+N),e.arc(l,u,i,c,s,d)}e.closePath()}}}var cf=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}(),lf=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new cf},t.prototype.buildPath=function(e,t){sf(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(As);lf.prototype.type=`sector`;var uf=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),df=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new uf},t.prototype.buildPath=function(e,t){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}(As);df.prototype.type=`ring`;function ff(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++)er(u,u,e[f]),tr(d,d,e[f]);er(u,u,r[0]),tr(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(Bn(e[f]));continue}else c=e[f-1],l=e[f+1];Un(a,l,c),Kn(a,a,t);var h=Jn(m,c),g=Jn(m,l),_=h+g;_!==0&&(h/=_,g/=_),Kn(o,a,-h),Kn(s,a,g);var v=Hn([],m,o),y=Hn([],m,s);r&&(tr(v,v,u),er(v,v,d),tr(y,y,u),er(y,y,d)),i.push(v),i.push(y)}return n&&i.push(i.shift()),i}function pf(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=ff(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 mf=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),hf=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new mf},t.prototype.buildPath=function(e,t){pf(e,t,!0)},t}(As);hf.prototype.type=`polygon`;var gf=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),_f=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 gf},t.prototype.buildPath=function(e,t){pf(e,t,!1)},t}(As);_f.prototype.type=`polyline`;var vf={},yf=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),bf=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 yf},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=zs(vf,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}(As);bf.prototype.type=`line`;var xf=[],Sf=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 Cf(e,t,n){var r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?Fi:Pi)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Fi:Pi)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?Hi:Vi)(e.x1,e.cpx1,e.x2,t),(n?Hi:Vi)(e.y1,e.cpy1,e.y2,t)]}var wf=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 Sf},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&&(Gi(n,o,i,u,xf),o=xf[1],i=xf[2],Gi(r,s,a,u,xf),s=xf[1],a=xf[2]),e.quadraticCurveTo(o,s,i,a)):(u<1&&(Ri(n,o,c,i,u,xf),o=xf[1],c=xf[2],i=xf[3],Ri(r,s,l,a,u,xf),s=xf[1],l=xf[2],a=xf[3]),e.bezierCurveTo(o,s,c,l,i,a)))},t.prototype.pointAt=function(e){return Cf(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=Cf(this.shape,e,!0);return qn(t,t)},t}(As);wf.prototype.type=`bezier-curve`;var Tf=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}(),Ef=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 Tf},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}(As);Ef.prototype.type=`arc`;var Df=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),As.prototype.getBoundingRect.call(this)},t}(As),Of=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),kf=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}(Of),Af=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}(Of),jf=Math.min,Mf=Math.max,Nf=Math.abs,Pf=[0,0],Ff=[0,0],If=Dr(),Lf=If.minTv,Rf=If.maxTv,zf=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new nr;for(var n=0;n<2;n++)this._axes[n]=new nr;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);nr.sub(r[0],n[1],n[0]),nr.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&&nr.set(t,0,0),If.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(r=!1,i)||!i&&!If.negativeSize&&nr.copy(t,r?If.useDir?If.dirMinTv:Lf:Rf),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,Pf),e._getProjMinMaxOnAxis(a,t._corners,Ff),If.negativeSize||Pf[1]<Ff[0]||Pf[0]>Ff[1]){if(i=!1,If.negativeSize||n)return i;var s=Nf(Ff[0]-Pf[1]),c=Nf(Pf[0]-Ff[1]);jf(s,c)>Rf.len()&&(s<c?nr.scale(Rf,o,-s*r):nr.scale(Rf,o,c*r))}else if(!n){var s=Nf(Ff[0]-Pf[1]),c=Nf(Pf[0]-Ff[1]);(If.useDir||jf(s,c)<Lf.len())&&((s<c||!If.bidirectional)&&(nr.scale(Lf,o,s*r),If.useDir&&If.calcDirMTV()),(s>=c||!If.bidirectional)&&(nr.scale(Lf,o,-c*r),If.useDir&&If.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=jf(l,o),s=Mf(l,s)}n[0]=o+If.touchThreshold,n[1]=s-If.touchThreshold,If.negativeSize=n[1]<n[0]},e}(),Bf=[],Vf=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 gr(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(Bf)),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}(Co),Hf=wl();function Uf(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)),Ot(d)&&(d=d(n,i)),Ot(l)&&(l=l(n)),{duration:l||0,delay:d,easing:u}}return null}function Wf(e,t,n,r,i,a,o){var s=!1,c;Ot(i)?(o=a,a=i,i=null):J(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=Uf(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 Gf(e,t,n,r,i,a){Wf(`update`,e,t,n,r,i,a)}function Kf(e,t,n,r,i,a){Wf(`enter`,e,t,n,r,i,a)}function qf(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 Jf(e,t,n,r,i,a){qf(e)||Wf(`leave`,e,t,n,r,i,a)}function Yf(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),Jf(e,{style:{opacity:0}},t,n,r)}function Xf(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 Zf(e){Hf(e).oldStyle=e.style}var Qf=se({Arc:()=>Ef,BezierCurve:()=>wf,BoundingRect:()=>gr,Circle:()=>Ud,CompoundPath:()=>Df,Ellipse:()=>Gd,Group:()=>Vd,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Is,IncrementalDisplayable:()=>Vf,Line:()=>bf,LinearGradient:()=>kf,OrientedBoundingRect:()=>zf,Path:()=>As,Point:()=>nr,Polygon:()=>hf,Polyline:()=>_f,RadialGradient:()=>Af,Rect:()=>Ws,Ring:()=>df,Sector:()=>lf,Text:()=>Ys,WH:()=>tp,XY:()=>ep,applyTransform:()=>gp,calcZ2Range:()=>zp,clipPointsByRect:()=>xp,clipRectByRect:()=>Sp,createIcon:()=>Cp,decomposeTransform:()=>Up,ensureCopyRect:()=>Ip,ensureCopyTransform:()=>Lp,expandOrShrinkRect:()=>Op,extendPath:()=>ip,extendShape:()=>np,getCurrentCanvasPainter:()=>Gp,getShapeClass:()=>op,getTransform:()=>hp,groupTransition:()=>bp,initProps:()=>Kf,isBoundingRectAxisAligned:()=>Pp,isElementRemoved:()=>qf,lineLineIntersect:()=>Tp,linePolygonIntersect:()=>wp,makeImage:()=>cp,makePath:()=>sp,mergePath:()=>up,payloadDisableAnimation:()=>Hp,registerShape:()=>ap,removeElement:()=>Jf,removeElementWithFadeOut:()=>Xf,resizePath:()=>dp,retrieveZInfo:()=>Rp,setTooltipConfig:()=>jp,subPixelOptimize:()=>mp,subPixelOptimizeLine:()=>fp,subPixelOptimizeRect:()=>pp,transformDirection:()=>_p,traverseElements:()=>Np,traverseUpdateZ:()=>Bp,updateProps:()=>Gf}),$f={},ep=[`x`,`y`],tp=[`width`,`height`];function np(e){return As.extend(e)}var rp=zd;function ip(e,t){return rp(e,t)}function ap(e,t){$f[e]=t}function op(e){if($f.hasOwnProperty(e))return $f[e]}function sp(e,t,n,r){var i=Rd(e,t);return n&&(r===`center`&&(n=lp(n,i.getBoundingRect())),dp(i,n)),i}function cp(e,t,n){var r=new Is({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(lp(t,i))}}});return r}function lp(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 up=Bd;function dp(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function fp(e,t){return zs(e,e,{lineWidth:t}),e}function pp(e,t){return Bs(e,e,t),e}var mp=Vs;function hp(e,t){for(var n=jn([]);e&&e!==t;)Nn(n,e.getLocalTransform(),n),e=e.parent;return n}function gp(e,t,n){return t&&!bt(t)&&(t=_i.getLocalTransform(t)),n&&(t=Ln([],t)),$n([],e,t)}function _p(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:mc(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:mc(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=gp(a,t,n),mc(a[0])>mc(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function vp(e){return!e.isGroup}function yp(e){return e.shape!=null}function bp(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){vp(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return yp(e)&&(t.shape=mt(e.shape)),t}var a=r(e);t.traverse(function(e){if(vp(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Gf(e,r,n,$l(e).dataIndex)}}})}function xp(e,t){return G(e,function(e){var n=e[0];n=pc(n,t.x),n=fc(n,t.x+t.width);var r=e[1];return r=pc(r,t.y),r=fc(r,t.y+t.height),[n,r]})}function Sp(e,t){var n=pc(e.x,t.x),r=fc(e.x+e.width,t.x+t.width),i=pc(e.y,t.y),a=fc(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 Cp(e,t,n){var r=U({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),gt(i,n),new Is(r)):sp(e.replace(`path://`,``),r,n,`center`)}function wp(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Tp(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function Tp(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=Ep(u,d,c,l);if(Dp(f))return!1;var p=e-i,m=t-a,h=Ep(p,m,c,l)/f;if(h<0||h>1)return!1;var g=Ep(p,m,u,d)/f;return!(g<0||g>1)}function Ep(e,t,n,r){return e*r-n*t}function Dp(e){return e<=1e-6&&e>=-1e-6}function Op(e,t,n,r,i){return t==null?e:(At(t)?kp[0]=kp[1]=kp[2]=kp[3]=t:(kp[0]=t[0],kp[1]=t[1],kp[2]=t[2],kp[3]=t[3]),r&&(kp[0]=pc(0,kp[0]),kp[1]=pc(0,kp[1]),kp[2]=pc(0,kp[2]),kp[3]=pc(0,kp[3])),n&&(kp[0]=-kp[0],kp[1]=-kp[1],kp[2]=-kp[2],kp[3]=-kp[3]),Ap(e,kp,`x`,`width`,3,1,i&&i[0]||0),Ap(e,kp,`y`,`height`,0,2,i&&i[1]||0),e)}var kp=[0,0,0,0];function Ap(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=pc(0,fc(o,c)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?c+t[a]:mc(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function jp(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=q(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(wt(c),function(e){Z(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=$l(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:gt({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Mp(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Np(e,t){if(e){if(K(e))for(var n=0;n<e.length;n++)Mp(e[n],t);else Mp(e,t)}}function Pp(e){return!e||mc(e[1])<Fp&&mc(e[2])<Fp||mc(e[0])<Fp&&mc(e[3])<Fp}var Fp=1e-5;function Ip(e,t){return e?gr.copy(e,t):t.clone()}function Lp(e,t){return t?Mn(e||An(),t):void 0}function Rp(e){return{z:e.get(`z`)||0,zlevel:e.get(`zlevel`)||0}}function zp(e){var t=-1/0,n=1/0;Mp(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 Bp(e,t,n){Vp(e,t,n,-1/0)}function Vp(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=pc(Vp(o[s],t,n,r),r);else e.z=t,e.zlevel=n,r=pc(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 Hp(e){return e.animation={duration:0},e}function Up(e,t){return t?Mn(Wp.transform,t):jn(Wp.transform),Wp.decomposeTransform(),xi(e,Wp),e}var Wp=new _i;Wp.transform=An();function Gp(e){var t=e.getZr().painter;return t.getType()===`canvas`?t:null}ap(`circle`,Ud),ap(`ellipse`,Gd),ap(`sector`,lf),ap(`ring`,df),ap(`polygon`,hf),ap(`polyline`,_f),ap(`rect`,Ws),ap(`line`,bf),ap(`bezierCurve`,wf),ap(`arc`,Ef);var Kp={};function qp(e,t){for(var n=0;n<gu.length;n++){var r=gu[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 Jp(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??=Ot(e.defaultText)?e.defaultText(i,e,n):e.defaultText;for(var c={normal:s},l=0;l<gu.length;l++){var u=gu[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||=Kp;for(var i=e instanceof Ys,a=!1,o=0;o<_u.length;o++){var s=t[_u[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=Jp(n,t),u=t.normal,d=!!u.getShallow(`show`),f=Zp(u,r&&r.normal,n,!1,!i);f.text=l.normal,i||e.setTextConfig(Qp(u,n,!1));for(var o=0;o<gu.length;o++){var p=gu[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=Zp(s,r&&r[p],n,!0,!i),m.style.text=l[p],!i){var g=e.ensureState(p);g.textConfig=Qp(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&&(om(c).setLabelText=function(e){var r=Jp(n,t,e);qp(c,r)})}else c&&(c.ignore=!0);e.dirty()}function Xp(e,t){t||=`label`;for(var n={normal:e.getModel(t)},r=0;r<gu.length;r++){var i=gu[r];n[i]=e.getModel([i,t])}return n}function Zp(e,t,n,r,i){var a={};return $p(a,e,n,r,i),t&&U(a,t),a}function Qp(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 $p(e,t,n,r,i){n||=Kp;var a=t.ecModel,o=a&&a.option.textStyle,s=em(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]);im(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=At(g)?g/2:0,h.margin=[g,g,g,g],h.__marginType=cm.minMargin;else{var _=t.get(`textMargin`);_!=null&&(h.margin=zt(_),h.__marginType=cm.textMargin)}im(e,t,o,null,null,n,r,i,!0,!1)}function em(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||Kp).rich;if(n){t||={};for(var r=wt(n),i=0;i<r.length;i++){var a=r[i];t[a]=1}}e=e.parentModel}return t}var tm=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`textShadowColor`,`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],nm=[`align`,`lineHeight`,`width`,`height`,`tag`,`verticalAlign`,`ellipsis`],rm=[`padding`,`borderWidth`,`borderRadius`,`borderDashOffset`,`backgroundColor`,`borderColor`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`];function im(e,t,n,r,i,a,o,s,c,l){n=!o&&n||Kp;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;_<tm.length;_++){var v=tm[_],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;_<nm.length;_++){var v=nm[_],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;_<rm.length;_++){var v=rm[_],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 am(e,t){var n=t&&t.getModel(`textStyle`);return Vt([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 om=wl();function sm(e,t,n,r){if(e){var i=om(e);i.prevValue=i.value,i.value=n;var a=t.normal;i.valueAnimation=a.get(`valueAnimation`),i.valueAnimation&&(i.precision=a.get(`precision`),i.defaultInterpolatedText=r,i.statesModels=t)}}var cm={minMargin:1,textMargin:2},lm=[`textStyle`,`color`],um=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`padding`,`lineHeight`,`rich`,`width`,`height`,`overflow`],dm=new Ys,fm=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow(`color`)||(!e&&t?t.get(lm):null)},e.prototype.getFont=function(){return am({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<um.length;n++)t[um[n]]=this.getShallow(um[n]);return dm.useStyle(t),dm.update(),dm.getBoundingRect()},e}(),pm=[[`lineWidth`,`width`],[`stroke`,`color`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`type`],[`lineDashOffset`,`dashOffset`],[`lineCap`,`cap`],[`lineJoin`,`join`],[`miterLimit`]],mm=yn(pm),hm=function(){function e(){}return e.prototype.getLineStyle=function(e){return mm(this,e)},e}(),gm=[[`fill`,`color`],[`stroke`,`borderColor`],[`lineWidth`,`borderWidth`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`borderType`],[`lineDashOffset`,`borderDashOffset`],[`lineCap`,`borderCap`],[`lineJoin`,`borderJoin`],[`miterLimit`,`borderMiterLimit`]],_m=yn(gm),vm=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return _m(this,e,t)},e}(),ym=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){H(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(mt(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(!nn.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}();dn(ym),hn(ym),yt(ym,hm),yt(ym,vm),yt(ym,xn),yt(ym,fm);function bm(e){return e==null?0:e.length||1}function xm(e){return e}var Sm=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||xm,this._newKeyGetter=r||xm,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=bm(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=bm(c),d=bm(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=bm(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=bm(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},e}(),Cm={Must:1,Might:2,Not:3},wm=wl();function Tm(e){wm(e).datasetMap=Yt()}function Em(e,t,n){var r={},i=Om(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=wm(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),W(e,function(t,n){var i=J(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 Dm(e,t,n){var r={};if(!Om(e))return r;var i=t.sourceFormat,a=t.dimensionsDefine,o;(i===`objectRows`||i===`keyedColumns`)&&W(a,function(e,t){(J(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=jm(t.data,i,t.seriesLayoutBy,a,t.startIndex,c);s.push(u);var d=u===Cm.Not;if(d&&e.v==null&&c!==o&&(e.v=c),(e.n==null||e.n===e.v||!d&&s[e.n]===Cm.Not)&&(e.n=c),f(e)&&s[e.n]!==Cm.Not)return e;d||(u===Cm.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 Om(e){if(!e.get(`data`,!0))return kl(e.ecModel,`dataset`,{index:e.get(`datasetIndex`,!0),id:e.get(`datasetId`,!0)},Ol).models[0]}function km(e){return!e.get(`transform`,!0)&&!e.get(`fromTransformResult`,!0)?[]:kl(e.ecModel,`dataset`,{index:e.get(`fromDatasetIndex`,!0),id:e.get(`fromDatasetId`,!0)},Ol).models}function Am(e,t){return jm(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function jm(e,t,n,r,i,a){var o,s=5;if(Mt(e))return Cm.Not;var c,l;if(r){var u=r[a];J(u)?(c=u.name,l=u.type):q(u)&&(c=u)}if(l!=null)return l===`ordinal`?Cm.Must:Cm.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 Cm.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 Cm.Not;var f=_[c];if(!f||Mt(f))return Cm.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=sl(g);if(!K(y))return Cm.Not;if((o=b(y[a]))!=null)return o}function b(e){var t=q(e);if(e!=null&&isFinite(Number(e))&&e!==``)return t?Cm.Might:Cm.Not;if(t&&e!==`-`)return Cm.Must}return Cm.Not}var Mm=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&&Am(this,n)===Cm.Must&&(r.type=`ordinal`)}}return e}();function Nm(e){return e instanceof Mm}function Pm(e,t,n){n||=Lm(e);var r=t.seriesLayoutBy,i=Rm(e,n,r,t.sourceHeader,t.dimensions);return new Mm({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:mt(t)})}function Fm(e){return new Mm({data:e,sourceFormat:Mt(e)?ou:nu})}function Im(e){return new Mm({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:mt(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function Lm(e){var t=su;if(Mt(e))t=ou;else if(K(e)){e.length===0&&(t=ru);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){if(K(i)||Mt(i)){t=ru;break}if(J(i)){t=iu;break}}}}else if(J(e)){for(var a in e)if(Z(e,a)&&bt(e[a])){t=au;break}}return t}function Rm(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:Bm(i),startIndex:o,dimensionsDetectedCount:a};if(t===`arrayRows`){var s=e;r===`auto`||r==null?Vm(function(e){e!=null&&e!==`-`&&(q(e)?o??=1:o=0)},n,s,10):o=At(r)?r:+!!r,!i&&o===1&&(i=[],Vm(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||=zm(e);else if(t===`keyedColumns`)i||(i=[],W(e,function(e,t){i.push(t)}));else if(t===`original`){var c=sl(e[0]);a=K(c)&&c.length||1}return{startIndex:o,dimensionsDefine:Bm(i),dimensionsDetectedCount:a}}function zm(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return wt(n)}function Bm(e){if(e){var t=Yt();return G(e,function(e,n){e=J(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 Vm(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 Hm(e){var t=e.sourceFormat;return t===`objectRows`||t===`keyedColumns`}var Um,Wm,Gm,Km,qm,Jm,Ym=function(){function e(e,t){var n=Nm(e)?e:Fm(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),Jm(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;Jm=function(e,i,a){var o=a.sourceFormat,s=a.seriesLayoutBy,c=a.startIndex,l=a.dimensionsDefine,u=qm[oh(o,s)];U(e,u),o===`typedArray`?(e.getItem=t,e.count=r,e.fillStorage=n):(e.getItem=Et($m(o,s),null,i,c,l),e.count=Et(nh(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};qm=(e={},e[ru+`_`+cu]={pure:!0,appendData:i},e[ru+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[iu]={pure:!0,appendData:i},e[au]={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[nu]={appendData:i},e[ou]={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}(),Xm=function(e){K(e)||$c(`series.data or dataset.source must be an array.`)};Um={},Um[ru+`_`+cu]=Xm,Um[ru+`_row`]=Xm,Um[iu]=Xm,Um[au]=function(e,t){for(var n=0;n<t.length;n++)t[n].name??$c(`dimension name must not be null/undefined.`)},Um[nu]=Xm;var Zm=function(e,t,n,r){return e[r]},Qm=(Wm={},Wm[ru+`_`+cu]=function(e,t,n,r){return e[r+t]},Wm[ru+`_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},Wm[iu]=Zm,Wm[au]=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},Wm[nu]=Zm,Wm);function $m(e,t){return Qm[oh(e,t)]}var eh=function(e,t,n){return e.length},th=(Gm={},Gm[ru+`_`+cu]=function(e,t,n){return Math.max(0,e.length-t)},Gm[ru+`_row`]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},Gm[iu]=eh,Gm[au]=function(e,t,n){var r=n[0].name,i=r==null?null:e[r];return i?i.length:0},Gm[nu]=eh,Gm);function nh(e,t){return th[oh(e,t)]}var rh=function(e,t,n){return e[t]},ih=(Km={},Km[ru]=rh,Km[iu]=function(e,t,n){return e[n]},Km[au]=rh,Km[nu]=function(e,t,n){var r=sl(e);return r instanceof Array?r[t]:r},Km[ou]=rh,Km);function ah(e){return ih[e]}function oh(e,t){return e===`arrayRows`?e+`_`+t:e}function sh(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 ah(a)(r,o,s)}var c=r;return a===`original`&&(c=sl(r)),c}}}var ch=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 lh(e,t){var n={},r=n.encode={},i=Yt(),a=[],o=[],s={};W(e.dimensions,function(t){var n=e.getDimensionInfo(t),c=n.coordDim;if(c){var l=n.coordDimIndex;uh(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),fh(n.type)&&(a[0]=t),uh(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}tu.each(function(e,t){var i=uh(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 ch(s,t),n}function uh(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function dh(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function fh(e){return e!==`ordinal`&&e!==`time`}var ph=function(){function e(e){this.otherDims={},e!=null&&U(this,e)}return e}();function mh(e,t){var n=t&&t.type;return n===`ordinal`?e:(n===`time`&&!At(e)&&e!=null&&e!==`-`&&(e=+zc(e)),e==null||e===``?NaN:Number(e))}Yt({number:function(e){return parseFloat(e)},time:function(e){return+zc(e)},trim:function(e){return q(e)?Vt(e):e}});var hh={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){At(t)||el(``),this._opFn=hh[e],this._rvalFloat=Uc(t)}return e.prototype.evaluate=function(e){return At(e)?this._opFn(e,this._rvalFloat):this._opFn(Uc(e),this._rvalFloat)},e})();var gh=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=At(e)?e:Uc(e),r=At(t)?t:Uc(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=q(e),s=q(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=Uc(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=Uc(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function _h(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 vh(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}var yh=typeof Uint32Array>`u`?Array:Uint32Array,bh=typeof Uint16Array>`u`?Array:Uint16Array,xh=typeof Int32Array>`u`?Array:Int32Array,Sh=typeof Float64Array>`u`?Array:Float64Array,Ch={float:Sh,int:xh,ordinal:Array,number:Array,time:Sh},wh;function Th(e){return e>65535?yh:bh}function Eh(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Dh(e,t,n,r,i){var a=Ch[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 Oh=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Yt()}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=wh[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],Hm(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 Ch[t||`float`](this._rawCount),this._rawExtent[i]=Fl(),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]=Fl());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];Dh(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=wh.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]=Fl()),Dh(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)}),kc(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=Th(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(Th(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=wt(e),i=r.length;if(!i)return this;var a=t.count(),o=new(Th(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]]=Fl();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(Th(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(Th(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]=Fl(),d=new(Th(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=Fl();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=_h(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||vh(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&&xt(t,function(e,t){return e[t]=!0,e},{});if(a)for(var o=0;o<i.length;o++)r._chunks[o]=a[o]?Eh(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=mt(this._extent),e._rawExtent=mt(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 mh(e[r],this._dimensions[r])}wh={arrayRows:e,objectRows:function(e,t,n,r){return mh(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return mh(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),kh=wl(),Ah={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},jh=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||=Ph(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=Hm(this.source),n=!Fh(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+=Ah[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 Mh(e){return e instanceof jh}function Nh(e){for(var t=Yt(),n=0;n<(e||[]).length;n++){var r=e[n],i=J(r)?r.name:r;i!=null&&t.get(i)==null&&t.set(i,n)}return t}function Ph(e){var t=kh(e);return t.dimNameMap||=Nh(e.dimensionsDefine)}function Fh(e){return e>30}var Ih=J,Lh=G,Rh=typeof Int32Array>`u`?Array:Int32Array,zh=`e\0\0`,Bh=-1,Vh=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Hh=[`_approximateExtent`],Uh,Wh,Gh,Kh,qh,Jh,Yh,Xh=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;Mh(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=q(u)?new ph({name:u}):u instanceof ph?u:new ph(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=Yt();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(At(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 Oh&&(i=e),!i){var a=this.dimensions,o=Nm(e)||bt(e)?new Ym(e,a.length):e;i=new Oh;var s=Lh(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=lh(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&&Yh(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&&cl(s)&&(this.hasItemOption=!0),s){var c=s.name;r[o]==null&&c!=null&&(r[o]=vl(c,null));var l=s.id;i[o]==null&&l!=null&&(i[o]=vl(l,null))}}if(this._shouldMakeIdFromName())for(var o=e;o<t;o++)Yh(this,o);Uh(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){Ih(e)?U(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=Gh(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 Wh(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(Lh(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)?Bh:r},e.prototype.each=function(e,t,n){Ot(e)&&(n=t,t=e,e=[]);var r=n||this,i=Lh(Kh(e),this._getStoreDimIndex,this);this._store.each(i,r?Et(t,r):t)},e.prototype.filterSelf=function(e,t,n){Ot(e)&&(n=t,t=e,e=[]);var r=n||this,i=Lh(Kh(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?Et(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={},r=wt(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){Ot(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=Lh(Kh(e),this._getStoreDimIndex,this),o=Jh(this);return o._store=this._store.map(a,i?Et(t,i):t),o},e.prototype.modify=function(e,t,n,r){var i=n||r||this,a=Lh(Kh(e),this._getStoreDimIndex,this);this._store.modify(a,i?Et(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=Jh(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.minmaxDownSample=function(e,t){var n=Jh(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=Jh(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 ym(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new Sm(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return Wh(e,t)},function(e){return Wh(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||{},Ih(e)?U(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():Ih(i)&&(i=U({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Ih(t)?U(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Ih(e)?U(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?U(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){eu(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:Lh(this.dimensions,this._getDimInfo,this),this.hostModel),qh(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];Ot(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Rt(arguments)))})},e.internalField=function(){Uh=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 Rh(a.categories.length);for(var s=0;s<n.length;s++)n[s]=Bh;for(var s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},Gh=function(e,t,n){return vl(e._getCategory(t,n),null)},Wh=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Gh(e,e._idDimIdx,t)),n??=zh+t,n},Kh=function(e){return K(e)||(e=e==null?[]:[e]),e},Jh=function(t){var n=new e(t._schema?t._schema:Lh(t.dimensions,t._getDimInfo,t),t.hostModel);return qh(n,t),n},qh=function(e,t){W(Vh.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,W(Hh,function(n){e[n]=mt(t[n])}),e._calculationInfo=U({},t._calculationInfo)},Yh=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=Gh(e,i,t)),s==null&&a!=null&&(r[t]=s=Gh(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 Zh(e,t){Nm(e)||(e=Fm(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Yt(),a=[],o=Qh(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Fh(o),c=r===e.dimensionsDefine,l=c?Ph(e):Nh(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=Yt(u),f=new xh(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=J(n)?n:{name:n},o=new ph,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=il(e).slice();if(n.length===1&&!q(n[0])&&n[0]<0){d.set(t,!1);return}var r=d.set(t,[]);W(n,function(e,n){var i=q(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(q(e))t=e,i={};else{i=e,t=i.name;var a=i.ordinalMeta;i.ordinalMeta=null,i=U({},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=il(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(gt(o,i),t,a),o.name==null&&n){var s=n[a];!J(s)&&(s={name:s}),o.name=o.displayName=s.name,o.defaultTooltip=s.defaultTooltip}r&>(o.otherDims,r)})}});function g(e,t,n){tu.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=$h(b,i,y),C.coordDimIndex=0,(!_||v<=0)&&(C.isExtraCoord=!0),v--),x(C),C.type==null&&(Am(e,S)===Cm.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type=`ordinal`)}return Kl(a,function(e){return e.name},function(e,t){t>0&&(e.name+=t-1)}),new jh({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Qh(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return W(t,function(e){var t;J(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function $h(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 eg={},tg={},ng=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(eg,!0),this._normalMasterList=n(tg,!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`){eg[e]=t;return}tg[e]=t},e.get=function(e){return tg[e]||eg[e]},e}();function rg(e){return!!eg[e]}function ig(e){ag.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var ag=Yt();function og(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=ag.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function sg(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&&!rg(n)&&(i=0))}return{coordSysType:n,kind:i}}function cg(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=sg(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 lg=function(){function e(e){this.coordSysDims=[],this.axisMap=Yt(),this.categoryAxisMap=Yt(),this.coordSysName=e}return e}();function ug(e){var t=e.get(`coordinateSystem`),n=new lg(t),r=dg[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var dg={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Ol).models[0],a=e.getReferringComponents(`yAxis`,Ol).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),fg(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),fg(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Ol).models[0];t.coordSysDims=[`single`],n.set(`single`,i),fg(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Ol).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),fg(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),fg(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),fg(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Ol).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 fg(e){return e.get(`type`)===`category`}function pg(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;mg(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){q(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 mg(e){return!Mh(e.schema)}function hg(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function gg(e,t){return hg(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function _g(e,t){var n=e.get(`coordinateSystem`),r=ng.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=dh(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function vg(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 yg(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Fm(e)):(i=r.getSource(),a=i.sourceFormat===nu);var o=ug(t),s=_g(t,o),c=n.useEncodeDefaulter,l=Ot(c)?c:c?Dt(Em,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=Zh(i,u),f=vg(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=pg(t,{schema:d,store:p}),h=new Xh(d,t);h.setCalculationInfo(m);var g=f!=null&&bg(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 bg(e){if(e.sourceFormat===`original`)return!K(sl(xg(e.data||[])))}function xg(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var Sg=Math.round(Math.random()*10);function Cg(e){return[e||``,Sg++].join(`_`)}function wg(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=cn(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var a=cn(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}function Tg(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){_t(s.predecessor,e)<0&&s.predecessor.push(e);var t=r(n,e);_t(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){_t(t,e)>=0&&n.push(e)}),n}}function Eg(e,t){return H(H({},e,!0),t,!0)}var Dg=Math.log(2);function Og(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)/Dg);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]*Og(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function kg(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=Og(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)*Og(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 Ag=`___zrEVENTSAVED`,jg=[];function Mg(e,t,n,r,i){return Pg(jg,t,r,i,!0)&&Pg(e,n,jg[0],jg[1])}function Ng(e,t){e&&n(e),t&&n(t);function n(e){var t=e[Ag];t&&(t.clearMarkers&&t.clearMarkers(),delete e[Ag])}}function Pg(e,t,n,r,i){if(t.getBoundingClientRect&&nn.domSupported&&!Lg(t)){var a=t[Ag]||(t[Ag]={}),o=Ig(Fg(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function Fg(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 Ig(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?kg(s,o):kg(o,s))}function Lg(e){return e.nodeName.toUpperCase()===`CANVAS`}var Rg=/([&<>"'])/g,zg={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Bg(e){return e==null?``:(e+``).replace(Rg,function(e,t){return zg[t]})}var Vg={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:`. `}}}},Hg={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:``}}}},Ug=`ZH`,Wg=`EN`,Gg=Wg,Kg={},qg={},Jg=nn.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Gg).toUpperCase().indexOf(Ug)>-1?Ug:Gg}():Gg;function Yg(e,t){e=e.toUpperCase(),qg[e]=new ym(t),Kg[e]=t}function Xg(e){if(q(e)){var t=Kg[e.toUpperCase()]||{};return e===Ug||e===Wg?mt(t):H(mt(t),mt(Kg[Gg]),!1)}return H(mt(e),mt(Kg[Gg]),!1)}function Zg(e){return qg[e]}function Qg(){return qg[Gg]}Yg(Wg,Vg),Yg(Ug,Hg);var $g=null;function e_(){return $g}function t_(e,t){var n=e_(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function n_(e){var t=e.brk;return t?t.breaks:[]}function r_(e){var t=e.brk;return t?t.hasBreaks():!1}var i_=1e3,a_=i_*60,o_=a_*60,s_=o_*24,c_=s_*365,l_={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})/},u_={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},d_=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,f_=`{yyyy}-{MM}-{dd}`,p_={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:f_,hour:f_+` `+u_.hour,minute:f_+` `+u_.minute,second:f_+` `+u_.second,millisecond:d_},m_=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],h_=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function g_(e){return!q(e)&&!Ot(e)?__(e):e}function __(e){e||={};var t={},n=!0;return W(m_,function(t){n&&=e[t]==null}),W(m_,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=m_[s],l=J(a)&&!K(a)?a[c]:a,u=void 0;K(l)?(u=l.slice(),o=u[0]||``):q(l)?(o=l,u=[o]):(o==null?o=u_[r]:l_[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function v_(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function y_(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 b_(e){return e===y_(e)}function x_(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function S_(e,t,n,r){var i=zc(e),a=i[E_(n)](),o=i[D_(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[O_(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[k_(n)](),d=(u-1)%12+1,f=i[A_(n)](),p=i[j_(n)](),m=i[M_(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof ym?r:Zg(r||Jg)||Qg()).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,v_(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,v_(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,v_(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,v_(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,v_(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,v_(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,v_(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,v_(m,3)).replace(/{S}/g,m+``)}function C_(e,t,n,r,i){var a=null;if(q(n))a=n;else if(Ot(n)){var o={time:e.time,level:e.time?e.time.level:0},s=e_();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=w_(e.value,i);a=n[u][u][0]}}return S_(new Date(e.value),a,i,r)}function w_(e,t){var n=zc(e),r=n[D_(t)]()+1,i=n[O_(t)](),a=n[k_(t)](),o=n[A_(t)](),s=n[j_(t)](),c=n[M_(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 T_(e,t,n){switch(t){case`year`:e[P_(n)](0);case`month`:e[F_(n)](1);case`day`:e[I_(n)](0);case`hour`:e[L_(n)](0);case`minute`:e[R_(n)](0);case`second`:e[z_(n)](0)}return e}function E_(e){return e?`getUTCFullYear`:`getFullYear`}function D_(e){return e?`getUTCMonth`:`getMonth`}function O_(e){return e?`getUTCDate`:`getDate`}function k_(e){return e?`getUTCHours`:`getHours`}function A_(e){return e?`getUTCMinutes`:`getMinutes`}function j_(e){return e?`getUTCSeconds`:`getSeconds`}function M_(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function N_(e){return e?`setUTCFullYear`:`setFullYear`}function P_(e){return e?`setUTCMonth`:`setMonth`}function F_(e){return e?`setUTCDate`:`setDate`}function I_(e){return e?`setUTCHours`:`setHours`}function L_(e){return e?`setUTCMinutes`:`setMinutes`}function R_(e){return e?`setUTCSeconds`:`setSeconds`}function z_(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function B_(e){if(!Wc(e))return q(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function V_(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var H_=zt;function U_(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&Vt(e)?e:`-`}function a(e){return Jc(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?zc(e):e;if(!isNaN(+c))return S_(c,r,n);if(s)return`-`}if(t===`ordinal`)return kt(e)?i(e):At(e)&&a(e)?e+``:`-`;var l=Uc(e);return a(l)?B_(l):kt(e)?i(e):typeof e==`boolean`?e+``:`-`}var W_=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],G_=function(e,t){return`{`+e+(t??``)+`}`};function K_(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=W_[a];e=e.replace(G_(o),G_(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(G_(W_[c],s),n?Bg(l):l)}return e}function q_(e,t){var n=q(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:`+Bg(r)+`;`+(t||``)+`"></span>`:`<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:`+Bg(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 J_(e,t){return t||=`transparent`,q(e)?e:J(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Y_(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var X_=W,Z_=[`left`,`right`,`top`,`bottom`,`width`,`height`],Q_=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function $_(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 ev=$_;Dt($_,`vertical`),Dt($_,`horizontal`);function tv(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 nv(e,t){var n=ov(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===av.point)a=n.refPoint,i=iv(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=K(o)?o:[o,o];i=iv(r,n.refContainer),a=n.boxCoordFrom===2?n.refPoint:[wc(s[0],i.width)+i.x,wc(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function rv(e,t){var n=nv(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);K(a)||(a=[0,a]);var o=wc(r.width,t.getWidth()),s=wc(r.height,t.getHeight()),c=Math.min(o,s),l=wc(a[0],c/2),u=wc(a[1],c/2);return{cx:i[0],cy:i[1],r0:l,r:u,viewRect:r}}function iv(e,t,n){n=H_(n||0);var r=t.width,i=t.height,a=wc(e.left,r),o=wc(e.top,i),s=wc(e.right,r),c=wc(e.bottom,i),l=wc(e.width,r),u=wc(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 gr((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var av={rect:1,point:2};function ov(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=og(e),l=c.coord,u=c.from;if(o.dataToLayout){a=av.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=av.point,s=u,i=o.dataToPoint(l))}return a??=av.rect,a===av.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 sv(e,t,n,r,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a||=e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(c===`raw`)l=e.type===`group`?new gr(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();l=l.clone(),l.applyTransform(u)}var d=iv(gt({width:l.width,height:l.height},t),n,r),f=o?d.x-l.x:0,p=s?d.y-l.y:0;return c===`raw`?(a.x=f,a.y=p):(a.x+=f,a.y+=p),a===e&&e.markRedraw(),!0}function cv(e){var t=e.layoutMode||e.constructor.layoutMode;return J(t)?t:t?{type:t}:null}function lv(e,t,n){var r=n&&n.ignoreSize;!K(r)&&(r=[r,r]);var i=o(Q_[0],0),a=o(Q_[1],1);c(Q_[0],e,i),c(Q_[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(X_(n,function(t){c[t]=e[t]}),X_(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){X_(e,function(e){t[e]=n[e]})}}function uv(e){return dv({},e)}function dv(e,t){return t&&e&&X_(Z_,function(n){Z(t,n)&&(e[n]=t[n])}),e}var fv=wl(),pv=function(e){V(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=Cg(`ec_cpt_model`),i}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=cv(this),r=n?uv(e):{};H(e,t.getTheme().get(this.mainType)),H(e,this.getDefaultOption()),n&&lv(e,r,n)},t.prototype.mergeOption=function(e,t){H(this.option,e,!0);var n=cv(this);n&&lv(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!un(e))return e.defaultOption;var t=fv(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=H(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return kl(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return tv(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}(ym);pn(pv,ym),vn(pv),wg(pv),Tg(pv,mv);function mv(e){var t=[];return W(pv.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=G(t,function(e){return cn(e).main}),e!==`dataset`&&_t(t,`dataset`)<=0&&t.unshift(`dataset`),t}var hv=wl(),gv=wl(),_v=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=il(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return bv(this,hv,r,i,e,t,n)},e.prototype.clearColorPalette=function(){xv(this,hv)},e}();function vv(e,t,n,r){return bv(e,gv,il(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function yv(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 bv(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:yv(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 xv(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Sv=/\{@(.+?)\}/g,Cv=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`]),Ot(i))return s.status=t,s.dimensionIndex=r,i(s);if(q(i))return K_(i,s).replace(Sv,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=sh(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 sh(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function wv(e){var t,n;return J(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function Tv(e){return new Ev(e)}var Ev=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){Dv.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:Dv.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}(),Dv=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}}(),Ov=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 mh(e,t)},e}();function kv(e,t){var n=new Ov,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex;e.seriesLayoutBy!==`column`&&el(``);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)&&el(``),s[n]=r)});else for(var l=0;l<e.dimensionsDetectedCount;l++)o.push({index:l});var u=$m(i,cu);t.__isBuiltIn&&(n.getRawDataItem=function(e){return u(r,a,o,e)},n.getRawData=Et(Av,null,e)),n.cloneRawData=Et(jv,null,e),n.count=Et(nh(i,cu),null,r,a,o);var d=ah(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=Et(Mv,null,o,s),n.cloneAllDimensionInfo=Et(Nv,null,o),n}function Av(e){var t=e.sourceFormat;return Rv(t)||el(``),e.data}function jv(e){var t=e.sourceFormat,n=e.data;if(Rv(t)||el(``),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(U({},n[i]));return r}}function Mv(e,t,n){if(n!=null){if(At(n)||!isNaN(n)&&!Z(t,n))return e[n];if(Z(t,n))return t[n]}}function Nv(e){return mt(e)}var Pv=Yt();function Fv(e){e=mt(e);var t=e.type,n=``;t||el(n);var r=t.split(`:`);r.length!==2&&el(n);var i=!1;r[0]===`echarts`&&(t=r[1],i=!0),e.__isBuiltIn=i,Pv.set(t,e)}function Iv(e,t,n){var r=il(e),i=r.length;i||el(``);for(var a=0,o=i;a<o;a++){var s=r[a];t=Lv(s,t,n,i===1?null:a),a!==o-1&&(t.length=Math.max(t.length,1))}return t}function Lv(e,t,n,r){var i=``;t.length||el(i),J(e)||el(i);var a=e.type,o=Pv.get(a);o||el(i);var s=G(t,function(e){return kv(e,o)});return G(il(o.transform({upstream:s[0],upstreamList:s,config:mt(e.config)})),function(e,n){var r=``;J(e)||el(r),e.data||el(r),Rv(Lm(e.data))||el(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:cu,sourceHeader:o,dimensions:a.metaRawOption.dimensions}}else i={seriesLayoutBy:cu,sourceHeader:0,dimensions:e.dimensions};return Pm(e.data,i,null)})}function Rv(e){return e===`arrayRows`||e===`objectRows`}var zv=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(Bv(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=Mt(o)?ou:nu,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?[Pm(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=[Pm(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&&Vv(``);var i,a=[],o=[];return W(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&Vv(``),a.push(t),o.push(e._getVersionSign())}),n?i=Iv(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Im(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];Bv(this._sourceHost)&&s?o=s._innerGetDataStore(e,t,n):(o=new Oh,o.initData(new Ym(t,e.length),e)),a[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Bv(e)){var t=Om(e);return t?[t.getSourceManager()]:[]}return G(km(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,r;if(Bv(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 Bv(e){return e.mainType===`series`}function Vv(e){throw Error(e)}var Q={color:{},darkColor:{},size:{}},Hv=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 Uv in U(Hv,{primary:Hv.neutral80,secondary:Hv.neutral70,tertiary:Hv.neutral60,quaternary:Hv.neutral50,disabled:Hv.neutral20,border:Hv.neutral30,borderTint:Hv.neutral20,borderShade:Hv.neutral40,background:Hv.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:Hv.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:Hv.neutral70,axisLineTint:Hv.neutral40,axisTick:Hv.neutral70,axisTickMinor:Hv.neutral60,axisLabel:Hv.neutral70,axisSplitLine:Hv.neutral15,axisMinorSplitLine:Hv.neutral05}),Hv)if(Hv.hasOwnProperty(Uv)){var Wv=Hv[Uv];Uv===`theme`?Q.darkColor.theme=Hv.theme.slice():Uv===`highlight`?Q.darkColor.highlight=`rgba(255,231,130,0.4)`:Uv.indexOf(`accent`)===0?Q.darkColor[Uv]=ga(Wv,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Q.darkColor[Uv]=ga(Wv,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 Gv=`line-height:1`;function Kv(e){var t=e.lineHeight;return t==null?Gv:`line-height:`+Bg(t+``)+`px`}function qv(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:`+Bg(r+``)+`px;color:`+Bg(n)+`;font-weight:`+Bg(i+``),valueStyle:`font-size:`+Bg(o+``)+`px;color:`+Bg(a)+`;font-weight:`+Bg(s+``)}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var Jv=[0,10,20,30],Yv=[``,`
|
|
9
|
+
`,`
|
|
10
|
+
|
|
11
|
+
`,`
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
`];function Xv(e,t){return t.type=e,t}function Zv(e){return e.type===`section`}function Qv(e){return Zv(e)?ey:ty}function $v(e){if(Zv(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return W(e.blocks,function(e){var n=$v(e);n>=t&&(t=n+ +(r&&(!n||Zv(e)&&!e.noHeader)))}),t}return 0}function ey(e,t,n,r){var i=t.noHeader,a=ry($v(t)),o=[],s=t.blocks||[];Bt(!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 gh(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=Qv(n)(s?U(U({},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):iy(r,o.join(``),i?n:a.html);if(i)return d;var f=U_(t.header,`ordinal`,e.useUTC),p=qv(r,e.renderMode).nameStyle,m=Kv(r);return e.renderMode===`richText`?sy(e,f,p)+a.richText+d:iy(r,`<div style="`+p+`;`+m+`;">`+Bg(f)+`</div>`+d,n)}function ty(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 U_(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?``:U_(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=qv(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:sy(e,f,v))+(o?``:cy(e,m,h,g,y)):iy(r,(s?``:d)+(a?``:ay(f,!s,v))+(o?``:oy(m,h,g,y)),n)}}function ny(e,t,n,r,i,a){if(e)return Qv(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function ry(e){return{html:Jv[e],richText:Yv[e]}}function iy(e,t,n){var r=`<div style="clear:both"></div>`,i=`margin: `+n+`px 0 0`,a=Kv(e);return`<div style="`+i+`;`+a+`;">`+t+r+`</div>`}function ay(e,t,n){var r=t?`margin-left:2px`:``;return`<span style="`+n+`;`+r+`">`+Bg(e)+`</span>`}function oy(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 Bg(e)}).join(` `)+`</span>`}function sy(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function cy(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 ly(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return J_(n)}function uy(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var dy=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Gc()}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=q_({color:t,type:e,renderMode:n,markerId:r});return q(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};K(t)?W(t,function(e){return U(n,e)}):U(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function fy(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=ly(t,n),u,d,f,p;if(o>1||c&&!o){var m=py(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=sh(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=yl(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return Xv(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[Xv(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!Vt(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function py(e,t,n,r,i){var a=t.getData(),o=xt(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(sh(a,n,e),e)}):W(e,u);function u(e,t){var n=a.getDimensionInfo(t);!n||n.otherDims.tooltip===!1||(o?l.push(Xv(`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 my=wl();function hy(e,t){return e.getName(t)||e.getId(t)}var gy=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=Tv({count:yy,reset:by}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(my(this).sourceManager=new zv(this)).prepareSource();var r=this.getInitialData(e,n);Sy(r,this),this.dataTask.context.data=r,my(this).dataBeforeProcessed=r,_y(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=cv(this),r=n?uv(e):{},i=this.subType;pv.hasClass(i)&&(i+=`Series`),H(e,t.getTheme().get(this.subType)),H(e,this.getDefaultOption()),al(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&lv(e,r,n)},t.prototype.mergeOption=function(e,t){e=H(this.option,e,!0),this.fillDataTextStyle(e.data);var n=cv(this);n&&lv(this.option,e,n);var r=my(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);Sy(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,my(this).dataBeforeProcessed=i,_y(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Mt(e))for(var t=[`show`],n=0;n<e.length;n++)e[n]&&e[n].label&&al(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=wy(this);if(t){var n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}return my(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=wy(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}my(this).data=e},t.prototype.getEncode=function(){var e=this.get(`encode`,!0);if(e)return Yt(e)},t.prototype.getSourceManager=function(){return my(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return my(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 fy({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(nn.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=_v.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=hy(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=wt(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[hy(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`){J(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c<o;c++){var l=t[c],u=hy(e,l);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(l)}}else if(a===`single`||a===!0){var d=t[o-1],u=hy(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 pv.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}(pv);yt(gy,Cv),yt(gy,_v),pn(gy,pv);function _y(e){var t=e.name;yl(e)||(e.name=vy(e)||t)}function vy(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 yy(e){return e.model.getRawData().count()}function by(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),xy}function xy(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Sy(e,t){W(Xt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,Dt(Cy,t))})}function Cy(e,t){var n=wy(e);return n&&n.setOutputEnd((t||this).count()),t}function wy(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 Ty=As.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()}}),Ey={line:bf,rect:Ws,roundRect:Ws,square:Ws,circle:Ud,diamond:As.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:As.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:As.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:Ty},Dy={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}},Oy={};W(Ey,function(e,t){Oy[t]=new e});var ky=As.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=Vr(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=Oy[r];i||=(r=`rect`,Oy[r]),Dy[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Ay(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 jy(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?cp(e.slice(8),new gr(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?sp(e.slice(7),{},new gr(t,n,r,i),o?`center`:`cover`):new ky({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Ay,a&&c.setColor(a),c}function My(e){return K(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Ny(e,t){if(e!=null)return K(e)||(e=[e,e]),[wc(e[0],t[0])||0,wc(X(e[1],e[0]),t[1])||0]}var Py=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 yg(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Vd,n=jy(`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=jy(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}(gy);function Fy(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=sh(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o<n.length;o++)a.push(sh(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 Ly=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=jy(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=Ry,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(){Uu(this.childAt(0))},t.prototype.downplay=function(){Wu(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):Gf(f,p,o,n),Zf(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,Kf(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=Xp(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=Ny(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 Is){var S=a.style;a.useStyle(U({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(U({},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):Fy(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),cd(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=$l(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Jf(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Jf(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return My(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Vd);function Ry(e,t){this.parent.drift(e,t)}function zy(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 By(e){return e!=null&&!J(e)&&(e={isIgnore:e}),e||{}}function Vy(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:Xp(t),cursorStyle:t.get(`cursor`)}}function Hy(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 Uy=function(){function e(e){this.group=new Vd,this._SymbolCtor=e||Ly}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=By(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=Vy(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);zy(e,i,r,t)&&Hy(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!zy(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):Gf(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);zy(t,s,i,e)?(o||=Hy(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=Vy(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n,r){this._progressiveEls=[],r=By(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(zy(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){Np(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 Wy(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=Gy(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 hg(t,d[0])&&(f=!0,d[0]=p),hg(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 Gy(e,t){var n=0,r=e.scale.getExtent();return t===`start`?n=r[0]:t===`end`?n=r[1]:At(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function Ky(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 qy(e,t){return!isFinite(e)||!isFinite(t)}var Jy=typeof Float32Array<`u`?Float32Array:void 0,Yy=typeof Float64Array<`u`?Float64Array:void 0;function Xy(e){return Zy({ctor:Jy},e).arr}function Zy(e,t){var n=e.arr,r=e.ctor;if(t>Fc&&(t=Fc),!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 Qy(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 $y(e,t,n,r,i,a,o,s){for(var c=Qy(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=Wy(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=Ky(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=Xy(M),P=Xy(M),F=Xy(M),ee=Xy(M),I=[],y=0;y<m.length;y++){var te=m[y],L=y*2,ne=te*2;N[L]=l[ne],N[L+1]=l[ne+1],P[L]=u[ne],P[L+1]=u[ne+1],F[L]=d[ne],F[L+1]=d[ne+1],ee[L]=f[ne],ee[L+1]=f[ne+1],I[y]=p[te]}return{current:N,next:P,stackedOnCurrent:F,stackedOnNext:ee,status:I}}var eb=Math.min,tb=Math.max;function nb(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(qy(_,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(;qy(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||qy(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,N=C-v,P=void 0,F=void 0;if(s===`x`){P=Math.abs(A),F=Math.abs(j);var ee=E>0?1:-1;p=_-ee*P*o,m=v,O=_+ee*F*o,k=v}else if(s===`y`){P=Math.abs(M),F=Math.abs(N);var I=D>0?1:-1;p=_,m=v-I*P*o,O=_,k=v+I*F*o}else P=Math.sqrt(A*A+M*M),F=Math.sqrt(j*j+N*N),T=F/(F+P),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=eb(O,tb(S,_)),k=eb(k,tb(C,v)),O=tb(O,eb(S,_)),k=tb(k,eb(C,v)),E=O-_,D=k-v,p=_-E*P/F,m=v-D*P/F,p=eb(p,tb(l,_)),m=eb(m,tb(u,v)),p=tb(p,eb(l,_)),m=tb(m,eb(u,v)),E=_-p,D=v-m,O=_+E*F/P,k=v+D*F/P}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var rb=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),ib=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 rb},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&qy(n[i*2-2],n[i*2-1]);i--);for(;r<i&&qy(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=nb(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=as.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?Ii(i,u,f,m,e,s):Ii(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?Pi(a,d,p,h,b):Pi(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(As),ab=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(rb),ob=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 ab},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&&qy(n[a*2-2],n[a*2-1]);a--);for(;i<a&&qy(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=nb(e,n,i,a,a,1,t.smooth,o,t.connectNulls);nb(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(As);function sb(){var e=wl();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 cb=wl(),lb=sb(),ub=function(){function e(){this.group=new Vd,this.uid=Cg(`viewChart`),this.renderTask=Tv({plan:pb,reset:mb}),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&&fb(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&fb(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){Np(this.group,e)},e.markUpdateMethod=function(e,t){cb(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function db(e,t,n){e&&md(e)&&(t===`emphasis`?Uu:Wu)(e,n)}function fb(e,t,n){var r=Cl(e,t),i=t&&t.highlightKey!=null?hd(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){db(e,n,i)}):W(il(r),function(t){db(e.getItemGraphicEl(t),n,i)})}dn(ub,[`dispose`]),vn(ub);function pb(e){return lb(e.model)}function mb(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&cb(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),hb[c]}var hb={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 gb(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 Ws({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=Ot(i)?function(e){i(e,d)}:null;Kf(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function _b(e,t,n){var r=e.getArea(),i=Oc(r.r0,1),a=Oc(r.r,1),o=new lf({shape:{cx:Oc(e.cx,1),cy:Oc(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,Kf(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function vb(e,t,n,r,i){return e?e.type===`polar`?_b(e,t,n):e.type===`cartesian2d`?gb(e,t,n,r,i):null:null}function yb(e){var t=e.coordinateSystem;if(e.get(`clip`,!0)&&t&&(!t.shouldClip||t.shouldClip()))return t.getArea&&t.getArea(.1)}function bb(e,t){return e.type===t}function xb(e,t,n,r){return e&&(e.legacy||e.legacy!==!1&&!n&&!r&&t!==`tspan`&&(t===`text`||Z(e,`text`)))}function Sb(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 Cb(o,e),W(o.rich,function(e){Cb(e,e)}),{textConfig:i,textContent:a}}function Cb(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 wb(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;Tb(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){Tb(e,e)}),r}function Tb(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 Eb=function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();vn(Eb);var Db=0,Ob=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Db,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&G(r,kb);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(!q(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||=Yt(this.categories)},e}();function kb(e){return J(e)&&e.value!=null?e.value:e+``}var Ab=wt({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 jb(e,t,n){var r;e||={};var i=e_();if(i){var a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(W(Ab,function(t){a[t]&&(e[t]=Et(a[t],a))}),r=a)}return r??Rb(e,n),{brk:r,mapper:e}}function Mb(e,t){W(Ab,function(n){e[n]=t[n]})}function Nb(e,t){e.freeze=$t}function Pb(e){return e.getExtentUnsafe(0,2)}function Fb(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function Ib(e){var t=Fb(e,3);return t[1]-t[0]}function Lb(e){var t=e.getExtentUnsafe(0,3);return t[1]-t[0]}function Rb(e,t){var n=e||{},r=[];return n._extents=r,r[0]=t?t.slice():Fl(),U(n,zb),n}var zb={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=Fb(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){Bb(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),Bb(r,e,t,n)},freeze:function(){}};function Bb(e,t,n,r){Vl(n,r)&&(e[t][0]=n,e[t][1]=r)}function Vb(e){return Hb(e)||Wb(e)}function Hb(e){return e.type===`interval`}function Ub(e){return e.type===`time`}function Wb(e){return e.type===`log`}function Gb(e){return e.type===`ordinal`}function Kb(e){var t=Vc(e),n=vc(10,t),r=hc(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,Oc(r*n,-t)}function qb(e){return Ac(e)+2}function Jb(e,t){return yc(e)/yc(t)}function Yb(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 vc(t,e)}function Xb(e,t,n){var r=e.slice();if(r[0]===r[1]){var i=n&&n.ctnShp;if(r[0]!==0){var a=mc(r[0]);t[1]||(r[1]+=a/2),r[0]-=a/2}else i&&(r[0]=-1),r[1]=1}return(!Bl(r[0])||!Bl(r[1]))&&(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function Zb(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function Qb(e,t){return e||=t,hc(pc(e,1))}function $b(e,t,n){var r=Pb(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 ex=function(e){V(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,Mb(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new Ob({}),K(i)&&(i=new Ob({categories:G(i,function(e){return J(e)?e.value:e})})),r._ordinalMeta=i;var a=jb(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,Nb(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:q(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=hc(e),e},t.prototype.getTicks=function(){var e=[];return $b(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=fc(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=Pb(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(hc(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}(Eb);Eb.registerClass(ex);function tx(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=qb(f);u<t-1;){var m=Oc(l.value+(u+1)*f,p);m>o[0]&&m<o[1]&&d.push(m),u++}var h=e_();h&&h.pruneTicksByBreak(`auto`,d,n,function(e){return e},r,o),a.push(d)}}return a}var nx=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=jb(r,t_(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 mt(this._cfg)},t.prototype.setConfig=function(e){var t=Pb(this);this._cfg=e=mt(e),e.niceExtent??(e.niceExtent=t.slice()),e.intervalPrecision??(e.intervalPrecision=qb(e.interval))},t.prototype.getTicks=function(e){e||={};var t=this._cfg,n=t.interval,r=Pb(this),i=t.niceExtent,a=t.intervalPrecision,o=e_(),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?Oc(i[0]-n,a):r[0]});for(var d=function(e,t){return hc((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=fc(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=Oc(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=Oc(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?Oc(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 tx(this,e,n_(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=Ac(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),B_(Oc(e.value,n,!0))},t.type=`interval`,t}(Eb);Eb.registerClass(nx);var rx=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},ix=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=jb(r,t_(r,n),null).brk,r}return t.prototype.getLabel=function(e){return S_(e.value,p_[x_(y_(this._minLevelUnit))]||p_.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,t,n){return C_(e,t,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=Pb(this),r=e_(),i=this.brk,a=r&&i,o=[];if(!t)return o;var s=this._useUTC;if(a&&e.breakTicks===`only_break`)return e_().addBreaksToTicks(o,i.breaks,n),o;o=mx(this._minLevelUnit,this._approxInterval,s,n,Lb(this),i);var c=m_.length-1,l=0;return W(o,function(e){e.time&&(c=Math.min(c,_t(m_,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a&&e_().pruneTicksByBreak(e.pruneByBreak,o,i.breaks,function(e){return e.value},this._approxInterval,n),a&&e.breakTicks!==`none`&&e_().addBreaksToTicks(o,i.breaks,n,function(e){for(var t=Math.max(_t(m_,w_(e.vmin,s)),_t(m_,w_(e.vmax,s))),n=0,r=0;r<m_.length;r++)if(!ox(m_[r],e.vmin,e.vmax,s)){n=r;break}var i=Math.min(n,c);return{level:l,lowerTimeUnit:m_[Math.max(i,t)],upperTimeUnit:m_[i]}}),o},t.prototype.getMinorTicks=function(e){return tx(this,e,n_(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 At(e)?Math.round(e):+zc(e)},t.type=`time`,t}(Eb),ax=[[`second`,i_],[`minute`,a_],[`hour`,o_],[`quarter-day`,o_*6],[`half-day`,o_*12],[`day`,s_*1.2],[`half-week`,s_*3.5],[`week`,s_*7],[`month`,s_*31],[`quarter`,s_*95],[`half-year`,c_/2],[`year`,c_]];function ox(e,t,n,r){return T_(new Date(t),e,r).getTime()===T_(new Date(n),e,r).getTime()}function sx(e,t){return e/=s_,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function cx(e){var t=30*s_;return e/=t,e>6?6:e>3?3:e>2?2:1}function lx(e){return e/=o_,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function ux(e,t){return e/=t?a_:i_,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function dx(e){return pc(Hc(e,!0),1)}function fx(e,t,n){var r=Math.max(0,_t(m_,t)-1);return T_(new Date(e),m_[r],n).getTime()}function px(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 mx(e,t,n,r,i,a){var o=h_,s=0;function c(e,t,n,i,o,c,l){for(var u=px(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(!ox(y_(e),r[0],r[1],n)){s&&(i=[{value:fx(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/s_/365)),p=E_(n),m=N_(n);break;case`half-year`:case`quarter`:case`month`:f=cx(t),p=D_(n),m=P_(n);break;case`week`:case`half-week`:case`day`:f=sx(t,31),p=O_(n),m=F_(n),h=!0;break;case`half-day`:case`quarter-day`:case`hour`:f=lx(t),p=k_(n),m=I_(n);break;case`minute`:f=ux(t,!0),p=A_(n),m=L_(n);break;case`second`:f=ux(t,!1),p=j_(n),m=R_(n);break;case`millisecond`:f=dx(t),p=M_(n),m=z_(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=y_(o[m]);if(b_(o[m])&&(l(o[m],u[u.length-1]||[],d),h!==(o[m+1]?y_(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=St(G(u,function(e){return St(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=w_(C[w].value,n);S.push({value:C[w].value,time:{level:x-m,upperTimeUnit:T,lowerTimeUnit:T}})}Kl(S,ql,null),S.sort(function(e,t){return e.value-t.value});var E=S[0],D=S[S.length-1],O=w_(r[0],n),k=w_(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 hx=function(e,t){var n=e.getExtent();if(n[0]===n[1]&&(n[0]-=s_,n[1]+=s_),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]-s_}e.setExtent(n[0],n[1]);var i=Qb(t.splitNumber,10),a=Lb(e)/i,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var c=ax.length,l=Math.min(rx(ax,a,0,c),c-1),u=ax[l][1],d=ax[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};Eb.registerClass(ix);var gx=0,_x=1,vx=2,yx=function(e){V(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=nx.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[gx]=i[_x]=a[gx]=a[_x]=NaN,Mb(r,t.mapperMethods);var s=e_(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},vx,l),r.powStub=new nx({breakParsed:l.original}),r.intervalStub=new nx({breakParsed:l.transformed}),Nb(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=e_(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return G(i.getTicks(e||{}),function(e){var i=e.value,o=Yb(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,n_(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return tx(this,e,n_(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(Jb(e,this.base))},scale:function(e){return Yb(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=Jb(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return bx.depth=n,xx.lookup=this._lookup,Yb(n===2?e:this.intervalStub.transformOut(e,bx),this.base,xx)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Vl(t,n)||t<=0||n<=0)){var r=Sx,i=Sx;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[gx]=t,r[_x]=n);var o=this.base;this.intervalStub.setExtent2(e,i[gx]=Jb(t,o),i[_x]=Jb(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Vl(t[0],t[1])&&Jc(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}(Eb);Eb.registerClass(yx);var bx={},xx={},Sx=[],Cx={value:1,category:1,time:1,log:1},Tx=wl();function Ex(e){var t=e.get(`type`);return(t==null||!Z(Cx,t)&&!Eb.getClass(t))&&(t=`value`),t}function Dx(e,t,n){var r=e_(),i;switch(r&&(i=Rx(e,t,n)),t){case`category`:return new ex({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Fl()});case`time`:return new ix({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new yx({logBase:e.get(`logBase`),breakOption:i});case`value`:return new nx({breakOption:i});default:return new((Eb.getClass(t))||nx)({})}}function Ox(e,t,n){var r=n?Fb(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Vl(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}function kx(e){Tx(e).noOnMyZero=!0}function Ax(e){return Tx(e).noOnMyZero}function jx(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=g_(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(q(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(Ot(t)){if(e.type===`category`)return function(n,r){return t(Mx(e,n),n.value-e.scale.getExtent()[0],null)};var r=e_();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Mx(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function Mx(e,t){var n=e.scale;return Gb(n)?n.getLabel(t):t.value}function Nx(e){return e.get(`interval`)??`auto`}function Px(e){return e.type===`category`&&Nx(e.getLabelModel())===0}function Fx(e,t){var n={};return W(e.mapDimensionsAll(t),function(t){n[gg(e,t)]=!0}),wt(n)}function Ix(e){return e===`middle`||e===`center`}function Lx(e){return e.getShallow(`show`)}function Rx(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!e_()||!n||!zx(t)?void 0:r}function zx(e){return e!==`category`}function Bx(e,t,n,r,i,a){var o=Wb(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=Zb(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Vx(e,t){return Gb(e)?e.getRawOrdinalNumber(t.value):t.value}function Hx(e,t){return Gb(e)&&!!t.get(`boundaryGap`)}function Ux(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function Wx(e){for(var t=Fl(),n=Fl(),r=0;r<e.length;){var i=e[r++],a=e[r++];qy(i,a)||(Il(t,i),Il(n,a))}return[t,n]}function Gx(e,t){var n=Wx(e),r=n[0],i=n[1],a=Wx(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 Kx(e){return At(e)?e:e?.5:0}function qx(e,t,n){if(n.valueDim==null)return[];for(var r=t.count(),i=Xy(r*2),a=0;a<r;a++){var o=Ky(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Jx(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;qy(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 Yx(e,t){var n=[],r=e.length,i,a;function o(e,t,n){var r=e.coord;return{coord:n,color:ha((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 Xx(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=Yx(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 kf(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function Zx(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&Qx(a,t))){var o=t.mapDimension(a.dim),s={};return W(a.getViewLabels(),function(e){e.tick.offInterval||(s[Vx(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function Qx(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(Ly.getSymbolSize(t,o)[+!!e.isHorizontal()]*1.5>r)return!1;return!0}function $x(e){for(var t=e.length/2;t>0&&qy(e[t*2-2],e[t*2-1]);t--);return t-1}function eS(e,t){return[e[t*2],e[t*2+1]]}function tS(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],!qy(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 nS(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<gu.length;t++)if(e.get([gu[t],`endLabel`,`show`]))return!0;return!1}function rS(e,t,n,r){if(bb(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=nS(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=gb(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 _b(t,n,r)}function iS(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 aS=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Vd,t=new Uy;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=Et(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=Wy(r,a,_),y=g&&qx(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&Zx(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=Xx(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&&=Jx(y,c,r,w,x),c=Jx(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,J_(E)),m.setClipPath(rS(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,J_(E));var D=m.getClipPath();D?Kf(D,{shape:rS(this,r,!1,e).shape},e):m.setClipPath(rS(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]]}}),(!Ux(this._stackedOnPoints,y)||!Ux(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=Jx(y,c,r,w,x),c=Jx(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(gt(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),fd(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}$l(f).seriesIndex=e.seriesIndex,cd(f,k,A,j);var N=Kx(e.get(`smooth`)),P=e.get(`smoothMonotone`);if(f.setShape({smooth:N,smoothMonotone:P,connectNulls:x}),p){var F=a.getCalculationInfo(`stackedOnSeries`),ee=0;p.useStyle(gt(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),F&&(ee=Kx(F.get(`smooth`))),p.setShape({smooth:N,stackedOnSmooth:ee,smoothMonotone:P,connectNulls:x}),fd(p,e,`areaStyle`),$l(p).seriesIndex=e.seriesIndex,cd(p,k,A,j)}var I=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=I)}),this._polyline.onHoverStateChange=I,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var te=e.get(`triggerEvent`),L=e.get(`triggerLineEvent`),ne=L===!0||te===!0||te===`line`,R=L===!0||te===!0||te===`area`;this.packEventData(e,f,ne),p&&this.packEventData(e,p,R)},t.prototype.packEventData=function(e,t,n){$l(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=Cl(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(qy(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Ly(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 ub.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=Cl(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 ub.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Pu(this._polyline,e),t&&Pu(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new ib({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 ob({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`);Ot(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=Ot(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=Ot(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(nS(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=$x(o);c>=0&&(Yp(a,Xp(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?Fy(i,e):Iy(i,n)},enableTextSetter:!0},iS(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=tS(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=eS(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=Pl(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=eS(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=om(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=$y(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=Jx(u.stackedOnCurrent,u.current,n,i,o),d=Jx(u.current,null,n,i,o),m=Jx(u.stackedOnNext,u.next,n,i,o),p=Jx(u.next,null,n,i,o)),Gx(d,p)>3e3||c&&Gx(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(),Gf(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Gf(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}(ub);function oS(e,t){return{seriesType:e,plan:sb(),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`);hg(n,o[0])&&(o[0]=c),hg(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&&Xy(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 sS={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]}},cS=function(e){return Math.round(e.length/2)};function lS(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;q(i)?p=sS[i]:Ot(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,cS))}}}}}function uS(e){e.registerChartView(aS),e.registerSeriesModel(Py),e.registerLayout(oS(`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,lS(`line`))}var dS=wl(),fS=wl(),pS={estimate:1,determine:2};function mS(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function hS(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:G(_S(n,r),function(t,n){return{formattedLabel:jx(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?vS(e,t):xS(e)}function gS(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:_S(i,r)}:e.type===`category`?bS(e,t):{ticks:r.getTicks(n)}}function _S(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)}),Kl(r,Jl,null),kc(r),G(r,function(e){return{value:e}})}function vS(e,t){var n=e.getLabelModel(),r=yS(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function yS(e,t,n){var r=CS(e),i=Nx(t),a=n.kind===pS.estimate;if(!a){var o=TS(r,i);if(o)return o}var s,c;Ot(i)?s=MS(e,i,!1):(c=i===`auto`?DS(e,n):i,s=MS(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return ES(r,i,l),!0}):ES(r,i,l),l}function bS(e,t){var n=SS(e),r=Nx(t),i=TS(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),Ot(r))a=MS(e,r,!0);else if(r===`auto`){var s=yS(e,e.getLabelModel(),mS(pS.determine));o=s.labelCategoryInterval,a=G(s.labels,function(e){return e.tick})}else o=r,a=MS(e,o,!0);return ES(n,r,{ticks:a,tickCategoryInterval:o})}function xS(e){var t=e.scale.getTicks(),n=jx(e);return{labels:G(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var SS=wS(`axisTick`),CS=wS(`axisLabel`);function wS(e){return function(t){return fS(t)[e]||(fS(t)[e]={list:[]})}}function TS(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function ES(e,t,n){return e.list.push({key:t,value:n}),n}function DS(e,t){if(t.kind===pS.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return fS(e).autoInterval=n,!0}),n}return fS(e).autoInterval??(fS(e).autoInterval=e.calculateCategoryInterval(t))}function OS(e,t){var n=t.kind,r=jS(e),i=jx(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=Ir(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===pS.estimate?(t.out.noPxChangeTryDetermine.push(Et(kS,null,e,S,c)),S):AS(e,S,c)??S}function kS(e,t,n){return AS(e,t,n)==null}function AS(e,t,n){var r=dS(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 jS(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 MS(e,t,n){var r=jx(e),i=e.scale,a=[],o=Ot(t);return $b(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 NS=wl();function PS(e){NS(e).prepare={}}function FS(e){NS(e).fullUpdate={}}function IS(e){return NS(e).prepare}function LS(e){return NS(e).fullUpdate}var RS=Wl(),zS=wl(),BS=wl();function VS(e,t){var n=e.model,r=zS(LS(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function HS(e,t){return GS(VS(e,t))}function US(e,t){var n=[];return WS(e.model.ecModel,function(e){for(var r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(GS(e))}),n}function WS(e,t){var n=zS(LS(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function GS(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function KS(e,t){var n=e.model.ecModel,r=zS(LS(n)).axSer;r&&JS(n,r.get(e.model.uid),t)}function qS(e,t,n){var r=VS(e,t);r&&JS(e.model.ecModel,r.sers,n)}function JS(e,t,n){if(t)for(var r=0;r<t.length;r++){var i=t[r];e.isSeriesFiltered(i)||n(i)}}function YS(e,t,n){var r=zS(LS(e)).keyed,i=r&&r.get(t);i&&i.each(function(e){n(e.axis)})}function XS(e,t){var n=e.model,r=zS(LS(n.ecModel)).keys;r&&W(r.get(n.uid),function(e){t(e)})}function ZS(e){var t=BS(IS(e)),n=t.keyed||=Yt();WS(e,function(t,r,i){var a=n.get(r)||n.set(r,Yt()),o=a.get(i)||a.set(i,{});t.metrics.liPosMinGap&&$S.liPosMinGap(e,t,o)})}function QS(e,t){$S[e]=t}var $S={};function eC(e,t,n){if(e){var r=t.ecModel,i=zS(LS(r)),a=e.model.uid,o=i.axSer||=Yt();(o.get(a)||o.set(a,[])).push(t);var s=t.subType,c=t.getBaseAxis()===e,l=rC.get(tC(s,c,n))||rC.get(tC(s,c,null));if(l){var u=i.keyed||=Yt(),d=i.keys||=Yt(),f=l.key,p=u.get(f)||u.set(f,Yt()),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 tC(e,t,n){return e+`|&`+X(t,!0)+`|&`+(n||``)}function nC(e,t){var n=tC(t.seriesType,t.baseAxis,t.coordSysType);rC.set(n,t),RS(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:ZS})})}var rC=Yt(),iC=.8;function aC(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=Ib(r);Jc(o)||(o=NaN);var s=e.getExtent(),c=mc(s[1]-s[0]);return Gb(r)?oC(n,e,o,c):i&&sC(n,e,o,c,i),a!=null&&(n.w=Jc(n.w)?pc(a,n.w):a),n}function oC(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 sC(e,t,n,r,i){var a=!1,o=-1/0;W(i.key?[HS(t,i.key)]:US(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Jc(n)&&n>0&&Jc(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*iC,e.w2=e.w*n/r)}var cC=[0,1],lC=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)),Cc(e,cC,uC(this),t)},e.prototype.coordToData=function(e,t){var n=Cc(e,uC(this),cC,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(gS(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Vx(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=dC(this,n,r);return G(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(Gb(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||=mS(pS.determine),hS(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 aC(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=mS(pS.determine),OS(this,e)},e}();function uC(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 dC(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=aC(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 fC=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}(lC),pC=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],mC=1,hC=2,gC=mC|hC;function _C(e,t,n){n||=gC,t?e.dirty|=n:e.dirty&=~n}function vC(e,t){return t||=gC,e.dirty==null||!!(e.dirty&t)}function yC(e){if(e)return vC(e)&&bC(e,e.label,e),e}function bC(e,t,n){var r=t.getComputedTransform();e.transform=Lp(e.transform,r);var i=e.localRect=Ip(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=cm.textMargin);for(var d=0;d<4;d++)xC[d]=u===cm.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===cm.textMargin&&Op(i,xC,!1,!1);var f=e.rect=Ip(e.rect,i);return r&&f.applyTransform(r),u===cm.minMargin&&Op(f,xC,!1,!1),e.axisAligned=Pp(r),(e.label=e.label||{}).ignore=t.ignore,_C(e,!1),_C(e,!0,hC),e}var xC=[0,0,0,0];function SC(e,t,n){return e.transform=Lp(e.transform,n),e.localRect=Ip(e.localRect,t),e.rect=Ip(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Pp(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function CC(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 wC(e,t){for(var n=0;n<pC.length;n++){var r=pC[n];e[r]??(e[r]=t[r])}return yC(e)}function TC(e){var t=e.obb;return(!t||vC(e,hC))&&(e.obb=t||=new zf,t.fromBoundingRect(e.localRect,e.transform),_C(e,!1,hC)),t}function EC(e,t,n,r,i){var a=e.length,o=ep[t],s=tp[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 DC(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=yC(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,c=0;c<t.length;c++)if(OC(i,t[c],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}}function OC(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:TC(e).intersect(TC(t),n,r)}var kC=null;function AC(){return kC}var jC=`expandAxisBreak`,MC=Math.PI,NC=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],PC=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],FC=wl(),IC=wl(),LC=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 RC(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=cw(e.axisName)&&Ix(e.nameLocation);W(r,function(e){var t=yC(e);if(!(!t||t.label.ignore)){o.push(t);var n=a.transGroup;c&&(n.transform?Ln(zC,n.transform):jn(zC),t.transform&&Nn(zC,zC,t.transform),gr.copy(BC,t.localRect),BC.applyTransform(zC),s?s.union(BC):gr.copy(s=new gr(0,0,0,0),BC))}});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 gr(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var zC=An(),BC=new gr(0,0,0,0),VC=function(e,t,n,r,i,a){if(Ix(e.nameLocation)){var o=a.stOccupiedRect;o&&HC(SC({},o,a.transGroup.transform),r,i)}else UC(a.labelInfoList,a.dirVec,r,i)};function HC(e,t,n){var r=new nr;OC(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&CC(t,r)}function UC(e,t,n,r){for(var i=nr.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||HC(s,n,r)}}var WC=function(){function e(e,t,n,r){this.group=new Vd,this._axisModel=e,this._api=t,this._local={},this._shared=r||new LC(VC),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:cw(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};this._cfg=a;var o=new Vd({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 nr(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(GC,function(r){e[r]&&KC[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=Ic(t-e),i,a;return Lc(r)?(a=n>0?`top`:`bottom`,i=`center`):Lc(r-MC)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<MC?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}(),GC=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],KC={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&&($n(u,u,l),$n(d,d,l));var p=U({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&r_(r.axis.scale))AC().buildAxisBreakLine(r,i,a,m);else{var h=new bf(U({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));fp(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`]);q(g)&&(g=[g,g]),(q(_)||At(_))&&(_=[_,_]);var v=Ny(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=jy(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){tw(t,i,s)&&qC(e,t,n,r,i,a,o,pS.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){tw(t,i,s)&&qC(e,t,n,r,i,a,o,pS.determine);var c=$C(e,i,a,r);XC(e,t.labelLayoutList,c),ew(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(cw(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 nr(0,0),_=new nr(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=An();_.transform(Fn(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*MC/180);var b,x;Ix(u)?b=WC.innerTextLayout(e.rotation,y??e.rotation,d):(b=JC(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=Y(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Ys({x:g.x,y:g.y,rotation:b.rotation,silent:WC.isLabelSilent(r),style:Zp(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(jp({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=WC.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,$l(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=yC({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Ix(u)?NC[E]:PC[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 qC(e,t,n,r,i,a,o,s){rw(t)||nw(e,t,i,s,r,o);var c=t.labelLayoutList;aw(e,r,c,a),uw(r,e.rotation,c);var l=e.optionHideOverlap;YC(r,c,l),l&&DC(St(c,function(e){return e&&!e.label.ignore})),RC(e,n,r,c)}function JC(e,t,n,r){var i=Ic(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Lc(i-MC/2)?(o=c?`bottom`:`top`,a=`center`):Lc(i-MC*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<MC*1.5&&i>MC/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function YC(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Px(r))return;function a(e,a,o){var s=yC(t[a]),c=yC(t[o]),l=r.scale;if(!(!s||!c)){if(e==null){if(!n&&i)return;var u=FC(s.label).labelInfo.tick;if(Ub(l)&&u.notNice||Gb(l)&&u.offInterval){ZC(s.label);return}}if(e===!1||s.suggestIgnore){ZC(s.label);return}if(c.suggestIgnore){ZC(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=wC({marginForce:f},s),c=wC({marginForce:f},c)}OC(s,c,null,{touchThreshold:d})&&ZC(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 XC(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=IC(r),a=FC(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.labelInfo.tick.value){ZC(r);return}}})}function ZC(e){e&&(e.ignore=!0)}function QC(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&&($n(o,o,t),$n(s,s,t));var u=new bf({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});fp(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);var d=IC(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function $C(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=QC(i.getTicksCoords(),n.transform,c,gt(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)t.add(l[u]);return l}function ew(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=gt(c.getLineStyle(),gt(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])})),d=0;d<s.length;d++)for(var f=QC(s[d],n.transform,l,u,`minorticks_`+d),p=0;p<f.length;p++)t.add(f[p])}}function tw(e,t,n){if(rw(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),iw(e,null,null,null))}return!0}function nw(e,t,n,r,i,a){var o=i.axis,s=Y(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new Vd;n.add(c);var l=mS(r);if(!s||o.scale.isBlank()){iw(t,[],c,l);return}var u=i.getModel(`axisLabel`),d=o.getViewLabels(l),f=(Y(e.raw.labelRotate,u.get(`rotate`))||0)*MC/180,p=WC.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=Vx(o.scale,n);if(m&&m[f]){var y=m[f];J(y)&&y.textStyle&&(l=new ym(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:WC.isLabelSilent(i),z2:D,style:Zp(l,{text:r,align:t===0?S:t===d.length-1?C:x,verticalAlign:t===0?T:t===d.length-1?E:w,fill:Ot(b)?b(o.type===`category`?s:o.type===`value`?f+``:f,t):b})});O.anid=`label_`+f;var k=FC(O);if(k.labelInfo=e,k.layoutRotation=p.rotation,jp({el:O,componentModel:i,itemName:r,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:s,tickIndex:t}}),g){var A=WC.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),$l(O).eventData=A,j&&lw(i,a,O,j)}h.push(O),c.add(O)}),iw(t,G(h,function(e){return{label:e,priority:FC(e).labelInfo.tick.break?e.z2+(v-_+1):e.z2,defaultAttr:{ignore:e.ignore}}}),c,l)}function rw(e){return!!e.labelLayoutList}function iw(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function aw(e,t,n,r){var i=t.get([`axisLabel`,`margin`]);W(n,function(n,a){var o=yC(n);if(o){var s=o.label,c=FC(s);o.suggestIgnore=s.ignore,s.ignore=!1,xi(ow,sw);var l=t.axis;ow.x=l.dataToCoord(Vx(l.scale,c.labelInfo.tick)),ow.y=e.labelOffset+e.labelDirection*i,ow.rotation=c.layoutRotation,r.add(ow),ow.updateTransform(),r.remove(ow),ow.decomposeTransform(),xi(s,ow),s.markRedraw(),_C(o,!0),yC(o)}})}var ow=new Ws,sw=new Ws;function cw(e){return!!e}function lw(e,t,n,r){n.on(`click`,function(n){var i={type:jC,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+`AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function uw(e,t,n){var r=e_();if(r){var i=r.retrieveAxisBreakPairs(n,function(e){return e&&FC(e.label).labelInfo.tick.break},!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&W(i,function(r){AC().adjustBreakLabelPair(e.axis.inverse,t,[yC(n[r[0]]),yC(n[r[1]])])})}}function dw(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),Y(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 fw(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function pw(e){var t={xAxisModel:null,yAxisModel:null};return W(t,function(n,r){var i=r.replace(/Model$/,``);t[r]=e.getReferringComponents(i,Ol).models[0]}),t}function mw(e,t,n,r,i,a){for(var o=dw(e,n),s=!1,c=!1,l=0;l<t.length;l++)Vb(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 WC(n,r,o,i)}function hw(e,t,n){var r=dw(t,n);e.updateCfg(r)}var gw=wl(),_w=3,vw=function(){function e(e,t,n,r,i){var a=Gb(e),o=a?t.getCategories().length:null,s;if(a){var c=t.getCategories(!0);s=c&&!c.length}var l=n.slice();(Hb(e)||Wb(e)||Ub(e))&&(Ll(l,bw(e,t.get(`dataMin`,!0))),Rl(l,bw(e,t.get(`dataMax`,!0)))),Hl(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]=bw(e,Ot(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]=bw(e,Ot(p)?p({min:l[0],max:l[1]}):p),d[1]=u[1]!=null);var m=xw(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,!Bl(u[0])&&(u[0]=NaN),!Bl(u[1])&&(u[1]=NaN);var g=s||It(u[0])||It(u[1])||a&&!o,_=Hb(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=bw(e,t.get(`startValue`,!0)),x=b!=null;!Jc(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Jc(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)),yw(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),yw(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 yw(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),Ul(t))}function bw(e,t){return t==null?null:It(t)?NaN:e.parse(t)}function xw(e,t){var n;if(Gb(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=K(r)?r:[r,r]}return[Sw(n[0]),Sw(n[1])]}function Sw(e){return Br(typeof e==`boolean`?0:e,1)||0}function Cw(e){var t=gw(e.scale);return t.extent||=Fl(),t}function ww(e,t){Cw(e).dimIdxInCoord=t.get(e.dim)}function Tw(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||Ew(n,e,i,r,t)}function Ew(e,t,n,r,i){var a=Cw(t),o=a.extent,s=!1;KS(t,function(r){if(r.boxCoordinateSystem){var i=og(r).coord,c=a.dimIdxInCoord;if(c>=0&&K(i)){var l=i[c];l!=null&&!K(l)&&Il(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;W(Fx(u,n),function(e){zl(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=Mw(e,t,r);Ow(e,new vw(e,r,o,s,c),i),a.extent=null}function Dw(e,t){var n=e.scale;Ow(n,new vw(n,e.model,t,!1,!1),_w)}function Ow(e,t,n){e.rawExtentInfo=t,t.from=n}function kw(e,t){Aw.set(e,t)}var Aw=Yt();function jw(e,t,n,r,i){e.rawExtentInfo||Dw({scale:e,model:t},i||Fl());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 Mw(e,t,n){var r=Hx(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return XS(t,function(e){a=!!Aw.get(e)||a}),a}function Nw(e,t,n,r){if(n.ctnShp){var i;if(XS(e,function(t){var n=Aw.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Ll(i,a[0]),Rl(i,a[1]),kx(e))}}),i){var a=t.getExtent();if(Gb(t))e.onBand||t.setExtent2(1,fc(a[0],a[0]+i[0]),pc(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=fc(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=pc(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]<a[0]||o[1]>a[1])&&t.setExtent2(1,o[0],o[1])}}}}function Pw(){QS(`liPosMinGap`,Fw)}function Fw(e,t,n){var r=Yt(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=_h(u);function f(n){JS(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}Zy(Iw,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r<i;++r){var a=n.get(e,r);isFinite(a)&&(!u||vh(d,a))&&(l&&(a=c.transformIn(a,null)),Iw.arr[m++]=a)}});var h=Iw.typed?Iw.arr.subarray(0,m):(Iw.arr.length=m,Iw.arr);Iw.typed?h.sort():kc(h);for(var g=1/0,_=1;_<m;++_){var v=h[_]-h[_-1];v>0&&v<g&&(g=v)}n.liPosMinGap=t.liPosMinGap=Jc(g)?g:m>0?-2:-1,n.serUids=r}var Iw=Zy({ctor:Yy},50);function Lw(e){return function(t,n){var r=aC(t,{fromStat:{key:e}});if(Jc(r.w2))return[-r.w2/2,r.w2/2]}}function Rw(e,t){return e+`|&`+t}function zw(e){return Pw(),{liPosMinGap:!Gb(e.scale)}}function Bw(e,t,n,r){nC(e,{key:t,seriesType:n,coordSysType:r,getMetrics:zw})}function Vw(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var Hw={left:0,right:0,top:0,bottom:0},Uw=[`25%`,`25%`],Ww=`cartesian2d`,Gw=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=uv(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&lv(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&lv(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:Hw,outerBoundsContain:`all`,outerBoundsClampWidth:Uw[0],outerBoundsClampHeight:Uw[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30},t}(pv),Kw=Wl(),qw=`__ec_stack_`;function Jw(e){return e.get(`stack`)||qw+e.seriesIndex}function Yw(e){if(Gb(e.axis.scale)){for(var t=aC(e.axis),n=[],r=0;r<e.count;r++)n.push(gt({stackId:qw+r},e));for(var i=Qw({bandWidthResult:t,seriesInfo:n}),a=[],r=0;r<e.count;r++){var o=i[qw+r];o.offsetCenter=o.offset+o.width/2,a.push(o)}return a}}function Xw(e,t){var n=Zw(e,t);return n.columnMap=Qw(n),n}function Zw(e,t){var n=Rw(t,Ww),r=[],i=aC(e,{fromStat:{key:n},min:1});return qS(e,n,function(e){r.push({barWidth:wc(e.get(`barWidth`),i.w),barMaxWidth:wc(e.get(`barMaxWidth`),i.w),barMinWidth:wc(e.get(`barMinWidth`)||(tT(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:Jw(e)})}),{bandWidthResult:i,seriesInfo:r}}function Qw(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=fc(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??=pc(35-o.length*4,15)+`%`;var c=wc(i,t),l=wc(a,1),u=(n-c)/(r+(r-1)*l);u=pc(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=fc(o,i)),a&&(o=pc(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&i<o&&(o=fc(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=pc(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}function $w(e){return{seriesType:e,overallReset:function(t){var n=Rw(e,Ww);YS(t,n,function(t){var r=Xw(t,e);qS(t,n,function(e){var t=r.columnMap[Jw(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function eT(e){return{seriesType:e,plan:sb(),reset:function(e){if(fw(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=hg(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(Vw(i))),p=tT(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&Xy(r*3),c=p&&s&&Xy(r*3),l=p&&Xy(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,mc(k)<m&&(k=(k<0?-1:1)*m)}else{var j=n.dataToPoint([w,C]);u&&(T=n.dataToPoint([w,E])[1]),D=j[0]+_,O=T,k=g,A=j[1]-T,mc(A)<m&&(A=(A<=0?-1:1)*m)}p?(i[S]=D,i[S+1]=O,i[S+2]=d?k:A,c&&(c[S]=d?v.x:D,c[S+1]=d?O:v.y,c[S+2]=y),l[b]=b):t.setItemLayout(b,{x:D,y:O,width:k,height:A}),S+=3}p&&t.setLayout({largePoints:i,largeDataIndices:l,largeBackgroundPoints:c,valueAxisHorizontal:d})}}}}}}function tT(e){return e.pipelineContext&&e.pipelineContext.large}function nT(e){return Lw(Rw(e,Ww))}function rT(e){Kw(e,function(){function t(t){var n=Rw(t,Ww);Bw(e,n,t,Ww),kw(n,nT(t))}t(`bar`),t(`pictorialBar`)})}var iT=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.getInitialData=function(e,t){return yg(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),a=r.dataToPoint(i);if(n)W(r.getAxes(),function(e,n){if(e.type===`category`&&t!=null){var r=e.getTicksCoords(),o=e.getTickModel().get(`alignWithLabel`),s=i[n],c=t[n]===`x1`||t[n]===`y1`;if(c&&!o&&(s+=1),r.length<2)return;if(r.length===2){a[n]=e.toGlobalCoord(e.getExtent()[+!!c]);return}for(var l=void 0,u=void 0,d=1,f=0;f<r.length;f++){var p=r[f].coord,m=f===r.length-1?r[f-1].tickValue+d:r[f].tickValue;if(m===s){u=p;break}if(m<s)l=p;else if(l!=null&&m>s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(gy);gy.registerClass(iT);var aT=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.getInitialData=function(){return yg(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=Xl(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=Eg(iT.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(iT),oT=`\0__throttleOriginMethod`,sT=`\0__throttleRate`,cT=`\0__throttleType`;function lT(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 uT(e,t,n,r){var i=e[t];if(i){var a=i[oT]||i,o=i[cT];if(i[sT]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=lT(a,n,r===`debounce`),i[oT]=a,i[cT]=r,i[sT]=n}return i}}function dT(e,t){var n=e[t];n&&n[oT]&&(n.clear&&n.clear(),e[t]=n[oT])}var fT=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),pT=function(e){V(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new fT},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-c<d:c-l<d;f||(c=l-(u?d:-d));var p=Math.cos(c),m=Math.sin(c),h=Math.cos(l),g=Math.sin(l);f?(e.moveTo(p*i+n,m*i+r),e.arc(p*s+n,m*s+r,o,-Math.PI+c,c,!u)):e.moveTo(p*a+n,m*a+r),e.arc(n,r,a,c,l,!u),e.arc(h*s+n,g*s+r,o,l-Math.PI*2,l-Math.PI,!u),i!==0&&e.arc(n,r,i,l,c,u)},t}(As);function mT(e,t){t||={};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return Vr(t,r,i);var o=e(a),s=r.distance==null?5:r.distance,c=this.shape,l=c.cx,u=c.cy,d=c.r,f=c.r0,p=(d+f)/2,m=c.startAngle,h=c.endAngle,g=(m+h)/2,_=n?Math.abs(d-f)/2:0,v=Math.cos,y=Math.sin,b=l+d*v(m),x=u+d*y(m),S=`left`,C=`top`;switch(o){case`startArc`:b=l+(f-s)*v(g),x=u+(f-s)*y(g),S=`center`,C=`top`;break;case`insideStartArc`:b=l+(f+s)*v(g),x=u+(f+s)*y(g),S=`center`,C=`bottom`;break;case`startAngle`:b=l+p*v(m)+gT(m,s+_,!1),x=u+p*y(m)+_T(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+gT(m,-s+_,!1),x=u+p*y(m)+_T(m,-s+_,!1),S=`left`,C=`middle`;break;case`middle`:b=l+p*v(g),x=u+p*y(g),S=`center`,C=`middle`;break;case`endArc`:b=l+(d+s)*v(g),x=u+(d+s)*y(g),S=`center`,C=`bottom`;break;case`insideEndArc`:b=l+(d-s)*v(g),x=u+(d-s)*y(g),S=`center`,C=`top`;break;case`endAngle`:b=l+p*v(h)+gT(h,s+_,!0),x=u+p*y(h)+_T(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+gT(h,-s+_,!0),x=u+p*y(h)+_T(h,-s+_,!0),S=`right`,C=`middle`;break;default:return Vr(t,r,i)}return t||={},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function hT(e,t,n,r){if(At(r)){e.setTextConfig({rotation:r});return}if(K(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,c,l=n(t);switch(l){case`startArc`:case`insideStartArc`:case`middle`:case`insideEndArc`:case`endArc`:c=s;break;case`startAngle`:case`insideStartAngle`:c=a;break;case`endAngle`:case`insideEndAngle`:c=o;break;default:e.setTextConfig({rotation:0});return}var u=Math.PI*1.5-c;l===`middle`&&u>Math.PI/2&&u<Math.PI*1.5&&(u-=Math.PI),e.setTextConfig({rotation:u})}function gT(e,t,n){return t*Math.sin(e)*(n?-1:1)}function _T(e,t,n){return t*Math.cos(e)*(n?1:-1)}function vT(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 Br(e,i)})}}var yT=Math.max,bT=Math.min,xT=function(e){V(t,e);function t(){var t=e.call(this)||this;return t.type=`bar`,t._isFirstFrame=!0,t}return t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get(`coordinateSystem`);(i===`cartesian2d`||i===`polar`)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){Np(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i=this.group,a=e.getData(),o=this._data,s=e.coordinateSystem,c=s.getBaseAxis(),l;s.type===`cartesian2d`?l=c.isHorizontal():s.type===`polar`&&(l=c.dim===`angle`);var u=e.isAnimationEnabled()?e:null,d=wT(e,s);d&&this._enableRealtimeSort(d,a,n);var f=e.get(`clip`,!0)||d,p=s.getArea();i.removeClipPath();var m=e.get(`roundCap`,!0),h=e.get(`showBackground`,!0),g=e.getModel(`backgroundStyle`),_=g.get(`borderRadius`)||0,v=[],y=this._backgroundEls,b=r&&r.isInitSort,x=r&&r.type===`changeAxisOrder`;function S(e){var t=AT[s.type](a,e);if(!t)return null;var n=VT(s,l,t);return n.useStyle(g.getItemStyle()),s.type===`cartesian2d`?n.setShape(`r`,_):n.setShape(`cornerRadius`,_),v[e]=n,n}a.diff(o).add(function(t){var n=a.getItemModel(t),r=AT[s.type](a,t,n);if(r&&(h&&S(t),!(!a.hasValue(t)||!kT[s.type](r)))){var o=!1;f&&(o=ST[s.type](p,r));var g=CT[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),NT(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?TT(d,u,g,r,t,l,!1,!1):Kf(g,{shape:r},e,t),a.setItemGraphicEl(t,g),i.add(g),g.ignore=o}}).update(function(t,n){var r=a.getItemModel(t),C=AT[s.type](a,t,r);if(C){if(h){var w=void 0;y.length===0?w=S(n):(w=y[n],w.useStyle(g.getItemStyle()),s.type===`cartesian2d`?w.setShape(`r`,_):w.setShape(`cornerRadius`,_),v[t]=w);var T=AT[s.type](a,t),E=BT(l,T,s);Gf(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!kT[s.type](C)){i.remove(D);return}var O=!1;if(f&&(O=ST[s.type](p,C),O&&i.remove(D)),D&&(D.type===`sector`&&m||D.type===`sausage`&&!m)&&(D&&Xf(D,e,n),D=null),D?Zf(D):D=CT[s.type](e,a,t,C,l,u,c.model,!0,m),d&&(D.forceLabelAnimation=!0),x){var k=D.getTextContent();if(k){var A=om(k);A.prevValue!=null&&(A.prevValue=A.value)}}else NT(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?TT(d,u,D,C,t,l,!0,x):Gf(D,{shape:C},e,t,null),a.setItemGraphicEl(t,D),D.ignore=O,i.add(D)}}).remove(function(t){var n=o.getItemGraphicEl(t);n&&Xf(n,e,t)}).execute();var C=this._backgroundGroup||=new Vd;C.removeAll();for(var w=0;w<v.length;++w)C.add(v[w]);i.add(C),this._backgroundEls=v,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),LT(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),LT(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&vb(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var a=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,a,i,n)},n.getZr().on(`rendered`,this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i??=NaN,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:G(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),a=Number.MAX_VALUE,o=0,s=r.getOrdinalMeta().categories.length;o<s;++o){var c=e.rawIndexOf(i,r.getRawOrdinalNumber(o)),l=c<0?Number.MIN_VALUE:t(e.indexOfRawIndex(c));if(l>a)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Xf(t,e,$l(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(ub),ST={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=yT(t.x,e.x),s=bT(t.x+t.width,i),c=yT(t.y,e.y),l=bT(t.y+t.height,a),u=s<o,d=l<c;return t.x=u&&o>i?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=bT(t.r,e.r),a=yT(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},CT={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new Ws({shape:U({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?pT:lf,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=mT(MT(i),{isRoundCap:l===pT}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Gf:Kf)(u,{shape:p},a)}return u}};function wT(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function TT(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?Gf:Kf)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Gf:Kf)(n,{shape:l},u,i)}function ET(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var DT=[`x`,`y`,`width`,`height`],OT=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],kT={cartesian2d:function(e){return!ET(e,DT)},polar:function(e){return!ET(e,OT)}},AT={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?PT(n,r):0,a=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function jT(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function MT(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function NT(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;U(u,vT(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?HT(i,a.coordinateSystem):UT(i,a.coordinateSystem),p=Xp(r);Yp(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Fy(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,hT(e,h===`outside`?f:h,MT(o),r.get([`label`,`rotate`]))}sm(m,p,a.getRawValue(n),function(e){return Iy(t,e)});var g=r.getModel([`emphasis`]);cd(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),fd(e,r),jT(i)&&(e.style.fill=`none`,e.style.stroke=`none`,W(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function PT(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var FT=function(){function e(){}return e}(),IT=function(e){V(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new FT},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c<n.length;c+=3)o[r]=s,o[i]=n[c+2],a[r]=n[c+r],a[i]=n[c+i],e.rect(a[0],a[1],o[0],o[1])},t}(As);function LT(e,t,n,r){var i=e.getData(),a=+!!i.getLayout(`valueAxisHorizontal`),o=i.getLayout(`largeDataIndices`),s=i.getLayout(`size`),c=e.getModel(`backgroundStyle`),l=i.getLayout(`largeBackgroundPoints`),u=r?Yl(e):0;if(l){var d=new IT({shape:{points:l},incremental:u,silent:!0,z2:0});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,d.useStyle(c.getItemStyle()),t.add(d),n&&n.push(d)}var f=new IT({shape:{points:i.getLayout(`largePoints`)},incremental:u,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual(`style`)),f.style.stroke=null,$l(f).seriesIndex=e.seriesIndex,e.get(`silent`)||(f.on(`mousedown`,RT),f.on(`mousemove`,RT)),n&&n.push(f)}var RT=lT(function(e){var t=this,n=zT(t,e.offsetX,e.offsetY);$l(t).dataIndex=n>=0?n:null},30,!1);function zT(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u<d;u++){var f=u*3;if(c[r]=l,c[i]=a[f+2],s[r]=a[f+r],s[i]=a[f+i],c[i]<0&&(s[i]+=c[i],c[i]=-c[i]),t>=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function BT(e,t,n){if(bb(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function VT(e,t,n){return new(e.type===`polar`?lf:Ws)({shape:BT(t,n,e),silent:!0,z2:0})}function HT(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function UT(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function WT(e){e.registerChartView(xT),e.registerSeriesModel(aT),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,$w(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,eT(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,lS(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),rT(e)}function GT(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=U({},t),i.dispatchAction(U(t,{type:e[1],seriesIndex:n(r,t)}))})})}function KT(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=Cl(c,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:K(l)?c.getName(l[0]):c.getName(l),selected:q(r)?r:U({},r)})}})}function qT(e,t,n){e.on(`selectchanged`,function(e){var r=n.getModel();e.isFromClick?(KT(`map`,`selectchanged`,t,r,e),KT(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?(KT(`map`,`selected`,t,r,e),KT(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&(KT(`map`,`unselected`,t,r,e),KT(`pie`,`unselected`,t,r,e))})}function JT(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 YT(e,t,n){t=K(t)&&{coordDimensions:t}||U({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=Zh(r,t).dimensions,a=new Xh(i,e);return a.initData(r,n),a}var XT=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}(),ZT=wl(),QT=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 XT(Et(this.getData,this),Et(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return YT(this,{coordDimensions:[`value`],encodeDefaulter:Dt(Dm,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=ZT(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=Nc(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){al(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}(gy);ig({fullType:QT.type,getCoord2:function(e){return e.getShallow(`center`)}}),Math.PI*2,as.CMD;function $T(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 eE=new nr,tE=new nr,nE=new nr,rE=new nr,iE=new nr,aE=[],oE=new nr;function sE(e,t){if(t<=180&&t>0){t=t/180*Math.PI,eE.fromArray(e[0]),tE.fromArray(e[1]),nE.fromArray(e[2]),nr.sub(rE,eE,tE),nr.sub(iE,nE,tE);var n=rE.len(),r=iE.len();if(!(n<.001||r<.001)){rE.scale(1/n),iE.scale(1/r);var i=rE.dot(iE);if(Math.cos(t)<i){var a=$T(tE.x,tE.y,nE.x,nE.y,eE.x,eE.y,aE,!1);oE.fromArray(aE),oE.scaleAndAdd(iE,a/Math.tan(Math.PI-t));var o=nE.x===tE.x?(oE.y-tE.y)/(nE.y-tE.y):(oE.x-tE.x)/(nE.x-tE.x);if(isNaN(o))return;o<0?nr.copy(oE,tE):o>1&&nr.copy(oE,nE),oE.toArray(e[1])}}}}function cE(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,eE.fromArray(e[0]),tE.fromArray(e[1]),nE.fromArray(e[2]),nr.sub(rE,tE,eE),nr.sub(iE,nE,tE);var r=rE.len(),i=iE.len();if(!(r<.001||i<.001)&&(rE.scale(1/r),iE.scale(1/i),rE.dot(t)<Math.cos(n))){var a=$T(tE.x,tE.y,nE.x,nE.y,eE.x,eE.y,aE,!1);oE.fromArray(aE);var o=Math.PI/2,s=o+Math.acos(iE.dot(t))-n;if(s>=o)nr.copy(oE,nE);else{oE.scaleAndAdd(iE,a/Math.tan(Math.PI/2-s));var c=nE.x===tE.x?(oE.y-tE.y)/(nE.y-tE.y):(oE.x-tE.x)/(nE.x-tE.x);if(isNaN(c))return;c<0?nr.copy(oE,tE):c>1&&nr.copy(oE,nE)}oE.toArray(e[1])}}}function lE(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 uE(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=Yn(r[0],r[1]),a=Yn(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=Qn([],r[1],r[0],o/i),c=Qn([],r[1],r[2],o/a),l=Qn([],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 dE(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<_u.length;c++){var l=_u[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&&lE(r,!0,l,u);continue}r||(r=new _f,e.setTextGuideLine(r),!d&&(s||!o)&&lE(r,!0,`normal`,t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),lE(r,!1,l,u)}}if(r){gt(r.style,n),r.style.fill=null;var m=a.get(`showAbove`),h=e.textGuideLineConfig=e.textGuideLineConfig||{};h.showAbove=m||!1,r.buildPath=uE}}function fE(e,t){t||=`labelLine`;for(var n={normal:e.getModel(t)},r=0;r<gu.length;r++){var i=gu[r];n[i]=e.getModel([i,t])}return n}var pE=Math.PI/180;function mE(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;gE(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}EC(e,1,c,c+o)&&d(e)}function hE(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;bE(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(!bE(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,gE(m,g,!1)}}mE(l,t,n,r,1,i,a,o,s,d),mE(c,t,n,r,-1,i,a,o,s,u);for(var f=0;f<e.length;f++){var m=e[f];if(!bE(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 gE(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)}_E(a,r)}}}function _E(e,t){yE.rect=e,bC(yE,t,vE)}var vE={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},yE={};function bE(e){return e.position===`center`}function xE(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*pE,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=wc(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=wc(T,l);var E=w.get(`length2`);if(E=wc(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 F=(P?(d.r+d.r0)/2*O:d.r*O)+r,ee=(P?(d.r+d.r0)/2*k:d.r*k)+i;if(A=F+O*3,j=ee+k*3,!P){var I=F+O*(T+c-d.r),te=ee+k*(T+c-d.r),L=I+(O<0?-1:1)*E,ne=te;A=x===`edge`?O<0?u+S:u+l-S:L+(O<0?-b:b),j=ne,M=[[F,ee],[I,te],[L,ne]]}N=P?`center`:x===`edge`?O>0?`right`:`left`:O>0?`left`:`right`}var R=Math.PI,re=0,ie=v.get(`rotate`);if(At(ie))re=R/180*ie;else if(y===`center`)re=0;else if(ie===`radial`||ie===!0)re=O<0?-D+R:-D;else if(ie===`tangential`||ie===`tangential-noflip`&&y!==`outside`&&y!==`outer`){var ae=Math.atan2(O,k);ae<0&&(ae=R*2+ae),k>0&&ie!==`tangential-noflip`&&(ae=R+ae),re=ae-R}if(a=!!re,h.x=A,h.y=j,h.rotation=re,h.setStyle({verticalAlign:`middle`}),P){h.setStyle({align:N});var oe=h.states.select;oe&&(oe.x+=h.x,oe.y+=h.y)}else{var z=new gr(0,0,0,0);_E(z,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new nr(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`)&&hE(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):(sE(x,g.minTurnAngle),cE(x,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:x}),_.__hostTarget.textGuideLineConfig={anchor:new nr(x[0][0],x[0][1])})}}}var SE=Math.PI*2,CE=Math.PI/180,wE=Zl(`pie`,TE);function TE(e,t){e.eachSeriesByType(`pie`,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=rv(e,t),a=i.cx,o=i.cy,s=i.r,c=i.r0,l=i.viewRect,u=-e.get(`startAngle`)*CE,d=e.get(`endAngle`),f=e.get(`padAngle`)*CE;d=d===`auto`?u-SE:-d*CE;var p=e.get(`minAngle`)*CE+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;is(S,!_),u=S[0],d=S[1];var w=EE(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?Cc(e,b,[c,s]):s}),O=i}),E<SE&&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 EE=wl(),DE=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=U(vT(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?(Kf(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,Kf(i,{shape:{r:c.r}},a,t)):n==null?(i.shape.endAngle=c.startAngle,Gf(i,{shape:{endAngle:c.endAngle}},a,t)):(i.setShape({startAngle:n,endAngle:n}),Kf(i,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},a,t))}else Zf(i),Gf(i,{shape:l},a,t);i.useStyle(e.getItemVisual(t,`style`)),fd(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=U({r:c.r+(s.get(`scale`)&&s.get(`scaleSize`)||0)},vT(s.getModel(`itemStyle`),c)),U(i.ensureState(`select`),{x:p,y:m,shape:vT(o.getModel([`select`,`itemStyle`]),c)}),U(i.ensureState(`blur`),{shape:vT(o.getModel([`blur`,`itemStyle`]),c)});var g=i.getTextGuideLine(),_=i.getTextContent();g&&U(g.ensureState(`select`),{x:p,y:m}),U(_.ensureState(`select`),{x:p,y:m}),cd(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,Xp(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 _f,this.setTextGuideLine(d)),dE(this,fE(i),{stroke:s,opacity:Lt(a.get([`lineStyle`,`opacity`]),c,1)})}},t}(lf),OE=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 lf({shape:mt(EE(e))});u.useStyle(e.getModel(`emptyCircleStyle`).getItemStyle()),this._emptyCircleSector=u,o.add(u)}i.diff(a).add(function(e){var t=new DE(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){Xf(a.getItemGraphicEl(t),e,t)}).execute(),xE(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}(ub);function kE(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!(At(r)&&!isNaN(r)&&r<0)})}}}function AE(e){e.registerChartView(OE),e.registerSeriesModel(QT),GT(`pie`,e.registerAction),e.registerLayout(wE),e.registerProcessor(JT(`pie`)),e.registerProcessor(kE(`pie`))}var jE=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),ME=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 jE(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 jE(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 jE(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new jE(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new jE(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new jE(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),NE=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,PE=[],FE=nn.browser.firefox&&+nn.browser.version.split(`.`)[0]<39;function IE(e,t,n,r){return n||={},r?LE(e,t,n):FE&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?LE(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function LE(e,t,n){if(nn.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Lg(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Pg(PE,e,r,i)){n.zrX=PE[0],n.zrY=PE[1];return}}n.zrX=n.zrY=0}function RE(e){return e||window.event}function zE(e,t,n){if(t=RE(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&&IE(e,i,t,n)}else{IE(e,t,t,n);var a=BE(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&NE.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function BE(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 VE(e,t,n,r){e.addEventListener(t,n,r)}function HE(e,t,n,r){e.removeEventListener(t,n,r)}var UE=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function WE(e){return e.which===2||e.which===3}var GE=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=IE(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 JE)if(JE.hasOwnProperty(t)){var n=JE[t](this._track,e);if(n)return n}},e}();function KE(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function qE(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var JE={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=KE(r)/KE(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=qE(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},YE=`silent`;function XE(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:ZE}}function ZE(){UE(this.event)}var QE=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}(qa),$E=function(){function e(e,t){this.x=e,this.y=t}return e}(),eD=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],tD=new gr(0,0,0,0),nD=function(e){V(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new $E(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new QE,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new ME(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(W(eD,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=aD(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 $E(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 $E(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=XE(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 $E(e,t);if(iD(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new gr(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)&&(tD.copy(u.getBoundingRect()),u.transform&&tD.applyTransform(u.transform),tD.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(iD(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 GE;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 $E;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(qa);W([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){nD.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=aD(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||Yn(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function rD(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||YE}return!1}function iD(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=rD(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==YE)){t.target=o;break}}}function aD(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var oD=32,sD=7;function cD(e){for(var t=0;e>=oD;)t|=e&1,e>>=1;return e+t}function lD(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++;uD(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function uD(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function dD(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 fD(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 pD(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 mD(e,t){var n=sD,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=pD(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=fD(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=pD(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=fD(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>=sD||m>=sD);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-pD(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-fD(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>=sD||g>=sD);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 hD(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<oD){a=lD(e,n,r,t),dD(e,n,r,n+a,t);return}var o=mD(e,t),s=cD(i);do{if(a=lD(e,n,r,t),a<s){var c=i;c>s&&(c=s),dD(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 gD=!1;function _D(){gD||(gD=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function vD(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var yD=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=vD}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,hD(n,vD)},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)&&(_D(),p.z=0),isNaN(p.z2)&&(_D(),p.z2=0),isNaN(p.zlevel)&&(_D(),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=_t(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}(),bD=nn.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function xD(){return new Date().getTime()}var SD=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=xD()-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&&(bD(t),!e._paused&&e.update())}bD(t)},t.prototype.start=function(){this._running||(this._time=xD(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=xD(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=xD()-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 Ka(e,t.loop);return this.addAnimator(n),n},t}(qa),CD=300,wD=nn.domSupported,TD=(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})}})(),ED={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},DD=!1;function OD(e){var t=e.pointerType;return t===`pen`||t===`touch`}function kD(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 AD(e){e&&(e.zrByTouch=!0)}function jD(e,t){return zE(e.dom,new ND(e,t),!0)}function MD(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 ND=function(){function e(e,t){this.stopPropagation=$t,this.stopImmediatePropagation=$t,this.preventDefault=$t,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),PD={mousedown:function(e){e=zE(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=zE(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=zE(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=zE(this.dom,e);var t=e.toElement||e.relatedTarget;MD(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){DD=!0,e=zE(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){DD||(e=zE(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=zE(this.dom,e),AD(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),PD.mousemove.call(this,e),PD.mousedown.call(this,e)},touchmove:function(e){e=zE(this.dom,e),AD(e),this.handler.processGesture(e,`change`),PD.mousemove.call(this,e)},touchend:function(e){e=zE(this.dom,e),AD(e),this.handler.processGesture(e,`end`),PD.mouseup.call(this,e),+new Date-this.__lastTouchMoment<CD&&PD.click.call(this,e)},pointerdown:function(e){PD.mousedown.call(this,e)},pointermove:function(e){OD(e)||PD.mousemove.call(this,e)},pointerup:function(e){PD.mouseup.call(this,e)},pointerout:function(e){OD(e)||PD.mouseout.call(this,e)}};W([`click`,`dblclick`,`contextmenu`],function(e){PD[e]=function(t){t=zE(this.dom,t),this.trigger(e,t)}});var FD={pointermove:function(e){OD(e)||FD.mousemove.call(this,e)},pointerup:function(e){FD.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 ID(e,t){var n=t.domHandlers;nn.pointerEventsSupported?W(TD.pointer,function(r){RD(t,r,function(t){n[r].call(e,t)})}):(nn.touchEventsSupported&&W(TD.touch,function(r){RD(t,r,function(i){n[r].call(e,i),kD(t)})}),W(TD.mouse,function(r){RD(t,r,function(i){i=RE(i),t.touching||n[r].call(e,i)})}))}function LD(e,t){nn.pointerEventsSupported?W(ED.pointer,n):nn.touchEventsSupported||W(ED.mouse,n);function n(n){function r(r){r=RE(r),MD(e,r.target)||(r=jD(e,r),t.domHandlers[n].call(e,r))}RD(t,n,r,{capture:!0})}}function RD(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,VE(e.domTarget,t,n,r)}function zD(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&HE(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var BD=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),VD=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 BD(t,PD),wD&&(r._globalHandlerScope=new BD(document,FD)),ID(r,r._localHandlerScope),r}return t.prototype.dispose=function(){zD(this._localHandlerScope),wD&&zD(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,wD&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?LD(this,t):zD(t)}},t}(qa),HD={},UD={};function WD(e){delete UD[e]}function GD(e){if(!e)return!1;if(typeof e==`string`)return ya(e,1)<Xa;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=ya(t[i].color,1);return n/=r,n<Xa}return!1}var KD=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 yD,a=n.renderer||`canvas`;HD[a]||(a=wt(HD)[0]),n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new HD[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!nn.node&&!nn.worker&&!s?new VD(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?nn.touchEventsSupported:!!l,d=44,f;u&&(f=X(n.pointerSize,d)),this.handler=new nD(i,o,c,o.root,f),this.animation=new SD({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=GD(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=xD(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=xD();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 Vd&&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,WD(this.id))},e}();function qD(e,t){var n=new KD(ft(),e,t);return UD[n.id]=n,n}function JD(e,t){HD[e]=t}var YD=``;typeof navigator<`u`&&(YD=navigator.platform||``);var XD=`rgba(0, 0, 0, 0.2)`,ZD=Q.color.theme[0],QD=ga(ZD,null,null,.9),$D={darkMode:`auto`,colorBy:`series`,color:Q.color.theme,gradientColor:[QD,ZD],aria:{decal:{decals:[{color:XD,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:XD,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:XD,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:XD,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:XD,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:XD,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:YD.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},eO=Yt();function tO(e,t,n){var r=eO.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}var nO,rO,iO,aO=`\0_ec_inner`,oO=1,sO=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 ym(r),this._locale=new ym(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=fO(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,fO(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`?iO(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=Yt(),s=t&&t.replaceMergeMainTypeMap;Tm(this),W(e,function(e,t){e!=null&&(pv.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?mt(e):H(n[t],e,!0))}),s&&s.each(function(e,t){pv.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),pv.topologicalTravel(a,pv.getAllClassMainTypes(),c,this);function c(t){var a=tO(this,t,il(e[t])),o=r.get(t),c=ll(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);xl(c,t,pv),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=pv.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=U({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),U(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`&&nO(this)}this._seriesIndices||nO(this)},t.prototype.getOption=function(){var e=mt(this.option);return W(e,function(t,n){if(pv.hasClass(n)){for(var r=il(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!bl(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[aO],e},t.prototype.setTheme=function(e){this._theme=new ym(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?St(a,function(e){return!!e}):uO(`name`,i,a):uO(`id`,r,a):(o=[],W(il(n),function(e){a[e]&&o.push(a[e])})),dO(o,e)},t.prototype.findComponents=function(e){var t=e.query,n=e.mainType,r=i(t);return a(dO(r?this.queryComponents(r):St(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?St(t,e.filter):t}},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(Ot(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=q(e)?r.get(e):J(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=vl(e,null);return St(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 St(this._componentsMap.get(`series`),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return St(this._componentsMap.get(`series`),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get(`series`)},t.prototype.eachSeries=function(e,t){rO(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){rO(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 rO(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){rO(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=Yt(n)},t.prototype.restoreData=function(e){nO(this);var t=this._componentsMap,n=[];t.each(function(e,t){pv.hasClass(t)&&n.push(t)}),pv.topologicalTravel(n,pv.getAllClassMainTypes(),function(n){W(t.get(n),function(t){t&&(n!==`series`||!cO(t,e))&&t.restoreData()})})},t.internalField=function(){nO=function(e){var t=e._seriesIndices=[];W(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=Yt(t)},rO=function(e){},iO=function(e,t){e.option={},e.option[aO]=oO,e._componentsMap=Yt({series:[]}),e._componentsCount=Yt();var n=t.aria;J(n)&&n.enabled==null&&(n.enabled=!0),lO(t,e._theme.option),H(t,$D,!1),e._mergeOption(t,null)}}(),t}(ym);function cO(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 lO(e,t){var n=e.color&&!e.colorLayer;W(t,function(t,r){r===`colorLayer`&&n||r===`color`&&e.color||pv.hasClass(r)||(typeof t==`object`?e[r]=e[r]?H(e[r],t,!1):mt(t):e[r]??(e[r]=t))})}function uO(e,t,n){if(K(t)){var r=Yt();return W(t,function(e){e!=null&&vl(e,null)!=null&&r.set(e,!0)}),St(n,function(t){return t&&r.get(t[e])})}var i=vl(t,null);return St(n,function(t){return t&&i!=null&&t[e]===i})}function dO(e,t){return t.hasOwnProperty(`subType`)?St(e,function(e){return e&&e.subType===t.subType}):e}function fO(e){var t=Yt();return e&&W(il(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}yt(sO,_v);var pO=/^(min|max)?(.+)$/,mO=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(W(il(e.series),function(e){e&&e.data&&Mt(e.data)&&Ut(e.data)}),W(il(e.dataset),function(e){e&&e.source&&Mt(e.source)&&Ut(e.source)})),e=mt(e);var r=this._optionBackup,i=hO(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=[],mt(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=mt(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++)gO(r[s].query,t,n)&&a.push(s);return!a.length&&i&&(a=[-1]),a.length&&!vO(a,this._currentMediaIndices)&&(o=G(a,function(e){return mt(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o},e}();function hO(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 gO(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return W(e,function(e,t){var n=t.match(pO);if(!(!n||!n[1]||!n[2])){var a=n[1];_O(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}function _O(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function vO(e,t){return e.join(`,`)===t.join(`,`)}var yO=W,bO=J,xO=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function SO(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=xO.length;n<r;n++){var i=xO[n],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?H(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?H(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function CO(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,gt(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 wO(e){CO(e,`itemStyle`),CO(e,`lineStyle`),CO(e,`areaStyle`),CO(e,`label`),CO(e,`labelLine`),CO(e,`upperLabel`),CO(e,`edgeLabel`)}function TO(e,t){var n=bO(e)&&e[t],r=bO(n)&&n.textStyle;if(r)for(var i=0,a=ol.length;i<a;i++){var o=ol[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}function EO(e){e&&(wO(e),TO(e,`label`),e.emphasis&&TO(e.emphasis,`label`))}function DO(e){if(bO(e)){SO(e),wO(e),TO(e,`label`),TO(e,`upperLabel`),TO(e,`edgeLabel`),e.emphasis&&(TO(e.emphasis,`label`),TO(e.emphasis,`upperLabel`),TO(e.emphasis,`edgeLabel`));var t=e.markPoint;t&&(SO(t),EO(t));var n=e.markLine;n&&(SO(n),EO(n));var r=e.markArea;r&&EO(r);var i=e.data;if(e.type===`graph`){i||=e.nodes;var a=e.links||e.edges;if(a&&!Mt(a))for(var o=0;o<a.length;o++)EO(a[o]);W(e.categories,function(e){wO(e)})}if(i&&!Mt(i))for(var o=0;o<i.length;o++)EO(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)EO(s[o]);if(n=e.markLine,n&&n.data)for(var c=n.data,o=0;o<c.length;o++)K(c[o])?(EO(c[o][0]),EO(c[o][1])):EO(c[o]);e.type===`gauge`?(TO(e,`axisLabel`),TO(e,`title`),TO(e,`detail`)):e.type===`treemap`?(CO(e.breadcrumb,`itemStyle`),W(e.levels,function(e){wO(e)})):e.type===`tree`&&wO(e.leaves)}}function OO(e){return K(e)?e:e?[e]:[]}function kO(e){return(K(e)?e[0]:e)||{}}function AO(e,t){yO(OO(e.series),function(e){bO(e)&&DO(e)});var n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),yO(n,function(t){yO(OO(e[t]),function(e){e&&(TO(e,`axisLabel`),TO(e.axisPointer,`label`))})}),yO(OO(e.parallel),function(e){var t=e&&e.parallelAxisDefault;TO(t,`axisLabel`),TO(t&&t.axisPointer,`label`)}),yO(OO(e.calendar),function(e){CO(e,`itemStyle`),TO(e,`dayLabel`),TO(e,`monthLabel`),TO(e,`yearLabel`)}),yO(OO(e.radar),function(e){TO(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)}),yO(OO(e.geo),function(e){bO(e)&&(EO(e),yO(OO(e.regions),function(e){EO(e)}))}),yO(OO(e.timeline),function(e){EO(e),CO(e,`label`),CO(e,`itemStyle`),CO(e,`controlStyle`,!0);var t=e.data;K(t)&&W(t,function(e){J(e)&&(CO(e,`label`),CO(e,`itemStyle`))})}),yO(OO(e.toolbox),function(e){CO(e,`iconStyle`),yO(e.feature,function(e){CO(e,`iconStyle`)})}),TO(kO(e.axisPointer),`label`),TO(kO(e.tooltip).axisPointer,`label`)}function jO(e,t){for(var n=t.split(`,`),r=e,i=0;i<n.length&&(r&&=r[n[i]],r!=null);i++);return r}function MO(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 NO(e){e&&W(PO,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var PO=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],FO=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],IO=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]];function LO(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<IO.length;n++){var r=IO[n][1],i=IO[n][0];t[r]!=null&&(t[i]=t[r])}}function RO(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function zO(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function BO(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus??(e.emphasis.focus=`adjacency`))}function VO(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&VO(e[n].children,t)}function HO(e,t){AO(e,t),e.series=il(e.series),W(e.series,function(e){if(J(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),RO(e.label);var n=e.data;if(n&&!Mt(n))for(var r=0;r<n.length;r++)RO(n[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){var i=jO(e,`pointer.color`);i!=null&&MO(e,`itemStyle.color`,i)}else if(t===`bar`){LO(e),LO(e.backgroundStyle),LO(e.emphasis);var n=e.data;if(n&&!Mt(n))for(var r=0;r<n.length;r++)typeof n[r]==`object`&&(LO(n[r]),LO(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)),zO(e),VO(e.data,zO)}else t===`graph`||t===`sankey`?BO(e):t===`map`&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&>(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),NO(e)}}),e.dataRange&&(e.visualMap=e.dataRange),W(FO,function(t){var n=e[t];n&&(K(n)||(n=[n]),W(n,function(e){NO(e)}))})}var UO=Ql(WO);function WO(e){var t=Yt();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)}),GO(e))})}function GO(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=Pc(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var KO=function(){function e(){this.group=new Vd,this.uid=Cg(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();dn(KO),vn(KO);var qO=wl(),JO={itemStyle:yn(gm,!0),lineStyle:yn(pm,!0)},YO={lineStyle:`stroke`,itemStyle:`fill`};function XO(e,t){return e.visualStyleMapper||JO[t]||(console.warn(`Unknown style type '`+t+`'.`),JO.itemStyle)}function ZO(e,t){return e.visualDrawType||YO[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var QO={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=XO(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=ZO(e,r),c=a[s],l=Ot(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`||Ot(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||Ot(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=U({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},$O=new ym,ek={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=XO(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){$O.option=n[r];var o=i($O);U(e.ensureUniqueItemVisual(t,`style`),o),$O.option.decal&&(e.setItemVisual(t,`decal`,$O.option.decal),$O.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},tk={performRawSeries:!0,overallReset:function(e){var t=Yt();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();qO(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=qO(e).scope,a=ZO(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)}})}})}},nk=Math.PI;function rk(e,t){t||={},gt(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 Vd,r=new Ws({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 Ws({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 Ef({shape:{startAngle:-nk/2,endAngle:-nk/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:nk*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:nk*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 ik=function(){function e(e,t,n,r){this._stageTaskMap=Yt(),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):Xl(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=Yt();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,{});Bt(!(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=Yt(),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)||Tv({plan:lk,reset:uk,count:pk}));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||Tv({reset:ak});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=Yt(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;Bt(!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,Tv({reset:ok,onDirty:ck})));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 Ot(e)&&(e={overallReset:e,seriesType:mk(e)}),e.uid=Cg(`stageHandler`),t&&(e.visualType=t),e},e}();function ak(e){e.overallReset(e.ecModel,e.api,e.payload)}function ok(e){return e.dirtyOnOverallProgress&&sk}function sk(){this.agent.dirty(),this.getDownstream().dirty()}function ck(){this.agent&&this.agent.dirty()}function lk(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function uk(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=il(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?G(t,function(e,t){return fk(t)}):dk}var dk=fk(0);function fk(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 pk(e){return e.data.count()}function mk(e){_k=null;try{e(hk,gk)}catch{}return _k}var hk={},gk={},_k;vk(hk,sO),vk(gk,uu),hk.eachSeriesByType=hk.eachRawSeriesByType=function(e){_k=e},hk.eachComponent=function(e){e.mainType===`series`&&e.subType&&(_k=e.subType)};function vk(e,t){for(var n in t.prototype)e[n]=$t}var $=Q.darkColor,yk=$.background,bk=function(){return{axisLine:{lineStyle:{color:$.axisLine}},splitLine:{lineStyle:{color:$.axisSplitLine}},splitArea:{areaStyle:{color:[$.backgroundTint,$.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:$.axisMinorSplitLine}},axisLabel:{color:$.axisLabel},axisName:{}}},xk={label:{color:$.secondary},itemStyle:{borderColor:$.borderTint},dividerLineStyle:{color:$.border}},Sk={darkMode:!0,color:$.theme,backgroundColor:yk,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:yk,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:xk,y:xk,backgroundColor:{borderColor:$.axisLine},body:{itemStyle:{borderColor:$.borderTint}}},timeAxis:bk(),logAxis:bk(),valueAxis:bk(),categoryAxis:bk(),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=bk();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}}}};Sk.categoryAxis.splitLine.show=!1;var Ck=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(q(e)){var i=cn(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}(),wk=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],Tk=wk.concat([`symbolKeepAspect`]),Ek={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<wk.length;o++){var s=wk[o],c=e.get(s);Ot(c)?(a=!0,i[s]=c):r[s]=c}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(U({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get(`symbolKeepAspect`)},r)),t.isSeriesFiltered(e))return;var l=wt(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}}},Dk={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<Tk.length;r++){var i=Tk[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?r:null}}};function Ok(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 kk(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 Ak(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var jk=new qa,Mk={};function Nk(e,t){Mk[e]=t}function Pk(e){return Mk[e]}var Fk={};function Ik(e,t){Fk[e]=t}function Lk(e){return Fk[e]}var Rk=Math.round(Math.random()*9),zk=typeof Object.defineProperty==`function`,Bk=function(){function e(){this._id=`__ec_inner_`+Rk++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return zk?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 Vk(e){return isFinite(e)}function Hk(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=Vk(r)?r:0,i=Vk(i)?i:1,a=Vk(a)?a:0,o=Vk(o)?o:0,e.createLinearGradient(r,a,i,o)}function Uk(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=Vk(o)?o:.5,s=Vk(s)?s:.5,c=c>=0&&Vk(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function Wk(e,t,n){for(var r=t.type===`radial`?Uk(e,t,n):Hk(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function Gk(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 Kk(e){return parseInt(e,10)}function qk(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]||Kk(s[r])||Kk(e.style[r]))-(Kk(s[a])||0)-(Kk(s[o])||0)||0}function Jk(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:At(e)?[e]:K(e)?e:null}function Yk(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&Jk(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 Xk=new as(!0);function Zk(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function Qk(e){return typeof e==`string`&&e!==`none`}function $k(e){var t=e.fill;return t!=null&&t!==`none`}function eA(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 tA(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 nA(e,t,n){var r=Dn(t.image,t.__image,n);if(kn(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)*en),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function rA(e,t,n,r,i){var a,o=Zk(n),s=$k(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||Xk,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?Wk(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?Wk(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?nA(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?nA(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=Yk(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&&tA(e,n),s&&eA(e,n)):(s&&eA(e,n),o&&tA(e,n)),T&&e.setLineDash([])}function iA(e,t,n){var r=t.__image=Dn(n.image,t.__image,t,t.onload);if(!(!r||!kn(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 aA(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=Yk(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(Zk(n)&&e.strokeText(i,n.x,n.y),$k(n)&&e.fillText(i,n.x,n.y)):($k(n)&&e.fillText(i,n.x,n.y),Zk(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var oA=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],sA=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function cA(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){yA(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?yo.opacity:o}(r||t.blend!==n.blend)&&(a||=(yA(e,i),!0),e.globalCompositeOperation=t.blend||yo.blend);for(var s=0;s<oA.length;s++){var c=oA[s];(r||t[c]!==n[c])&&(a||=(yA(e,i),!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||=(yA(e,i),!0),e.shadowColor=t.shadowColor||yo.shadowColor),a}function lA(e,t,n,r,i){var a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;var s=cA(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||=(yA(e,i),!0),Qk(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||=(yA(e,i),!0),Qk(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||=(yA(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||=(yA(e,i),!0),e.lineWidth=c)}for(var l=0;l<sA.length;l++){var u=sA[l],d=u[0];(r||a[d]!==o[d])&&(s||=(yA(e,i),!0),e[d]=a[d]||u[1])}return s}function uA(e,t,n,r,i){return cA(e,t.style,n&&n.style,r,i)}function dA(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 fA(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r||=a.isZeroArea(),dA(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function pA(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 mA=1,hA=2,gA=3,_A=4;function vA(e){var t=$k(e),n=Zk(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 yA(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function bA(e,t){var n={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};xA(e,t,n),SA(e,n)}function xA(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||Gk(i,a))&&(a&&(yA(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(yA(e,n),e.save(),fA(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 As&&t.autoBatch&&vA(o);s||pA(r,l.transform)?(yA(e,n),dA(e,t)):u||yA(e,n),t instanceof As?(n.lastDrawType!==mA&&(c=!0,n.lastDrawType=mA),lA(e,t,l,c,n),(!u||!n.batchFill&&!n.batchStroke)&&e.beginPath(),rA(e,t,o,u,n)):t instanceof Ms?(n.lastDrawType!==gA&&(c=!0,n.lastDrawType=gA),lA(e,t,l,c,n),aA(e,t,o)):t instanceof Is?(n.lastDrawType!==hA&&(c=!0,n.lastDrawType=hA),uA(e,t,l,c,n),iA(e,t,o)):t.getTemporalDisplayables&&(n.lastDrawType!==_A&&(c=!0,n.lastDrawType=_A),CA(e,t,n)),t.innerAfterBrush(),t.afterBrush&&(u&&yA(e,n),t.afterBrush()),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}function SA(e,t){yA(e,t),t.prevElClipPaths&&e.restore()}function CA(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(),xA(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}SA(e,a);for(var l=0,u=i.length;l<u;l++){var c=i[l];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),xA(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}SA(e,a),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var wA=new Bk,TA=new wn(100),EA=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`];function DA(e,t){if(e===`none`)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&wA.delete(e);var a=wA.get(e);if(a)return a;var o=gt(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,wA.set(e,s),e.dirty=!1,s;function c(e){for(var t=[n],a=!0,s=0;s<EA.length;++s){var c=o[EA[s]];if(c!=null&&!K(c)&&!q(c)&&!At(c)&&typeof c!=`boolean`){a=!1;break}t.push(c)}var l;if(a){l=t.join(`,`)+(i?`-svg`:``);var u=TA.get(l);u&&(i?e.svgElement=u:e.image=u)}var d=kA(o.dashArrayX),f=AA(o.dashArrayY),p=OA(o.symbol),m=jA(d),h=MA(f),g=!i&&Qe.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&&TA.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=qc(e,m[t]);for(var r=1,t=0,n=p.length;t<n;++t)r=qc(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=jy(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 bA(y,u)}}}}function OA(e){if(!e||e.length===0)return[[`rect`]];if(q(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!q(e[n])){t=!1;break}if(t)return OA([e]);for(var r=[],n=0;n<e.length;++n)q(e[n])?r.push([e[n]]):r.push(e[n]);return r}function kA(e){if(!e||e.length===0)return[[0,0]];if(At(e)){var t=Math.ceil(e);return[[t,t]]}for(var n=!0,r=0;r<e.length;++r)if(!At(e[r])){n=!1;break}if(n)return kA([e]);for(var i=[],r=0;r<e.length;++r)if(At(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 AA(e){if(!e||typeof e==`object`&&e.length===0)return[0,0];if(At(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 jA(e){return G(e,function(e){return MA(e)})}function MA(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}var NA=Ql(PA);function PA(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=DA(n,t)}});var i=r.getVisual(`decal`);if(i){var a=r.getVisual(`style`);a.decal=DA(i,t)}}})}var FA=1,IA=800,LA=900,RA=920,zA=1e3,BA=2e3,VA=5e3,HA=1e3,UA=1100,WA=2e3,GA=3e3,KA=4e3,qA=4500,JA=4600,YA=5e3,XA=6e3,ZA=7e3,QA={PROCESSOR:{SERIES_FILTER:IA,AXIS_STATISTICS:RA,FILTER:zA,STATISTIC:VA,STATISTICS:VA},VISUAL:{LAYOUT:HA,PROGRESSIVE_LAYOUT:UA,GLOBAL:WA,CHART:GA,POST_CHART_LAYOUT:JA,COMPONENT:KA,BRUSH:YA,CHART_ITEM:qA,ARIA:XA,DECAL:ZA}},$A=`__flagInMainProcess`,ej=`__mainProcessVersion`,tj=`__pendingUpdate`,nj=`__needsUpdateStatus`,rj=/^[a-zA-Z0-9_]+$/,ij=`__connectUpdateStatus`,aj=0,oj=1,sj=2;function cj(e){return function(){var t=[...arguments];if(this.isDisposed()){this.id;return}return uj(this,e,t)}}function lj(e){return function(){var t=[...arguments];return uj(this,e,t)}}function uj(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),qa.prototype[t].apply(e,n)}var dj=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(qa),fj=dj.prototype;fj.on=lj(`on`),fj.off=lj(`off`);var pj,mj,hj,gj,_j,vj,yj,bj,xj,Sj,Cj,wj,Tj,Ej,Dj,Oj,kj,Aj,jj,Mj=function(e){V(t,e);function t(t,n,r){var i=e.call(this,new Ck)||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[ej]=1,r.ssr;var c=i._zr=qD(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=lT(Et(c.flush,c),17),i._updateTheme(n),i._locale=Xg(r.locale||Jg),i._coordSysMgr=new ng;var l=i._api=Dj(i);function u(e,t){return e.__prio-t.__prio}return hD(Bj,u),hD(Rj,u),i._scheduler=new ik(i,l,Rj,Bj),i._messageCenter=new dj,i._initEvents(),i.resize=Et(i.resize,i),c.animation.on(`frame`,i._onframe,i),Sj(c,i),Cj(c,i),Ut(i),i}return t.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,t=this._model,n=this._api;if(Aj(this),this[tj]){var r=this[tj].silent;this[$A]=!0,jj(this);try{pj(this),gj.update.call(this,null,this[tj].updateParams)}catch(e){throw this[$A]=!1,this[tj]=null,e}this._zr.flush(),this[$A]=!1,this[tj]=null,bj.call(this,r),xj.call(this,r)}else if(e.unfinished){var i=FA;do{e.unfinished=!1;var a=Qe.getTime();e.performSeriesTasks(t),e.performDataProcessorTasks(t),vj(this,t),e.performVisualTasks(t),Ej(this,this._model,n,`remain`,{}),i-=Qe.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[$A]){if(this._disposed){this.id;return}var r,i,a;if(J(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[$A]=!0,jj(this),!this._model||t){var o=new mO(this._api),s=this._theme,c=this._model=new sO;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},zj);var l={seriesTransition:a,optionChanged:!0};if(n)this[tj]={silent:r,updateParams:l},this[$A]=!1,this.getZr().wakeUp();else{try{pj(this),gj.update.call(this,null,l)}catch(e){throw this[tj]=null,this[$A]=!1,e}this._ssr||this._zr.flush(),this[tj]=null,this[$A]=!1,bj.call(this,r),xj.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[$A]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[tj]&&(r??=this[tj].silent,i=this[tj].updateParams,this[tj]=null),this[$A]=!0,jj(this);try{this._updateTheme(e),n.setTheme(this._theme),pj(this),gj.update.call(this,{type:`setTheme`},i)}catch(e){throw this[$A]=!1,e}this[$A]=!1,bj.call(this,r),xj.call(this,r)}}},t.prototype._updateTheme=function(e){q(e)&&(e=Vj[e]),e&&(e=mt(e),e&&HO(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||nn.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(Wj[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();W(Uj,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(mt(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=Qe.createCanvas(),h=qD(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 Ws({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),W(u,function(e){var t=new Is({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 _j(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return _j(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return _j(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return W(El(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=El(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?kk(i,t):Ok(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(Pj,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&Ak(i,function(e){var t=$l(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=U({},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(Lj,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),qT(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()&&jl(this.getDom(),Kj,``);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 Uj[e.id]},t.prototype.resize=function(e){if(!this[$A]){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[tj]&&(r??=this[tj].silent,n=!0,this[tj]=null),this[$A]=!0,jj(this);try{n&&pj(this),gj.update.call(this,{type:`resize`,animation:U({duration:0},e&&e.animation)})}catch(e){throw this[$A]=!1,e}this[$A]=!1,bj.call(this,r),xj.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(J(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),Hj[e]){var n=Hj[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=U({},e);return t.type=Ij[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(J(t)||(t={silent:!!t}),Fj[e.type]&&this._model){if(this[$A]){this._pendingActions.push(e);return}var n=t.silent;yj.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&nn.browser.weChat&&this._throttledZrFlush(),bj.call(this,n),xj.call(this,n)}},t.prototype.updateLabelLayout=function(){jk.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(){pj=function(e){PS(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),mj(e,!0),mj(e,!1),t.plan()},mj=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=cn(e.type);u=new(t?KO.getClass(d.main,d.sub):ub.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)}},hj=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=Al(n,r,i),s=n.excludeSeriesId,c;s!=null&&(c=Yt(),W(il(s),function(e){var t=vl(e,null);t!=null&&c.set(t,!0)})),a&&a.eachComponent(o,function(t){if(!(c&&c.get(t.id)!=null)){if(_d(n)){if(t instanceof gy)n.type===`highlight`&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&$u(t,n,e._api);else{var r=ed(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===`highlight`&&i&&!n.notBlur&&Qu(t.mainType,t.componentIndex,e._api),a&&W(a,function(e){n.type===`highlight`?Uu(e):Wu(e)})}}else gd(n)&&t instanceof gy&&(rd(t,n,e._api),id(t),kj(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)}},gj={prepareAndUpdate:function(e){pj(this),gj.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){FS(r),r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),o.create(r,i),jk.trigger(`coordsys:aftercreate`,r,i),s.performDataProcessorTasks(r,e),vj(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),wj(this,r,i,e,n),jk.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=Yt();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}),Ej(t,n,r,e,{},a),jk.trigger(`afterupdate`,n,r)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),ub.markUpdateMethod(e,`updateView`),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),wj(this,n,this._api,e,{}),jk.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()}),ub.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)}),jk.trigger(`afterupdate`,r,this._api))},updateLayout:function(e){gj.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=El(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}}_j=e,vj=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},yj=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=Fj[i],s=(o.update||`update`).split(`:`),c=s.pop(),l=s[0]!=null&&cn(s[0]);this[$A]=!0,jj(this);var u=[e],d=!1;e.batch&&(d=!0,u=G(e.batch,function(t){return t=gt(U({},t),e),t.batch=null,t}));var f=[],p,m=[],h=o.nonRefinedEventType,g=gd(e),_=_d(e);if(_&&Xu(this._api),W(u,function(t){var i=o.action(t,r,n._api);if(o.refineEvent?m.push(i):p=i,p||=U({},t),p.type=h,f.push(p),_){var a=Dl(e),s=a.queryOptionMap,u=a.mainTypeSpecified?s.keys()[0]:`series`;hj(n,c,t,u),kj(n)}else g?(hj(n,c,t,`series`),kj(n)):l&&hj(n,c,t,l.main,l.sub)}),c!==`none`&&!_&&!g&&!l)try{this[tj]?(pj(this),gj.update.call(this,e),this[tj]=null):gj[c].call(this,e)}catch(e){throw this[$A]=!1,e}if(p=d?{type:h,escapeConnect:a,batch:f}:f[0],this[$A]=!1,!t){var v=void 0;if(o.refineEvent){var y=o.refineEvent(m,e,r,this._api).eventContent;Bt(J(y)),v=gt({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)}},bj=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();yj.call(this,n,e)}},xj=function(e){!e&&this.trigger(`updated`)},Sj=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[tj]&&!t._scheduler.unfinished&&!t._pendingActions.length?t.trigger(`finished`):e.refresh()})},Cj=function(e,t){e.on(`mouseover`,function(e){var n=e.target,r=Ak(n,md);r&&(td(r,e,t._api),kj(t))}).on(`mouseout`,function(e){var n=e.target,r=Ak(n,md);r&&(nd(r,e,t._api),kj(t))}).on(`click`,function(e){var n=e.target,r=Ak(n,function(e){return $l(e).dataIndex!=null},!0);if(r){var i=r.selected?`unselect`:`select`,a=$l(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;hD(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)})}}wj=function(e,t,r,i,a){n(t),Tj(e,t,r,i,a),W(e._chartsViews,function(e){e.__alive=!1}),Ej(e,t,r,i,a),W(e._chartsViews,function(e){e.__alive||e.remove(t,r)})},Tj=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)})},Ej=function(e,t,n,r,l,u){var d=e._scheduler;l=U(l||{},{updatedSeries:t.getSeries()}),jk.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),id(t)}),d.unfinished=f||d.unfinished,jk.trigger(`series:layoutlabels`,t,n,l),jk.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),jk.trigger(`series:afterupdate`,t,n,l)},kj=function(e){e[nj]=!0,e.getZr().wakeUp()},jj=function(e){e[ej]=(e[ej]+1)%1e6},Aj=function(e){e[nj]&&(e.getZr().storage.traverse(function(e){qf(e)||r(e)}),e[nj]=!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`),$D.hoverLayerThreshold)&&!nn.node&&!nn.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=Rp(e);t.eachRendered(function(e){return Bp(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!qf(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(qf(e))return;if(e instanceof As&&vd(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)}})}Dj=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){Uu(t,n),kj(e)},n.prototype.leaveEmphasis=function(t,n){Wu(t,n),kj(e)},n.prototype.enterBlur=function(t){Gu(t),kj(e)},n.prototype.leaveBlur=function(t){Ku(t),kj(e)},n.prototype.enterSelect=function(t){qu(t),kj(e)},n.prototype.leaveSelect=function(t){Ju(t),kj(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[ej]},n.prototype.usingTHL=function(){return e._usingTHL},n}(uu))(e)},Oj=function(e){function t(e,t){for(var n=0;n<e.length;n++){var r=e[n];r[ij]=t}}W(Ij,function(n,r){e._messageCenter.on(r,function(n){if(Wj[e.group]&&e[ij]!==aj){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];W(Uj,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,aj),W(i,function(e){e[ij]!==oj&&e.dispatchAction(r)}),t(i,sj)}})})}}(),t}(qa),Nj=Mj.prototype;Nj.on=cj(`on`),Nj.off=cj(`off`),Nj.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 Pj=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`],Fj={},Ij={},Lj={},Rj=[],zj=[],Bj=[],Vj={},Hj={},Uj={},Wj={},Gj=new Date-0;new Date-0;var Kj=`_echarts_instance_`;function qj(e,t,n){var r=!(n&&n.ssr);if(r){var i=Jj(e);if(i)return i}var a=new Mj(e,t,n);return a.id=`ec_`+Gj++,Uj[a.id]=a,r&&jl(e,Kj,a.id),Oj(a),jk.trigger(`afterinit`,a),a}function Jj(e){return Uj[Ml(e,Kj)]}function Yj(e,t){Vj[e]=t}function Xj(e){_t(zj,e)<0&&zj.push(e)}function Zj(e,t){oM(Rj,e,t,BA)}function Qj(e){eM(`afterinit`,e)}function $j(e){eM(`afterupdate`,e)}function eM(e,t){jk.on(e,t)}function tM(e,t,n){var r,i,a,o,s;Ot(t)&&(n=t,t=``),J(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;Fj[r]||(Bt(rj.test(r)&&rj.test(i)),a&&Bt(i!==r),Fj[r]={actionType:r,refinedEventType:i,nonRefinedEventType:l,update:o,action:n,refineEvent:a},Lj[i]=1,a&&s&&(Lj[l]=1),Ij[l]=r)}function nM(e,t){ng.register(e,t)}function rM(e,t){oM(Bj,e,t,HA,`layout`,!0)}function iM(e,t){oM(Bj,e,t,GA,`visual`,!0)}var aM=[];function oM(e,t,n,r,i,a){if((Ot(t)||J(t))&&(n=t,t=r),!(_t(aM,n)>=0)){aM.push(n);var o=ik.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function sM(e,t){Hj[e]=t}function cM(e,t,n){var r=Pk(`registerMap`);r&&r(e,t,n)}var lM=Fv;iM(WA,QO),iM(qA,ek),iM(qA,tk),iM(WA,Ek),iM(qA,Dk),iM(ZA,NA),Xj(HO),Zj(LA,UO),sM(`default`,rk),tM({type:vu,event:vu,update:vu},$t),tM({type:yu,event:yu,update:yu},$t),tM({type:bu,event:Cu,update:bu,action:$t,refineEvent:uM,publishNonRefinedEvent:!0}),tM({type:xu,event:Cu,update:xu,action:$t,refineEvent:uM,publishNonRefinedEvent:!0}),tM({type:Su,event:Cu,update:Su,action:$t,refineEvent:uM,publishNonRefinedEvent:!0});function uM(e,t,n,r){return{eventContent:{selected:ad(n),isFromClick:t.isFromClick||!1}}}Yj(`default`,{}),Yj(`dark`,Sk);var dM=[],fM={registerPreprocessor:Xj,registerProcessor:Zj,registerPostInit:Qj,registerPostUpdate:$j,registerUpdateLifecycle:eM,registerAction:tM,registerCoordinateSystem:nM,registerLayout:rM,registerVisual:iM,registerTransform:lM,registerLoading:sM,registerMap:cM,registerImpl:Nk,PRIORITY:QA,ComponentModel:pv,ComponentView:KO,SeriesModel:gy,ChartView:ub,registerComponentModel:function(e){pv.registerClass(e)},registerComponentView:function(e){KO.registerClass(e)},registerSeriesModel:function(e){gy.registerClass(e)},registerChartView:function(e){ub.registerClass(e)},registerCustomSeries:function(e,t){Ik(e,t)},registerSubTypeDefaulter:function(e,t){pv.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){JD(e,t)}};function pM(e){if(K(e)){W(e,function(e){pM(e)});return}_t(dM,e)>=0||(dM.push(e),Ot(e)&&(e={install:e}),e.install(fM))}var mM=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,t){return yg(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?5e3:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?1e4:this.get(`progressiveThreshold`))},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:``},t.type=`series.scatter`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:Q.color.primary}},universalTransition:{divideShape:`clone`}},t}(gy),hM=4,gM=function(){function e(){}return e}(),_M=function(e){V(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new gM},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.buildPath=function(e,t){var n=t.points,r=t.size,i=this.symbolProxy,a=i.shape,o=e.getContext?e.getContext():e,s=o&&r[0]<hM,c=this.softClipShape,l;if(s){this._ctx=o;return}for(this._ctx=null,l=this._off;l<n.length;){var u=n[l++],d=n[l++];isNaN(u)||isNaN(d)||c&&!c.contain(u,d)||(a.x=u-r[0]/2,a.y=d-r[1]/2,a.width=r[0],a.height=r[1],i.buildPath(e,a,!0))}this.incremental&&(this._off=l,this.notClear=!0)},t.prototype.afterBrush=function(){var e=this.shape,t=e.points,n=e.size,r=this._ctx,i=this.softClipShape,a;if(r){for(a=this._off;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||isNaN(s)||i&&!i.contain(o,s)||r.fillRect(o-n[0]/2,s-n[1]/2,n[0],n[1])}this.incremental&&(this._off=a,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var n=this.shape,r=n.points,i=n.size,a=Math.max(i[0],4),o=Math.max(i[1],4),s=r.length/2-1;s>=0;s--){var c=s*2,l=r[c]-a/2,u=r[c+1]-o/2;if(e>=l&&t>=u&&e<=l+a&&t<=u+o)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],a=r[1],o=1/0,s=1/0,c=-1/0,l=-1/0,u=0;u<n.length;){var d=n[u++],f=n[u++];o=Math.min(d,o),c=Math.max(d,c),s=Math.min(f,s),l=Math.max(f,l)}e=this._rect=new gr(o-i/2,s-a/2,c-o+i,l-s+a)}return e},t}(As),vM=function(){function e(){this.group=new Vd}return e.prototype.updateData=function(e,t){this._clear(),this._data=e;var n=this._create();n.setShape({points:e.getLayout(`points`)}),this._setCommon(n,e,t)},e.prototype.updateLayout=function(e){var t=this._data;if(t){var n=t.getLayout(`points`);this.group.eachChild(function(e){if(e.startIndex!=null){var t=(e.endIndex-e.startIndex)*2,r=e.startIndex*4*2;n=new Float32Array(n.buffer,r,t)}e.setShape(`points`,n),e.reset(),e.stopAnimation()})}},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n,r){var i=this._newAdded[0],a=t.getLayout(`points`),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,c=new Float32Array(s+a.length);c.set(o),c.set(a,s),i.endIndex=e.end,i.setShape({points:c})}else{this._newAdded=[];var l=this._create();l.startIndex=e.start,l.endIndex=e.end,l.incremental=n,l.setShape({points:a}),this._setCommon(l,t,r)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new _M({cursor:`default`});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;n||={};var i=t.getVisual(`symbolSize`);e.setShape(`size`,i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=jy(t.getVisual(`symbol`),0,0,0,0),e.setColor=e.symbolProxy.setColor;var a=e.shape.size[0]<hM;e.useStyle(r.getModel(`itemStyle`).getItemStyle(a?[`color`,`shadowBlur`,`shadowColor`]:[`color`]));var o=t.getVisual(`style`),s=o&&o.fill;s&&e.setColor(s);var c=$l(e);c.seriesIndex=r.seriesIndex,e.on(`mousemove`,function(t){c.dataIndex=null;var n=e.hoverDataIdx;n>=0&&(c.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),yM=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=e.getData();this._updateSymbolDraw(r,e).updateData(r,bM(e)),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),Yl(t),bM(t)),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),this._finished){var i=oS(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(bM(e))}else return{update:!0}},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return(!n||r!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=r?new vM:new Uy,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type=`scatter`,t}(ub);function bM(e){return{clipShape:yb(e)}}var xM=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),SM=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Ol).models[0]},t.type=`cartesian2dAxis`,t}(pv);yt(SM,xM);var CM={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`}},wM=H({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},CM),TM=H({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}}},CM),EM={category:wM,value:TM,time:H({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},TM),log:gt({logBase:10},TM)};function DM(e,t,n,r){W(Cx,function(i,a){var o=H(H({},EM[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=cv(this),r=n?uv(e):{};H(e,t.getTheme().get(a+`Axis`)),H(e,this.getDefaultOption()),e.type=OM(e),n&&lv(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=Ob.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=AC();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,OM)}function OM(e){return e.type||(e.data?`category`:`value`)}var kM=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(),St(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}(),AM=[`x`,`y`];function jM(e){return(e.type===`interval`||e.type===`time`)&&!r_(e)}var MM=function(e){V(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Ww,t.dimensions=AM,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!jM(e)||!jM(t))){var n=Fb(e,null),r=Fb(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 gr(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 $n(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 $n(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 gr(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(kM);function NM(e,t){var n=e.scale,r=e.model,i=jw(n,r,r.ecModel,e,null),a=Wb(n),o=Wb(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=mc(l[0].value-l[1].value),g=mc(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=Xb(S,b),w,T,E,D,O,k;function A(e){for(var t=50,n=0;n<t&&!e();n++)E=a?E*pc(c,2):Kb(E),D=qb(E)}function j(){w=Oc(k-E*f,D)}function M(){T=Oc(O+E*p,D)}function N(){k=f?Oc(w+E*f,D):w}function P(){O=p?Oc(T-E*p,D):T}if(b[0]&&b[1]){w=C[0],T=C[1],E=(T-w)/(m+f+p);var F=e.getExtent(),ee=mc(F[1]-F[0]);D=Mc([T,w],ee,.5/m),N(),P(),Jc(D)&&(E=Oc(E,D))}else{var I=C[1]-C[0];E=a?pc(Bc(I),1):Hc(I/m,2),D=qb(E),b[0]?(w=C[0],A(function(){if(N(),O=Oc(k+E*m,D),M(),T>=C[1])return!0})):b[1]?(T=C[1],A(function(){if(P(),k=Oc(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=Oc(_c(C[0]/E)*E,D),O=Oc(gc(C[1]/E)*E,D);var e=hc((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=gc(t/2);n=t%2==0?[o,o]:w+T<C[0]+C[1]?[o,o+1]:[o+1,o]}if(k=Oc(k-E*n[0],D),O=Oc(O+E*n[1],D),j(),M(),w<=C[0]&&T>=C[1])return!0}})}Bx(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function PM(e,t){var n=Wb(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=Xb(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?IM(r,t):FM(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=qb(d)),i[0]||(s[0]=Oc(gc(s[0]/u)*u,l)),i[1]||(s[1]=Oc(_c(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),Bx(e,i,o,s,a,c)}function FM(e,t){var n=Qb(t.splitNumber,5),r=Lb(e),i=t.minInterval,a=t.maxInterval,o=Hc(r/n,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);var s=qb(o),c=e.getExtent(),l=[Oc(_c(c[0]/o)*o,s),Oc(gc(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function IM(e,t){var n=Qb(t.splitNumber,10),r=e.getExtent(),i=Lb(e),a=pc(Bc(i),1);n/i*a<=.5&&(a*=10);var o=qb(a),s=[Oc(_c(r[0]/a)*a,o),Oc(gc(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function LM(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;RM(t,n,r,i,null)}function RM(e,t,n,r,i){var a=jw(e,t,r,n,i),o=Hb(e)||Ub(e);zM(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&&Nw(n,e,a,r)}function zM(e,t){BM[e.type](e,t)}var BM={interval:PM,log:PM,time:hx,ordinal:$t},VM=[[3,1],[0,2]],HM=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=AM,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){Tw(e,1);var t=e.scale;Gb(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=wt(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):LM(i)}W(n,function(e){qM(e,e.__alignTo)?LM(e):NM(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};W(n.x,function(e){WM(n,`y`,e,i)}),W(n.y,function(e){WM(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=ov(e,t),i=this._rect=iv(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(YM(a,i),!n){var c=$M(i,o,a,s,t),l=void 0;if(s)ZM?(ZM(this._axesList,i),YM(a,i)):l=QM(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=tN(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=QM(d,f,p,i,a,c,r))}eN(i,a,pS.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]}J(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`,Ol).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,Ol).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,_t(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 MM(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})}),KM(o.x),KM(o.y);function c(t){return function(n,r){if(UM(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=Ex(n),u=new fC(t,Dx(n,l,!0),[0,0],l,c);u.onBand=Hx(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);_t(t,i)<0&&t.push(i),_t(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){ww(t,e.dimIdxMap)})}),t.eachSeries(function(e){var t,n;cg({targetModel:e,coordSysType:Ww,coordSysProvider:r});function r(){var r=pw(e),i=r.xAxisModel,a=r.yAxisModel;return t=i.axis,n=a.axis,i.getCoordSysModel().coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}t&&n&&(eC(t,e,Ww),eC(n,e,Ww))},this),r},e.dimensions=AM,e.dimIdxMap=Nh(AM),e}();function UM(e,t){return e.getCoordSysModel()===t}function WM(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)GM(s,i[c])&&(a=i[c]);else for(var l in i)if(Z(i,l)&&GM(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 GM(e,t){if(!t)return!1;var n=t.scale,r=Ox(n,0,!1),i=t&&t.type!==`category`&&t.type!==`time`&&r!==3;return i&&e===`auto`&&Ax(t)&&(i=!1),i}function KM(e){for(var t=wt(e),n,r=[],i=t.length-1;i>=0;i--){var a=e[+t[i]];Vb(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 qM(e,t){return r_(e.scale)||r_(t.scale)||t.scale.getTicks().length<2}function JM(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 YM(e,t){W(e.x,function(e){return XM(e,t.x,t.width)}),W(e.y,function(e){return XM(e,t.y,t.height)})}function XM(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),JM(e,t)}var ZM;function QM(e,t,n,r,i,a,o){eN(r,i,pS.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=Ct(s,function(e){return e>0})==null;return Op(r,s,!0,!0,n),YM(i,r),c;function l(e){W(i[ep[e]],function(t){if(Lx(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(Vx(t.scale,FC(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=Ix(n.nameLocation)?.5:NaN;u(c.rect,e,s),u(c.rect,1-e,NaN)}}})}function u(t,n,r){var i=e[ep[n]]-t[ep[n]],a=t[tp[n]]+t[ep[n]]-(e[tp[n]]+e[ep[n]]);i=d(i,1-r),a=d(a,r);var o=VM[n][0],c=VM[n][1];s[o]=pc(s[o],i),s[c]=pc(s[c],a)}function d(e,t){return e>0&&!It(t)&&t>1e-4&&(e/=t),e}}function $M(e,t,n,r,i){var a=new LC(nN);return W(n,function(n){return W(n,function(n){if(Lx(n.model)){var o=!r;n.axisBuilder=mw(e,t,n.model,i,a,o)}})}),a}function eN(e,t,n,r,i,a){var o=n===pS.determine;W(t,function(t){return W(t,function(t){Lx(t.model)&&(hw(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[ep[1-t]]=e[tp[t]]<=a.refContainer[tp[t]]*.5?0:1-t==1?2:1}W(t,function(e,t){return W(e,function(e){Lx(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function tN(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=iv(e.get(`outerBounds`,!0)||Hw,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||_t([`all`,`axisLabel`],a)<0?`all`:a,s=[Ec(X(e.get(`outerBoundsClampWidth`,!0),Uw[0]),t.width),Ec(X(e.get(`outerBoundsClampHeight`,!0),Uw[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var nN=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;VC(e,t,n,r,i,a),Ix(e.nameLocation)||W(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&UC(e.labelInfoList,e.dirVec,r,i)})};function rN(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return iN(n,e,t),n.seriesInvolved&&oN(n,e),n}function iN(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=pN(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(W(n.getAxes(),Dt(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,Dt(p,!d||`cross`,u)),d&&W(f.otherAxes,Dt(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!fN(d))){s??=d.get(`triggerTooltip`),d=r?aN(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=pN(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:fN(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=sN(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function aN(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]=mt(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&>(l,u.textStyle)}return e.model.getModel(`axisPointer`,new ym(c,n,r))}function oN(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[pN(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 sN(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(cN(a[r+`AxisId`],n.id)||cN(a[r+`AxisIndex`],n.componentIndex)||cN(a[r+`AxisName`],n.name))return i}}function cN(e,t){return e===`all`||K(e)&&_t(e,t)>=0||e===t}function lN(e){var t=uN(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=fN(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 uN(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[pN(e)]}function dN(e){var t=uN(e);return t&&t.axisPointerModel}function fN(e){return!!e.get([`handle`,`show`])}function pN(e){return e.type+`||`+e.id}var mN={},hN=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&&lN(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=dN(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){mN[e]=t},t.getAxisPointerClass=function(e){return e&&mN[e]},t.type=`axis`,t}(KO),gN=wl();function _N(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=gN(e).splitAreaColors,f=Yt(),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 Ws({anid:C==null?null:`area_`+C,shape:{x:y,y:b,width:x,height:S},style:gt({fill:s[p]},_),autoBatch:!0,silent:!0})),p=(p+1)%u}gN(e).splitAreaColors=f}}}function vN(e){gN(e).splitAreaColors=null}var yN=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`],bN=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 Vd,this.group.add(this._axisGroup),Lx(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),W(yN,function(e){t.get([e,`show`])&&xN[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||bp(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},t.prototype.remove=function(){vN(this)},t.type=`cartesianAxis`,t}(hN),xN={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 bf({anid:b==null?null:`line_`+b,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},style:gt({stroke:c[x]},_),silent:!0});fp(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 bf({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});fp(g.shape,f.lineWidth),t.add(g)}},splitArea:function(e,t,n,r,i){_N(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=AC(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},SN=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}(bN),CN=function(e){V(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=SN.type,t}return t.type=`yAxis`,t}(bN),wN=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 Ws({shape:e.coordinateSystem.getRect(),style:gt({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},t.type=`grid`,t}(KO),TN={offset:0};function EN(e){e.registerComponentView(wN),e.registerComponentModel(Gw),e.registerCoordinateSystem(`cartesian2d`,HM),DM(e,`x`,SM,TN),DM(e,`y`,SM,TN),e.registerComponentView(SN),e.registerComponentView(CN),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function DN(e){pM(EN),e.registerSeriesModel(mM),e.registerChartView(yM),e.registerLayout(oS(`scatter`))}var ON=wl();function kN(e,t){return!!ON(e)[t]}tM({type:`takeGlobalCursor`,event:`globalCursorTaken`,update:`update`},$t);var AN={axisPointer:1,tooltip:1,brush:1};function jN(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||AN.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var a=Rp(r),o=Rp(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var MN=function(e){V(t,e);function t(t){var n=e.call(this)||this;n._zr=t;var r=Et(n._mousedownHandler,n),i=Et(n._mousemoveHandler,n),a=Et(n._mouseupHandler,n),o=Et(n._mousewheelHandler,n),s=Et(n._pinchHandler,n);return n.enable=function(e,n){var c=n.zInfo,l=Rp(c.component),u=l.z,d=l.zlevel,f={component:c.component,z:u,zlevel:d,z2:X(c.z2,-1/0)},p=U({},n.triggerInfo);this._opt=gt(U({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:f,triggerInfo:p,cursorGrab:`grab`,cursorGrabbing:`grabbing`}),e??=!0,(!this._enabled||this._controlType!==e)&&(this.disable(),this._enabled=!0,(e===!0||e===`move`||e===`pan`)&&(IN(t,`mousedown`,r,f),IN(t,`mousemove`,i,f),IN(t,`mouseup`,a,f)),(e===!0||e===`scale`||e===`zoom`)&&(IN(t,`mousewheel`,o,f),IN(t,`pinch`,s,f)))},n.disable=function(){this._enabled&&(this._enabled=!1,LN(t,`mousedown`,r),LN(t,`mousemove`,i),LN(t,`mouseup`,a),LN(t,`mousewheel`,o),LN(t,`pinch`,s))},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,t,n){var r=this._opt,i=r.zInfoParsed;if(jN(e,r.api,i.component))return!1;var a=r.triggerInfo,o=a.roamTrigger,s=!1;return o===`global`&&(s=!0),s||=a.isInSelf(e,t,n),s&&a.isInClip&&!a.isInClip(e,t,n)&&(s=!1),s},t.prototype._decideCursorStyle=function(e,t,n,r){var i=e.target;if(!i&&this._checkPointer(e,t,n))return this._opt.cursorGrab;if(r)return i&&i.cursor||`default`},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(WE(e)||NN(e))){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this._checkPointer(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var t=this._zr;if(!(e.gestureEvent===`pinch`||kN(t,`globalPan`)||NN(e))){var n=e.offsetX,r=e.offsetY;if(!this._dragging||!VN(`moveOnMouseMove`,e,this._opt)){var i=this._decideCursorStyle(e,n,r,!1);i&&t.setCursorStyle(i);return}t.setCursorStyle(this._opt.cursorGrabbing);var a=this._x,o=this._y,s=n-a,c=r-o;this._x=n,this._y=r,this._opt.preventDefaultMouseMove&&UE(e.event),e.__ecRoamConsumed=!0,BN(this,`pan`,`moveOnMouseMove`,e,{dx:s,dy:c,oldX:a,oldY:o,newX:n,newY:r,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!NN(e)){var t=this._zr;if(!WE(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!NN(e)){var t=VN(`zoomOnMouseWheel`,e,this._opt),n=VN(`moveOnMouseWheel`,e,this._opt),r=e.wheelDelta,i=Math.abs(r),a=e.offsetX,o=e.offsetY;if(!(r===0||!t&&!n)){if(t){var s=i>3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(kN(this._zr,`globalPan`)||NN(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(UE(r.event),r.__ecRoamConsumed=!0,BN(e,t,n,r,i))},t}(qa);function NN(e){return e.__ecRoamConsumed}var PN=wl();function FN(e){var t=PN(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function IN(e,t,n,r){for(var i=FN(e).roam,a=i[t]=i[t]||[],o=0;o<a.length;o++){var s=a[o].zInfoParsed;if((s.zlevel-r.zlevel||s.z-r.z||s.z2-r.z2)<=0)break}a.splice(o,0,{listener:n,zInfoParsed:r}),RN(e,t)}function LN(e,t,n){for(var r=FN(e).roam[t]||[],i=0;i<r.length;i++)if(r[i].listener===n){r.splice(i,1),r.length||zN(e,t);return}}function RN(e,t){var n=FN(e);n.uniform[t]||e.on(t,n.uniform[t]=function(e){var r=n.roam[t];if(r)for(var i=0;i<r.length;i++)r[i].listener(e)})}function zN(e,t){var n=FN(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function BN(e,t,n,r,i){i.isAvailableBehavior=Et(VN,null,n,r),e.trigger(t,i)}function VN(e,t,n){var r=n[e];return!e||r&&(!q(r)||t.event[r+`Key`])}function HN(e){return e}var UN=`view`;(function(e){V(t,e);function t(t,n,r){var i=e.call(this)||this;i.type=UN,i.dimensions=[`x`,`y`];var a=HN(i);a.invertY=t,a.lgCt=n,a.lgGeo=r;var o=a.trans=[];return o[0]=yi(),o[1]=yi(),o[2]=yi(),a.mtRaw=An(),a.mtRawInv=An(),a.mtOverall=An(),a.mtOverallInv=An(),a.zoom=1,i}return t.prototype.getBoundingRect=function(){return KN(null,this)},t.prototype.getViewRect=function(){return qN(null,this)},t.prototype.getRoamTransform=function(){return vi(HN(this).trans[1])},t.prototype.dataToPoint=function(e,t,n){var r=t?HN(this).mtRaw:HN(this).mtOverall;return n||=[],r?$n(n,e,r):zn(n,e)},t.prototype.pointToData=function(e,t,n){n||=[];var r=HN(this).mtOverallInv;return r?$n(n,e,r):zn(n,e)},t.prototype.convertToPixel=function(e,t,n){var r=JN(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=JN(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){var t=HN(this);return yr(WN,t.dataRect),xr(WN,WN,t.mtOverall),Sr(WN,e[0],e[1])},t.dimensions=[`x`,`y`],t})(_i);var WN=_r();function GN(e){return HN(e).zoom}function KN(e,t){return yr(e||_r(),HN(t).dataRect)}function qN(e,t){return yr(e||_r(),HN(t).viewRect)}_r();function JN(e){var t=e.seriesModel;return t?t.coordinateSystem:null}yi(),yi();function YN(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}var XN=wl();function ZN(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,iP(t,n,e),W(n,function(n){W(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,Dt(QN,e))})}),t.wrapMethod(`cloneShallow`,Dt(eP,e)),W(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,Dt($N,e))}),Bt(n[t.dataType]===t)}function QN(e,t){if(rP(this)){var n=U({},XN(this).datas);n[this.dataType]=t,iP(t,n,e)}else aP(t,this.dataType,XN(this).mainData,e);return t}function $N(e,t){return e.struct&&e.struct.update(),t}function eP(e,t){return W(XN(t).datas,function(n,r){n!==t&&aP(n.cloneShallow(),r,t,e)}),t}function tP(e){var t=XN(this).mainData;return e==null||t==null?t:XN(t).datas[e]}function nP(){var e=XN(this).mainData;return e==null?[{data:e}]:G(wt(XN(e).datas),function(t){return{type:t,data:XN(e).datas[t]}})}function rP(e){return XN(e).mainData===e}function iP(e,t,n){XN(e).datas={},W(t,function(t,r){aP(t,r,e,n)})}function aP(e,t,n,r){XN(n).datas[t]=e,XN(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=tP,e.getLinkedDataAll=nP}var oP=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||``,this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){Ot(e)&&(n=t,t=e,e=null),e||={},q(e)&&(e={order:e});var r=e.order||`preorder`,i=this[e.attr||`children`],a;r===`preorder`&&(a=t.call(n,this));for(var o=0;!a&&o<i.length;o++)i[o].eachNode(e,t,n);r===`postorder`&&t.call(n,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var r=this.children[n];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].getNodeById(e);if(i)return i}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].contains(e);if(i)return i}},e.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||`value`),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),sP=function(){function e(e){this.type=`tree`,this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,r=t.length;n<r;n++)t[n].dataIndex=-1;for(var n=0,r=e.count();n<r;n++)t[e.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,r){var i=new e(n),a=[],o=1;s(t);function s(e,t){var n=e.value;o=Math.max(o,K(n)?n.length:1),a.push(e);var r=new oP(vl(e.name,``),i);t?cP(r,t):i.root=r,i._nodes.push(r);var c=e.children;if(c)for(var l=0;l<c.length;l++)s(c[l],r)}i.root.updateDepthAndHeight(0);var c=Zh(a,{coordDimensions:[`value`],dimensionsCount:o}).dimensions,l=new Xh(c,n);return l.initData(a),r&&r(l),ZN({mainData:l,struct:i,structAttr:`tree`}),i.update(),i},e}();function cP(e,t){var n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}function lP(e,t,n){if(e&&_t(t,e.type)>=0){var r=n.getData().tree.root,i=e.targetNode;if(q(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=r.getNodeById(a)))return{node:i}}}function uP(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function dP(e,t){return _t(uP(e),t)>=0}function fP(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var pP=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function mP(e){for(var t=0;t<pP.length;t++)e.registerAction({type:pP[t],update:`updateView`},$t);e.registerAction({type:`treemapRootToNode`,update:`updateView`},function(e,t){t.eachComponent({mainType:`series`,subType:`treemap`,query:e},n);function n(t,n){var r=lP(e,[`treemapZoomToNode`,`treemapRootToNode`],t);if(r){var i=t.getViewRoot();i&&(e.direction=dP(i,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}})}function hP(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var i=vv(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var gP=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};_P(n);var r=e.levels||[],i=new ym({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=vP(r,t);var a=G(r||[],function(e){return new ym(e,i,t)},this),o=sP.createTree(n,this,s);function s(e){e.wrapMethod(`getItemModel`,function(e,t){var n=o.getNodeByDataIndex(t);return e.parentModel=(n?a[n.depth]:null)||i,e})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e);return Xv(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=fP(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},U(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=Yt(),this._idIndexMapCount=0);var n=t.get(e);return n??t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){hP(this)},t.type=`series.treemap`,t.layoutMode=`box`,t.defaultOption={progressive:0,coordinateSystemUsage:`box`,left:Q.size.l,top:Q.size.xxxl,right:Q.size.l,bottom:Q.size.xxxl,sort:!0,clipWindow:`origin`,squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:`▶`,zoomToNodeRatio:.1024,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:`global`,nodeClick:`zoomToNode`,animation:!0,animationDurationUpdate:900,animationEasing:`quinticInOut`,breadcrumb:{show:!0,height:22,left:`center`,bottom:Q.size.m,emptyItemWidth:25,itemStyle:{color:Q.color.backgroundShade,textStyle:{color:Q.color.secondary}},emphasis:{itemStyle:{color:Q.color.background}}},label:{show:!0,distance:0,padding:5,position:`inside`,color:Q.color.neutral00,overflow:`truncate`},upperLabel:{show:!1,position:[0,`50%`],height:20,overflow:`truncate`,verticalAlign:`middle`},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:Q.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,`50%`],overflow:`truncate`,verticalAlign:`middle`}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:`index`,visibleMin:10,childrenVisibleMin:null,levels:[]},t}(gy);function _P(e){var t=0;W(e.children,function(e){_P(e);var n=e.value;K(n)&&(n=n[0]),t+=n});var n=e.value;K(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),K(e.value)?e.value[0]=n:e.value=n}function vP(e,t){var n=il(t.get(`color`)),r=il(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;W(e,function(e){var t=new ym(e),n=t.get(`color`),r=t.get(`decal`);(t.get([`itemStyle`,`color`])||n&&n!==`none`)&&(i=!0),(t.get([`itemStyle`,`decal`])||r&&r!==`none`)&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}}var yP=8,bP=8,xP=5,SP=function(){function e(e){this.group=new Vd,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel(`breadcrumb`),a=this.group;if(a.removeAll(),!(!i.get(`show`)||!n)){var o=i.getModel(`itemStyle`),s=i.getModel(`emphasis`),c=o.getModel(`textStyle`),l=s.getModel([`itemStyle`,`textStyle`]),u=ov(e,t).refContainer,d={left:i.get(`left`),right:i.get(`right`),top:i.get(`top`),bottom:i.get(`bottom`)},f={emptyItemWidth:i.get(`emptyItemWidth`),totalWidth:0,renderList:[]},p=iv(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),sv(a,d,u)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=vl(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+yP*2,t.emptyItemWidth);t.totalWidth+=o+bP,t.renderList.push({node:r,text:i,width:o})}},e.prototype._renderContent=function(e,t,n,r,i,a,o,s){for(var c=0,l=t.emptyItemWidth,u=e.get([`breadcrumb`,`height`]),d=t.totalWidth,f=t.renderList,p=i.getModel(`itemStyle`).getItemStyle(),m=f.length-1;m>=0;m--){var h=f[m],g=h.node,_=h.width,v=h.text;d>n.width&&(d-=_-l,_=l,v=null);var y=new hf({shape:{points:CP(c,0,_,u,m===f.length-1,m===0)},style:gt(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new Ys({style:Zp(a,{text:v})}),textConfig:{position:`inside`},z2:1e5,onclick:Dt(s,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=Zp(o,{text:v}),y.ensureState(`emphasis`).style=p,cd(y,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(y),wP(y,e,g),c+=_+bP}},e.prototype.remove=function(){this.group.removeAll()},e}();function CP(e,t,n,r,i,a){var o=[[i?e:e-xP,t],[e+n,t],[e+n,t+r],[i?e:e-xP,t+r]];return!a&&o.splice(2,0,[e+n+xP,t+r/2]),!i&&o.push([e,t+r/2]),o}function wP(e,t,n){$l(e).eventData={componentType:`series`,componentSubType:`treemap`,componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:`treemap`,selfType:`breadcrumb`,nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&fP(n,t)}}var TP=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;r<i;r++){var a=this._storage[r];a.el.animateTo(a.target,{duration:a.duration,delay:a.delay,easing:a.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();function EP(){return new TP}var DP=Math.max,OP=Math.min,kP=W,AP=[`itemStyle`,`borderWidth`],jP=[`itemStyle`,`gapWidth`],MP=[`upperLabel`,`show`],NP=[`upperLabel`,`height`],PP={seriesType:`treemap`,reset:function(e,t,n,r){var i=e.option,a=ov(e,n).refContainer,o=iv(e.getBoxLayoutParams(),a),s=r&&r.type,c=lP(r,[`treemapZoomToNode`,`treemapRootToNode`],e),l=s===`treemapRender`||s===`treemapMove`?r.rootRect:null,u=e.getViewRoot(),d=uP(u);if(s!==`treemapMove`){var f=!1,p=s===`treemapZoomToNode`?(f=!0,HP(e,c,u,o)):l?(f=!0,U({},l)):U({},o);if(f){var m=KP(o,p);m=qP(m,e),p.width=o.width*m,p.height=o.height*m}var h=i.sort;h&&h!==`asc`&&h!==`desc`&&(h=`desc`);var g={squareRatio:i.squareRatio,sort:h,leafDepth:i.leafDepth};u.hostTree.clearLayouts();var _={x:0,y:0,width:p.width,height:p.height,area:p.width*p.height};u.setLayout(_),FP(u,g,!1,0),_=u.getLayout(),kP(d,function(e,t){var n=(d[t+1]||u).getValue();e.setLayout(U({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))})}var v=e.getData().tree.root;v.setLayout(UP(o,l,c),!0),e.setLayoutInfo(o),WP(v,new gr(-o.x,-o.y,n.getWidth(),n.getHeight()),d,u,0)}};function FP(e,t,n,r){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),c=s.get(AP),l=s.get(jP)/2,u=GP(s),d=Math.max(c,u),f=c-l,p=d-l;e.setLayout({borderWidth:c,upperHeight:d,upperLabelHeight:u},!0),i=DP(i-2*f,0),a=DP(a-f-p,0);var m=i*a,h=IP(e,s,m,t,n,r);if(h.length){var g={x:f,y:p,width:i,height:a},_=OP(i,a),v=1/0,y=[];y.area=0;for(var b=0,x=h.length;b<x;){var S=h[b];y.push(S),y.area+=S.getLayout().area;var C=BP(y,_,t.squareRatio);C<=v?(b++,v=C):(y.area-=y.pop().getLayout().area,VP(y,_,g,l,!1),_=OP(g.width,g.height),y.length=y.area=0,v=1/0)}if(y.length&&VP(y,_,g,l,!0),!n){var w=s.get(`childrenVisibleMin`);w!=null&&m<w&&(n=!0)}for(var b=0,x=h.length;b<x;b++)FP(h[b],t,n,r+1)}}}function IP(e,t,n,r,i,a){var o=e.children||[],s=r.sort;s!==`asc`&&s!==`desc`&&(s=null);var c=r.leafDepth!=null&&r.leafDepth<=a;if(i&&!c)return e.viewChildren=[];o=St(o,function(e){return!e.isRemoved()}),RP(o,s);var l=zP(t,o,s);if(l.sum===0||(l.sum=LP(t,n,l.sum,s,o),l.sum===0))return e.viewChildren=[];for(var u=0,d=o.length;u<d;u++){var f=o[u].getValue()/l.sum*n;o[u].setLayout({area:f})}return c&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:l.dataExtent},!0),o}function LP(e,t,n,r,i){if(!r)return n;for(var a=e.get(`visibleMin`),o=i.length,s=o,c=o-1;c>=0;c--){var l=i[r===`asc`?o-c-1:c].getValue();l/n*t<a&&(s=c,n-=l)}return r===`asc`?i.splice(0,o-s):i.splice(s,o-s),n}function RP(e,t){return t&&e.sort(function(e,n){var r=t===`asc`?e.getValue()-n.getValue():n.getValue()-e.getValue();return r===0?t===`asc`?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:r}),e}function zP(e,t,n){for(var r=0,i=0,a=t.length;i<a;i++)r+=t[i].getValue();var o=e.get(`visualDimension`),s;return!t||!t.length?s=[NaN,NaN]:o===`value`&&n?(s=[t[t.length-1].getValue(),t[0].getValue()],n===`asc`&&s.reverse()):(s=Fl(),kP(t,function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)})),{sum:r,dataExtent:s}}function BP(e,t,n){for(var r=0,i=1/0,a=0,o=void 0,s=e.length;a<s;a++)o=e[a].getLayout().area,o&&(o<i&&(i=o),o>r&&(r=o));var c=e.area*e.area,l=t*t*n;return c?DP(l*r/c,c/(l*i)):1/0}function VP(e,t,n,r,i){var a=t===n.width?0:1,o=1-a,s=[`x`,`y`],c=[`width`,`height`],l=n[s[a]],u=t?e.area/t:0;(i||u>n[c[o]])&&(u=n[c[o]]);for(var d=0,f=e.length;d<f;d++){var p=e[d],m={},h=u?p.getLayout().area/u:0,g=m[c[o]]=DP(u-2*r,0),_=n[s[a]]+n[c[a]]-l,v=d===f-1||_<h?_:h,y=m[c[a]]=DP(v-2*r,0);m[s[o]]=n[s[o]]+OP(r,g/2),m[s[a]]=l+OP(r,y/2),l+=v,p.setLayout(m,!0)}n[s[o]]+=u,n[c[o]]-=u}function HP(e,t,n,r){var i=(t||{}).node,a=r.width,o=r.height,s=U({},r);if(!i||i===n)return s;for(var c,l=a*o,u=l*e.option.zoomToNodeRatio;c=i.parentNode;){for(var d=0,f=c.children,p=0,m=f.length;p<m;p++)d+=f[p].getValue();var h=i.getValue();if(h===0)return s;u*=d/h;var g=c.getModel(),_=g.get(AP),v=Math.max(_,GP(g));u+=4*_*_+(3*_+v)*u**.5,u>Fc&&(u=Fc),i=c}u<l&&(u=l);var y=(u/l)**.5;return{width:a*y,height:o*y}}function UP(e,t,n){if(t)return{x:t.x,y:t.y};var r={x:0,y:0};if(!n)return r;var i=n.node,a=i.getLayout();if(!a)return r;for(var o=[a.width/2,a.height/2],s=i;s;){var c=s.getLayout();o[0]+=c.x,o[1]+=c.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function WP(e,t,n,r,i){var a=e.getLayout(),o=n[i],s=o&&o===e;if(!(o&&!s||i===n.length&&e!==r)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var c=new gr(t.x-a.x,t.y-a.y,t.width,t.height);kP(e.viewChildren||[],function(e){WP(e,c,n,r,i+1)})}}function GP(e){return e.get(MP)?e.get(NP):0}function KP(e,t){return t.width/e.width||t.height/e.height||1}function qP(e,t){return YN(e,t.get(`scaleLimit`,!0))}var JP=Vd,YP=Ws,XP=3,ZP=`label`,QP=`upperLabel`,$P=100,eF=20,tF=30,nF=yn([[`fill`,`color`],[`stroke`,`strokeColor`],[`lineWidth`,`strokeWidth`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`]]),rF=function(e){var t=nF(e);return t.stroke=t.fill=t.lineWidth=null,t},iF=wl(),aF=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._state=`ready`,n._storage=oF(),n}return t.prototype.render=function(e,t,n,r){if(!(_t(t.findComponents({mainType:`series`,subType:`treemap`,query:r}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var i=lP(r,[`treemapZoomToNode`,`treemapRootToNode`],e),a=r&&r.type,o=e.layoutInfo,s=!this._oldTree,c=this._storage,l=a===`treemapRootToNode`&&i&&c?{rootNodeGroup:c.nodeGroup[i.node.getRawIndex()],direction:r.direction}:null,u=this._giveContainerGroup(o),d=e.get(`animation`),f=this._doRender(u,e,l);d&&!s&&(!a||a===`treemapZoomToNode`||a===`treemapRootToNode`)?this._doAnimation(u,f,e,l):f.renderFinally(),this._resetController(n),this._renderBreadcrumb(e,n,i)}},t.prototype._giveContainerGroup=function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new JP,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t},t.prototype._doRender=function(e,t,n){var r=t.getData().tree,i=this._oldTree,a=oF(),o=oF(),s=this._storage,c=[];function l(e,r,i,l){return sF(t,o,s,n,a,c,e,r,i,l)}d(r.root?[r.root]:[],i&&i.root?[i.root]:[],e,r===i||!i,0);var u=f(s);return this._oldTree=r,this._storage=o,{lastsForAnimation:a,willDeleteEls:u,renderFinally:p};function d(e,t,n,r,i){r?(t=e,W(e,function(e,t){!e.isRemoved()&&o(t,t)})):new Sm(t,e,a,a).add(o).update(o).remove(Dt(o,null)).execute();function a(e){return e.getId()}function o(a,o){var s=a==null?null:e[a],c=o==null?null:t[o],u=l(s,c,n,i);u&&d(s&&s.viewChildren||[],c&&c.viewChildren||[],u,r,i+1)}}function f(e){var t=oF();return e&&W(e,function(e,n){var r=t[n];W(e,function(e){e&&(r.push(e),iF(e).willDelete=!0)})}),t}function p(){W(u,function(e){W(e,function(e){e.parent&&e.parent.remove(e)})}),W(c,function(e){e.invisible=!0,e.dirty()})}},t.prototype._doAnimation=function(e,t,n,r){var i=n.get(`animationDurationUpdate`),a=n.get(`animationEasing`),o=(Ot(i)?0:i)||0,s=(Ot(a)?null:a)||`cubicOut`,c=EP();W(t.willDeleteEls,function(e,t){W(e,function(e,n){if(!e.invisible){var i=e.parent,a,l=iF(i);if(r&&r.direction===`drillDown`)a=i===r.rootNodeGroup?{shape:{x:0,y:0,width:l.nodeWidth,height:l.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,d=0;l.willDelete||(u=l.nodeWidth/2,d=l.nodeHeight/2),a=t===`nodeGroup`?{x:u,y:d,style:{opacity:0}}:{shape:{x:u,y:d,width:0,height:0},style:{opacity:0}}}a&&c.add(e,a,o,0,s)}})}),W(this._storage,function(e,n){W(e,function(e,r){var i=t.lastsForAnimation[n][r],a={};i&&(e instanceof Vd?i.oldX!=null&&(a.x=e.x,a.y=e.y,e.x=i.oldX,e.y=i.oldY):(i.oldShape&&(a.shape=U({},e.shape),e.setShape(i.oldShape)),i.fadein?(e.setStyle(`opacity`,0),a.style={opacity:1}):e.style.opacity!==1&&(a.style={opacity:1})),c.add(e,a,o,0,s))})},this),this._state=`animating`,c.finished(Et(function(){this._state=`ready`,t.renderFinally()},this)).start()},t.prototype._resetController=function(e){var t=this,n=this.seriesModel,r=this._controller;r||(r=this._controller=new MN(e.getZr()),r.on(`pan`,Et(this._onPan,this)),r.on(`zoom`,Et(this._onZoom,this))),r.enable(n.get(`roam`),{api:e,zInfo:{component:n},triggerInfo:{roamTrigger:n.get(`roamTrigger`),isInSelf:function(e,n,r){var i=t._containerGroup;return i?i.getBoundingRect().contain(n-i.x,r-i.y):!1}}})},t.prototype._clearController=function(){var e=this._controller;e&&=(e.dispose(),null)},t.prototype._onPan=function(e){if(this._state!==`animating`&&(Math.abs(e.dx)>XP||Math.abs(e.dy)>XP)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:`treemapMove`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale,i=this.seriesModel;if(this._state!==`animating`){var a=i.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new gr(o.x,o.y,o.width,o.height),c=i.layoutInfo,l=KP(c,o),u=l*r;u=qP(u,i);var d=u/l;t-=c.x,n-=c.y;var f=An();Pn(f,f,[-t,-n]),In(f,f,[d,d]),Pn(f,f,[t,n]),s.applyTransform(f),this.api.dispatchAction({type:`treemapRender`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var t=this;e.on(`click`,function(e){if(t._state===`ready`){var n=t.seriesModel.get(`nodeClick`,!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if(n===`zoomToNode`)t._zoomToNode(r);else if(n===`link`){var a=i.hostTree.data.getItemModel(i.dataIndex),o=a.get(`link`,!0),s=a.get(`target`,!0)||`blank`;o&&Y_(o,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=e.get(`leafDepth`,!0)==null?this.findTarget(t.getWidth()/2,t.getHeight()/2):{node:e.getViewRoot()},n||={node:e.getData().tree.root}),(this._breadcrumb||=new SP(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&(dP(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=oF(),this._state=`ready`,this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:`treemapZoomToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:`treemapRootToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:`viewChildren`,order:`preorder`},function(r){var i=this._storage.background[r.getRawIndex()];if(i){var a=i.transformCoordToLocal(e,t),o=i.shape;if(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height)n={node:r,offsetX:a[0],offsetY:a[1]};else return!1}},this),n},t.type=`treemap`,t}(ub);function oF(){return{nodeGroup:[],background:[],content:[]}}function sF(e,t,n,r,i,a,o,s,c,l){if(!o)return;var u=o.getLayout(),d=e.getData(),f=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!u||!u.isInView)return;var p=u.width,m=u.height,h=u.borderWidth,g=u.invisible,_=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,b=u.upperHeight,x=y&&y.length,S=f.getModel(`itemStyle`),C=f.getModel([`emphasis`,`itemStyle`]),w=f.getModel([`blur`,`itemStyle`]),T=f.getModel([`select`,`itemStyle`]),E=S.get(`borderRadius`)||0,D=R(`nodeGroup`,JP);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),iF(D).nodeWidth=p,iF(D).nodeHeight=m,u.isAboveViewRoot)return D;var O=R(`background`,YP,l,eF);O&&ee(D,O,x&&u.upperLabelHeight);var k=f.getModel(`emphasis`),A=k.get(`focus`),j=k.get(`blurScope`),M=k.get(`disabled`),N=A===`ancestor`?o.getAncestorsIndices():A===`descendant`?o.getDescendantIndices():A;if(x)md(D)&&pd(D,!1),O&&(pd(O,!M),d.setItemGraphicEl(o.dataIndex,O),ld(O,N,j));else{var P=R(`content`,YP,l,tF);P&&I(D,P),O.disableMorphing=!0,O&&md(O)&&pd(O,!1),pd(D,!M),d.setItemGraphicEl(o.dataIndex,D);var F=f.getShallow(`cursor`);F&&P.attr(`cursor`,F),ld(D,N,j)}return D;function ee(t,n,r){var i=$l(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)te(n);else{n.invisible=!1;var a=o.getVisual(`style`),s=a.stroke,c=rF(S);c.fill=s;var l=nF(C);l.fill=C.get(`borderColor`);var u=nF(w);u.fill=w.get(`borderColor`);var d=nF(T);if(d.fill=T.get(`borderColor`),r){var f=p-2*h;L(n,s,a.opacity,{x:h,y:0,width:f,height:b})}else n.removeTextContent();n.setStyle(c),n.ensureState(`emphasis`).style=l,n.ensureState(`blur`).style=u,n.ensureState(`select`).style=d,Bu(n)}t.add(n)}function I(t,n){var r=$l(n);r.dataIndex=o.dataIndex,r.seriesIndex=e.seriesIndex;var i=Math.max(p-2*h,0),a=Math.max(m-2*h,0);if(n.culling=!0,n.setShape({x:h,y:h,width:i,height:a,r:E}),g)te(n);else{n.invisible=!1;var s=o.getVisual(`style`),c=s.fill,l=rF(S);l.fill=c,l.decal=s.decal;var u=nF(C),d=nF(w),f=nF(T);L(n,c,s.opacity,null),n.setStyle(l),n.ensureState(`emphasis`).style=u,n.ensureState(`blur`).style=d,n.ensureState(`select`).style=f,Bu(n)}t.add(n)}function te(e){!e.invisible&&a.push(e)}function L(t,n,r,i){var a=f.getModel(i?QP:ZP),s=vl(f.get(`name`),null),c=a.getShallow(`show`);Yp(t,Xp(f,i?QP:ZP),{defaultText:c?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:o.dataIndex});var l=t.getTextContent();if(l){var d=l.style,p=zt(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),l.disableLabelLayout=!0),l.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);(d.width!==e||d.height!==n)&&l.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow=`truncate`,ne(d,i,u);var m=l.getState(`emphasis`);ne(m?m.style:null,i,u)}}function ne(t,n,r){var i=t?t.text:null;if(!n&&r.isLeafRoot&&i!=null){var a=e.get(`drillDownIcon`,!0);t.text=a?a+` `+i:i}}function R(e,r,a,o){var s=v!=null&&n[e][v],c=i[e];return s?(n[e][v]=null,re(c,s)):g||(s=new r,s instanceof Co&&(s.z2=cF(a,o)),ie(c,s)),t[e][_]=s}function re(e,t){var n=e[_]={};t instanceof JP?(n.oldX=t.x,n.oldY=t.y):n.oldShape=U({},t.shape)}function ie(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof Vd;if(a&&(!r||r.direction===`drillDown`)){var c=0,l=0,u=i.background[a.getRawIndex()];!r&&u&&u.oldShape&&(c=u.oldShape.width,l=u.oldShape.height),s?(n.oldX=0,n.oldY=l):n.oldShape={x:c,y:l,width:0,height:0}}n.fadein=!s}}function cF(e,t){return e*$P+t}var lF=W,uF=J,dF=-1,fF=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=mt(t);this.type=r,this.mappingMethod=n,this._normalizeData=wF[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(hF(i),pF(i)):n===`category`?i.categories?mF(i):hF(i,!0):(Bt(n!==`linear`||i.dataExtent),hF(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return Et(this._normalizeData,this)},e.listVisualTypes=function(){return wt(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){J(e)?W(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=K(t)?[]:J(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&lF(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(K(e))e=e.slice();else if(uF(e)){var t=[];lF(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a<o;a++){var s=t[a].value;if(s!=null){if(s===e||q(s)&&s===e+``)return a;n&&d(s,a)}}for(var a=0,o=t.length;a<o;a++){var c=t[a],l=c.interval,u=c.close;if(l){if(l[0]===-1/0){if(TF(u[1],e,l[1]))return a}else if(l[1]===1/0){if(TF(u[0],l[0],e))return a}else if(TF(u[0],l[0],e)&&TF(u[1],e,l[1]))return a;n&&d(l[0],a),n&&d(l[1],a)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var a=Math.abs(t-e);a<i&&(i=a,r=n)}},e.visualHandlers={color:{applyVisual:vF(`color`),getColorMapper:function(){var e=this.option;return Et(e.mappingMethod===`category`?function(e,t){return!t&&(e=this._normalizeData(e)),yF.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=ma(t,e.parsedVisual,r),i?r:va(r,`rgba`)},this)},_normalizedToVisual:{linear:function(e){return va(ma(e,this.option.parsedVisual),`rgba`)},category:yF,piecewise:function(e,t){var n=SF.call(this,t);return n??=va(ma(e,this.option.parsedVisual),`rgba`),n},fixed:bF}},colorHue:gF(function(e,t){return ga(e,t)}),colorSaturation:gF(function(e,t){return ga(e,null,t)}),colorLightness:gF(function(e,t){return ga(e,null,null,t)}),colorAlpha:gF(function(e,t){return _a(e,t)}),decal:{applyVisual:vF(`decal`),_normalizedToVisual:{linear:null,category:yF,piecewise:null,fixed:null}},opacity:{applyVisual:vF(`opacity`),_normalizedToVisual:xF([0,1])},liftZ:{applyVisual:vF(`liftZ`),_normalizedToVisual:{linear:bF,category:bF,piecewise:bF,fixed:bF}},symbol:{applyVisual:function(e,t,n){n(`symbol`,this.mapValueToVisual(e))},_normalizedToVisual:{linear:_F,category:yF,piecewise:function(e,t){var n=SF.call(this,t);return n??=_F.call(this,e),n},fixed:bF}},symbolSize:{applyVisual:vF(`symbolSize`),_normalizedToVisual:xF([0,1])}},e}();function pF(e){var t=e.pieceList;e.hasSpecialVisual=!1,W(t,function(t,n){t.originIndex=n,t.visual!=null&&(e.hasSpecialVisual=!0)})}function mF(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(lF(t,function(e,t){n[e]=t}),!K(r)){var i=[];J(r)?lF(r,function(e,t){var r=n[t];i[r??dF]=e}):i[dF]=r,r=CF(e,i)}for(var a=t.length-1;a>=0;a--)r[a]??(delete n[t[a]],t.pop())}function hF(e,t){var n=e.visual,r=[];J(n)?lF(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),CF(e,r)}function gF(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:xF([0,1])}}function _F(e){var t=this.option.visual;return t[Math.round(Cc(e,[0,1],[0,t.length-1],!0))]||{}}function vF(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function yF(e){var t=this.option.visual;return t[this.option.loop&&e!==dF?e%t.length:e]}function bF(){return this.option.visual[0]}function xF(e){return{linear:function(t){return Cc(t,e,this.option.visual,!0)},category:yF,piecewise:function(t,n){var r=SF.call(this,n);return r??=Cc(t,e,this.option.visual,!0),r},fixed:bF}}function SF(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[fF.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function CF(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=G(t,function(e){return ua(e)||[0,0,0,1]})),t}var wF={linear:function(e){return Cc(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=fF.findPieceIndex(e,t,!0);if(n!=null)return Cc(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??dF},fixed:$t};function TF(e,t,n){return e?t<=n:t<n}var EF=`itemStyle`,DF=wl(),OF={seriesType:`treemap`,reset:function(e){var t=e.getData().tree.root;t.isRemoved()||kF(t,{},e.getViewRoot().getAncestors(),e)}};function kF(e,t,n,r){var i=e.getModel(),a=e.getLayout(),o=e.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=i.getModel(EF),c=AF(s,t,r),l=o.ensureUniqueItemVisual(e.dataIndex,`style`),u=s.get(`borderColor`),d=s.get(`borderColorSaturation`),f;d!=null&&(f=jF(c),u=MF(d,f)),l.stroke=u;var p=e.viewChildren;if(!p||!p.length)f=jF(c),l.fill=f;else{var m=PF(e,i,a,s,c,p);W(p,function(e,t){(e.depth>=n.length||e===n[e.depth])&&kF(e,IF(i,c,e,t,m,r),n,r)})}}}function AF(e,t,n){var r=U({},t),i=n.designatedVisualItemStyle;return W([`color`,`colorAlpha`,`colorSaturation`],function(n){i[n]=t[n];var a=e.get(n);i[n]=null,a!=null&&(r[n]=a)}),r}function jF(e){var t=NF(e,`color`);if(t){var n=NF(e,`colorAlpha`),r=NF(e,`colorSaturation`);return r&&(t=ga(t,null,null,r)),n&&(t=_a(t,n)),t}}function MF(e,t){return t==null?null:ga(t,null,null,e)}function NF(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function PF(e,t,n,r,i,a){if(!(!a||!a.length)){var o=FF(t,`color`)||i.color!=null&&i.color!==`none`&&(FF(t,`colorAlpha`)||FF(t,`colorSaturation`));if(o){var s=t.get(`visualMin`),c=t.get(`visualMax`),l=n.dataExtent.slice();s!=null&&s<l[0]&&(l[0]=s),c!=null&&c>l[1]&&(l[1]=c);var u=t.get(`colorMappingBy`),d={type:o.name,dataExtent:l,visual:o.range};d.type===`color`&&(u===`index`||u===`id`)?(d.mappingMethod=`category`,d.loop=!0):d.mappingMethod=`linear`;var f=new fF(d);return DF(f).drColorMappingBy=u,f}}}function FF(e,t){var n=e.get(t);return K(n)&&n.length?{name:t,range:n}:null}function IF(e,t,n,r,i,a){var o=U({},t);if(i){var s=i.type,c=s===`color`&&DF(i).drColorMappingBy,l=c===`index`?r:c===`id`?a.mapIdToIndex(n.getId()):n.getValue(e.get(`visualDimension`));o[s]=i.mapValueToVisual(l)}return o}function LF(e){e.registerSeriesModel(gP),e.registerChartView(aF),e.registerVisual(OF),e.registerLayout(PP),mP(e)}var RF=bf.prototype,zF=wf.prototype,BF=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})(BF);function VF(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var HF=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 BF},t.prototype.buildPath=function(e,t){VF(t)?RF.buildPath.call(this,e,t):zF.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return VF(this.shape)?RF.pointAt.call(this,e):zF.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=VF(t)?[t.x2-t.x1,t.y2-t.y1]:zF.tangentAt.call(this,e);return qn(n,n)},t}(As),UF=[`fromSymbol`,`toSymbol`];function WF(e){return`_`+e+`Type`}function GF(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=My(i),l=Ny(o||0,c);return r+c+l+(a||``)+(s||``)}function KF(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=My(i),l=Ny(o||0,c),u=jy(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 qF(e){var t=new HF({name:`line`,subPixelOptimize:!0});return JF(t.shape,e),t}function JF(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 YF=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=qF(i);o.shape.percent=0,Kf(o,{z2:X(a,0),shape:{percent:1}},r,t),this.add(o),W(UF,function(n){var r=KF(n,e,t);this.add(r),this[WF(n)]=GF(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:{}};JF(o.shape,a),Gf(i,o,r,t),W(UF,function(n){var r=GF(n,e,t),i=WF(n);if(this[i]!==r){this.remove(this.childOfName(n));var a=KF(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=Xp(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(UF,function(e){var t=this.childOfName(e);if(t){t.setColor(h),t.style.opacity=m.opacity;for(var n=0;n<gu.length;n++){var r=gu[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)?Oc(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}),cd(this,u,d,l)},t.prototype.highlight=function(){Uu(this)},t.prototype.downplay=function(){Wu(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`);JF(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=Un([],l,c);qn(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}(Vd),XF=function(){function e(e){this.group=new Vd,this._LineCtor=e||YF}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=QF(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=QF(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!ZF(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i<e.end;i++)if(eI(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){Np(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(eI(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(!eI(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 ZF(e){return e.animators&&e.animators.length>0}function QF(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:Xp(t)}}function $F(e){return isNaN(e[0])||isNaN(e[1])}function eI(e){return e&&!$F(e[0])&&!$F(e[1])}var tI={color:`fill`,borderColor:`stroke`},nI={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},rI=wl(),iI=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 yg(null,this)},t.prototype.getDataParams=function(t,n,r){var i=e.prototype.getDataParams.call(this,t,n);return r&&(i.info=rI(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}(gy);function aI(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`?aC(i).w:Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function oI(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:Et(aI,e)}}}function sI(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 cI(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:GN(t)},api:{coord:function(t){return e.dataToPoint(t)},size:Et(sI,e)}}}function lI(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`?aC(n).w:Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}function uI(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:Et(lI,e)}}}function dI(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`?aC(a).w:Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return n===`Angle`&&(c=c*Math.PI/180),c},this)}function fI(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:Et(dI,e)}}}function pI(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 mI(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 hI={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},gI=wt(hI);xt(bi,function(e,t){return e[t]=1,e},{}),bi.join(`, `);var _I=[``,`style`,`shape`,`extra`],vI=wl();function yI(e,t,n,r,i){var a=e+`Animation`,o=Uf(e,r,i)||{},s=vI(t).userDuring;return o.duration>0&&(o.during=s?Et(kI,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),U(o,n[a]),o}function bI(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=vI(e),l=t.style;c.userDuring=t.during;var u={},d={};if(NI(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];jI(`shape`,h,f[m])}else jI(`shape`,t,d),jI(`extra`,t,d);if(!a&&s&&(MI(e,t,u),AI(`shape`,e,t,u),AI(`extra`,e,t,u),PI(e,t,l,u)),d.style=l,wI(e,d,o),EI(e,t),s){if(a){var g={};W(_I,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(g[e]=g[e]||{}),U(e?g[e]:g,n.enterFrom))});var _=yI(`enter`,e,t,n,i);_.duration>0&&e.animateFrom(g,_)}else TI(e,t,i||0,n,u)}xI(e,t),l?e.dirty():e.markRedraw()}function xI(e,t){for(var n=vI(e).leaveToProps,r=0;r<_I.length;r++){var i=_I[r],a=i?t[i]:t;a&&a.leaveTo&&(n||=vI(e).leaveToProps={},i&&(n[i]=n[i]||{}),U(i?n[i]:n,a.leaveTo))}}function SI(e,t,n,r){if(e){var i=e.parent,a=vI(e).leaveToProps;if(a){var o=yI(`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 CI(e){return e===`all`}function wI(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 TI(e,t,n,r,i){if(i){var a=yI(`update`,e,t,r,n);a.duration>0&&e.animateFrom(i,a)}}function EI(e,t){Z(t,`silent`)&&(e.silent=t.silent),Z(t,`ignore`)&&(e.ignore=t.ignore),e instanceof Co&&Z(t,`invisible`)&&(e.invisible=t.invisible),e instanceof As&&Z(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}var DI={},OI={setTransform:function(e,t){return DI.el[e]=t,this},getTransform:function(e){return DI.el[e]},setShape:function(e,t){var n=DI.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=DI.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=DI.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=DI.el.style;if(t)return t[e]},setExtra:function(e,t){var n=DI.el.extra||(DI.el.extra={});return n[e]=t,this},getExtra:function(e){var t=DI.el.extra;if(t)return t[e]}};function kI(){var e=this,t=e.el;if(t){var n=vI(t).userDuring,r=e.userDuring;if(n!==r){e.el=e.userDuring=null;return}DI.el=t,r(OI)}}function AI(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]={}),CI(c))U(o,a);else for(var l=il(c),u=0;u<l.length;u++){var d=l[u],f=a[d];o[d]=f}}else if(CI(s)||_t(s,e)>=0){!o&&(o=r[e]={});for(var p=wt(a),u=0;u<p.length;u++){var d=p[u],f=a[d];FI(i[d],f)&&(o[d]=f)}}}}}function jI(e,t,n){var r=t[e];if(r)for(var i=n[e]={},a=wt(r),o=0;o<a.length;o++){var s=a[o];i[s]=Ma(r[s])}}function MI(e,t,n){for(var r=t.transition,i=CI(r)?bi:il(r||[]),a=0;a<i.length;a++){var o=i[a];o!==`style`&&o!==`shape`&&o!==`extra`&&(n[o]=e[o])}}function NI(e,t,n){for(var r=0;r<gI.length;r++){var i=gI[r],a=hI[i],o=t[i];o&&(n[a[0]]=o[0],n[a[1]]=o[1])}for(var r=0;r<bi.length;r++){var s=bi[r];t[s]!=null&&(n[s]=t[s])}}function PI(e,t,n,r){if(n){var i=e.style,a;if(i){var o=n.transition,s=t.transition;if(o&&!CI(o)){var c=il(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&&(CI(s)||CI(o)||_t(s,`style`)>=0)){var f=e.getAnimationStyleProps(),p=f?f.style:null;if(p){!a&&(a=r.style={});for(var m=wt(n),l=0;l<m.length;l++){var u=m[l];if(p[u]){var d=i[u];a[u]=d}}}}}}}function FI(e,t){return bt(e)?e!==t:e!=null&&isFinite(e)}var II=wl(),LI=[`percent`,`easing`,`shape`,`style`,`extra`];function RI(e){e.stopAnimation(`keyframe`),e.attr(II(e))}function zI(e,t,n){if(!(!n.isAnimationEnabled()||!t)){if(K(t)){W(t,function(t){zI(e,t,n)});return}var r=t.keyframes,i=t.duration;if(n&&i==null){var a=Uf(`enter`,n,0);i=a&&a.duration}if(!(!r||!i)){var o=II(e);W(_I,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=wt(c);if(n||(l=St(l,function(e){return _t(LI,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 BI=`emphasis`,VI=`normal`,HI=`blur`,UI=`select`,WI=[VI,BI,HI,UI],GI={normal:[`itemStyle`],emphasis:[BI,`itemStyle`],blur:[HI,`itemStyle`],select:[UI,`itemStyle`]},KI={normal:[`label`],emphasis:[BI,`label`],blur:[HI,`label`],select:[UI,`label`]},qI=[`x`,`y`],JI=`e\0\0`,YI={normal:{},emphasis:{},blur:{},select:{}},XI={cartesian2d:oI,geo:cI,single:uI,polar:fI,calendar:pI,matrix:mI};function ZI(e){return e instanceof As}function QI(e){return e instanceof Co}function $I(e,t){t.copyTransform(e),QI(t)&&QI(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,ZI(t)&&ZI(e)&&t.setShape(e.shape))}var eL=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=oL(e,a,t,n);i||o.removeAll(),a.diff(i).add(function(t){cL(n,null,t,s(t,r),e,o,a)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&SI(n,rI(n).option,e)}).update(function(t,c){cL(n,i.getItemGraphicEl(c),t,s(t,r),e,o,a)}).execute();var c=e.get(`clip`,!0)?vb(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=oL(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=cL(null,null,l,o(l,i),t,this.group,a);u&&(u.traverse(c),s.push(u))}},t.prototype.eachRendered=function(e){Np(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}(ub);function tL(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=SL(r);n=sp(a,null,i,r.layout||`center`),rI(n).customPathData=a}else if(t===`image`)n=new Is({}),rI(n).customImagePath=e.style.image;else if(t===`text`)n=new Ys({});else if(t===`group`)n=new Vd;else if(t===`compoundPath`){var r=e.shape;if(!r||!r.paths){var o=``;el(o)}n=new Df({shape:{paths:G(r.paths,function(e){if(e.type===`path`)return sp(e.shape.pathData,e,null);var t=op(e.type);return t||el(``),new t})}})}else{var s=op(t);if(!s){var o=``;el(o)}n=new s}return rI(n).customGraphicType=t,n.name=e.name,n.z2EmphasisLift=1,n.z2SelectLift=1,n}function nL(e,t,n,r,i,a,o){RI(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),r&&r.transition==null&&(r.transition=qI);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=ZI(t)?c.decal:null;e&&d&&(d.dirty=!0,u=DA(d,e)),c.__decalPattern=u}if(QI(t)&&c){var u=c.__decalPattern;u&&(c.decal=u)}bI(t,r,a,{dataIndex:n,isInit:o,clearStyle:!0}),zI(t,r.keyframeAnimation,a)}function rL(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),Bu(a)}}function iL(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<WI.length;s++)aL(r,t,WI[s])}}function aL(e,t,n){var r=n===VI,i=r?t:mL(t,n),a=i?i.z2:null,o;a!=null&&(o=r?e:e.ensureState(n),o.z2=a||0)}function oL(e,t,n,r){var i=e.get(`renderItem`);if(typeof i==`string`){var a=Lk(i);a&&(i=a)}var o=e.coordinateSystem,s={};o&&(s=o.prepareCustoms?o.prepareCustoms(o):XI[o.type](o));for(var c=gt({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:sL(e.getData()),itemPayload:e.get(`itemPayload`)||{}},u,d,f={},p={},m={},h={},g=0;g<WI.length;g++){var _=WI[g];m[_]=e.getModel(GI[_]),h[_]=e.getModel(KI[_])}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(GI[n])):v(e).getModel(GI[n]):m[n]}function b(e,n){return t.hasItemOption?e===u?p[n]||(p[n]=v(e).getModel(KI[n])):v(e).getModel(KI[n]):h[n]}return function(e,n){return u=e,d=null,f={},p={},i&&i(gt({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,VI).getItemStyle();a!=null&&(s.fill=a),o!=null&&(s.opacity=o);var c={inheritColor:q(a)?a:Q.color.neutral99},l=b(r,VI),d=Zp(l,null,c,!1,!0);d.text=l.getShallow(`show`)?X(e.getFormattedLabel(r,VI),Fy(t,r)):null;var f=Qp(l,c,!1);return E(n,s),s=wb(s,d,f),n&&T(s,n),s.legacy=!0,s}function w(n,r){r??=u;var i=y(r,BI).getItemStyle(),a=b(r,BI),o=Zp(a,null,null,!0,!0);o.text=a.getShallow(`show`)?Lt(e.getFormattedLabel(r,BI),e.getFormattedLabel(r,VI),Fy(t,r)):null;var s=Qp(a,null,!0);return E(n,i),i=wb(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(tI,e)){var r=t.getItemVisual(n,`style`);return r?r[tI[e]]:null}if(Z(nI,e))return t.getItemVisual(n,e)}function O(e){if(o.type===`cartesian2d`)return Yw(gt({axis:o.getBaseAxis()},e))}function k(){return n.getCurrentSeriesIndices()}function A(e){return am(e,n)}}function sL(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 cL(e,t,n,r,i,a,o){if(!r){a.remove(t);return}var s=lL(e,t,n,r,i,a);return s&&o.setItemGraphicEl(n,s),s&&cd(s,r.focus,r.blurScope,r.emphasisDisabled),s}function lL(e,t,n,r,i,a){var o=-1,s=t;t&&uL(t,r,i)&&(o=_t(a.childrenRef(),t),t=null);var c=!t,l=t;l?l.clearStates():(l=tL(r),s&&$I(s,l)),r.morph===!1?l.disableMorphing=!0:l.disableMorphing&&(l.disableMorphing=!1),r.tooltipDisabled&&(l.tooltipDisabled=!0),YI.normal.cfg=YI.normal.conOpt=YI.emphasis.cfg=YI.emphasis.conOpt=YI.blur.cfg=YI.blur.conOpt=YI.select.cfg=YI.select.conOpt=null,YI.isLegacy=!1,fL(l,n,r,i,c,YI),dL(l,n,r,i,c),nL(e,l,n,r,YI,i,c),Z(r,`info`)&&(rI(l).info=r.info);for(var u=0;u<WI.length;u++){var d=WI[u];if(d!==VI){var f=mL(r,d),p=hL(r,f,d);rL(d,l,f,p,YI)}}return iL(l,r,i),r.type===`group`&&gL(e,l,n,r,i),o>=0?a.replaceAt(l,o):a.add(l),l}function uL(e,t,n){var r=rI(e),i=t.type,a=t.shape,o=t.style;return n.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i===`path`&&CL(a)&&SL(a)!==r.customPathData||i===`image`&&Z(o,`image`)&&o.image!==r.customImagePath}function dL(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&&uL(o,a,r)&&(o=null),o||(o=tL(a),e.setClipPath(o)),nL(null,o,t,a,null,r,i)}}function fL(e,t,n,r,i,a){if(!(e.isGroup||e.type===`compoundPath`)){pL(n,null,a),pL(n,BI,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=tL(o),e.setTextContent(u)),nL(null,u,t,o,null,r,i);for(var d=o&&o.style,f=0;f<WI.length;f++){var p=WI[f];if(p!==VI){var m=a[p].conOpt;rL(p,u,m,hL(o,m,p),null)}}d?u.dirty():u.markRedraw()}}}}function pL(e,t,n){var r=t?mL(e,t):e,i=t?hL(e,r,BI):e.style,a=e.type,o=r?r.textConfig:null,s=e.textContent,c=s?t?mL(s,t):s:null;if(i&&(n.isLegacy||xb(i,a,!!o,!!c))){n.isLegacy=!0;var l=Sb(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 mL(e,t){return t?e?e[t]:null:e}function hL(e,t,n){var r=t&&t.style;return r==null&&n===BI&&e&&(r=e.styleEmphasis),r}function gL(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){vL({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,lL(e,f,n,d,i,t)):f.ignore=!0}for(var p=t.childCount()-1;p>=u;p--)_L(t,t.childAt(p),i)}}function _L(e,t,n){t&&SI(t,rI(e).option,n)}function vL(e){new Sm(e.oldChildren,e.newChildren,yL,yL,e).add(bL).update(bL).remove(xL).execute()}function yL(e,t){return(e&&e.name)??JI+t}function bL(e,t){var n=this.context,r=e==null?null:n.newChildren[e],i=t==null?null:n.oldChildren[t];lL(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function xL(e){var t=this.context,n=t.oldChildren[e];n&&SI(n,rI(n).option,t.seriesModel)}function SL(e){return e&&(e.pathData||e.d)}function CL(e){return e&&(Z(e,`pathData`)||Z(e,`d`))}function wL(e){e.registerChartView(eL),e.registerSeriesModel(iI)}var TL=wl(),EL=mt,DL=Et,OL=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 Vd,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=Dt(kL,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}NL(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&&aC(r).w>o)return!0;if(a){var s=uN(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=TL(e).pointerEl=new Qf[i.type](EL(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=TL(e).labelEl=new Ys(EL(t.label));e.add(i),jL(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=TL(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=TL(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),jL(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=Cp(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){UE(e.event)},onmousedown:DL(this._onHandleDragMove,this,0,0),drift:DL(this._onHandleDragMove,this),ondragend:DL(this._onHandleDragEnd,this)}),n.add(r)),NL(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,uT(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){kL(this._axisPointerModel,!t&&this._moveAnimation,this._handle,ML(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(ML(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(ML(r)),TL(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),dT(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 kL(e,t,n,r){AL(TL(n).lastProp,r)||(TL(n).lastProp=r,t?Gf(n,r,e):(n.stopAnimation(),n.attr(r)))}function AL(e,t){if(J(e)&&J(t)){var n=!0;return W(t,function(t,r){n&&=AL(e[r],t)}),!!n}return e===t}function jL(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function ML(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function NL(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 PL(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 FL(e,t,n,r,i){var a=LL(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=H_(o.get(`padding`)||0),c=o.getFont(),l=Ir(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),IL(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:Zp(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function IL(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 LL(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:Mx(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)}),q(o)?a=o.replace(`{value}`,a):Ot(o)&&(a=o(s))}return a}function RL(e,t,n){var r=An();return Fn(r,r,n.rotation),Pn(r,r,n.position),gp([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function zL(e,t,n,r,i,a){var o=WC.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),FL(t,r,i,a,{position:RL(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function BL(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function VL(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function HL(e,t,n){return aC(e,{fromStat:{sers:G(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function UL(e,t,n){return[pc(fc(t[0],t[1]),e-n/2),fc(e+n/2,pc(t[0],t[1]))]}var WL=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=GL(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=PL(r),f=KL[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}zL(t,e,dw(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=dw(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=RL(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=GL(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=fc(o[1],l[c]),l[c]=pc(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}(OL);function GL(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var KL={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:BL([t,r[0]],[t,r[1]],qL(e))}},shadow:function(e,t,n,r,i,a){var o=HL(e,i,a),s=r[1]-r[0],c=UL(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:VL([l,r[0]],[u-l,s],qL(e))}}};function qL(e){return e.dim===`x`?0:1}var JL=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}(pv),YL=wl(),XL=W;function ZL(e,t,n){if(!nn.node){var r=t.getZr();YL(r).records||(YL(r).records={}),QL(r,t);var i=YL(r).records[e]||(YL(r).records[e]={});i.handler=n}}function QL(e,t){if(YL(e).initialized)return;YL(e).initialized=!0,n(`click`,Dt(tR,`click`)),n(`mousemove`,Dt(tR,`mousemove`)),n(`mousewheel`,Dt(tR,`mousewheel`)),n(`globalout`,eR);function n(n,r){e.on(n,function(n){var i=nR(t);XL(YL(e).records,function(e){e&&r(e,n,i.dispatchAction)}),$L(i.pendings,t)})}}function $L(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 eR(e,t,n){e.handler(`leave`,null,n)}function tR(e,t,n,r){t.handler(e,n,r)}function nR(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 rR(e,t){if(!nn.node){var n=t.getZr();(YL(n).records||{})[e]&&(YL(n).records[e]=null)}}var iR=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`;ZL(`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){rR(`axisPointer`,t)},t.prototype.dispose=function(e,t){rR(`axisPointer`,t)},t.type=`axisPointer`,t}(KO);function aR(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Cl(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 oR=wl();function sR(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||Et(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){_R(i)&&(i=aR({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=_R(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||_R(i),f={},p={},m={list:[],map:{}},h={showPointer:Dt(uR,p),showTooltip:Dt(dR,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=hR(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&cR(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,gR(t),gR(e)))),g[e.key]=a}})}),W(g,function(e,t){cR(u[t],e,h,!0,f)}),fR(p,u,f),pR(m,i,e,o),mR(u,o,n),f}}function cR(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=lR(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&U(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function lR(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(Jc(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 uR(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function dR(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=pN(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 fR(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 pR(e,t,n,r){if(_R(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 mR(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=oR(r)[i]||{},o=oR(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 hR(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 gR(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 _R(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function vR(e){hN.registerAxisPointerClass(`CartesianAxisPointer`,WL),e.registerComponentModel(JL),e.registerComponentView(iR),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=rN(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},sR)}function yR(e){pM(EN),pM(vR)}function bR(e,t){var n=H_(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Ws({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 xR=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}(pv);function SR(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function CR(e){if(nn.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var wR=CR([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),TR=CR([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function ER(e,t){if(!e)return t;t=V_(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function DR(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}var OR=ER(TR,`transition`),kR=ER(wR,`transform`),AR=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(nn.transform3dSupported?`will-change:transform;`:``);function jR(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function MR(e,t,n){if(!q(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=J_(t);var a=jR(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=kR+`:`,l;_t([`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 NR(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?`,`:``)+(nn.transformSupported?``+kR+i:`,left`+i+`,top`+i)),OR+`:`+a}function PR(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!nn.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=nn.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+kR+`:`+o+`;`:[[`top`,0],[`left`,0],[wR,o]]}function FR(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 IR(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=uy(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(NR(a,n,r)),o&&i.push(`background-color:`+o),W([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=V_(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(FR(d)),f!=null&&i.push(`padding:`+H_(f).join(`px `)+`px`),i.join(`;`)+`;`}function LR(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Mg(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 RR=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,nn.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&&(q(i)?document.querySelector(i):Nt(i)?i:Ot(i)&&i(e.getDom()));LR(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;zE(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=DR(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=AR+IR(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+PR(i[0],i[1],!0)+(`border-color:`+J_(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(q(i)&&n.get(`trigger`)===`item`&&!SR(n)&&(o=MR(n,r,i)),q(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,K(e)||(e=[e]);for(var s=0;s<e.length;s++)Nt(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(LR(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;W(PR(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`,nn.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(Et(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}(),zR=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),HR(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;J(e)&&el(``),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:uy(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=VR(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;HR(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=BR(i.borderWidth||0),o=VR(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(Et(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function BR(e){return Math.max(0,e)}function VR(e){var t=BR(e.shadowBlur||0),n=BR(e.shadowOffsetX||0),r=BR(e.shadowOffsetY||0);return{left:BR(t-n),right:BR(t+n),top:BR(t-r),bottom:BR(t+r)}}function HR(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var UR=new Ws({shape:{x:-1,y:-1,width:2,height:2}}),WR=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(!(nn.node||!t.getDom())){var n=e.getComponent(`tooltip`),r=this._renderMode=Nl(n.get(`renderMode`));this._tooltipContent=r===`richText`?new zR(t):new RR(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}},t.prototype.render=function(e,t,n){if(!(nn.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`)?uT(this,`_updatePosition`,50,`fixRate`):dT(this,`_updatePosition`)}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);ZL(`itemTooltip`,this._api,Et(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||nn.node||!n.getDom())){var i=KR(r,n);this._ticket=``;var a=r.dataByCoordSys,o=ZR(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=UR;c.x=r.x,c.y=r.y,c.update(),$l(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=aR(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(KR(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&&GR([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($l(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;Ak(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||($l(e).dataIndex==null?$l(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=Et(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=GR([t.tooltipOption],r),o=this._renderMode,s=[],c=Xv(`section`,{blocks:[],noHeader:!0}),l=[],u=new dy;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=LL(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=Xv(`section`,{header:f,noHeader:!Vt(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=Mx(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,J_(m.color),o);var h=wv(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=GR([a],r).get(`valueFormatter`);p.blocks.push(_?U({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=ny(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=$l(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=GR([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 dy;h.marker=g.makeTooltipMarker(`item`,J_(h.color),d);var _=wv(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?ny(y?U({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=$l(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(q(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=mt(a),a.content=Bg(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=GR(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new dy;this._showOrMove(d,function(){var n=mt(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(q(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=S_(m.axisValue,d,p)),d=K_(d,n,!0)}else if(Ot(u)){var g=Et(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),Ot(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),K(t))n=wc(t[0],s),r=wc(t[1],c);else if(J(t)){var p=t;p.width=l[0],p.height=l[1];var m=iv(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(q(t)&&o){var h=YR(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=qR(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=XR(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=XR(d)?l[1]/2:d===`bottom`?l[1]:0),SR(e)){var h=JR(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){nn.node||!t.getDom()||(dT(this,`_updatePosition`),this._tooltipContent.dispose(),rR(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(KO);function GR(e,t,n){var r=t.ecModel,i;n?(i=new ym(n,r,r),i=new ym(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof ym&&(o=o.get(`tooltip`,!0)),q(o)&&(o={formatter:o}),o&&(i=new ym(o,i,r)))}return i}function KR(e,t){return e.dispatchAction||Et(t.dispatchAction,t)}function qR(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 JR(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 YR(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 XR(e){return e===`center`||e===`middle`}function ZR(e,t,n){var r=Dl(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=kl(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=$l(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function QR(e){pM(vR),e.registerComponentModel(xR),e.registerComponentView(WR),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},$t),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},$t)}var $R=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}(pv),ez=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:Zp(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new Ys({style:Zp(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(){Y_(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){Y_(p,`_`+e.get(`subtarget`))}),$l(c).eventData=$l(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 _=iv(g,ov(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 Ws({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}(KO);function tz(e){e.registerComponentModel($R),e.registerComponentView(ez)}function nz(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 rz(e){al(e,`label`,[`show`])}var iz=wl(),az=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(nn.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=iz(e)[i];if(!n||!n.data){iz(e)[i]=null;return}a?a._mergeOption(n,t,!0):(r&&rz(n),W(n.data,function(e){e instanceof Array?(rz(e[0]),rz(e[1])):rz(e)}),a=this.createMarkerModelFromSeries(n,this,t),U(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),iz(e)[i]=a},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return Xv(`section`,{header:this.name,blocks:[Xv(`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=Cv.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 iz(e)[t]},t.type=`marker`,t.dependencies=[`series`,`grid`,`polar`,`geo`],t}(pv);yt(az,Cv.prototype);function oz(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function sz(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function cz(e,t,n,r,i,a,o){var s=[],c=hg(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=hz(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=Ac(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var lz={min:Dt(cz,`min`),max:Dt(cz,`max`),average:Dt(cz,`average`),median:Dt(cz,`median`)};function uz(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!sz(t)&&!K(t.coord)&&K(i)){var a=dz(t,n,r,e);if(t=mt(t),t.type&&lz[t.type]&&a.baseAxis&&a.valueAxis){var o=_t(i,a.baseAxis.dim),s=_t(i,a.valueAxis.dim),c=lz[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&&lz[t.type]){var u=r.getOtherAxis(l);u&&(t.value=hz(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)lz[d[f]]&&(d[f]=hz(n,n.mapDimension(i[f]),d[f]));return t}}function dz(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(fz(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 fz(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function pz(e,t){return e&&e.containData&&t.coord&&!oz(t)?e.containData(t.coord):!0}function mz(e,t){return e?function(e,n,r,i){return mh(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return mh(e.value,t[i])}}function hz(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 gz=wl(),_z=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=Yt()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){gz(e).keep=!1}),t.eachSeries(function(e){var i=az.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!gz(e).keep&&r.group.remove(e.group)}),vz(t,i,this.type)},t.prototype.markKeep=function(e){gz(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;W(e,function(e){var r=az.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?Gu(e):Ku(e))})})},t.type=`marker`,t}(KO);function vz(e,t,n){e.eachSeries(function(e){var r=az.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=Rp(r),o=a.z,s=a.zlevel;Bp(i.group,o,s)}})}var yz=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}(az),bz=wl(),xz=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=Y(r.yAxis,r.xAxis);else{var l=dz(r,i,t,e);s=l.valueAxis,c=hz(i,gg(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=mt(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&&At(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=[uz(e,a[0]),uz(e,a[1]),U({},a[2])];return h[2].type=h[2].type||null,H(h[2],h[0]),H(h[2],h[1]),h};function Sz(e){return!isNaN(e)&&!isFinite(e)}function Cz(e,t,n,r){var i=1-e,a=r.dimensions[e];return Sz(t[i])&&Sz(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function wz(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(Cz(1,n,r,e)||Cz(0,n,r,e)))return!0}return pz(e,t[0])&&pz(e,t[1])}function Tz(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=wc(o.get(`x`),i.getWidth()),l=wc(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(bb(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;Sz(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):Sz(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 Ez=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=az.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=bz(t).from,a=bz(t).to;i.each(function(t){Tz(i,t,!0,e,n),Tz(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 XF);this.group.add(c.group);var l=Dz(i,e,t),u=l.from,d=l.to,f=l.line;bz(t).from=u,bz(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){$l(e).dataModel=t,e.traverse(function(e){$l(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);Tz(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=kk(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}(_z);function Dz(e,t,n){var r=e?G(e&&e.dimensions,function(e){var n=t.getData();return U(U({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new Xh(r,n),a=new Xh(r,n),o=new Xh([],n),s=G(n.get(`data`),Dt(xz,t,e,n));e&&(s=St(s,Dt(wz,e)));var c=mz(!!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 Oz(e){e.registerComponentModel(yz),e.registerComponentView(Ez),e.registerPreprocessor(function(e){nz(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var kz=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`])}},Az=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){q(e)&&(e={type:e}),t[r]=H(e,kz(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&&yl(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=Yt(),a=G(r,function(e){return(q(e)||At(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new ym(e,this,this.ecModel))},this);this._data=St(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])&&_t(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}(pv),jz=Dt,Mz=W,Nz=Vd,Pz=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 Nz),this.group.add(this._selectorGroup=new Nz),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=ov(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=iv(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=iv(gt({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=bR(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=Yt(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),Mz(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
|
|
17
|
+
`)){var p=new Nz;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`,jz(Lz,f,null,r,d)).on(`mouseover`,jz(Rz,m.name,null,r,d)).on(`mouseout`,jz(zz,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=$l(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`),_=ua(h.fill);_&&_[3]===0&&(_[3]=.2,h=U(U({},h),{fill:va(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,jz(Lz,null,f,r,d)).on(`mouseover`,jz(Rz,null,f,r,d)).on(`mouseout`,jz(zz,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=$l(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};$l(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();Mz(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}),od(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=Fz(c,r,o,s,d,m,u),y=new Nz,b=r.getModel(`textStyle`);if(Ot(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(Iz({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;q(w)&&w?T=w.replace(`{name}`,t??``):Ot(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Ys({style:Zp(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Ws({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&jp({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),od(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();ev(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){ev(`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}(KO);function Fz(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),Mz(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:DA(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 Iz(e){var t=e.icon||`roundRect`,n=jy(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 Lz(e,t,n,r){zz(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),Rz(e,t,n,r)}function Rz(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function zz(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function Bz(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),Vz(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){W(i,function(t,n){e[t?`select`:`unSelect`](n)}),Vz(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function Vz(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 Hz(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,Dt(Bz,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,Dt(Bz,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,Dt(Bz,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,Dt(Bz,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,Dt(Bz,`unSelect`))}var Uz=Ql(Wz);function Wz(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 Gz(e){e.registerComponentModel(Az),e.registerComponentView(Pz),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,Uz),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),Hz(e)}var Kz=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=uv(t);e.prototype.init.call(this,t,n,r),qz(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),qz(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=Eg(Az.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}(Az);function qz(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,lv(t,n,{type:`box`,ignoreSize:!!i})}var Jz=Vd,Yz=[`width`,`height`],Xz=[`x`,`y`],Zz=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 Jz),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Jz)},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=Cp(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:Et(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=Yz[s],l=Xz[s],u=Yz[1-s],d=Xz[1-s];i&&ev(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=mt(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;ev(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),ev(`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 Ws({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&&Gf(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`,q(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=Yz[i],o=Xz[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}(Pz);function Qz(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 $z(e){pM(Gz),e.registerComponentModel(Kz),e.registerComponentView(Zz),Qz(e)}function eB(e){pM(Gz),pM($z)}var tB={label:{enabled:!0},decal:{show:!1}},nB=wl(),rB=wl(),iB=Ql(aB);function aB(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=rB(e).scope||(rB(e).scope={}),i=mt(tB);H(i.label,e.getLocaleModel().get(`aria`),!1),H(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=Yt();e.eachSeries(function(e){e.isColorBySeries()||(nB(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(Ot(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=vv(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=nB(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=vv(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?U(U({},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=gt(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?St(i.getValues(_),function(e,t){return _t(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(!q(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 oB(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 sB(e){e.registerPreprocessor(oB),e.registerVisual(e.PRIORITY.VISUAL.ARIA,iB)}function cB(e,t,n){var r=Qe.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 lB(e){return!e.__cursors.get(0)}function uB(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var dB=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=cB(t,n,r):J(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(Qt(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=uB(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=cB(`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 gr(0,0,0,0);function c(e){if(!(!e.isFinite()||e.isZero())){if(i.length===0){var t=new gr(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 gr(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 gr(0,0,0,0);t.copy(e),i.push(t)}o||=i.length>=a}}}for(var l=uB(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;Pt(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||Wk(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):Ft(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=nA(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}(qa),fB=1e5,pB=314159,mB=void 0,hB=1,gB=2;function _B(e){return e?e.__builtin__?!0:typeof e.resize==`function`&&typeof e.refresh==`function`:!1}function vB(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 yB(e,t,n,r){var i=new dB(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,bB(i),i}function bB(e){e.__cursorStack=[],e.__cursors=Yt()}function xB(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function SB(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,xB({key:r})))}function CB(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function wB(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function TB(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&EB)||s.__builtin__)&&(!(n&DB)||!s.__builtin__)&&(!(n&OB)||s!==e.hoverlayer))&&t(s,a,o,i)}}var EB=1,DB=2,OB=4,kB=EB|OB,AB=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=U({},n||{}),this.dpr=n.devicePixelRatio||Ya,this._singleCanvas=i,this.root=e,e.style&&(Qt(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=yB(a,this,pB,0);c.initContext(),this._insertLayer(c,pB,0,!0),this._domRoot=e}else{this._width=qk(e,0,n),this._height=qk(e,1,n);var l=this._domRoot=vB(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&&!J(e)?{paintAll:!!e}:e||{},n=X(t.refresh,!0),r=X(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=gB),!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 TB(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},DB),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=mB,n!==mB&&(!t&&n===gB&&(t=this._i.hoverlayer=this._ensureLayer(fB)),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),xA(i,s,r),c&&(s.style=l)}}i&&(SA(i,r),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(fB)},e.prototype.paintOne=function(e,t){bA(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)TB(this._i,function(e){e.afterBrush&&e.afterBrush()},kB),this._paintHoverList(e);else{var i=this;bD(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(pB).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),TB(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},EB)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return TB(this._i,function(i){var a=!1;if(CB(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),!(!a&&!i.__dirty)){var o=n._opts.useDirtyRect&&!lB(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)}CB(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},kB),nn.wxa&&TB(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=lB(e),c=s&&Qe.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=gB),r!=null){var p=f.getPaintRect();p&&p.intersect(r)&&(xA(o,f,a),f.setPrevPaintRect(p))}else xA(o,f,a);if(s&&Qe.getTime()-c>15){d++;break}}}SA(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=pB,t=0);var i=wB(this._i,e)[t];return i||(i=yB(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&H(i,this._layerConfig[e],!0),(n||r&&e!==pB)&&(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])&&_B(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=wB(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),wB(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 TB(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return TB(this._i,function(n,r){e.call(t,n,r)},EB)},e.prototype.eachOtherLayer=function(e,t){return TB(this._i,function(n,r){e.call(t,n,r)},DB)},e.prototype.getLayers=function(){var e={};return TB(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}}TB(n._i,function(e){e.__dirty=!1,CB(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},kB);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__)){pt(`ZLevel `+d+` has been used by unknown layer `+o.id);continue}if((!s||f!==s.key)&&(s=SB(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))}TB(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;(lB(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&&(CB(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===mB&&(n._hoverLayerDirty=hB))},kB)},e.prototype.clear=function(){return TB(this._i,function(e){e.clear(),bB(e)},EB),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,TB(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?H(n[e],t,!0):n[e]=t,TB(this._i,function(e,t){H(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=qk(i,0,r),t=qk(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,TB(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(pB).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[pB][0].dom;var t=new dB(`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;TB(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];xA(n,l,a)}SA(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function jB(e){e.registerPainter(`canvas`,AB)}var MB=t(`<tr><td> </td><td> </td></tr>`),NB=t(`<tr><td> </td><td> </td><td> </td></tr>`),PB=t(`<div data-testid="model-detail-visual" data-chart-engine="echarts"></div> <div class="model-detail-data svelte-1i3n9mf"><table><thead><tr><th> </th><th> </th></tr></thead><tbody></tbody></table> <table><thead><tr><th> </th><th> </th><th> </th></tr></thead><tbody></tbody></table></div>`,1);function FB(t,i){ne(i,!1);let a=y(),o=y(),u=`agent-usage:theme-changed`;pM([AE,uS,yR,QR,eB,tz,sB,jB]);let m=S(i,`compositionTotals`,8),h=S(i,`unclassifiedTokens`,8),_=S(i,`trend`,8),v=S(i,`trendEvidence`,8),x=S(i,`locale`,8),w=S(i,`formatNumber`,8),E=S(i,`formatMoney`,8),D=y(null),O=y(null),A=null,j=0,M=0,N=0,P=y(!1),ee=y(!1),I=y({text:`#10131a`,muted:`#697386`,surface:`#ffffff`,border:`#dce1e9`,primary:`#647cf0`,cost:`#9b7cf4`}),te=[{key:`input`,label:`input`,color:`#6f8ff7`},{key:`output`,label:`output`,color:`#e19a6c`},{key:`reasoning`,label:`reasoning`,color:`#9b7cf4`},{key:`cacheRead`,label:`cacheRead`,color:`#52c5a4`},{key:`cacheWrite`,label:`cacheWrite`,color:`#e0b84f`}];function R(e){return Ee(x(),e)}function ae(e){let{composition:t,trend:n,trendEvidence:r,compact:i,colors:a,locale:o,formatNumber:s,formatMoney:c}=e,l=e=>Ee(o,e),u=l(`recordedTotal`),d=l(`cost`),f=r.find(e=>e.costAmount!==null)?.costCurrency??`USD`;return{animation:!B(),animationDuration:320,aria:{enabled:!0,decal:{show:!1}},title:[{text:l(`tokenBreakdown`),left:i?16:`3%`,top:i?8:10,textStyle:{color:a.text,fontSize:12,fontWeight:600},subtextStyle:{color:a.muted,fontSize:9}},{text:l(`modelTrend`),left:i?16:`47%`,top:i?`53%`:10,textStyle:{color:a.text,fontSize:12,fontWeight:600},subtextStyle:{color:a.muted,fontSize:9}}],legend:[{type:`scroll`,orient:`horizontal`,left:i?12:`2%`,right:i?12:`55%`,...i?{top:224}:{bottom:12},data:t.map(e=>e.name),textStyle:{color:a.muted,fontSize:9},itemWidth:9,itemHeight:9},{left:i?12:`47%`,top:i?`62%`:50,data:[u,d],textStyle:{color:a.muted,fontSize:9},itemWidth:14,itemHeight:8}],tooltip:{trigger:`item`,confine:!0,renderMode:`richText`,backgroundColor:a.surface,borderColor:a.border,borderWidth:1,padding:[9,11],textStyle:{color:a.text,fontSize:11},formatter:e=>{let t=Array.isArray(e)?e[0]:e,i=typeof t.dataIndex==`number`?t.dataIndex:-1,a=typeof t.value==`number`?t.value:0;if(t.seriesType===`pie`)return`${t.name}\n${s(a)} ${l(`tokens`)}`;let o=n[i],u=r[i];return!o||!u?`${s(a)} ${l(`tokens`)}`:t.seriesName===d?`${o.label}\n${c(u.costAmount,u.costCurrency)}`:`${o.label}\n${s(a)} ${l(`tokens`)}`}},grid:{left:i?48:`47%`,right:48,top:i?`68%`:82,bottom:i?34:38,containLabel:!0},xAxis:{type:`category`,boundaryGap:!1,data:n.map(e=>e.label),axisLine:{lineStyle:{color:a.border}},axisTick:{show:!1},axisLabel:{color:a.muted,fontSize:9,hideOverlap:!0,interval:`auto`}},yAxis:[{type:`value`,min:0,splitNumber:3,axisLabel:{color:a.muted,fontSize:9,formatter:e=>oe(e,o)},splitLine:{lineStyle:{color:a.border,opacity:.65}}},{type:`value`,min:0,position:`right`,splitNumber:3,axisLabel:{color:a.cost,fontSize:9,formatter:e=>z(e,f,o)},splitLine:{show:!1}}],series:[{name:l(`tokenBreakdown`),type:`pie`,center:i?[`50%`,`27%`]:[`23%`,`50%`],radius:i?[`20%`,`34%`]:[`34%`,`54%`],avoidLabelOverlap:!0,itemStyle:{borderColor:a.surface,borderWidth:3,borderRadius:4},label:{show:!1},emphasis:{focus:`self`,scaleSize:5},data:t},{name:u,type:`line`,yAxisIndex:0,smooth:.28,showSymbol:n.length<=14,symbolSize:6,connectNulls:!1,data:r.map(e=>e.recordedTokens),lineStyle:{width:2.5,color:a.primary},itemStyle:{color:a.primary},areaStyle:{color:a.primary,opacity:.12},emphasis:{focus:`series`}},{name:d,type:`line`,yAxisIndex:1,smooth:.28,showSymbol:n.length<=14,symbolSize:6,connectNulls:!1,data:r.map(e=>e.costAmount),lineStyle:{width:2,type:`dashed`,color:a.cost},itemStyle:{color:a.cost},emphasis:{focus:`series`}}]}}function oe(e,t){return new Intl.NumberFormat(t,{notation:`compact`,maximumFractionDigits:1}).format(e)}function z(e,t,n){return new Intl.NumberFormat(n,{style:`currency`,currency:t,notation:`compact`,maximumFractionDigits:1}).format(e)}function B(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function se(e,t){return p(D)&&getComputedStyle(p(D)).getPropertyValue(e).trim()||t}function ce(){b(I,{text:se(`--text-strong`,p(I).text),muted:se(`--muted`,p(I).muted),surface:se(`--surface`,p(I).surface),border:se(`--border`,p(I).border),primary:se(`--primary`,p(I).primary),cost:se(`--warning`,p(I).cost)})}function ue(e){p(O)?.setOption(e,{notMerge:!0,lazyUpdate:!1})}ie(()=>{if(p(D))return M=requestAnimationFrame(()=>{N=requestAnimationFrame(()=>{p(D)&&(ce(),b(ee,p(D).clientWidth<660),b(O,qj(p(D),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(O).getDom().setAttribute(`aria-hidden`,`true`),ue(p(o)),A=new ResizeObserver(([e])=>{let t=e.contentRect.width<660;t!==p(ee)&&b(ee,t),cancelAnimationFrame(j),j=requestAnimationFrame(()=>p(O)?.resize())}),A.observe(p(D)),b(P,!0))})}),window.addEventListener(u,ce),()=>{window.removeEventListener(u,ce),cancelAnimationFrame(M),cancelAnimationFrame(N),cancelAnimationFrame(j),A?.disconnect(),p(O)?.dispose(),b(O,null)}}),fe(()=>(d(m()),d(h())),()=>{b(a,te.map(e=>({name:R(e.label),value:m()[e.key],itemStyle:{color:e.color}})).filter(e=>e.value>0).concat(h()>0?[{name:R(`unclassified`),value:h(),itemStyle:{color:`#8b94a5`}}]:[]))}),fe(()=>(p(a),d(_()),d(v()),p(ee),p(I),d(x()),d(w()),d(E())),()=>{b(o,ae({composition:p(a),trend:_(),trendEvidence:v(),compact:p(ee),colors:p(I),locale:x(),formatNumber:w(),formatMoney:E()}))}),fe(()=>(p(O),p(o)),()=>{p(O)&&ue(p(o))}),n(),L();var pe=PB(),me=re(pe);let he;T(me,e=>b(D,e),()=>p(D));var ge=s(me,2),_e=c(ge),ve=c(_e),ye=c(ve),be=c(ye),xe=c(be,!0);F(be);var Se=s(be),Ce=c(Se,!0);F(Se),F(ye),F(ve);var we=s(ve);le(we,5,()=>p(a),e=>e.name,(e,t)=>{var n=MB(),i=c(n),a=c(i,!0);F(i);var o=s(i),u=c(o,!0);F(o),F(n),g(e=>{r(a,(p(t),l(()=>p(t).name))),r(u,e)},[()=>(d(w()),p(t),l(()=>w()(p(t).value)))]),f(e,n)}),F(we),F(_e);var Te=s(_e,2),De=c(Te),Oe=c(De),ke=c(Oe),Ae=c(ke,!0);F(ke);var je=s(ke),Me=c(je,!0);F(je);var Ne=s(je),Pe=c(Ne,!0);F(Ne),F(Oe),F(De);var Fe=s(De);le(Fe,7,_,e=>e.start,(t,n,i)=>{let a=e(()=>(d(v()),d(p(i)),l(()=>v()[p(i)])));var o=NB(),u=c(o),m=c(u,!0);F(u);var h=s(u),_=c(h,!0);F(h);var y=s(h),b=c(y,!0);F(y),F(o),g((e,t)=>{r(m,(p(n),l(()=>p(n).label))),r(_,e),r(b,t)},[()=>(p(n),d(p(a)),d(w()),l(()=>p(n).gap||p(a)?.recordedTokens===null?R(`gap`):w()(p(a).recordedTokens))),()=>(d(p(a)),d(E()),l(()=>p(a)?.costAmount===null?R(`notAvailable`):E()(p(a).costAmount,p(a).costCurrency)))]),f(t,o)}),F(Fe),F(Te),F(ge),g((e,t,n,i,a,o,s,c)=>{he=de(me,1,`model-detail-visual svelte-1i3n9mf`,null,he,{"chart-pending":!p(P)}),k(me,`aria-busy`,!p(P)),k(me,`aria-label`,e),k(_e,`aria-label`,t),r(xe,n),r(Ce,i),k(Te,`aria-label`,a),r(Ae,o),r(Me,s),r(Pe,c)},[()=>l(()=>`${R(`tokenBreakdown`)} · ${R(`modelTrend`)}`),()=>l(()=>R(`tokenBreakdown`)),()=>l(()=>R(`tokens`)),()=>l(()=>R(`total`)),()=>l(()=>R(`modelTrend`)),()=>l(()=>R(`interval`)),()=>l(()=>R(`tokens`)),()=>l(()=>R(`cost`))]),f(t,pe),C()}function IB(e){return e.retailEquivalent.amount===null?e.reportedEstimate.amount:e.retailEquivalent.amount}function LB(e,t,n,r,i){let a=e.flatMap(e=>{let n=t===`tokens`?e.tokenTotals.total:IB(e);return n===null||n<=0?[]:[{modelId:e.id,model:e,value:n,providerDisplayName:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,includedInHeadline:e.includedInHeadline}]}),o=a.reduce((e,t)=>e+t.value,0)||1,s=new Map;for(let e of a)s.set(e.model.model,(s.get(e.model.model)??0)+1);let c=new Set,l=e=>{if((s.get(e.model)??0)===1)return e.model;let t=`${e.model} · ${e.providerDisplayName}`;if(!c.has(t))return t;let n=`${e.model} · ${e.providerDisplayName} · ${e.billingDomainDisplayName}`;if(!c.has(n))return n;let r=2,i=`${n} #${r}`;for(;c.has(i);)i=`${n} #${++r}`;return i};return a.map(e=>{let t=l(e.model);return c.add(t),{modelId:e.model.id,name:t,providerDisplayName:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,includedInHeadline:e.includedInHeadline,value:e.value,share:e.value/o,color:n(e.model.providerId,e.model.billingDomainId),formattedValue:r(e.value),formattedShare:i(e.value/o)}})}function RB(e,t,n={notAvailable:`Unavailable`,separateFromHeadline:`Separate domain · not included in headline`},r=!0){return{animation:r,animationDuration:r?320:0,animationEasing:`cubicOut`,aria:{enabled:!0,decal:{show:!1}},title:{show:e.length===0,text:n.notAvailable,left:`center`,top:`46%`,textStyle:{color:t.muted,fontSize:12,fontWeight:500}},tooltip:{show:!0,trigger:`item`,renderMode:`html`,confine:!0,className:`model-breakdown-tooltip`,backgroundColor:t.surface,borderColor:t.border,borderWidth:1,padding:[10,12],textStyle:{color:t.text,fontSize:11},extraCssText:`border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.22);`,formatter:e=>BB(e,t,n,n.notAvailable)},series:[{type:`treemap`,top:0,left:0,right:0,bottom:0,roam:!1,nodeClick:!1,squareRatio:1,gapWidth:2,breadcrumb:{show:!1},upperLabel:{show:!1},label:{show:!0,color:t.text,fontSize:11,fontWeight:600,lineHeight:16,overflow:`truncate`,ellipsis:`…`,formatter:e=>zB(e)},itemStyle:{borderColor:t.surface,borderWidth:2,gapWidth:2},emphasis:{label:{show:!0,fontWeight:700},itemStyle:{borderColor:t.border,borderWidth:3}},data:e.map(e=>({name:e.name,value:e.value,modelId:e.modelId,formattedValue:e.formattedValue,formattedShare:e.formattedShare,providerDisplayName:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,includedInHeadline:e.includedInHeadline,itemStyle:{color:e.color}}))}]}}function zB(e){if(!e||typeof e!=`object`||!(`data`in e))return``;let t=e.data;return!t||typeof t!=`object`?``:[t.name,t.formattedValue].filter(e=>typeof e==`string`).join(`
|
|
19
|
+
`)}function BB(e,t,n,r){if(!e||typeof e!=`object`||!(`data`in e))return r;let i=e.data;if(!i||typeof i!=`object`)return r;let a=i,o=[`<strong>${VB(a.name)}</strong>`,`<span style="color:${VB(t.muted)}">${VB(a.providerDisplayName)} · ${VB(a.billingDomainDisplayName)}</span>`,`<span>${VB(a.formattedValue)} · ${VB(a.formattedShare)}</span>`];return a.includedInHeadline||o.push(`<span style="color:${VB(t.muted)}">${VB(n.separateFromHeadline)}</span>`),o.join(`<br>`)}function VB(e){return e.replace(/[&<>'"]/g,e=>({"&":`&`,"<":`<`,">":`>`,"'":`'`,'"':`"`})[e]??e)}var HB=2.5,UB=[10,7],WB=`rgba(122, 136, 164, 0.16)`,GB=`#697386`,KB=`Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,qB={codex:`#78a7ff`,"claude-code":`#d69b73`,opencode:`#55c89d`,"opencode-go":`#73d4b2`,"grok:grok-build-subscription":`#b28cff`,"grok:custom":`#d480ff`,"grok:xai-api":`#f07f9a`,dsh:`#e3c85c`};function JB(e,t){return qB[`${e}:${t}`]??qB[e]??`#9aa5b8`}function YB(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 XB(e,t,n,r,i=.5){if(e<=1)return{start:t,size:n};let a=YB(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 ZB(e,t,n,r){let i=YB(e,t,n);return Math.max(0,Math.min(e-i.size,i.start+r))}function QB(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 $B(e,t,n){return e?t===`tokens`?e.recordedTokens:n===`reported-estimate`?e.reportedEstimate?.amount??null:e.retailEquivalent.amount:null}function eV(e,t){return QB(e,t).map(n=>({...n,key:`${n.providerId}:${n.billingDomainId}:${n.costPurpose??`tokens`}`,values:e.map(e=>e.gap?null:$B(e.segments.find(e=>e.providerId===n.providerId&&e.billingDomainId===n.billingDomainId),t,n.costPurpose))}))}function tV(e){let t=e.flatMap(e=>e.values.filter(e=>e!==null));return t.length>0?Math.max(...t):null}function nV(e,t){return e[t]!=null&&e[t-1]==null&&e[t+1]==null}function rV(e,t){return t<=1?50:Math.max(8,Math.min(92,e/(t-1)*100))}function iV(e){let t=JB(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)=>nV(e.values,n)),symbol:`circle`,symbolSize:(t,n)=>nV(e.values,n.dataIndex)?8:0,lineStyle:{width:HB,color:t,type:n?UB:`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 aV(e,t,n,r,i,a=e=>String(e)){let o=Math.max(1,n??0),s={color:r.label,fontFamily:KB,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(iV)}}var oV=t(`<div class="model-breakdown-treemap-root svelte-1nr4hcl"><div class="model-breakdown-echarts svelte-1nr4hcl" data-testid="model-breakdown-treemap" data-chart-engine="echarts"></div></div>`);function sV(e,t){ne(t,!1);let r=y(),i=y();pM([LF,QR,tz,sB,jB]);let a=S(t,`models`,8),s=S(t,`metric`,8),u=S(t,`currency`,8),m=S(t,`locale`,24,()=>Te(``)),h=S(t,`formatUsageMetric`,8),_=S(t,`formatPercent`,8),v=S(t,`onSelect`,8),x=y(null),w=y(null),E=y(null),D=null,O=y({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`});function A(e){return Ee(m(),e)}function j(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function M(e,t,n){let r=getComputedStyle(e).getPropertyValue(t).trim();if(!r)return n;let i=document.createElement(`span`);i.style.color=r,i.style.position=`absolute`,i.style.visibility=`hidden`,e.appendChild(i);let a=getComputedStyle(i).color;return i.remove(),a&&a!==`rgba(0, 0, 0, 0)`?a:n}function N(){let e=p(w)??p(x);e&&b(O,{text:M(e,`--text-strong`,p(O).text),muted:M(e,`--muted`,p(O).muted),surface:M(e,`--surface`,p(O).surface),border:M(e,`--border`,p(O).border)})}async function P(e){p(E)&&(p(E).setOption(e,{notMerge:!0,lazyUpdate:!1}),await o(),p(E).resize())}ie(()=>{if(p(x))return N(),b(E,qj(p(x),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(E).on(`click`,e=>{let t=e?.data,n=t&&typeof t==`object`?t.modelId:null;typeof n==`string`&&v()(n)}),D=new ResizeObserver(()=>p(E)?.resize()),D.observe(p(x)),window.addEventListener(De,N),()=>{window.removeEventListener(De,N),D?.disconnect(),D=null,p(E)?.dispose(),b(E,null)}}),fe(()=>(d(a()),d(s()),d(h()),d(u()),d(_())),()=>{b(r,LB(a(),s(),JB,e=>h()(e,u(),s()),_()))}),fe(()=>(p(r),p(O)),()=>{b(i,RB(p(r),p(O),{notAvailable:A(`notAvailable`),separateFromHeadline:A(`separateFromHeadline`)},!j()))}),fe(()=>(p(E),p(i)),()=>{p(E)&&P(p(i))}),n(),L();var ee=oV(),I=c(ee);T(I,e=>b(x,e),()=>p(x)),F(ee),T(ee,e=>b(w,e),()=>p(w)),g(e=>k(I,`aria-label`,e),[()=>l(()=>A(`modelBreakdownTreemap`))]),f(e,ee),C()}var cV=t(`<div class="model-trend-stacked-root svelte-kd7ncs" data-testid="model-trend-stacked"></div>`);function lV(e,t){ne(t,!1);let r=y(),i=y(),a=y();pM([WT,yR,QR,eB,sB,jB]);let o=S(t,`models`,8),s=S(t,`metric`,8),c=S(t,`currency`,8),u=S(t,`locale`,24,()=>Te(``)),m=S(t,`formatUsageMetric`,8),h=S(t,`onSelect`,8),_=y(null),v=y(null),x=null;function w(e){return Ee(u(),e)}function E(e){let t={};for(let n of e)t[n.model]=(t[n.model]??0)+1;return e.map(e=>(t[e.model]??0)>1?`${e.model} · ${e.providerDisplayName}`:e.model)}function D(e,t){let n=e.trend[t];return!n||n.gap?null:s()===`tokens`?n.tokenTotals.total:n.retailEquivalent.amount}function O(e,t,n){let r=e.map((e,r)=>({name:t[r],type:`bar`,stack:`total`,barMaxWidth:34,emphasis:{focus:`series`},itemStyle:{color:JB(e.providerId,e.billingDomainId)},data:n.map((t,n)=>D(e,n))}));return{animation:!A(),animationDuration:280,aria:{enabled:!0,decal:{show:!1}},legend:{type:`scroll`,bottom:4,left:8,right:8,textStyle:{color:`#697386`,fontSize:9},data:t},tooltip:{trigger:`axis`,axisPointer:{type:`shadow`},confine:!0,formatter:e=>{let t=Array.isArray(e)?e:[e],n=t[0];return[typeof n?.axisValue==`string`?n.axisValue:``,...t.flatMap(e=>{let t=typeof e.value==`number`?e.value:null;return t===null?[]:`${e.marker??``} ${e.seriesName}: ${m()(t,c(),s())}`})].join(`<br/>`)}},grid:{left:48,right:48,top:18,bottom:46,containLabel:!0},xAxis:{type:`category`,data:n,axisTick:{show:!1},axisLine:{lineStyle:{color:`#dce1e9`}},axisLabel:{color:`#697386`,fontSize:9,hideOverlap:!0}},yAxis:{type:`value`,min:0,axisLabel:{color:`#697386`,fontSize:9,formatter:e=>m()(e,c(),s())},splitLine:{lineStyle:{color:`#dce1e9`,opacity:.65}}},series:r}}function A(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}ie(()=>{if(p(_))return b(v,qj(p(_),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(v).on(`click`,e=>{let t=typeof e.seriesIndex==`number`?e.seriesIndex:-1,n=o()[t];n&&h()(n.id)}),x=new ResizeObserver(()=>p(v)?.resize()),x.observe(p(_)),()=>{x?.disconnect(),p(v)?.dispose(),b(v,null)}}),fe(()=>d(o()),()=>{b(r,o()[0]?.trend.map(e=>e.label)??[])}),fe(()=>d(o()),()=>{b(i,E(o()))}),fe(()=>(d(o()),p(i),p(r)),()=>{b(a,O(o(),p(i),p(r)))}),fe(()=>(p(v),p(a)),()=>{p(v)&&p(v).setOption(p(a),{notMerge:!0,lazyUpdate:!1})}),n(),L();var j=cV();T(j,e=>b(_,e),()=>p(_)),g(e=>k(j,`aria-label`,e),[()=>l(()=>w(`modelTrendStacked`))]),f(e,j),C()}function uV(e,t){if(!e)return null;let n=e.retailEquivalent.status===`available`?e.retailEquivalent.amount:null,r=Math.min(100,Math.max(0,e.progress*100)),i=e.breakEvenRatio===null?0:Math.min(100,Math.max(0,e.breakEvenRatio*100));return{start:e.start,end:e.end,elapsedDays:e.elapsedDays,totalDays:e.totalDays,elapsedPercent:r,earnedPercent:i,onPace:e.breakEvenRatio!==null&&e.breakEvenRatio>=e.progress,earnedLabel:t.money(n),periodCostLabel:t.money(e.periodCost.amount),bound:e.ratioBound}}var dV=[1,2,5,10,20,50],fV=14;function pV(e){let t=new Map;for(let n of e)t.set(n.providerDisplayName,(t.get(n.providerDisplayName)??0)+1);return new Map(e.map(e=>[`${e.providerId}:${e.billingDomainId}`,(t.get(e.providerDisplayName)??0)>1?mV(e):e.providerDisplayName]))}function mV(e){return e.providerDisplayName===e.billingDomainDisplayName?e.providerDisplayName:`${e.providerDisplayName} · ${e.billingDomainDisplayName}`}function hV(e,t){return e.plan.displayName||t}function gV(e,t,n){let r=pV(e.entries);return e.entries.flatMap(e=>{let i=e.windowPlanCost.amount,a=e.retailEquivalent.status===`available`?e.retailEquivalent.amount:null;return i===null||a===null?[]:[{key:`${e.providerId}:${e.billingDomainId}`,name:mV(e),shortName:r.get(`${e.providerId}:${e.billingDomainId}`)??mV(e),planLabel:hV(e,n),color:t(e.providerId,e.billingDomainId),paid:i,worth:a,tokens:e.recordedTokens??0,ratio:e.valueRatio,bound:e.ratioBound,effectiveUnitPrice:e.effectiveUnitPrice,retailUnitPrice:e.retailUnitPrice}]})}function _V(e,t){return t<=0||e<=0?fV:fV+32*Math.sqrt(e/t)}function vV(e,t){if(e<=0||t<=0)return[];let n=n=>{let r=Math.min(e,t/n);return{ratio:n,points:[[0,0],[r,r*n]]}},r=dV.filter(e=>e!==1).map(n).filter(t=>t.points[1][0]>=e*.2).slice(-3);return[n(1),...r]}function yV(e,t,n,r,i=!0){let a=Math.max(...e.map(e=>e.paid),0)*1.25,o=Math.max(...e.map(e=>e.worth),0)*1.25,s=Math.max(...e.map(e=>e.tokens),0),c=vV(a,o);return{animation:i,animationDuration:i?320:0,animationEasing:`cubicOut`,aria:{enabled:!0,decal:{show:!1}},title:{show:e.length===0,text:n.empty,left:`center`,top:`44%`,textStyle:{color:t.muted,fontSize:12,fontWeight:500}},grid:{top:34,right:26,bottom:46,left:62,containLabel:!0},xAxis:{type:`value`,show:e.length>0,min:0,max:a||void 0,name:n.paid,nameLocation:`middle`,nameGap:30,nameTextStyle:{color:t.muted,fontSize:11},axisLabel:{color:t.muted,fontSize:10,formatter:e=>r.money(e)},axisLine:{lineStyle:{color:t.border}},splitLine:{lineStyle:{color:t.border,opacity:.35}}},yAxis:{type:`value`,show:e.length>0,min:0,max:o||void 0,name:n.worth,nameLocation:`end`,nameGap:14,nameTextStyle:{color:t.muted,fontSize:11,align:`left`},axisLabel:{color:t.muted,fontSize:10,formatter:e=>r.money(e)},axisLine:{lineStyle:{color:t.border}},splitLine:{lineStyle:{color:t.border,opacity:.35}}},tooltip:{show:e.length>0,trigger:`item`,renderMode:`html`,confine:!0,className:`plan-value-tooltip`,backgroundColor:t.surface,borderColor:t.border,borderWidth:1,padding:[10,12],textStyle:{color:t.text,fontSize:11},extraCssText:`border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.22);`,formatter:e=>bV(e,t,n,r)},series:[...c.map(e=>({type:`line`,silent:!0,symbol:`none`,data:e.points,lineStyle:{color:t.muted,width:e.ratio===1?1.4:1,type:e.ratio===1?`dashed`:`dotted`,opacity:e.ratio===1?.85:.45},endLabel:{show:!0,color:t.muted,fontSize:10,formatter:()=>`${e.ratio}x`},emphasis:{disabled:!0},animation:!1,z:1})),{type:`scatter`,z:3,symbolSize:(e,t)=>_V(t.data?.tokens??0,s),label:{show:!0,position:`top`,distance:6,color:t.text,fontSize:10,fontWeight:600,formatter:e=>e.data?.shortName??``},emphasis:{scale:1.08,focus:`self`},data:e.map(e=>({value:[e.paid,e.worth],name:e.name,shortName:e.shortName,planLabel:e.planLabel,tokens:e.tokens,ratio:e.ratio,bound:e.bound,effectiveUnitPrice:e.effectiveUnitPrice,retailUnitPrice:e.retailUnitPrice,itemStyle:{color:e.color,opacity:.85,borderColor:t.surface,borderWidth:1.5}}))}]}}function bV(e,t,n,r){if(!e||typeof e!=`object`||!(`data`in e))return n.empty;let i=e.data;if(!i||typeof i!=`object`)return n.empty;let a=i,o=[`<strong>${SV(a.name??``)}</strong>`,`<span style="color:${SV(t.muted)}">${SV(a.planLabel??``)}</span>`,`<span>${SV(n.ratio)} · ${SV(r.ratio(a.ratio??null,a.bound??`unavailable`))}</span>`,`<span>${SV(n.paid)} · ${SV(r.money(a.value?.[0]??null))}</span>`,`<span>${SV(n.worth)} · ${SV(r.money(a.value?.[1]??null))}</span>`,`<span>${SV(n.tokens)} · ${SV(r.tokens(a.tokens??null))}</span>`,`<span>${SV(n.effectiveUnitPrice)} · ${SV(r.money(a.effectiveUnitPrice??null))} ${SV(n.perMillion)}</span>`,`<span>${SV(n.retailUnitPrice)} · ${SV(r.money(a.retailUnitPrice??null))} ${SV(n.perMillion)}</span>`];return a.bound===`lower`&&o.push(`<span style="color:${SV(t.muted)}">${SV(n.partial)}</span>`),o.join(`<br>`)}function xV(e,t,n,r){let i=e.entries.map(e=>e.valueRatio).filter(e=>e!==null),a=Math.max(...i,1);return e.entries.map(e=>{let i=e.retailUnitPrice!==null&&e.effectiveUnitPrice!==null?e.retailUnitPrice-e.effectiveUnitPrice:null;return{key:`${e.providerId}:${e.billingDomainId}`,name:mV(e),planLabel:hV(e,r),color:t(e.providerId,e.billingDomainId),ratio:e.valueRatio,bound:e.ratioBound,ratioLabel:n.ratio(e.valueRatio,e.ratioBound),meterPercent:e.valueRatio===null?0:Math.min(100,e.valueRatio/a*100),breakEvenPercent:Math.min(100,1/a*100),beatsBreakEven:e.valueRatio!==null&&e.valueRatio>=1,paidLabel:n.money(e.windowPlanCost.amount),worthLabel:n.money(e.retailEquivalent.status===`available`?e.retailEquivalent.amount:null),tokensLabel:n.tokens(e.recordedTokens),effectiveUnitPriceLabel:n.money(e.effectiveUnitPrice),retailUnitPriceLabel:n.money(e.retailUnitPrice),savingsLabel:i===null?null:n.money(Math.abs(i)),savingsIsLoss:i!==null&&i<0,period:uV(e.billingPeriod,n)}})}function SV(e){return e.replace(/[&<>'"]/g,e=>({"&":`&`,"<":`<`,">":`>`,"'":`'`,'"':`"`})[e]??e)}var CV=t(`<tr><td> </td><td> </td><td> </td><td> </td><td> </td></tr>`),wV=t(`<div class="plan-value-chart-root svelte-jg0yd3"><div class="plan-value-echarts svelte-jg0yd3" data-testid="plan-value-chart" data-chart-engine="echarts"></div> <div class="plan-value-data svelte-jg0yd3"><table><thead><tr><th> </th><th> </th><th> </th><th> </th><th> </th></tr></thead><tbody></tbody></table></div></div>`);function TV(e,t){ne(t,!1);let i=y(),a=y();pM([DN,uS,yR,QR,tz,sB,jB]);let u=S(t,`planValue`,8),m=S(t,`locale`,24,()=>Te(``)),h=S(t,`formatters`,8),_=y(null),v=y(null),x=y(null),w=null,E=y({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`});function D(e){return Ee(m(),e)}function O(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function A(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 j(){let e=p(v)??p(_);e&&b(E,{text:A(e,`--text-strong`,p(E).text),muted:A(e,`--muted`,p(E).muted),surface:A(e,`--surface-subtle`,p(E).surface),border:A(e,`--border`,p(E).border)})}async function M(e){p(x)&&(p(x).setOption(e,{notMerge:!0,lazyUpdate:!1}),await o(),p(x).resize())}ie(()=>{if(p(_))return j(),b(x,qj(p(_),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(x).getDom().setAttribute(`aria-hidden`,`true`),w=new ResizeObserver(()=>p(x)?.resize()),w.observe(p(_)),window.addEventListener(De,j),()=>{window.removeEventListener(De,j),w?.disconnect(),w=null,p(x)?.dispose(),b(x,null)}}),fe(()=>(d(u()),JB),()=>{b(i,gV(u(),JB,D(`planCustom`)))}),fe(()=>(p(i),p(E),d(h())),()=>{b(a,yV(p(i),p(E),{paid:D(`planValuePaid`),worth:D(`planValueWorth`),ratio:D(`planValueRatio`),tokens:D(`tokens`),effectiveUnitPrice:D(`planValueEffectiveUnitPrice`),retailUnitPrice:D(`planValueRetailUnitPrice`),perMillion:D(`planValuePerMillion`),partial:D(`planValuePartial`),empty:D(`planValueEmpty`)},h(),!O()))}),fe(()=>(p(x),p(a)),()=>{p(x)&&M(p(a))}),n(),L();var N=wV(),P=c(N);T(P,e=>b(_,e),()=>p(_));var ee=s(P,2),I=c(ee),te=c(I),R=c(te),re=c(R),ae=c(re,!0);F(re);var oe=s(re),z=c(oe,!0);F(oe);var B=s(oe),se=c(B,!0);F(B);var ce=s(B),ue=c(ce,!0);F(ce);var de=s(ce),pe=c(de,!0);F(de),F(R),F(te);var me=s(te);le(me,5,()=>p(i),e=>e.key,(e,t)=>{var n=CV(),i=c(n),a=c(i);F(i);var o=s(i),u=c(o,!0);F(o);var m=s(o),_=c(m,!0);F(m);var v=s(m),y=c(v,!0);F(v);var b=s(v),x=c(b,!0);F(b),F(n),g((e,n,i,o)=>{r(a,`${p(t),l(()=>p(t).name)??``} · ${p(t),l(()=>p(t).planLabel)??``}`),r(u,e),r(_,n),r(y,i),r(x,o)},[()=>(d(h()),p(t),l(()=>h().money(p(t).paid))),()=>(d(h()),p(t),l(()=>h().money(p(t).worth))),()=>(d(h()),p(t),l(()=>h().ratio(p(t).ratio,p(t).bound))),()=>(d(h()),p(t),l(()=>h().tokens(p(t).tokens)))]),f(e,n)}),F(me),F(I),F(ee),F(N),T(N,e=>b(v,e),()=>p(v)),g((e,t,n,i,a,o)=>{k(I,`aria-label`,e),r(ae,t),r(z,n),r(se,i),r(ue,a),r(pe,o)},[()=>l(()=>D(`planValueChartLabel`)),()=>l(()=>D(`plans`)),()=>l(()=>D(`planValuePaid`)),()=>l(()=>D(`planValueWorth`)),()=>l(()=>D(`planValueRatio`)),()=>l(()=>D(`tokens`))]),f(e,N),C()}function EV(e,t,n,r,i){return e.flatMap(e=>{let a=t===`tokens`?e.recordedTokens:e.retailEquivalent.amount,o=t===`tokens`?e.tokenShare:e.retailShare;return e.includedInHeadline===!1||a===null||o===null||a<=0||o<=0?[]:[{key:`${e.providerId}:${e.billingDomainId}`,name:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,value:a,share:o,color:n(e.providerId,e.billingDomainId),formattedValue:r(a),formattedShare:i(o)}]})}function DV(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=>AV(kV(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=>AV(OV(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 OV(e){if(!e||typeof e!=`object`||!(`data`in e))return null;let t=e.data;return!t||typeof t!=`object`?null:t}function kV(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 AV(e,t,n){return e?[`<strong>${jV(e.name)}</strong>`,`<span style="color:${jV(t.muted)}">${jV(e.billingDomainDisplayName)}</span>`,`<span>${jV(e.formattedValue)} · ${jV(e.formattedShare)}</span>`].join(`<br>`):n}function jV(e){return e.replace(/[&<>'"]/g,e=>({"&":`&`,"<":`<`,">":`>`,"'":`'`,'"':`"`})[e]??e)}var MV=t(`<tr><td> </td><td> </td><td> </td></tr>`),NV=t(`<div class="provider-share-chart-root svelte-15bk8av"><div class="provider-share-echarts svelte-15bk8av" data-testid="provider-share-chart" data-chart-engine="echarts"></div> <div class="provider-share-data svelte-15bk8av"><table><thead><tr><th> </th><th> </th><th> </th></tr></thead><tbody></tbody></table></div></div>`);function PV(e,t){ne(t,!1);let i=y(),a=y();pM([AE,eB,QR,tz,sB,jB]);let u=S(t,`providers`,8),m=S(t,`metric`,8),h=S(t,`currency`,8),_=S(t,`locale`,24,()=>Te(``)),v=S(t,`formatUsageMetric`,8),x=S(t,`formatPercent`,8),w=y(null),E=y(null),D=y(null),O=null,A=y({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`});function j(e){return Ee(_(),e)}function M(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function N(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 P(){let e=p(E)??p(w);e&&b(A,{text:N(e,`--text-strong`,p(A).text),muted:N(e,`--muted`,p(A).muted),surface:N(e,`--surface-subtle`,p(A).surface),border:N(e,`--border`,p(A).border)})}async function ee(e){p(D)&&(p(D).setOption(e,{notMerge:!0,lazyUpdate:!1}),await o(),p(D).resize())}ie(()=>{if(p(w))return P(),b(D,qj(p(w),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(D).getDom().setAttribute(`aria-hidden`,`true`),O=new ResizeObserver(()=>p(D)?.resize()),O.observe(p(w)),window.addEventListener(De,P),()=>{window.removeEventListener(De,P),O?.disconnect(),O=null,p(D)?.dispose(),b(D,null)}}),fe(()=>(d(u()),d(m()),d(v()),d(h()),d(x())),()=>{b(i,EV(u(),m(),JB,e=>v()(e,h(),m()),x()))}),fe(()=>(p(i),p(A)),()=>{b(a,DV(p(i),p(A),j(`notAvailable`),!M()))}),fe(()=>(p(D),p(a)),()=>{p(D)&&ee(p(a))}),n(),L();var I=NV(),te=c(I);T(te,e=>b(w,e),()=>p(w));var R=s(te,2),re=c(R),ae=c(re),oe=c(ae),z=c(oe),B=c(z,!0);F(z);var se=s(z),ce=c(se,!0);F(se);var ue=s(se),de=c(ue,!0);F(ue),F(oe),F(ae);var pe=s(ae);le(pe,5,()=>p(i),e=>e.key,(e,t)=>{var n=MV(),i=c(n),a=c(i);F(i);var o=s(i),u=c(o,!0);F(o);var d=s(o),m=c(d,!0);F(d),F(n),g(()=>{r(a,`${p(t),l(()=>p(t).name)??``} · ${p(t),l(()=>p(t).billingDomainDisplayName)??``}`),r(u,(p(t),l(()=>p(t).formattedValue))),r(m,(p(t),l(()=>p(t).formattedShare)))}),f(e,n)}),F(pe),F(re),F(R),F(I),T(I,e=>b(E,e),()=>p(E)),g((e,t,n,i)=>{k(re,`aria-label`,e),r(B,t),r(ce,n),r(de,i)},[()=>l(()=>j(`providerShare`)),()=>l(()=>j(`providersLabel`)),()=>(d(m()),l(()=>m()===`tokens`?j(`tokens`):j(`cost`))),()=>(d(m()),l(()=>m()===`tokens`?j(`tokenShare`):j(`costShare`)))]),f(e,I),C()}var FV=6e4,IV=300,LV=1440,RV=20160;function zV(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 IV;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 BV(e,t,n,r,i=`UTC`){let a=VV(t,n,r,i),o=e.flatMap(e=>{let n=KV(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:pe(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=>JV(e,a,r)),nowMs:r}}function VV(e,t,n,r=`UTC`){let i=HV(n,r);if(e===`session`){let e=UV(i,t),n=UV(e,3);return{startMs:WV(e,r),endMs:WV(n,r)}}let a=UV(i,-new Date(Date.UTC(i.year,i.month-1,i.day)).getUTCDay()+t*7),o=UV(a,14);return{startMs:WV(a,r),endMs:WV(o,r)}}function HV(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 UV(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 WV(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=GV(r,t),i=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second);r+=n-i}return r}function GV(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 KV(e,t){return e.quotaBuckets.flatMap(e=>{let n=zV(e),r=e.resetsAt?Date.parse(e.resetsAt):NaN;return!n||!Number.isFinite(r)||t===`session`&&n!==IV||t===`weekly`&&(n<LV||n>RV)?[]:[{bucket:e,durationMinutes:n}]}).sort((e,t)=>{let n=t.durationMinutes-e.durationMinutes;if(n!==0)return n;let r=qV(e.bucket)-qV(t.bucket);return r===0?e.bucket.id.localeCompare(t.bucket.id):r})[0]??null}function qV(e){let t=e.label.toLowerCase();return/all models|^week$|^weekly limit$/.test(t)?0:/fable|spark|model/.test(t)?2:1}function JV(e,t,n){let r=Date.parse(e.resetsAt),i=e.durationMinutes*FV;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?pe(e.usedPercent):null,authority:i?e.authority:`estimate`,observedAt:e.observedAt})}a+=i}return o}var YV=t(`<p class="quota-timeline-empty svelte-1oyi7sq" role="status"> </p>`),XV=t(`<div class="quota-timeline-scroll svelte-1oyi7sq"><div class="quota-timeline-chart svelte-1oyi7sq"></div></div>`),ZV=t(`<tr><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>`),QV=t(`<section class="quota-timeline svelte-1oyi7sq" data-testid="quota-timeline" data-chart-engine="echarts" aria-labelledby="quota-timeline-heading"><header class="svelte-1oyi7sq"><div><h2 id="quota-timeline-heading" class="svelte-1oyi7sq"> </h2> <p class="quota-timeline-range svelte-1oyi7sq"> </p></div> <div class="quota-timeline-controls svelte-1oyi7sq"><div class="quota-timeline-navigation svelte-1oyi7sq"><button type="button" class="svelte-1oyi7sq">‹</button> <button type="button" class="svelte-1oyi7sq"> </button> <button type="button" class="svelte-1oyi7sq">›</button></div> <div class="quota-timeline-modes svelte-1oyi7sq" role="group"><button type="button" class="svelte-1oyi7sq"> </button> <button type="button" class="svelte-1oyi7sq"> </button></div></div></header> <div class="quota-timeline-legend svelte-1oyi7sq" aria-hidden="true"><ul class="quota-timeline-legend-items svelte-1oyi7sq"><li class="quota-timeline-legend-item svelte-1oyi7sq"><span class="quota-timeline-swatch swatch-solid svelte-1oyi7sq"></span> </li> <li class="quota-timeline-legend-item svelte-1oyi7sq"><span class="quota-timeline-swatch swatch-outline svelte-1oyi7sq"></span> </li> <li class="quota-timeline-legend-item svelte-1oyi7sq"><span class="quota-timeline-swatch swatch-dashed svelte-1oyi7sq"></span> </li></ul></div> <!> <div class="quota-timeline-data svelte-1oyi7sq"><table><thead><tr><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th></tr></thead><tbody></tbody></table></div></section>`);function $V(e,t){ne(t,!1);let a=y(),m=y(),h=y(),_=y(),v=y(),x=`agent-usage:theme-changed`;pM([wL,yR,Oz,QR,sB,jB]);let E=S(t,`providers`,8),D=S(t,`locale`,24,()=>Te(``)),O=S(t,`timeZone`,8,`UTC`),A=S(t,`now`,24,()=>Date.now()),j=y(null),M=y(null),P=y(null),ee=null,I=y(`weekly`),te=y(0),R=y({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`,grid:`rgba(122, 136, 164, 0.16)`});function ie(e){return Ee(D(),e)}function ae(e,t){let n=new Intl.DateTimeFormat(D(),{month:`2-digit`,day:`2-digit`,timeZone:O()});return`${n.format(e)} – ${n.format(t-1)}`}function oe(e){return new Intl.DateTimeFormat(D(),{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1,timeZone:O()}).format(e)}function z(e){return new Intl.DateTimeFormat(D(),{month:`2-digit`,day:`2-digit`,...p(I)===`session`?{hour:`2-digit`}:{},hour12:!1,timeZone:O()}).format(e)}function B(e){return ie({elapsed:`quotaTimelineElapsed`,current:`quotaTimelineCurrent`,upcoming:`quotaTimelineUpcoming`}[e])}function se(e){return ie({"official-account":`authorityOfficialAccount`,"official-client":`authorityOfficialClient`,"local-observation":`authorityLocalObservation`,estimate:`authorityEstimate`,unavailable:`authorityUnavailable`}[e])}function ue(e){b(I,e),b(te,0)}function de(e){return e===`current`?.34:e===`upcoming`?.12:.08}function me(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:JB(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=he(e);if(!t)return``;let n=pe(t.usedPercent),r=n===null?``:`<br/><strong>${ge(n)}% ${ve(ie(`used`))}</strong>`,i=t.observedAt?oe(Date.parse(t.observedAt)):`—`;return`<strong>${ve(t.providerDisplayName)}</strong> · ${ve(t.billingDomainDisplayName)}<br/>${ve(t.label)} · ${ve(B(t.state))}<br/>${ve(oe(t.startMs))} → ${ve(oe(t.endMs))}${r}<br/>${ve(ie(`source`))}: ${ve(se(t.authority))} · ${ve(ie(`updated`))}: ${ve(i)}`}},xAxis:{type:`time`,position:`top`,min:e.range.startMs,max:e.range.endMs,splitNumber:i===`weekly`?14:12,axisLine:{lineStyle:{color:t.border}},axisTick:{show:!1},axisLabel:{color:t.muted,fontSize:10,formatter:z},splitLine:{show:!0,lineStyle:{color:t.grid}}},yAxis:{type:`category`,inverse:!0,data:e.lanes.map(e=>`${e.providerDisplayName}\n${e.billingDomainDisplayName}`),axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:(n,r)=>{let i=e.lanes[r];return i?JB(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:ie(`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:_e(u.color,de(u.window.state)),stroke:_e(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:_e(u.color,.58)}}),l>86&&u.window.state===`current`&&d.push({type:`text`,style:{x:a[0]+8,y:a[1],text:`${ge(pe(u.window.usedPercent))}% · ${oe(u.window.endMs)}`,fill:t.text,font:`600 10px Inter, system-ui, sans-serif`,verticalAlign:`middle`,width:Math.max(0,l-16),overflow:`truncate`}}),{type:`group`,children:d}},markLine:s?{silent:!0,symbol:`none`,lineStyle:{color:t.muted,width:1,opacity:.72},label:{show:!1},data:[{xAxis:a}]}:void 0}]}}function he(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 ge(e){return e===null?`—`:new Intl.NumberFormat(D(),{maximumFractionDigits:1}).format(e)}function _e(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=p(M)??p(j);e&&b(R,{text:be(e,`--text-strong`,p(R).text),muted:be(e,`--muted`,p(R).muted),surface:be(e,`--surface-subtle`,p(R).surface),border:be(e,`--border`,p(R).border),grid:be(e,`--border-soft`,p(R).grid)})}async function Se(e){p(P)&&(p(P).setOption(e,{notMerge:!0,lazyUpdate:!1}),await o(),p(P).resize())}function Ce(e){return b(j,e),xe(),b(P,qj(e,void 0,{renderer:`canvas`,useDirtyRect:!0})),p(P).getDom().setAttribute(`aria-hidden`,`true`),ee=new ResizeObserver(()=>p(P)?.resize()),ee.observe(e),window.addEventListener(x,xe),Se(p(v)),{destroy(){window.removeEventListener(x,xe),ee?.disconnect(),ee=null,p(P)?.dispose(),b(P,null),p(j)===e&&b(j,null)}}}fe(()=>(d(E()),d(A()),d(O())),()=>{b(a,BV(E(),`weekly`,0,A(),O()))}),fe(()=>(d(E()),p(I),p(te),d(A()),d(O())),()=>{b(m,BV(E(),p(I),p(te),A(),O()))}),fe(()=>p(m),()=>{b(h,ae(p(m).range.startMs,p(m).range.endMs))}),fe(()=>p(m),()=>{b(_,Math.max(188,70+p(m).lanes.length*48))}),fe(()=>(p(m),p(R),d(D()),d(O()),p(I),d(A())),()=>{b(v,me(p(m),p(R),D(),O(),p(I),A()))}),fe(()=>(p(P),p(v)),()=>{p(P)&&Se(p(v))}),n(),L();var we=N(),De=re(we),Oe=e=>{var t=QV(),n=c(t),a=c(n),o=c(a),v=c(o,!0);F(o);var y=s(o,2),x=c(y);F(y),F(a);var S=s(a,2),C=c(S),E=c(C),D=s(E,2),O=c(D,!0);F(D);var A=s(D,2);F(C);var N=s(C,2),P=c(N),ee=c(P,!0);F(P);var L=s(P,2),ne=c(L,!0);F(L),F(N),F(S),F(n);var R=s(n,2),re=c(R),ae=c(re),z=s(c(ae));F(ae);var B=s(ae,2),de=s(c(B));F(B);var fe=s(B,2),me=s(c(fe));F(fe),F(re),F(R);var he=s(R,2),_e=e=>{var t=YV(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>ie(`quotaTimelineEmpty`))]),f(e,t)},ve=e=>{var t=XV(),n=c(t);T(n,e=>b(j,e),()=>p(j)),w(n,e=>Ce?.(e)),F(t),g(()=>ce(n,`height: ${p(_)}px`)),f(e,t)};i(he,e=>{p(m),l(()=>p(m).lanes.length===0)?e(_e):e(ve,-1)});var ye=s(he,2),be=c(ye),xe=c(be),Se=c(xe),we=c(Se),Te=c(we,!0);F(we);var Ee=s(we),De=c(Ee,!0);F(Ee);var Oe=s(Ee),ke=c(Oe,!0);F(Oe);var Ae=s(Oe),je=c(Ae,!0);F(Ae);var Me=s(Ae),Ne=c(Me,!0);F(Me);var Pe=s(Me),Fe=c(Pe,!0);F(Pe);var Ie=s(Pe),Le=c(Ie,!0);F(Ie),F(Se),F(xe);var Re=s(xe);le(Re,5,()=>(p(m),l(()=>p(m).lanes)),e=>e.id,(e,t)=>{var n=ZV(),i=c(n),a=c(i,!0);F(i);var o=s(i),u=c(o,!0);F(o);var m=s(o),h=c(m,!0);F(m);var _=s(m),v=c(_,!0);F(_);var y=s(_),b=c(y,!0);F(y);var x=s(y),S=c(x,!0);F(x);var C=s(x),w=c(C,!0);F(C),F(n),g((e,n,i,o)=>{r(a,(p(t),l(()=>p(t).providerDisplayName))),r(u,(p(t),l(()=>p(t).billingDomainDisplayName))),r(h,(p(t),l(()=>p(t).selectedLabel))),r(v,e),r(b,n),r(S,i),r(w,o)},[()=>(p(t),d(pe),l(()=>p(t).usedPercent===null?`—`:`${ge(pe(p(t).usedPercent))}%`)),()=>(p(t),l(()=>oe(Date.parse(p(t).resetsAt)))),()=>(p(t),l(()=>se(p(t).authority))),()=>(p(t),l(()=>p(t).observedAt?oe(Date.parse(p(t).observedAt)):`—`))]),f(e,n)}),F(Re),F(be),F(ye),F(t),T(t,e=>b(M,e),()=>p(M)),g((e,n,i,a,o,s,c,u,d,f,g,_,y,b,S,C,w,T,j,M)=>{k(t,`data-lane-count`,(p(m),l(()=>p(m).lanes.length))),r(v,e),r(x,`${p(h)??``} · ${n??``}`),k(E,`aria-label`,i),D.disabled=p(te)===0,k(D,`aria-label`,a),r(O,o),k(A,`aria-label`,s),k(N,`aria-label`,c),k(P,`aria-pressed`,p(I)===`weekly`),r(ee,u),k(L,`aria-pressed`,p(I)===`session`),r(ne,d),r(z,` ${f??``}`),r(de,` ${g??``}`),r(me,` ${_??``}`),k(be,`aria-label`,y),r(Te,b),r(De,S),r(ke,C),r(je,w),r(Ne,T),r(Fe,j),r(Le,M)},[()=>l(()=>ie(`quotaTimelineTitle`)),()=>l(()=>ie(`quotaTimelineCurrentRange`)),()=>l(()=>ie(`quotaTimelinePrevious`)),()=>l(()=>ie(`quotaTimelineToday`)),()=>l(()=>ie(`quotaTimelineToday`)),()=>l(()=>ie(`quotaTimelineNext`)),()=>l(()=>ie(`quotaTimelineModes`)),()=>l(()=>ie(`quotaTimelineWeekly`)),()=>l(()=>ie(`quotaTimelineFiveHour`)),()=>l(()=>ie(`quotaTimelineCurrent`)),()=>l(()=>ie(`quotaTimelineElapsed`)),()=>l(()=>ie(`quotaTimelineUpcoming`)),()=>l(()=>ie(`quotaTimelineData`)),()=>l(()=>ie(`providersLabel`)),()=>l(()=>ie(`quotaTimelineAccount`)),()=>l(()=>ie(`quota`)),()=>l(()=>ie(`used`)),()=>l(()=>ie(`resets`)),()=>l(()=>ie(`source`)),()=>l(()=>ie(`updated`))]),u(`click`,E,()=>b(te,p(te)-1)),u(`click`,D,()=>b(te,0)),u(`click`,A,()=>b(te,p(te)+1)),u(`click`,P,()=>ue(`weekly`)),u(`click`,L,()=>ue(`session`)),f(e,t)};i(De,e=>{p(a),l(()=>p(a).lanes.length>0)&&e(Oe)}),f(e,we),C()}var eH=t(`<span></span>`),tH=t(`<div class="trend-hover-line svelte-1axsv0d"></div>`),nH=t(`<span class="svelte-1axsv0d"> </span>`),rH=t(`<span class="svelte-1axsv0d"><b class="svelte-1axsv0d"> </b> <small class="svelte-1axsv0d"> </small></span>`),iH=t(`<div class="trend-tooltip svelte-1axsv0d" data-testid="trend-tooltip" role="tooltip"><strong class="svelte-1axsv0d"> </strong> <!></div>`),aH=t(`<span class="svelte-1axsv0d"><i class="svelte-1axsv0d"></i> <!></span>`),oH=t(`<tr><td> </td><td> </td></tr>`),sH=t(`<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 cH(e,t){ne(t,!1);let a=y(),m=y(),h=y(),_=y(),v=y(),x=y(),w=y();pM([uS,yR,jB]);let E=S(t,`buckets`,8),D=S(t,`metric`,8),O=S(t,`currency`,8),A=S(t,`locale`,24,()=>Te(``)),j=S(t,`selectedWindow`,8),P=S(t,`timeZone`,8),ee=S(t,`granularity`,8),I=S(t,`rangeLabel`,8),te=S(t,`formatUsageMetric`,8),R=S(t,`describeSegment`,8),ae=y(null),z=y(null),B=y(null),se=null,ue=y(0),pe=y(null),me=y(null),he=y(null),ge=y(!1),_e=y(WB),ve=y(GB);function ye(e){return Ee(A(),e)}function be(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function xe(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 Se(){let e=p(z)??p(ae);if(!e)return;let t=getComputedStyle(e).getPropertyValue(`--trend-grid-line`).trim(),n=getComputedStyle(e).getPropertyValue(`--muted`).trim(),r=t?xe(e,t):``,i=n?xe(e,n):``;b(_e,r&&r!==`rgba(0, 0, 0, 0)`?r:WB),b(ve,i&&i!==`rgba(0, 0, 0, 0)`?i:GB)}function Ce(e){if(p(B)){let t=p(B).convertToPixel({xAxisIndex:0},e),n=p(B).convertToPixel({yAxisIndex:0},Math.max(1,p(_)??1)),r=p(B).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: ${rV(e,p(m).length)}%; top: 16px; bottom: 28px`}function we(){b(ue,0),b(pe,null),b(me,null),b(he,null),b(ge,!1)}function Oe(e,t=.5){let n=XB(E().length,p(ue),p(pe),e,t);b(ue,n.start),b(pe,n.size),b(me,null)}function ke(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;Oe(e.deltaY<0?`in`:`out`,n)}function Ae(e){if(!(e.currentTarget instanceof HTMLElement)||p(m).length===0)return;let t=e.currentTarget.getBoundingClientRect(),n=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width));b(me,Math.round(n*Math.max(0,p(m).length-1)))}function je(e){!(e.currentTarget instanceof HTMLElement)||p(a).size>=E().length||(e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),b(he,{clientX:e.clientX,viewportStart:p(a).start}),b(ge,!0))}function Me(e){if(Ae(e),!p(he)||!(e.currentTarget instanceof HTMLElement))return;let t=e.currentTarget.getBoundingClientRect(),n=Math.round((p(he).clientX-e.clientX)/t.width*p(a).size);b(ue,Math.max(0,Math.min(E().length-p(a).size,p(he).viewportStart+n)))}function Ne(e){e.currentTarget instanceof HTMLElement&&e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),b(he,null),b(ge,!1)}function Pe(e){b(ue,ZB(E().length,p(ue),p(pe),e)),b(me,null)}function Fe(e){if(e.key===`+`||e.key===`=`)Oe(`in`);else if(e.key===`-`)Oe(`out`);else if(e.key===`ArrowLeft`)Pe(-1);else if(e.key===`ArrowRight`)Pe(1);else if(e.key===`Home`)we();else return;e.preventDefault()}async function Ie(e){p(B)&&(p(B).setOption(e,{notMerge:!0,lazyUpdate:!1}),await o(),p(B).resize())}ie(()=>{if(p(ae))return Se(),b(B,qj(p(ae),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(B).getDom().setAttribute(`aria-hidden`,`true`),se=new ResizeObserver(()=>p(B)?.resize()),se.observe(p(ae)),window.addEventListener(De,Se),()=>{window.removeEventListener(De,Se),se?.disconnect(),se=null,p(B)?.dispose(),b(B,null)}}),fe(()=>(d(E()),p(ue),p(pe)),()=>{b(a,YB(E().length,p(ue),p(pe)))}),fe(()=>(d(E()),p(a)),()=>{b(m,E().slice(p(a).start,p(a).start+p(a).size))}),fe(()=>(p(m),d(D())),()=>{b(h,eV(p(m),D()))}),fe(()=>p(h),()=>{b(_,tV(p(h)))}),fe(()=>p(h),()=>{b(v,p(h).filter((e,t)=>p(h).findIndex(t=>t.providerId===e.providerId&&t.billingDomainId===e.billingDomainId)===t))}),fe(()=>(p(me),p(m)),()=>{b(x,p(me)===null?null:p(m)[p(me)])}),fe(()=>(p(m),p(h),p(_),p(_e),p(ve),p(ge),d(te()),d(O()),d(D())),()=>{b(w,aV(p(m).map(e=>e.label),p(h),p(_),{gridLine:p(_e),label:p(ve)},!p(ge)&&!be(),e=>te()(e,O(),D())))}),fe(()=>(p(B),p(w)),()=>{p(B)&&Ie(p(w))}),n(),L();var Le=sH(),Re=c(Le),ze=c(Re),Be=c(ze),Ve=c(Be,!0);F(Be);var He=s(Be,2),Ue=c(He,!0);F(He),F(ze);var We=s(ze,2),Ge=c(We),V=c(Ge,!0);F(Ge);var Ke=s(Ge,2),qe=c(Ke),Je=s(qe,2),Ye=s(Je,2);F(Ke),F(We),F(Re);var Xe=s(Re,2),Ze=c(Xe);let Qe;var $e=c(Ze);T($e,e=>b(ae,e),()=>p(ae));var et=s($e,2);le(et,5,()=>p(h),e=>e.key,(e,t)=>{var n=eH();g(e=>{k(n,`data-cost-purpose`,(p(t),l(()=>p(t).costPurpose??`tokens`))),ce(n,e)},[()=>(p(t),d(JB),l(()=>p(t).costPurpose===`reported-estimate`?`fill: transparent; stroke: ${JB(p(t).providerId,p(t).billingDomainId)}`:`fill: ${JB(p(t).providerId,p(t).billingDomainId)}`))]),f(e,n)}),F(et);var tt=s(et,2),nt=e=>{var t=tH();g(e=>ce(t,e),[()=>(p(me),l(()=>Ce(p(me))))]),f(e,t)};i(tt,e=>{p(me),p(m),l(()=>p(me)!==null&&p(m).length>0)&&e(nt)});var rt=s(tt,2),it=e=>{var t=iH(),n=c(t),a=c(n,!0);F(n);var o=s(n,2),u=e=>{var t=nH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>ye(`gap`))]),f(e,t)},h=e=>{var t=N(),n=re(t);le(n,1,()=>(p(x),l(()=>p(x).segments)),e=>`${e.providerId}:${e.billingDomainId}`,(e,t)=>{var n=rH(),i=c(n),a=c(i,!0);F(i);var o=s(i,2),u=c(o,!0);F(o),F(n),g(e=>{r(a,(p(t),l(()=>p(t).providerDisplayName))),r(u,e)},[()=>(d(R()),p(t),d(D()),l(()=>R()(p(t),D())))]),f(e,n)}),f(e,t)};i(o,e=>{p(x),l(()=>p(x).gap||p(x).segments.length===0)?e(u):e(h,-1)}),F(t),g(e=>{ce(t,e),r(a,(p(x),l(()=>p(x).label)))},[()=>(d(rV),p(me),p(m),l(()=>`left: ${rV(p(me)??0,p(m).length)}%`))]),f(e,t)};i(rt,e=>{p(x)&&e(it)}),F(Ze),F(Xe);var at=s(Xe,2);le(at,5,()=>p(v),e=>e.key,(e,t)=>{var n=aH(),a=c(n),o=s(a),u=s(o),m=e=>{var t=M();g(e=>r(t,`· ${e??``}`),[()=>l(()=>ye(`separateFromHeadline`))]),f(e,t)};i(u,e=>{p(t),l(()=>p(t).includedInHeadline===!1)&&e(m)}),F(n),g(e=>{ce(a,e),r(o,` ${p(t),l(()=>p(t).providerDisplayName)??``} · ${p(t),l(()=>p(t).billingDomainDisplayName)??``} `)},[()=>(d(JB),p(t),l(()=>`background: ${JB(p(t).providerId,p(t).billingDomainId)}`))]),f(e,n)}),F(at);var ot=s(at,2),st=c(ot),ct=c(st),lt=c(ct),ut=c(lt),dt=c(ut,!0);F(ut);var ft=s(ut),pt=c(ft,!0);F(ft),F(lt),F(ct);var mt=s(ct);le(mt,5,E,e=>e.start,(e,t)=>{var n=oH(),i=c(n),a=c(i,!0);F(i);var o=s(i),u=c(o,!0);F(o),F(n),g(e=>{r(a,(p(t),l(()=>p(t).label))),r(u,e)},[()=>(p(t),d(R()),d(D()),l(()=>p(t).gap?ye(`gap`):p(t).segments.map(e=>R()(e,D())).join(`; `)))]),f(e,n)}),F(mt),F(st),F(ot),F(Le),T(Le,e=>b(z,e),()=>p(z)),g((e,t,n,i,o,s,c,u,f,m,h,g,_)=>{r(Ve,e),r(Ue,I()),r(V,t),k(Ke,`aria-label`,n),k(qe,`aria-label`,i),qe.disabled=p(pe)===null,k(Je,`aria-label`,o),Je.disabled=s,k(Ye,`aria-label`,c),Ye.disabled=p(pe)===null&&p(ue)===0,Qe=de(Ze,1,`trend-plot svelte-1axsv0d`,null,Qe,{"trend-panning":p(ge)}),k(Ze,`data-total-buckets`,(d(E()),l(()=>E().length))),k(Ze,`data-visible-buckets`,(p(a),l(()=>p(a).size))),k(Ze,`data-viewport-start`,(p(a),l(()=>p(a).start))),k(Ze,`aria-label`,u),k(Ze,`aria-valuemax`,f),k(Ze,`aria-valuenow`,(p(a),l(()=>p(a).start))),k(Ze,`aria-valuetext`,m),k(st,`aria-label`,h),r(dt,g),r(pt,_)},[()=>(d(D()),l(()=>D()===`tokens`?ye(`tokenTrend`):ye(`costTrend`))),()=>l(()=>ye(`trendInteractionHint`)),()=>l(()=>ye(`timeAxisControls`)),()=>l(()=>ye(`zoomOutTimeAxis`)),()=>l(()=>ye(`zoomInTimeAxis`)),()=>(p(pe),d(E()),d(4),l(()=>(p(pe)??E().length)<=Math.min(4,E().length))),()=>l(()=>ye(`resetTimeAxis`)),()=>l(()=>ye(`interactiveTrend`)),()=>(d(E()),p(a),l(()=>Math.max(0,E().length-p(a).size))),()=>(p(m),l(()=>`${p(m)[0]?.label??`—`} – ${p(m).at(-1)?.label??`—`}`)),()=>(d(j()),d(P()),d(ee()),l(()=>`${ye(`trendData`)} · ${j()} · ${P()} · ${ee()===`hour`?ye(`precisionHour`):ye(`precisionDay`)} · ${ye(`trendSummary`)}`)),()=>l(()=>ye(`interval`)),()=>(d(D()),l(()=>D()===`tokens`?ye(`tokens`):ye(`cost`)))]),u(`click`,qe,()=>Oe(`out`)),u(`click`,Je,()=>Oe(`in`)),u(`click`,Ye,()=>we()),u(`wheel`,Ze,oe(ke)),u(`pointerdown`,Ze,je),u(`pointermove`,Ze,Me),u(`pointerup`,Ze,Ne),u(`pointercancel`,Ze,Ne),u(`pointerleave`,Ze,()=>{p(he)||b(me,null)}),u(`keydown`,Ze,Fe),f(e,Le),C()}var lH=t(`<link rel="icon" href="/brand/agent-usage-logo.svg"/> <meta name="description"/>`,1),uH=t(`<div id="token-model-costs-panel" data-testid="token-model-costs-panel" role="tabpanel" aria-labelledby="token-model-costs-tab" aria-busy="true"><section class="token-money-workbench initial-workbench-loading svelte-1uha8ag"><p class="module-progress svelte-1uha8ag" role="status" data-testid="model-costs-initial-status"> </p></section></div>`),dH=t(`<div class="state error svelte-1uha8ag" role="alert"> </div>`),fH=t(`<div class="inline-error svelte-1uha8ag" role="status"> </div>`),pH=t(`<div class="state compact svelte-1uha8ag"> </div>`),mH=t(`<div class="agent-skeleton-quota-row svelte-1uha8ag"><div class="agent-skeleton-quota-copy svelte-1uha8ag"><i class="agent-skeleton-block svelte-1uha8ag"></i> <i class="agent-skeleton-block svelte-1uha8ag"></i></div> <i class="agent-skeleton-block agent-skeleton-progress svelte-1uha8ag"></i> <i class="agent-skeleton-block agent-skeleton-meta svelte-1uha8ag"></i></div>`),hH=t(`<div class="agent-card-skeleton-overlay svelte-1uha8ag" aria-hidden="true"><div class="agent-card-skeleton-content svelte-1uha8ag"><div class="agent-skeleton-section-label svelte-1uha8ag"><i class="agent-skeleton-block svelte-1uha8ag"></i></div> <div class="agent-skeleton-quota-list svelte-1uha8ag"></div></div></div>`),gH=t(`<img class="provider-logo svelte-1uha8ag" alt=""/>`),_H=t(`<span class="connection-chip svelte-1uha8ag"><span class="visually-hidden svelte-1uha8ag"> </span> <button class="svelte-1uha8ag"><span aria-hidden="true">⚙</span></button></span>`),vH=t(`<button type="button" role="tab" class="svelte-1uha8ag"> </button>`),yH=t(`<div class="domain-tabs svelte-1uha8ag" role="tablist"></div>`),bH=t(`<small class="svelte-1uha8ag"> </small>`),xH=t(`<label class="secret-field svelte-1uha8ag"><span> </span> <input type="password" autocomplete="off" class="svelte-1uha8ag"/></label>`),SH=t(`<button class="primary-action svelte-1uha8ag"> </button>`),CH=t(`<button class="svelte-1uha8ag"> </button>`),wH=t(`<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>`),TH=t(`<p class="quota-absent svelte-1uha8ag"> </p>`),EH=t(`<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>`),DH=t(`<!> <div class="section-label svelte-1uha8ag"> </div> <!> <div class="quotas svelte-1uha8ag"></div>`,1),OH=t(`<article><!> <div class="provider-heading svelte-1uha8ag"><!> <div class="provider-heading-copy svelte-1uha8ag"><div class="provider-heading-top svelte-1uha8ag"><h2 class="svelte-1uha8ag"> </h2> <div class="provider-status svelte-1uha8ag"><div class="coverage svelte-1uha8ag"> </div> <!></div></div> <p class="freshness svelte-1uha8ag"><span class="svelte-1uha8ag"></span> <!></p></div></div> <!> <!></article>`),kH=t(`<div id="agent-usage-panel" data-testid="agent-usage-panel" role="tabpanel" aria-labelledby="agent-usage-tab"><section class="providers svelte-1uha8ag"></section> <!></div>`),AH=t(`<button type="button" class="svelte-1uha8ag"> </button>`),jH=t(`<div class="panel-progress svelte-1uha8ag" role="status" data-testid="workbench-summary-refresh-status"><span class="visually-hidden svelte-1uha8ag"> </span></div>`),MH=t(`<div class="panel-progress svelte-1uha8ag" role="status" data-testid="workbench-analysis-refresh-status"><span class="visually-hidden svelte-1uha8ag"> </span></div>`),NH=t(`<div class="plan-value-empty svelte-1uha8ag" data-testid="plan-value-empty"><p class="svelte-1uha8ag"> </p> <button type="button" class="svelte-1uha8ag"> </button></div>`),PH=t(`<div><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div>`),FH=t(`<div class="plan-value-period svelte-1uha8ag" data-testid="plan-value-period"><div class="plan-value-period-heading svelte-1uha8ag"><span> </span> <span data-testid="plan-value-period-progress"> </span></div> <div class="plan-value-meter plan-value-period-meter svelte-1uha8ag" role="img"><span class="plan-value-meter-fill svelte-1uha8ag"></span> <span class="plan-value-pace svelte-1uha8ag"></span></div> <small> </small></div>`),IH=t(`<p class="plan-value-caveat svelte-1uha8ag"> </p>`),LH=t(`<li data-testid="plan-value-row" class="svelte-1uha8ag"><div class="plan-value-row-heading svelte-1uha8ag"><span class="plan-value-name svelte-1uha8ag"><span class="plan-value-swatch svelte-1uha8ag"></span> <strong class="svelte-1uha8ag"> </strong> <small class="svelte-1uha8ag"> </small></span> <span data-testid="plan-value-ratio"> </span></div> <div class="plan-value-meter svelte-1uha8ag" role="img"><span class="plan-value-meter-fill svelte-1uha8ag"></span> <span class="plan-value-break-even svelte-1uha8ag"></span></div> <dl class="plan-value-facts svelte-1uha8ag"><div><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <!></dl> <!> <!></li>`),RH=t(`<div class="plan-value-body svelte-1uha8ag"><!> <ol class="plan-value-ranking svelte-1uha8ag" data-testid="plan-value-ranking"></ol></div> <p class="plan-value-note svelte-1uha8ag"> </p>`,1),zH=t(`<li class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <span> </span> <span> </span></li>`),BH=t(`<li class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <span> </span> <button type="button" class="svelte-1uha8ag"> </button></li>`),VH=t(`<ul class="plan-value-aside svelte-1uha8ag" data-testid="plan-value-aside"><!> <!></ul>`),HH=t(`<section class="plan-value svelte-1uha8ag" data-testid="plan-value" aria-labelledby="plan-value-heading"><div class="plan-value-heading svelte-1uha8ag"><h3 id="plan-value-heading" class="svelte-1uha8ag"> </h3> <small class="svelte-1uha8ag"> </small></div> <!> <!></section>`),UH=t(`<div class="panel-progress svelte-1uha8ag" role="status" data-testid="workbench-breakdown-refresh-status"><span class="visually-hidden svelte-1uha8ag"> </span></div>`),WH=t(`<div class="treemap-wrap svelte-1uha8ag" role="tabpanel"><!> <p class="treemap-hint svelte-1uha8ag"> </p></div>`),GH=t(`<div class="treemap-wrap svelte-1uha8ag" role="tabpanel"><!></div>`),KH=t(`<img class="ranking-logo svelte-1uha8ag" alt=""/>`),qH=t(`<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>`),JH=t(`<li><button type="button" data-testid="model-ranking-row" class="svelte-1uha8ag"><span class="ranking-identity svelte-1uha8ag"><!> <span class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <small class="svelte-1uha8ag"> </small> <!></span></span> <span class="ranking-value svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong></span> <span class="ranking-value ranking-share-value svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <!></span> <span class="ranking-value svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong></span></button></li>`),YH=t(`<div role="tabpanel"><ol class="ranking-list svelte-1uha8ag"></ol></div>`),XH=t(`<section class="token-money-workbench svelte-1uha8ag" data-testid="token-money-workbench" aria-labelledby="token-money-workbench-heading"><div class="usage-toolbar svelte-1uha8ag"><div><h2 id="token-money-workbench-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong><span class="svelte-1uha8ag">/</span> </p></div> <div class="workbench-controls svelte-1uha8ag"><div class="segmented-control svelte-1uha8ag" role="group"><button type="button" class="svelte-1uha8ag"> </button> <button type="button" class="svelte-1uha8ag"> </button></div> <div class="history-toolbar svelte-1uha8ag"></div> <div class="segmented-control svelte-1uha8ag" role="group"></div></div></div> <section class="usage-summary-board svelte-1uha8ag" data-testid="usage-summary-board"><!> <div class="usage-headline svelte-1uha8ag" data-testid="usage-headline"><strong class="svelte-1uha8ag"> </strong></div> <div class="usage-totals svelte-1uha8ag" data-testid="usage-totals" aria-labelledby="usage-totals-heading"><h3 id="usage-totals-heading" class="svelte-1uha8ag"> </h3> <dl class="svelte-1uha8ag"><div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div></dl></div></section> <div class="usage-overview-grid svelte-1uha8ag" data-testid="usage-analysis-grid"><!> <section class="usage-summary svelte-1uha8ag" aria-labelledby="provider-share-heading"><div class="provider-share-heading svelte-1uha8ag"><h3 id="provider-share-heading" class="svelte-1uha8ag"> </h3> <small class="svelte-1uha8ag"> </small></div> <!></section> <!></div> <!> <section class="model-ranking svelte-1uha8ag" data-testid="usage-breakdown" aria-labelledby="model-ranking-heading"><!> <div class="ranking-heading svelte-1uha8ag"><div><h3 id="model-ranking-heading" class="svelte-1uha8ag"> </h3></div> <div class="segmented-control svelte-1uha8ag" role="tablist" data-testid="breakdown-view-tabs"><button type="button" role="tab" class="svelte-1uha8ag"> </button> <button type="button" role="tab" class="svelte-1uha8ag"> </button> <button type="button" role="tab" class="svelte-1uha8ag"> </button></div></div> <div class="breakdown-header svelte-1uha8ag" aria-hidden="true"><span class="svelte-1uha8ag"> </span> <span class="svelte-1uha8ag"> </span> <span class="svelte-1uha8ag"> </span> <span class="svelte-1uha8ag"> </span></div> <!></section></section>`),ZH=t(`<div id="token-model-costs-panel" data-testid="token-model-costs-panel" role="tabpanel" aria-labelledby="token-model-costs-tab"><!></div>`),QH=t(`<!> <!> <!>`,1),$H=t(`<p class="settings-error svelte-1uha8ag" role="status"> </p>`),eU=t(`<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>`),tU=t(`<option> </option>`),nU=t(`<div class="plan-settings-price svelte-1uha8ag"><label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.01" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="text" maxlength="3" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <select class="svelte-1uha8ag"><option> </option><option> </option></select></label></div> <label class="svelte-1uha8ag"><span> </span> <input type="date" class="svelte-1uha8ag"/> <small class="svelte-1uha8ag"> </small></label>`,1),rU=t(`<label class="svelte-1uha8ag"><span> </span> <select class="svelte-1uha8ag"><option> </option><!><option> </option></select></label> <!> <div class="plan-settings-actions svelte-1uha8ag"><button type="button" class="svelte-1uha8ag"> </button> <!></div>`,1),iU=t(`<article class="svelte-1uha8ag"><div class="plan-settings-heading svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <small class="svelte-1uha8ag"> </small></div> <!></article>`),aU=t(`<div class="plan-settings svelte-1uha8ag"></div>`),oU=t(`<label class="svelte-1uha8ag"><span> </span> <input type="text" required="" class="svelte-1uha8ag"/></label>`),sU=t(`<small class="custom-rate-empty svelte-1uha8ag"> </small>`),cU=t(`<form class="custom-rate-edit-form svelte-1uha8ag"><div class="custom-rate-edit-header svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <small class="svelte-1uha8ag"> </small></div> <div class="custom-rate-edit-fields svelte-1uha8ag"><label class="svelte-1uha8ag"><span> </span> <input type="text" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" required="" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" required="" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" class="svelte-1uha8ag"/></label></div> <div class="custom-rate-edit-actions svelte-1uha8ag"><button type="submit" class="svelte-1uha8ag"> </button> <button type="button" class="svelte-1uha8ag"> </button></div></form>`),lU=t(`<div class="custom-rate-header svelte-1uha8ag"><div class="custom-rate-title-row svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <span class="custom-rate-provider-badge svelte-1uha8ag"> </span></div> <small class="svelte-1uha8ag"> </small></div> <div class="custom-rate-details svelte-1uha8ag"><div class="rate-metric svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></div> <div class="rate-metric svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></div> <div class="rate-metric svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></div></div> <div class="custom-rate-footer svelte-1uha8ag"><small class="custom-rate-updated-time svelte-1uha8ag"> </small> <div class="custom-rate-card-actions svelte-1uha8ag"><button type="button" class="svelte-1uha8ag"> </button> <button type="button" class="svelte-1uha8ag"> </button></div></div>`,1),uU=t(`<article class="custom-rate-card svelte-1uha8ag"><!></article>`),dU=t(`<div class="custom-rates-list svelte-1uha8ag"></div>`),fU=t(`<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>`),pU=t(`<p class="svelte-1uha8ag"> </p>`),mU=t(`<code class="svelte-1uha8ag"> </code>`),hU=t(`<article tabindex="-1"><div class="svelte-1uha8ag"><strong> </strong> <span class="svelte-1uha8ag"> </span></div> <small class="svelte-1uha8ag"> </small> <!> <!></article>`),gU=t(`<div class="diagnostics-grid svelte-1uha8ag"></div>`),_U=t(`<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> <nav class="settings-nav svelte-1uha8ag"><button type="button"> </button> <button type="button"> </button> <button type="button"> </button> <button type="button"> </button> <button type="button"> </button></nav> <div class="settings-content svelte-1uha8ag"><section aria-labelledby="settings-connections-heading" data-settings-target="connections" tabindex="-1" class="svelte-1uha8ag"><div class="settings-section-heading svelte-1uha8ag"><h2 id="settings-connections-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"> </p></div> <!> <div class="settings-connections svelte-1uha8ag"></div></section> <section aria-labelledby="plans-heading" data-settings-target="plans" data-testid="settings-plans" tabindex="-1"><div class="settings-section-heading svelte-1uha8ag"><h2 id="plans-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"> </p></div> <!> <!></section> <section aria-labelledby="rates-heading" data-settings-target="rates" data-testid="settings-rates" tabindex="-1"><div class="settings-section-heading svelte-1uha8ag"><div class="heading-with-action svelte-1uha8ag"><h2 id="rates-heading" class="svelte-1uha8ag"> </h2> <button type="button" class="rates-refresh-button svelte-1uha8ag"><span aria-hidden="true">↻</span> </button></div> <p class="svelte-1uha8ag"> </p></div> <!> <div class="custom-rates-container svelte-1uha8ag"><form class="custom-rate-form svelte-1uha8ag"><div class="custom-rate-inputs svelte-1uha8ag"><label class="svelte-1uha8ag"><span> </span> <select class="svelte-1uha8ag"><!><option> </option></select></label> <!> <label class="svelte-1uha8ag"><span> </span> <input type="text" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="text" placeholder="e.g. gpt-4o, qwen-max" required="" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" placeholder="2.0" required="" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" placeholder="8.0" required="" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" placeholder="0.5" class="svelte-1uha8ag"/></label></div> <div class="custom-rate-actions svelte-1uha8ag"><button type="submit" class="svelte-1uha8ag"> </button></div></form> <!></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>`),vU=t(`<div class="model-custom-rate-prompt svelte-1uha8ag"><button type="button" class="configure-rate-button svelte-1uha8ag"> </button></div>`),yU=t(`<span class="model-price-source svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span>`),bU=t(`<div class="model-detail-backdrop svelte-1uha8ag" role="presentation"><div class="model-detail-drawer svelte-1uha8ag" role="dialog" aria-modal="true" tabindex="-1"><div class="model-detail-header svelte-1uha8ag"><div><p class="eyebrow svelte-1uha8ag"> </p> <h2 class="svelte-1uha8ag"> </h2> <!></div> <button class="svelte-1uha8ag">×</button></div> <div class="model-detail-content svelte-1uha8ag"><div class="model-detail-summary svelte-1uha8ag" data-testid="model-detail-summary"><span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></span></div> <!> <section class="model-activity svelte-1uha8ag" aria-labelledby="model-activity-heading"><h3 id="model-activity-heading" class="svelte-1uha8ag"> </h3> <!></section> <section class="model-evidence-summary svelte-1uha8ag" data-testid="model-evidence-summary" aria-labelledby="model-evidence-heading"><h3 id="model-evidence-heading" class="svelte-1uha8ag"> </h3> <div class="svelte-1uha8ag"><span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span> <!></div></section></div></div></div>`),xU=t(`<main class="shell svelte-1uha8ag"><header class="product-header svelte-1uha8ag"><img class="product-logo svelte-1uha8ag" src="/brand/agent-usage-logo.svg"/> <h1 class="visually-hidden svelte-1uha8ag"> </h1> <div class="dashboard-tabs svelte-1uha8ag" role="tablist"><button id="agent-usage-tab" type="button" role="tab" aria-controls="agent-usage-panel" class="svelte-1uha8ag"> </button> <button id="token-model-costs-tab" type="button" role="tab" aria-controls="token-model-costs-panel" class="svelte-1uha8ag"> </button></div> <div class="header-actions svelte-1uha8ag"><button class="settings-toggle svelte-1uha8ag"> </button> <button class="theme-toggle svelte-1uha8ag"><span class="theme-icon svelte-1uha8ag" aria-hidden="true"> </span> </button> <button class="locale-toggle svelte-1uha8ag"> </button> <button class="refresh svelte-1uha8ag"><span aria-hidden="true">↻</span> </button></div></header> <!></main> <!> <!>`,1);function SU(t,S){ne(S,!1);let w=()=>te(Fe,`$themePreference`,ae),E=()=>te(Ie,`$activeTheme`,ae),[ae,se]=z(),me=y(),he=y(),ge=y(),ve=y(),ye=y(),be=y(),xe=y(),Se=[{id:`codex`,displayName:`Codex`},{id:`claude-code`,displayName:`Claude Code`},{id:`opencode-go`,displayName:`OpenCode Go`},{id:`grok`,displayName:`Grok`},{id:`antigravity`,displayName:`Antigravity`}],we=new Set(Se.map(e=>e.id)),De=y(`en`),Oe=y(),ke=y(null),Ae=y(Se),je=y({}),Me=y(Object.fromEntries(Se.map(e=>[e.id,!0]))),Ne=new Set,Pe=y(!0),Le=y(!1),Re=y(!1),ze=y(!1),Be=y(!1),Ve=y(!1),He=y(!1),Ge=y(!1),V=y(!1),Ke=y([]),qe=y(null),Je=y({}),Ye=y({}),Xe=y(`agents`),Ze=y(`7d`),Qe=y(`CNY`),$e=y(`retail-equivalent`),et=y(`list`),tt=y(null),nt=null,rt=y(null),it=y(`UTC`),at=y(null),ot=y(null),st=y(!1),ct=y({}),lt=y(null),ut=[{id:`grok`,label:`Grok`},{id:`dsh`,label:`DeepSeek (dsh)`},{id:`claude-code`,label:`Claude Code`},{id:`codex`,label:`Codex`},{id:`opencode-go`,label:`OpenCode Go`},{id:`opencode`,label:`OpenCode`},{id:`antigravity`,label:`Antigravity`}],dt=y(`grok`),ft=y([]),pt=y(!1),mt=y(!1),H=y({providerId:`grok`,billingDomainId:``,model:``,inputRate:``,outputRate:``,cacheReadRate:`0`}),U=y(!1),ht=y(null),gt=y({id:``,providerId:``,billingDomainId:``,model:``,inputRate:``,outputRate:``,cacheReadRate:``}),_t=y(!1),vt=y(null),yt=y(null),bt=!1,W=y(null),G=y(!1),xt=y(!1),St=y(!1),Ct=y(!1),wt=y(!1),Tt=y(null),Et=null,Dt=y(!1),K=y(null),Ot=y(null),q=null,kt=y(null),At=y(),J=y(),jt=y(),Mt=!1,Nt=0,Pt={},Ft=0,It=Ce(()=>Gt());ie(async()=>{Ue(),b(De,Te(navigator.language)),document.documentElement.lang=p(De),b(it,Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`),b(Ze,qn()),b(Qe,Jn()),await Promise.all([Vt(),Ht(),Jt(),Yt(),Xt(),en(),un(),dn()]),p(yt)||await ln(),pn();let e=new URL(window.location.href).searchParams.get(`settings`);e&&await bn(e,!1)}),I(()=>{Mt=!0,Et&&clearInterval(Et),It.dispose()});function Y(e){return Ee(p(De),e)}function X(){return p($e)===`tokens`?Y(`tokenShare`):Y(`costShare`)}function Lt(){b(De,p(De)===`en`?`zh-CN`:`en`),document.documentElement.lang=p(De)}let Rt=[`system`,`light`,`dark`];function zt(){let e=Rt[(Rt.indexOf(w())+1)%Rt.length];We(e)}function Bt(e){return Y({system:`themeSystem`,light:`themeLight`,dark:`themeDark`}[e])}async function Vt(){let e=++Nt,t=p(Ze),n=p(Qe);try{let r=new URLSearchParams({window:t,timeZone:p(it),currency:n}),i=await fetch(`/api/overview?${r}`);if(!i.ok)throw Error(`HTTP ${i.status}`);let a=await i.json();if(Mt||e!==Nt)return;b(ke,a),b(Re,!1),qt()}catch{e===Nt&&b(Re,!0)}}async function Ht(){b(Pe,!0);let e=new Set([...we,...Ne]),t=[...e].map(e=>Ut(e));try{let n=await fetch(`/api/overview/providers`);if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();if(Mt)return;let i=r.providers.filter(e=>e.id!==`opencode`&&e.id!==`dsh`),a=new Map(i.map(e=>[e.id,e]));Ne=new Set(a.keys()),b(Ae,[...Se.map(e=>a.get(e.id)??e),...i.filter(e=>!we.has(e.id))]),b(Pe,!1);let o=i.filter(t=>!e.has(t.id)).map(e=>Ut(e.id));await Promise.all([...t,...o])}catch{Mt||b(Pe,!1),await Promise.all(t)}}async function Ut(e){let t=(Pt[e]??0)+1;Pt={...Pt,[e]:t},b(Me,{...p(Me),[e]:!0});try{let n=new URLSearchParams({window:p(Ze),timeZone:p(it),currency:p(Qe)}),r=await fetch(`/api/overview/providers/${encodeURIComponent(e)}?${n}`);if(!r.ok)throw Error(`HTTP ${r.status}`);let i=await r.json();if(Mt||Pt[e]!==t)return;b(je,{...p(je),[e]:i})}catch{}finally{!Mt&&Pt[e]===t&&b(Me,{...p(Me),[e]:!1})}}async function Wt(){await Kt(`manual`)}async function Gt(){await Kt(`automatic`)}async function Kt(e){b(Le,!0);try{let t=await fetch(e===`automatic`?`/api/refresh?mode=automatic&background=true`:`/api/refresh?background=true`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);await Promise.all([Vt(),Ht(),ln()]),await dn(),pn(),b(ze,!1)}catch{b(ze,!0)}finally{Mt||(b(Le,!1),qt())}}function qt(){Mt||!p(ke)||!bt||It.schedule(p(ke),p(yt),p(Le))}async function Jt(){try{let e=await fetch(`/api/connectors`);if(!e.ok)throw Error(`HTTP ${e.status}`);b(Ke,await e.json()),b(Be,!1)}catch{b(Be,!0)}}async function Yt(){try{let e=await fetch(`/api/monitoring`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();b(at,t.settings),b(Ve,!1)}catch{b(Ve,!0)}}async function Xt(){try{let e=await fetch(`/api/plans`);if(!e.ok)throw Error(`HTTP ${e.status}`);b(ot,await e.json()),b(ct,Qt(p(ot))),b(st,!1)}catch{b(st,!0)}}function Zt(e,t){return`${e}:${t}`}function Qt(e){let t=new Map(e.subscriptions.map(e=>[Zt(e.providerId,e.billingDomainId),e]));return Object.fromEntries(e.domains.map(e=>{let n=Zt(e.providerId,e.billingDomainId),r=t.get(n);return[n,{selection:r?r.priceSource===`catalog-preset`&&r.planId||`custom`:`none`,amount:r?String(r.amount):``,currency:r?.currency??`USD`,billingPeriod:r?.billingPeriod??`monthly`,anchorDate:r?.anchorDate??``}]}))}function Z(e,t){let n=p(ct)[e];if(!n)return;let r={...n,...t};if(t.selection&&t.selection!==`custom`&&t.selection!==`none`){let e=p(ot)?.domains.flatMap(e=>e.presets).find(e=>e.id===t.selection);e&&(r.amount=String(e.amount),r.currency=e.currency,r.billingPeriod=e.billingPeriod)}b(ct,{...p(ct),[e]:r})}async function $t(e,t){let n=Zt(e,t),r=p(ct)[n];if(!r)return;let i=Number(r.amount),a=r.selection===`none`?null:{planId:r.selection===`custom`?null:r.selection,amount:Number.isFinite(i)&&i>0?i:void 0,currency:r.currency,billingPeriod:r.billingPeriod,anchorDate:r.anchorDate===``?null:r.anchorDate};b(lt,n);try{let n=await fetch(`/api/plans`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify({providerId:e,billingDomainId:t,plan:a})});if(!n.ok)throw Error(`HTTP ${n.status}`);b(ot,await n.json()),b(ct,Qt(p(ot))),b(st,!1),await Vt()}catch{b(st,!0)}finally{b(lt,null)}}async function en(){b(mt,!0);try{let e=await fetch(`/api/custom-rates`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();b(ft,t.rates),b(pt,!1)}catch{b(pt,!0)}finally{b(mt,!1)}}function tn(){p(dt)===`custom`?v(H,p(H).providerId=``):v(H,p(H).providerId=p(dt))}async function nn(){let e=p(dt)===`custom`?p(H).providerId.trim():p(dt);if(!(!e||!p(H).model.trim()||p(U))){b(U,!0);try{let t=await fetch(`/api/custom-rates`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({providerId:e,billingDomainId:p(H).billingDomainId.trim()||null,model:p(H).model.trim(),inputRate:parseFloat(p(H).inputRate)||0,outputRate:parseFloat(p(H).outputRate)||0,cacheReadRate:parseFloat(p(H).cacheReadRate)||0})});if(!t.ok)throw Error(`HTTP ${t.status}`);b(H,{providerId:e,billingDomainId:``,model:``,inputRate:``,outputRate:``,cacheReadRate:`0`}),await en(),await Vt()}catch(e){console.error(e)}finally{b(U,!1)}}}function rn(e){b(ht,e.id),b(gt,{id:e.id,providerId:e.providerId,billingDomainId:e.billingDomainId??``,model:e.model,inputRate:String(e.ratesPerMillion.input),outputRate:String(e.ratesPerMillion.output),cacheReadRate:String(e.ratesPerMillion.cacheRead)})}function an(){b(ht,null)}async function on(){if(!(!p(ht)||p(_t))){b(_t,!0);try{let e=await fetch(`/api/custom-rates/${encodeURIComponent(p(ht))}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({providerId:p(gt).providerId.trim(),billingDomainId:p(gt).billingDomainId.trim()||null,model:p(gt).model.trim(),inputRate:parseFloat(p(gt).inputRate)||0,outputRate:parseFloat(p(gt).outputRate)||0,cacheReadRate:parseFloat(p(gt).cacheReadRate)||0})});if(!e.ok)throw Error(`HTTP ${e.status}`);b(ht,null),await en(),await Vt()}catch(e){console.error(e)}finally{b(_t,!1)}}}async function sn(e){b(vt,e);try{let t=await fetch(`/api/custom-rates/${encodeURIComponent(e)}`,{method:`DELETE`});if(!t.ok)throw Error(`HTTP ${t.status}`);p(ht)===e&&b(ht,null),await en(),await Vt()}catch(e){console.error(e)}finally{b(vt,null)}}function cn(e,t,n){yr(),b(dt,ut.some(t=>t.id===e)?e:`custom`),v(H,p(H).providerId=e),v(H,p(H).billingDomainId=!t||t===`*`?``:t),v(H,p(H).model=n),bn(`rates`)}async function ln(){try{let e=await fetch(`/api/doctor`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();if(Mt)return;b(yt,t),b(He,!1)}catch{b(He,!0)}finally{Mt||(bt=!0,qt())}}async function un(){try{let e=await fetch(`/api/retention`);if(!e.ok)throw Error(`HTTP ${e.status}`);b(W,await e.json()),b(Ge,!1)}catch{b(Ge,!0)}}async function dn(){try{let e=await fetch(`/api/processing`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json(),n=p(Tt);b(Tt,t),fn(n,t,`discovery`)&&Jt(),fn(n,t,`usage`)&&(Ht(),Vt()),fn(n,t,`pricing`)&&Vt(),fn(n,t,`retention`)&&un(),b(Ct,t.hardRebuild&&Object.values(t.modules).some(e=>e.state===`pending`||e.state===`running`)),Et&&Object.values(t.modules).every(e=>e.state===`ready`||e.state===`failed`)&&(clearInterval(Et),Et=null)}catch{}}function fn(e,t,n){return e!==null&&e.modules[n].state!==`ready`&&t.modules[n].state===`ready`}function pn(){Et||p(Tt)&&Object.values(p(Tt).modules).every(e=>e.state===`ready`||e.state===`failed`)||(Et=setInterval(()=>void dn(),1e3))}async function mn(){if(window.confirm(Y(`hardRebuildConfirmation`))){b(Ct,!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 dn(),pn(),b(V,!1)}catch{b(Ct,!1),b(V,!0)}}}function hn(e){return`/api/export?${new URLSearchParams({format:e,window:p(Ze),timeZone:p(it),currency:p(Qe),includeAccountIdentifiers:String(p(xt))})}`}async function gn(e){try{let t=await fetch(hn(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-${p(Ze)}.${e}`,r.click(),URL.revokeObjectURL(n),b(V,!1)}catch{b(V,!0)}}async function _n(){if(window.confirm(Y(`clearConfirmation`))){b(St,!0);try{let e=await fetch(`/api/data`,{method:`DELETE`,headers:{"content-type":`application/json`},body:JSON.stringify({deleteProductSecrets:p(G)})});if(!e.ok)throw Error(`HTTP ${e.status}`);b(G,!1),await Promise.all([Vt(),Ht(),Jt(),ln(),un()]),b(V,!1)}catch{b(V,!0)}finally{b(St,!1)}}}async function vn(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}`);b(at,await t.json()),b(Ve,!1)}catch{b(Ve,!0)}}async function yn(e,t){b(qe,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`&&p(Je)[e]?{secret:p(Je)[e]}:{}})});if(!n.ok)throw Error(`HTTP ${n.status}`);await n.json(),b(Je,{...p(Je),[e]:``}),await Promise.all([Jt(),Vt(),Ht(),ln()])}catch{b(Be,!0)}finally{b(qe,null)}}async function bn(e=null,t=!0){if(!p(Dt)){let e=document.activeElement;q=e instanceof HTMLElement&&e!==document.body?e:null}if(b(Dt,!0),b(K,e),en(),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();let n=e?[...document.querySelectorAll(`[data-settings-target]`)].find(t=>t.dataset.settingsTarget===e):null;n?.scrollIntoView?.({behavior:`smooth`,block:`start`}),(n??p(kt))?.focus()}async function xn(){let e=q;b(Dt,!1),b(K,null),q=null;let t=new URL(window.location.href);t.searchParams.delete(`settings`),window.history.replaceState(null,``,t),await o(),(e?.isConnected?e:p(Ot))?.focus()}function Sn(e){let t=p(tt)?p(rt):p(Dt)?p(kt):null;e.key===`Tab`&&t?Cn(e,t):p(tt)&&e.key===`Escape`?yr():p(Dt)&&e.key===`Escape`&&xn()}function Cn(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 wn(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 Tn(e){return Y({"not-checked":`notChecked`,"not-installed":`notInstalled`,discovered:`discovered`,connected:`connected`,skipped:`skipped`,error:`connectionError`}[e])}function En(e){return Y(e===`official-client`?`officialClient`:e===`agent-usage`?`managedSecret`:`noCredential`)}function Dn(e){let t={codex:`codexPermission`,"claude-code":`claudePermission`,"opencode-go":`openCodePermission`,grok:`grokPermission`,"xai-api":`xaiPermission`,dsh:`dshPermission`}[e.id];return t?Y(t):e.permissionDescription}function On(e){return e.status===`healthy`?Y(`healthy`):e.category?Y({"missing-binary":`diagnosticMissingBinary`,"not-configured":`diagnosticNotConfigured`,unauthorized:`diagnosticUnauthorized`,unsupported:`diagnosticUnsupported`,"schema-mismatch":`diagnosticSchemaMismatch`,"rate-limited":`diagnosticRateLimited`,timeout:`diagnosticTimeout`,stale:`diagnosticStale`,unavailable:`diagnosticUnavailable`}[e.category]):Y(`diagnosticUnavailable`)}function kn(e){return!e.recovery||p(De)===`en`?e.recovery:e.category?Y({"missing-binary":`recoveryMissingBinary`,"not-configured":`recoveryNotConfigured`,unauthorized:`recoveryUnauthorized`,unsupported:`recoveryUnsupported`,"schema-mismatch":`recoverySchemaMismatch`,"rate-limited":`recoveryRateLimited`,timeout:`recoveryTimeout`,stale:`recoveryStale`,unavailable:`recoveryUnavailable`}[e.category]):Y(`recoveryUnavailable`)}function An(e){return new Intl.NumberFormat(p(De)).format(e)}function jn(e){return Math.abs(e)<1e4?An(e):new Intl.NumberFormat(p(De),{compactDisplay:`short`,maximumFractionDigits:1,notation:`compact`}).format(e)}function Mn(e){return`${An(e)} ${Y(`tokens`)}`}function Nn(e){return e===null?Y(`notAvailable`):new Intl.NumberFormat(p(De),{style:`percent`,maximumFractionDigits:1}).format(e)}function Pn(e){return e?new Intl.DateTimeFormat(p(De),{hour:`2-digit`,minute:`2-digit`,month:`short`,day:`numeric`}).format(new Date(e)):`—`}function Fn(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(p(De),{numeric:`auto`}).format(Math.round(t/r),i)}function In(e){return Y({"official-account":`authorityOfficialAccount`,"official-client":`authorityOfficialClient`,"local-observation":`authorityLocalObservation`,estimate:`authorityEstimate`,unavailable:`authorityUnavailable`,mixed:`authorityMixed`}[e])}function Ln(e){return!e||e.expectedCoverage.includes(`quota`)}function Rn(e){return Y({complete:`coverageComplete`,partial:`coveragePartial`,unavailable:`coverageUnavailable`}[e])}function zn(e){return Y(e===`account-wide`?`accountWide`:e===`this-mac`?`localOnly`:`unknown`)}function Bn(e){return e.trend.map(e=>{let t=e.retailEquivalent.status!==`unavailable`&&e.retailEquivalent.amount!==null?e.retailEquivalent:e.reportedEstimate??e.retailEquivalent;return{recordedTokens:e.gap?null:e.recordedTokens??0,costAmount:t.amount,costCurrency:t.comparisonCurrency}})}function Vn(e){return Y({"source-reported":`derivationSourceReported`,"reconciled-remainder":`derivationReconciledRemainder`,categorized:`derivationCategorized`,"legacy-total":`derivationLegacyTotal`}[e]??`unknown`)}function Hn(e){return Y({quota:`quota`,tokens:`tokens`,"actual-cost":`actualCost`,history:`history`}[e])}function Un(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:[],lastCostObservedAt:null,balances:[],invoices:[],history:Wn(e.tokenTotals,[],e.tokenAuthority,e.tokenEvidence),forecasts:[],forecastCoverage:e.forecastCoverage}}function Wn(e,t,n,r=cr()){return{window:p(Ze),start:``,end:``,timeZone:p(it),tokenTotals:e,tokenEvidence:r,models:[],unclassified:{tokenTotals:sr(),tokenEvidence:cr(),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 Gn(e){if(p(Ze)===e&&!p(wt))return;b(Ze,e);try{localStorage.setItem(`agent-usage:history-window`,e)}catch{}let t=++Ft;b(wt,!0);try{await Vt()}finally{t===Ft&&b(wt,!1)}}async function Kn(e){if(p(Qe)===e)return;b(Qe,e);try{localStorage.setItem(`agent-usage:comparison-currency`,e)}catch{}let t=++Ft;b(wt,!0);try{await Vt()}finally{t===Ft&&b(wt,!1)}}function qn(){try{let e=localStorage.getItem(`agent-usage:history-window`);return e===`24h`||e===`7d`||e===`30d`?e:`7d`}catch{return`7d`}}function Jn(){try{let e=localStorage.getItem(`agent-usage:comparison-currency`);return e===`USD`||e===`CNY`?e:`CNY`}catch{return`CNY`}}function Yn(e,t){b(Ye,{...p(Ye),[e]:t})}function Xn(e,t,n){return e.find(e=>e.target.provider.id===t&&e.target.billingDomain.id===n)}function Zn(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`},dsh:{dark:`/brands/deepseek.svg`,light:`/brands/deepseek.svg`},antigravity:{dark:`/brands/antigravity.svg`,light:`/brands/antigravity.svg`}}[e]??null}function Qn(e,t){return t===`dark`?e.dark:e.light}function $n(e,t){return e===`grok`?t.filter(e=>e.id===`grok-build-subscription`):t}function er(e,t,n=[]){let r=e.providers.filter(e=>e.id!==`opencode`&&e.id!==`dsh`).map(e=>({...e,billingDomains:$n(e.id,[...e.billingDomains??[]])}));for(let e of t){let{provider:t,billingDomain:n}=e.target;if(t.id===`opencode`||t.id===`dsh`||t.id===`grok`&&n.id!==`grok-build-subscription`)continue;let i=r.find(e=>e.id===t.id);i||(i=ar(t.id,t.displayName),r.push(i)),i.billingDomains.some(e=>e.id===n.id)||i.billingDomains.push(or(n.id,n.displayName))}for(let t of n){if(t.id===`opencode`||t.id===`dsh`)continue;let n=r.find(e=>e.id===t.id);n?e.providers.some(e=>e.id===n.id)||(n.displayName=t.displayName):r.push(ar(t.id,t.displayName))}let i={codex:0,"claude-code":1,"opencode-go":2,grok:3};return r.sort((e,t)=>(i[e.id]??100)-(i[t.id]??100)||e.displayName.localeCompare(t.displayName))}function tr(e){return/\b5\s*hours?\b/i.test(e)?0:/\b(?:week|weekly)\b/i.test(e)?1:/\b(?:month|monthly)\b/i.test(e)?2:3}function nr(e){return e.split(` · `).filter(e=>tr(e)===3).join(` · `)}function rr(e){let t=e.map((e,t)=>({bucket:e,sourceIndex:t})).sort((e,t)=>tr(e.bucket.label)-tr(t.bucket.label)||e.sourceIndex-t.sourceIndex),n=[];for(let{bucket:e}of t){let t=nr(e.label);n.includes(t)||n.push(t)}return t.sort((e,t)=>n.indexOf(nr(e.bucket.label))-n.indexOf(nr(t.bucket.label))).map(({bucket:e})=>e)}function ir(e,t){return er(e,t,p(Ae)).flatMap(e=>(e.billingDomains.length>0?e.billingDomains:[Un(e,void 0)]).flatMap(t=>{let n=rr(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 ar(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:sr(),tokenEvidence:cr(),tokenAuthority:null,billingDomains:[],forecasts:[],forecastCoverage:`insufficient`}}function or(e,t){let n=sr();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:cr(),tokenAuthority:null,costs:[],lastCostObservedAt:null,balances:[],invoices:[],history:Wn(n,[],null),forecasts:[],forecastCoverage:`insufficient`}}function sr(){return{total:0,input:0,output:0,reasoning:0,cacheRead:0,cacheWrite:0}}function cr(){return{recordedTokens:0,sourceReportedTokens:0,sourceReportedObservationCount:0,observationCount:0,unclassifiedTokens:0,classifiedTokens:0,classificationCoverage:null,totalDerivations:[],timePrecisions:[],usageScopes:[],aggregationTemporalities:[]}}function lr(e,t){return e===null?`—`:new Intl.NumberFormat(p(De),{style:`currency`,currency:t,currencyDisplay:`narrowSymbol`,minimumFractionDigits:2,maximumFractionDigits:Math.abs(e)>0&&Math.abs(e)<.01?8:2}).format(e)}function ur(e,t){let n=new Intl.DateTimeFormat(p(De),{month:`short`,day:`numeric`});return`${n.format(new Date(e))} – ${n.format(new Date(t))}`}function dr(e,t){return{money:t=>t===null?Y(`notAvailable`):lr(t,e),tokens:e=>e===null?Y(`notAvailable`):`${jn(e)} ${Y(`tokens`)}`,ratio:(e,n)=>{if(e===null)return Y(`notAvailable`);let r=`${new Intl.NumberFormat(t,{maximumFractionDigits:+(e<10)}).format(e)}x`;return n===`lower`?`≥ ${r}`:r}}}function fr(e){b($e,e)}function pr(e){let t=new Intl.DateTimeFormat(p(De),{month:`short`,day:`numeric`,timeZone:e.timeZone});return`${t.format(new Date(e.start))} – ${t.format(new Date(e.end))}`}function mr(e,t,n){return e===null?Y(`notAvailable`):n===`tokens`?`${jn(e)} ${Y(`tokens`)}`:lr(e,t)}function hr(e,t){return e.includedInHeadline===!1?null:t===`tokens`?e.tokenShare:e.retailEquivalent.amount===null&&e.reportedEstimate.amount!==null?e.reportedShare:e.retailShare}function gr(e,t){let n=e.retailEquivalent.amount===null?e.reportedEstimate:e.retailEquivalent,r=t===`tokens`?`${An(e.recordedTokens)} ${Y(`tokens`)}`:n?.amount==null?Y(`notAvailable`):lr(n.amount,n.currency),i=e.includedInHeadline===!1?` · ${Y(`separateFromHeadline`)}`:``;return`${e.providerDisplayName} · ${e.billingDomainDisplayName}${i}: ${r}`}function _r(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 vr(e,t){b(tt,e),nt=t,await o(),p(rt)?.focus()}async function yr(){b(tt,null),await o(),nt?.focus()}fe(()=>p(De),()=>{b(Oe,Ee(p(De),`metaDescription`))}),fe(()=>(p(ke),p(tt)),()=>{b(At,p(ke)?.workbench?.modelRanking.entries.find(e=>e.id===p(tt))??null)}),fe(()=>(p(Pe),p(Ae),p(je)),()=>{b(J,p(Pe)&&p(Ae).length===0?null:{generatedAt:new Date().toISOString(),providers:Object.values(p(je))})}),fe(()=>(p(Xe),p(J),p(ke)),()=>{b(jt,p(Xe)===`agents`?p(J):p(ke))}),fe(()=>p(Tt),()=>{b(me,p(Tt)?Object.values(p(Tt).modules).some(e=>e.state===`pending`||e.state===`running`):!1)}),fe(()=>(p(wt),p(Le),p(me)),()=>{b(he,p(wt)||p(Le)||p(me))}),fe(()=>(p(jt),p(Qe)),()=>{b(ge,p(jt)?.workbench?.comparisonCurrency??p(Qe))}),fe(()=>(p(ge),p(De)),()=>{b(ve,dr(p(ge),p(De)))}),fe(()=>p(ot),()=>{b(ye,new Set((p(ot)?.domains??[]).map(e=>Zt(e.providerId,e.billingDomainId))))}),fe(()=>(p(jt),p(ye)),()=>{b(be,(p(jt)?.workbench?.planValue?.unconfiguredDomains??[]).filter(e=>p(ye).has(Zt(e.providerId,e.billingDomainId))))}),fe(()=>(p(jt),p(ve)),()=>{b(xe,p(jt)?.workbench?.planValue?xV(p(jt).workbench.planValue,JB,p(ve),Y(`planCustom`)):[])}),n(),L();var br=N();ue(`1uha8ag`,e=>{var t=lH(),n=s(re(t),2);g(()=>k(n,`content`,p(Oe))),m(()=>{_.title=`Agent Usage`}),f(e,t)}),u(`keydown`,a,Sn);var xr=re(br);h(xr,()=>p(De),t=>{var n=xU(),a=re(n),o=c(a),m=c(o),_=s(m,2),y=c(_,!0);F(_);var S=s(_,2),C=c(S),N=c(C,!0);F(C);var I=s(C,2),te=c(I,!0);F(I),F(S);var L=s(S,2),ne=c(L),ie=c(ne,!0);F(ne),T(ne,e=>b(Ot,e),()=>p(Ot));var ae=s(ne,2),z=c(ae),se=c(z,!0);F(z);var ue=s(z);F(ae);var fe=s(ae,2),me=c(fe,!0);F(fe);var ge=s(fe,2),ye=c(ge);let Se;var Ce=s(ye);F(ge),F(L),F(o);var we=s(o,2),Te=e=>{var t=uH(),n=c(t),i=c(n),a=c(i,!0);F(i),F(n),F(t),g(e=>r(a,e),[()=>l(()=>Y(`loadingModelCosts`))]),f(e,t)},Ee=e=>{var t=dH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`error`))]),f(e,t)},Oe=t=>{var n=QH(),a=re(n),o=e=>{var t=fH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`refreshUnavailable`))]),f(e,t)};i(a,e=>{p(ze)&&e(o)});var m=s(a,2),_=e=>{var t=pH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`noProviders`))]),f(e,t)};i(m,e=>{p(Xe),p(Pe),p(Ae),p(Ke),l(()=>p(Xe)===`agents`&&!p(Pe)&&p(Ae).length===0&&p(Ke).length===0)&&e(_)});var v=s(m,2),y=t=>{var n=kH(),a=c(n);le(a,5,()=>(p(jt),p(Ke),p(Ae),l(()=>er(p(jt),p(Ke),p(Ae)))),e=>e.id,(t,n)=>{let a=e(()=>(p(n),l(()=>Zn(p(n).id)))),o=e(()=>(p(je),p(n),l(()=>!!p(je)[p(n).id]))),m=e(()=>(p(Me),p(n),d(p(o)),l(()=>p(Me)[p(n).id]&&!p(o)))),h=e(()=>(p(Me),p(n),d(p(o)),l(()=>p(Me)[p(n).id]&&p(o)))),_=e(()=>(p(n),p(Ye),l(()=>Un(p(n),p(Ye)[p(n).id])))),v=e(()=>(d(p(_)),p(n),l(()=>p(_).freshness??p(n).freshness))),y=e(()=>(d(p(_)),p(n),l(()=>p(_).coverage??p(n).coverage))),x=e(()=>(p(Ke),p(n),d(p(_)),l(()=>Xn(p(Ke),p(n).id,p(_).id))));var S=OH();let C;var w=c(S),T=e=>{var t=hH(),r=c(t),i=s(c(r),2);le(i,4,()=>[0,1,2],e=>e,(e,t)=>{var n=mH();f(e,n)}),F(i),F(r),F(t),g(()=>k(t,`data-testid`,(p(n),l(()=>`agent-provider-skeleton-${p(n).id}`)))),f(e,t)};i(w,e=>{p(m)&&e(T)});var A=s(w,2),j=c(A),N=e=>{var t=gH();g(e=>{k(t,`data-provider-logo`,(p(n),l(()=>p(n).id))),k(t,`src`,e)},[()=>(d(p(a)),E(),l(()=>Qn(p(a),E())))]),f(e,t)};i(j,e=>{p(a)&&e(N)});var P=s(j,2),I=c(P),te=c(I),L=c(te,!0);F(te);var ne=s(te,2),R=c(ne),ie=c(R,!0);F(R);var ae=s(R,2),oe=e=>{var t=_H(),n=c(t),i=c(n,!0);F(n);var a=s(n,2);F(t),g((e,n,o)=>{k(t,`data-testid`,(d(p(x)),l(()=>`connector-${p(x).id}`))),r(i,e),k(a,`title`,n),k(a,`aria-label`,o)},[()=>(d(p(x)),l(()=>Tn(p(x).state))),()=>(d(p(x)),l(()=>`${Tn(p(x).state)} · ${Y(`manageConnection`)}`)),()=>l(()=>Y(`manageConnection`))]),u(`click`,a,()=>bn(`connector:${p(x).id}`)),f(e,t)};i(ae,e=>{d(p(x)),l(()=>p(x)?.state===`connected`)&&e(oe)}),F(ne),F(I);var z=s(I,2),B=s(c(z),2),se=e=>{var t=M();g(e=>r(t,e),[()=>l(()=>Y(`updating`))]),f(e,t)},ue=e=>{var t=M();g((e,n)=>r(t,`${e??``}
|
|
20
|
+
${n??``}`),[()=>(d(p(v)),l(()=>p(v).status===`fresh`?Y(`updatedNow`):p(v).lastSuccessAt?Y(`updated`):Y(`unavailable`))),()=>(d(p(v)),l(()=>p(v).lastSuccessAt?` · ${Pn(p(v).lastSuccessAt)}`:``))]),f(e,t)};i(B,e=>{p(h)?e(se):e(ue,-1)}),F(z),F(P),F(A);var fe=s(A,2),me=t=>{var i=yH();le(i,5,()=>(p(n),l(()=>p(n).billingDomains)),e=>e.id,(t,i)=>{let a=e(()=>(d(p(_)),p(i),l(()=>p(_).id===p(i).id)));var o=vH(),s=c(o,!0);F(o),g(()=>{k(o,`aria-selected`,p(a)),k(o,`tabindex`,p(a)?0:-1),r(s,(p(i),l(()=>p(i).displayName)))}),u(`click`,o,()=>Yn(p(n).id,p(i).id)),u(`keydown`,o,wn),f(t,o)}),F(i),g(e=>k(i,`aria-label`,e),[()=>(p(n),l(()=>`${p(n).displayName} ${Y(`billingDomainTabs`)}`))]),f(t,i)};i(fe,e=>{p(n),l(()=>(p(n).billingDomains?.length??0)>1)&&e(me)});var he=s(fe,2);le(he,1,()=>[p(_)],e=>e.id,(t,a)=>{let o=e(()=>(p(Ke),p(n),p(a),l(()=>Xn(p(Ke),p(n).id,p(a).id))));var m=DH(),h=re(m),_=e=>{var t=wH();let n;var a=c(t),m=c(a),h=c(m),_=c(h,!0);F(h);var v=s(h,2),y=e=>{var t=bH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`experimental`))]),f(e,t)};i(v,e=>{d(p(o)),l(()=>p(o).experimental)&&e(y)}),F(m);var x=s(m);F(a);var S=s(a,2),C=c(S),w=c(C,!0);F(C);var T=s(C,2),E=c(T),O=c(E,!0);F(E);var A=s(E,2),j=c(A,!0);F(A),F(T);var M=s(T,2),N=c(M),P=c(N,!0);F(N);var I=s(N,2),te=c(I,!0);F(I),F(M);var L=s(M,2),ne=e=>{var t=xH(),n=c(t),i=c(n,!0);F(n);var a=s(n,2);D(a),F(t),g((e,t)=>{r(i,e),k(a,`aria-label`,t),ee(a,(p(Je),d(p(o)),l(()=>p(Je)[p(o).id]??``)))},[()=>l(()=>Y(`managementKey`)),()=>(d(p(o)),l(()=>`${p(o).displayName} ${Y(`managementKey`)}`))]),u(`input`,a,e=>b(Je,{...p(Je),[p(o).id]:e.currentTarget.value})),f(e,t)};i(L,e=>{d(p(o)),l(()=>p(o).credentialOwner===`agent-usage`)&&e(ne)});var R=s(L,2),re=c(R),ie=e=>{var t=SH(),n=c(t,!0);F(t),g(e=>{t.disabled=(d(p(o)),p(qe),p(Je),l(()=>!p(o).installed||p(qe)===p(o).id||p(o).credentialOwner===`agent-usage`&&!p(Je)[p(o).id])),r(n,e)},[()=>l(()=>Y(`connect`))]),u(`click`,t,()=>yn(p(o).id,`connect`)),f(e,t)};i(re,e=>{d(p(o)),l(()=>p(o).state===`discovered`||p(o).state===`skipped`)&&e(ie)});var ae=s(re,2),oe=e=>{var t=CH(),n=c(t,!0);F(t),g(e=>{t.disabled=(p(qe),d(p(o)),l(()=>p(qe)===p(o).id)),r(n,e)},[()=>l(()=>Y(`retry`))]),u(`click`,t,()=>yn(p(o).id,`retry`)),f(e,t)};i(ae,e=>{d(p(o)),l(()=>p(o).state===`error`||p(o).state===`not-installed`)&&e(oe)});var z=s(ae,2),B=e=>{var t=CH(),n=c(t,!0);F(t),g(e=>{t.disabled=(p(qe),d(p(o)),l(()=>p(qe)===p(o).id)),r(n,e)},[()=>l(()=>Y(`skip`))]),u(`click`,t,()=>yn(p(o).id,`skip`)),f(e,t)};i(z,e=>{d(p(o)),l(()=>p(o).state!==`skipped`)&&e(B)}),F(R),F(S),F(t),g((e,i,a,s,c,u,f)=>{n=de(t,1,`inline-connection svelte-1uha8ag`,null,n,{"connection-pending":p(qe)===p(o).id}),k(t,`data-testid`,(d(p(o)),l(()=>`connector-${p(o).id}`))),k(t,`aria-busy`,(p(qe),d(p(o)),l(()=>p(qe)===p(o).id))),r(_,e),r(x,` ${i??``}`),r(w,a),r(O,s),r(j,c),r(P,u),r(te,f)},[()=>(d(p(o)),l(()=>Tn(p(o).state))),()=>l(()=>Y(`connectionSetup`)),()=>(d(p(o)),l(()=>Dn(p(o)))),()=>(d(p(o)),l(()=>p(o).installed?Y(`installed`):Y(`notInstalled`))),()=>(d(p(o)),l(()=>En(p(o).credentialOwner))),()=>l(()=>Y(`coverageLabel`)),()=>(d(p(o)),l(()=>p(o).expectedCoverage.map(Hn).join(` · `)))]),f(e,t)};i(h,e=>{d(p(o)),l(()=>p(o)&&p(o).state!==`connected`)&&e(_)});var v=s(h,2),y=c(v,!0);F(v);var x=s(v,2),S=e=>{var t=TH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`noQuotaWindowDetail`))]),f(e,t)},C=O(()=>(d(p(o)),l(()=>!Ln(p(o))))),w=e=>{var t=TH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`noQuotaReported`))]),f(e,t)};i(x,e=>{p(C)?e(S):(p(a),l(()=>p(a).quotaBuckets.length===0)&&e(w,1))});var T=s(x,2);le(T,5,()=>(p(a),l(()=>rr(p(a).quotaBuckets))),e=>e.id,(t,i)=>{let o=e(()=>(d(pe),p(i),l(()=>pe(p(i).usedPercent))));var u=EH(),m=c(u),h=c(m),_=c(h,!0);F(h);var v=s(h,2),y=c(v);F(v),F(m);var b=s(m,2);let x;var S=c(b);F(b);var C=s(b,2),w=c(C);F(C);var T=s(C,2),E=c(T),D=c(E);F(E),F(T),F(u),g((e,t,s,c,u,d,f,m,h)=>{r(_,(p(i),l(()=>p(i).label))),r(y,`${e??``}% ${t??``}`),x=de(b,1,`progress svelte-1uha8ag`,null,x,{"progress-warning":(p(o)??0)>=70&&(p(o)??0)<90,"progress-critical":(p(o)??0)>=90}),k(b,`aria-label`,(p(i),l(()=>p(i).label))),k(b,`aria-valuenow`,p(o)??void 0),k(b,`aria-valuetext`,s),k(b,`aria-describedby`,(p(n),p(a),p(i),l(()=>`quota-evidence-${p(n).id}-${p(a).id}-${p(i).id}`))),ce(S,`width: ${p(o)??0}%`),k(C,`id`,(p(n),p(a),p(i),l(()=>`quota-evidence-${p(n).id}-${p(a).id}-${p(i).id}`))),r(w,`${c??``}: ${u??``} ·
|
|
21
|
+
${d??``}`),r(D,`${f??``}
|
|
22
|
+
${m??``} · ${h??``}`)},[()=>(d(p(o)),l(()=>p(o)===null?`—`:An(p(o)))),()=>l(()=>Y(`used`)),()=>(d(p(o)),l(()=>p(o)===null?Y(`notAvailable`):`${An(p(o))}% ${Y(`used`)}`)),()=>l(()=>Y(`source`)),()=>(p(i),l(()=>In(p(i).authority))),()=>(p(i),p(a),p(n),l(()=>Pn(p(i).observedAt??p(a).freshness?.lastSuccessAt??p(n).freshness.lastSuccessAt))),()=>l(()=>Y(`resets`)),()=>(p(i),l(()=>Pn(p(i).resetsAt))),()=>(p(i),l(()=>Fn(p(i).resetsAt)))]),f(t,u)}),F(T),g(e=>r(y,e),[()=>l(()=>Y(`quota`))]),f(t,m)}),F(S),g(e=>{C=de(S,1,`provider-card svelte-1uha8ag`,null,C,{"provider-card-loading":p(m)}),k(S,`aria-busy`,(p(Me),p(n),l(()=>p(Me)[p(n).id]))),k(te,`data-provider-logo`,(d(p(a)),p(n),l(()=>p(a)?void 0:p(n).id))),r(L,(p(n),l(()=>p(n).displayName))),r(ie,e),k(z,`data-status`,(d(p(h)),d(p(v)),l(()=>p(h)?`updating`:p(v).status===`unavailable`?`unavailable`:`available`))),k(z,`role`,p(h)?`status`:void 0),k(z,`data-testid`,(d(p(h)),p(n),l(()=>p(h)?`agent-provider-update-${p(n).id}`:void 0)))},[()=>(d(p(x)),d(p(y)),l(()=>Ln(p(x))?Rn(p(y).quota):Y(`noQuotaWindow`)))]),f(t,S)}),F(a);var o=s(a,2);{let t=e(()=>(p(jt),p(Ke),l(()=>ir(p(jt),p(Ke))))),n=e(()=>(p(jt),l(()=>Date.parse(p(jt).generatedAt))));$V(o,{get providers(){return p(t)},get locale(){return p(De)},get timeZone(){return p(it)},get now(){return p(n)}})}F(n),g(e=>k(a,`aria-label`,e),[()=>l(()=>Y(`providersLabel`))]),f(t,n)},x=t=>{var n=ZH(),a=c(n),o=t=>{let n=e(()=>(p(jt),l(()=>p(jt).workbench)));var a=XH(),o=c(a),m=c(o),_=c(m),v=c(_,!0);F(_);var y=s(_,2),x=c(y),S=c(x,!0);F(x);var C=s(x,2,!0);F(y),F(m);var w=s(m,2),T=c(w),D=c(T),O=c(D,!0);F(D);var A=s(D,2),j=c(A,!0);F(A),F(T);var M=s(T,2);le(M,4,()=>[`24h`,`7d`,`30d`],e=>e,(e,t)=>{var n=AH(),i=c(n,!0);F(n),g(()=>{k(n,`aria-pressed`,p(Ze)===t),r(i,t)}),u(`click`,n,()=>Gn(t)),f(e,n)}),F(M);var N=s(M,2);le(N,4,()=>[`CNY`,`USD`],e=>e,(e,t)=>{var n=AH(),i=c(n,!0);F(n),g(()=>{k(n,`aria-pressed`,p(Qe)===t),r(i,t)}),u(`click`,n,()=>Kn(t)),f(e,n)}),F(N),F(w),F(o);var P=s(o,2),ee=c(P),I=e=>{var t=jH(),n=c(t),i=c(n,!0);F(n),F(t),g(e=>r(i,e),[()=>l(()=>Y(`updatingModelCosts`))]),f(e,t)};i(ee,e=>{p(he)&&e(I)});var te=s(ee,2),L=c(te),ne=c(L,!0);F(L),F(te);var R=s(te,2),ie=c(R),ae=c(ie,!0);F(ie);var oe=s(ie,2),z=c(oe),B=c(z),se=c(B,!0);F(B);var ue=s(B,2),fe=c(ue,!0);F(ue),F(z);var pe=s(z,2),me=c(pe),ge=c(me,!0);F(me);var _e=s(me,2),ye=c(_e,!0);F(_e),F(pe);var Se=s(pe,2),Ce=c(Se),we=c(Ce,!0);F(Ce);var Te=s(Ce,2),Ee=c(Te,!0);F(Te),F(Se);var Oe=s(Se,2),ke=c(Oe),Ae=c(ke,!0);F(ke);var je=s(ke,2),Me=c(je,!0);F(je),F(Oe);var Ne=s(Oe,2),Pe=c(Ne),Fe=c(Pe,!0);F(Pe);var Ie=s(Pe,2),Le=c(Ie,!0);F(Ie),F(Ne);var Re=s(Ne,2),ze=c(Re),Be=c(ze,!0);F(ze);var Ve=s(ze,2),He=c(Ve,!0);F(Ve),F(Re),F(oe),F(R),F(P);var Ue=s(P,2),We=c(Ue),Ge=e=>{var t=MH(),n=c(t),i=c(n,!0);F(n),F(t),g(e=>r(i,e),[()=>l(()=>Y(`updatingModelCosts`))]),f(e,t)};i(We,e=>{p(he)&&e(Ge)});var V=s(We,2),Ke=c(V),qe=c(Ke),Je=c(qe,!0);F(qe);var Ye=s(qe,2),Xe=c(Ye,!0);F(Ye),F(Ke),PV(s(Ke,2),{get providers(){return d(p(n)),l(()=>p(n).providerSummary)},get metric(){return p($e)},get currency(){return d(p(n)),l(()=>p(n).comparisonCurrency)},get locale(){return p(De)},formatUsageMetric:mr,formatPercent:Nn}),F(V);var tt=s(V,2);h(tt,()=>p(Ze),t=>{{let r=e(()=>(d(p(n)),l(()=>pr(p(n)))));cH(t,{get buckets(){return d(p(n)),l(()=>p(n).trend.buckets)},get metric(){return p($e)},get currency(){return d(p(n)),l(()=>p(n).comparisonCurrency)},get locale(){return p(De)},get selectedWindow(){return p(Ze)},get timeZone(){return d(p(n)),l(()=>p(n).timeZone)},get granularity(){return d(p(n)),l(()=>p(n).trend.granularity)},get rangeLabel(){return p(r)},formatUsageMetric:mr,describeSegment:gr})}}),F(Ue);var nt=s(Ue,2),rt=e=>{var t=HH(),a=c(t),o=c(a),m=c(o,!0);F(o);var h=s(o,2),_=c(h,!0);F(h),F(a);var v=s(a,2),y=e=>{var t=NH(),n=c(t),i=c(n,!0);F(n);var a=s(n,2),o=c(a,!0);F(a),F(t),g((e,t)=>{r(i,e),r(o,t)},[()=>l(()=>Y(`planValueEmpty`)),()=>l(()=>Y(`planValueEmptyAction`))]),u(`click`,a,()=>bn(`plans`)),f(e,t)},b=e=>{var t=RH(),a=re(t),o=c(a);TV(o,{get planValue(){return d(p(n)),l(()=>p(n).planValue)},get locale(){return p(De)},get formatters(){return p(ve)}});var u=s(o,2);le(u,5,()=>p(xe),e=>e.key,(e,t)=>{var n=LH(),a=c(n),o=c(a),u=c(o),d=s(u,2),m=c(d,!0);F(d);var h=s(d,2),_=c(h,!0);F(h),F(o);var v=s(o,2);let y;var b=c(v,!0);F(v),F(a);var x=s(a,2),S=c(x),C=s(S,2);F(x);var w=s(x,2),T=c(w),E=c(T),D=c(E,!0);F(E);var O=s(E,2),A=c(O,!0);F(O),F(T);var j=s(T,2),M=c(j),N=c(M,!0);F(M);var P=s(M,2),ee=c(P,!0);F(P),F(j);var I=s(j,2),te=c(I),L=c(te,!0);F(te);var ne=s(te,2),R=c(ne,!0);F(ne),F(I);var re=s(I,2),ie=c(re),ae=c(ie,!0);F(ie);var oe=s(ie,2),z=c(oe,!0);F(oe),F(re);var B=s(re,2),se=e=>{var n=PH(),i=c(n),a=c(i,!0);F(i);var o=s(i,2),u=c(o);F(o),F(n),g((e,n)=>{r(a,e),r(u,`${p(t),l(()=>p(t).savingsLabel)??``} · ${n??``}`)},[()=>(p(t),l(()=>p(t).savingsIsLoss?Y(`planValueOverpaid`):Y(`planValueSavings`))),()=>l(()=>Y(`planValuePerMillion`))]),f(e,n)};i(B,e=>{p(t),l(()=>p(t).savingsLabel)&&e(se)}),F(w);var le=s(w,2),ue=e=>{var n=FH(),i=c(n),a=c(i),o=c(a);F(a);var u=s(a,2),d=c(u);F(u),F(i);var m=s(i,2),h=c(m),_=s(h,2);F(m);var v=s(m,2);let y;var b=c(v);F(v),F(n),g((e,n,i,a,s,c,u,f,g)=>{r(o,`${e??``} · ${n??``}`),r(d,`${i??``}/${a??``}
|
|
23
|
+
${s??``}`),k(m,`aria-label`,c),ce(h,(p(t),l(()=>`width:${p(t).period.earnedPercent}%;background:${p(t).color}`))),ce(_,(p(t),l(()=>`left:${p(t).period.elapsedPercent}%`))),k(_,`title`,u),y=de(v,1,`svelte-1uha8ag`,null,y,{"plan-value-behind":!p(t).period.onPace}),r(b,`${f??``}
|
|
24
|
+
${p(t),l(()=>p(t).period.earnedLabel)??``} / ${p(t),l(()=>p(t).period.periodCostLabel)??``} · ${g??``}`)},[()=>l(()=>Y(`planPeriodLabel`)),()=>(p(t),l(()=>ur(p(t).period.start,p(t).period.end))),()=>(p(t),l(()=>Math.floor(p(t).period.elapsedDays))),()=>(p(t),l(()=>Math.round(p(t).period.totalDays))),()=>l(()=>Y(`planPeriodDays`)),()=>(p(t),l(()=>`${Y(`planPeriodEarnedBack`)} ${p(t).period.earnedLabel} / ${p(t).period.periodCostLabel}`)),()=>(p(t),l(()=>p(t).period.onPace?Y(`planPeriodOnPace`):Y(`planPeriodBehindPace`))),()=>l(()=>Y(`planPeriodEarnedBack`)),()=>(p(t),l(()=>p(t).period.onPace?Y(`planPeriodOnPace`):Y(`planPeriodBehindPace`)))]),f(e,n)};i(le,e=>{p(t),l(()=>p(t).period)&&e(ue)});var fe=s(le,2),pe=e=>{var t=IH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`planValuePartial`))]),f(e,t)},me=e=>{var t=IH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`planValueUnavailable`))]),f(e,t)};i(fe,e=>{p(t),l(()=>p(t).bound===`lower`)?e(pe):(p(t),l(()=>p(t).bound===`unavailable`)&&e(me,1))}),F(n),g((e,n,i,a,o,s)=>{ce(u,(p(t),l(()=>`background:${p(t).color}`))),r(m,(p(t),l(()=>p(t).name))),r(_,(p(t),l(()=>p(t).planLabel))),y=de(v,1,`plan-value-ratio svelte-1uha8ag`,null,y,{"plan-value-below":p(t).ratio!==null&&!p(t).beatsBreakEven}),r(b,(p(t),l(()=>p(t).ratioLabel))),k(x,`aria-label`,e),ce(S,(p(t),l(()=>`width:${p(t).meterPercent}%;background:${p(t).color}`))),ce(C,(p(t),l(()=>`left:${p(t).breakEvenPercent}%`))),k(C,`title`,n),r(D,i),r(A,(p(t),l(()=>p(t).paidLabel))),r(N,a),r(ee,(p(t),l(()=>p(t).worthLabel))),r(L,o),r(R,(p(t),l(()=>p(t).effectiveUnitPriceLabel))),r(ae,s),r(z,(p(t),l(()=>p(t).retailUnitPriceLabel)))},[()=>(p(t),l(()=>`${Y(`planValueRatio`)} ${p(t).ratioLabel}`)),()=>l(()=>Y(`planValueBreakEven`)),()=>l(()=>Y(`planValuePaid`)),()=>l(()=>Y(`planValueWorth`)),()=>l(()=>Y(`planValueEffectiveUnitPrice`)),()=>l(()=>Y(`planValueRetailUnitPrice`))]),f(e,n)}),F(u),F(a);var m=s(a,2),h=c(m,!0);F(m),g(e=>r(h,e),[()=>l(()=>Y(`planValueWindowNote`))]),f(e,t)};i(v,e=>{d(p(n)),l(()=>p(n).planValue.entries.length===0)?e(y):e(b,-1)});var x=s(v,2),S=e=>{var t=VH(),i=c(t);le(i,1,()=>(d(p(n)),l(()=>p(n).planValue.meteredDomains)),e=>`${e.providerId}:${e.billingDomainId}`,(e,t)=>{var i=zH(),a=c(i),o=c(a);F(a);var u=s(a,2),m=c(u,!0);F(u);var h=s(u,2),_=c(h);F(h),F(i),g((e,n,i)=>{r(o,`${p(t),l(()=>p(t).providerDisplayName)??``} · ${p(t),l(()=>p(t).billingDomainDisplayName)??``}`),r(m,e),r(_,`${n??``} · ${i??``}`)},[()=>l(()=>Y(`planValueMetered`)),()=>l(()=>Y(`actualCost`)),()=>(p(t),d(p(n)),l(()=>lr(p(t).actualCost.amount,p(n).comparisonCurrency)))]),f(e,i)});var a=s(i,2);le(a,1,()=>p(be),e=>`${e.providerId}:${e.billingDomainId}`,(e,t)=>{var n=BH(),i=c(n),a=c(i);F(i);var o=s(i,2),d=c(o,!0);F(o);var m=s(o,2),h=c(m,!0);F(m),F(n),g((e,n)=>{r(a,`${p(t),l(()=>p(t).providerDisplayName)??``} · ${p(t),l(()=>p(t).billingDomainDisplayName)??``}`),r(d,e),r(h,n)},[()=>l(()=>Y(`planValueUnconfigured`)),()=>l(()=>Y(`planValueEmptyAction`))]),u(`click`,m,()=>bn(`plans`)),f(e,n)}),F(t),f(e,t)};i(x,e=>{d(p(n)),p(be),l(()=>p(n).planValue.meteredDomains.length>0||p(be).length>0)&&e(S)}),F(t),g((e,n)=>{k(t,`aria-busy`,p(he)),r(m,e),r(_,n)},[()=>l(()=>Y(`planValue`)),()=>l(()=>Y(`planValueSubtitle`))]),f(e,t)};i(nt,e=>{d(p(n)),l(()=>p(n).planValue)&&e(rt)});var it=s(nt,2),at=c(it),ot=e=>{var t=UH(),n=c(t),i=c(n,!0);F(n),F(t),g(e=>r(i,e),[()=>l(()=>Y(`updatingModelCosts`))]),f(e,t)};i(at,e=>{p(he)&&e(ot)});var st=s(at,2),ct=c(st),lt=c(ct),ut=c(lt,!0);F(lt),F(ct);var dt=s(ct,2),ft=c(dt),pt=c(ft,!0);F(ft);var mt=s(ft,2),H=c(mt,!0);F(mt);var U=s(mt,2),ht=c(U,!0);F(U),F(dt),F(st);var gt=s(st,2),_t=c(gt),vt=c(_t,!0);F(_t);var yt=s(_t,2),bt=c(yt,!0);F(yt);var W=s(yt,2),G=c(W,!0);F(W);var xt=s(W,2),St=c(xt,!0);F(xt),F(gt);var Ct=s(gt,2),wt=t=>{var i=WH(),a=c(i);{let t=e(()=>(d(p(n)),p($e),l(()=>_r(p(n),p($e)))));sV(a,{get models(){return p(t)},get metric(){return p($e)},get currency(){return d(p(n)),l(()=>p(n).comparisonCurrency)},get locale(){return p(De)},formatUsageMetric:mr,formatPercent:Nn,onSelect:e=>void vr(e,null)})}var o=s(a,2),u=c(o,!0);F(o),F(i),g(e=>r(u,e),[()=>l(()=>Y(`treemapHint`))]),f(t,i)},Tt=t=>{var r=GH(),i=c(r);{let t=e(()=>(d(p(n)),p($e),l(()=>_r(p(n),p($e)))));lV(i,{get models(){return p(t)},get metric(){return p($e)},get currency(){return d(p(n)),l(()=>p(n).comparisonCurrency)},get locale(){return p(De)},formatUsageMetric:mr,onSelect:e=>void vr(e,null)})}F(r),f(t,r)},Et=t=>{var a=YH(),o=c(a);le(o,5,()=>(d(p(n)),p($e),l(()=>_r(p(n),p($e)))),e=>e.id,(t,n)=>{let a=e(()=>(p(n),l(()=>Zn(p(n).providerId)))),o=e(()=>(p(n),l(()=>p(n).retailEquivalent.amount===null?p(n).reportedEstimate??p(n).retailEquivalent:p(n).retailEquivalent))),m=e(()=>(p(n),p($e),l(()=>hr(p(n),p($e)))));var h=JH(),_=c(h),v=c(_),y=c(v),b=e=>{var t=KH();g(e=>{k(t,`data-provider-logo`,(p(n),l(()=>p(n).providerId))),k(t,`src`,e)},[()=>(d(p(a)),E(),l(()=>Qn(p(a),E())))]),f(e,t)};i(y,e=>{p(a)&&e(b)});var x=s(y,2),S=c(x),C=c(S,!0);F(S);var w=s(S,2),T=c(w);F(w);var D=s(w,2),O=e=>{var t=bH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`separateFromHeadline`))]),f(e,t)};i(D,e=>{p(n),l(()=>p(n).includedInHeadline===!1)&&e(O)}),F(x),F(v);var A=s(v,2),j=c(A),M=c(j,!0);F(j),F(A);var N=s(A,2),P=c(N),ee=c(P,!0);F(P);var I=s(P,2),te=e=>{var t=qH(),r=c(t);F(t),g((e,n,i)=>{k(t,`aria-label`,e),k(t,`aria-valuenow`,n),ce(r,i)},[()=>(p(n),l(()=>`${p(n).model} ${X()}`)),()=>(d(p(m)),l(()=>Math.round(p(m)*1e3)/10)),()=>(d(p(m)),l(()=>`width: ${Math.max(2,Math.min(100,p(m)*100))}%`))]),f(e,t)};i(I,e=>{p(m)!==null&&e(te)}),F(N);var L=s(N,2),ne=c(L),R=c(ne,!0);F(ne),F(L),F(_),F(h),g((e,t,i,a,o,s,c)=>{r(C,(p(n),l(()=>p(n).model))),r(T,`${p(n),l(()=>p(n).providerDisplayName)??``} · ${p(n),l(()=>p(n).billingDomainDisplayName)??``}`),k(A,`data-label`,e),r(M,t),k(N,`data-label`,i),r(ee,a),k(L,`data-label`,o),k(ne,`aria-label`,s),r(R,c)},[()=>l(()=>Y(`cost`)),()=>(d(p(o)),l(()=>p(o).amount===null?Y(`notAvailable`):lr(p(o).amount,p(o).comparisonCurrency))),()=>l(X),()=>(p(n),d(p(m)),l(()=>p(n).includedInHeadline===!1?Y(`headlineShareNotApplicable`):Nn(p(m)))),()=>l(()=>Y(`tokens`)),()=>(p(n),l(()=>Mn(p(n).tokenTotals.total))),()=>(p(n),l(()=>jn(p(n).tokenTotals.total)))]),u(`click`,_,e=>vr(p(n).id,e.currentTarget)),u(`keydown`,_,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),vr(p(n).id,e.currentTarget))}),f(t,h)}),F(o),F(a),f(t,a)};i(Ct,e=>{p(et)===`treemap`?e(wt):p(et)===`trend`?e(Tt,1):e(Et,-1)}),F(it),F(a),g((e,t,n,i,a,o,s,c,l,u,d,f,m,h,g,_,y,b,x,w,E,F,ee,I,te,R,re,ie,oe,z,B,ce,le,ue,de)=>{r(v,e),r(S,t),r(C,n),k(T,`aria-label`,i),k(D,`aria-pressed`,p($e)===`retail-equivalent`),r(O,a),k(A,`aria-pressed`,p($e)===`tokens`),r(j,o),k(M,`aria-label`,s),k(N,`aria-label`,c),k(P,`aria-label`,l),k(P,`aria-busy`,p(he)),k(L,`aria-label`,u),r(ne,d),r(ae,f),r(se,m),r(fe,h),r(ge,g),r(ye,_),r(we,y),r(Ee,b),r(Ae,x),r(Me,w),r(Fe,E),r(Le,F),r(Be,ee),r(He,I),k(Ue,`aria-busy`,p(he)),r(Je,te),r(Xe,R),k(it,`aria-busy`,p(he)),r(ut,re),k(dt,`aria-label`,ie),k(ft,`aria-selected`,p(et)===`list`),r(pt,oe),k(mt,`aria-selected`,p(et)===`treemap`),r(H,z),k(U,`aria-selected`,p(et)===`trend`),r(ht,B),r(vt,ce),r(bt,le),r(G,ue),r(St,de)},[()=>l(()=>Y(`tokenMoneyWorkbench`)),()=>l(()=>Y(`usage`)),()=>(d(p(n)),l(()=>pr(p(n)))),()=>l(()=>Y(`trendMetric`)),()=>l(()=>Y(`cost`)),()=>l(()=>Y(`tokens`)),()=>l(()=>Y(`history`)),()=>l(()=>Y(`displayCurrency`)),()=>l(()=>Y(`usageOverview`)),()=>(p($e),d(p(n)),l(()=>p($e)===`tokens`?p(n).recordedTokens===null?Y(`notAvailable`):Mn(p(n).recordedTokens):lr(p(n).costs.retailEquivalent.amount,p(n).comparisonCurrency))),()=>(p($e),d(p(n)),l(()=>p($e)===`tokens`?p(n).recordedTokens===null?Y(`notAvailable`):jn(p(n).recordedTokens):lr(p(n).costs.retailEquivalent.amount,p(n).comparisonCurrency))),()=>l(()=>Y(`usageTotals`)),()=>l(()=>Y(`recordedTokens`)),()=>(d(p(n)),l(()=>p(n).recordedTokens===null?Y(`notAvailable`):jn(p(n).recordedTokens))),()=>l(()=>Y(`input`)),()=>(d(p(n)),l(()=>p(n).tokenBreakdown.status===`unavailable`?Y(`notAvailable`):jn(p(n).tokenBreakdown.tokenTotals.input))),()=>l(()=>Y(`output`)),()=>(d(p(n)),l(()=>p(n).tokenBreakdown.status===`unavailable`?Y(`notAvailable`):jn(p(n).tokenBreakdown.tokenTotals.output))),()=>l(()=>Y(`reasoning`)),()=>(d(p(n)),l(()=>p(n).tokenBreakdown.status===`unavailable`?Y(`notAvailable`):jn(p(n).tokenBreakdown.tokenTotals.reasoning))),()=>l(()=>Y(`cacheRead`)),()=>(d(p(n)),l(()=>p(n).tokenBreakdown.status===`unavailable`?Y(`notAvailable`):jn(p(n).tokenBreakdown.tokenTotals.cacheRead))),()=>l(()=>Y(`cacheWrite`)),()=>(d(p(n)),l(()=>p(n).tokenBreakdown.status===`unavailable`?Y(`notAvailable`):jn(p(n).tokenBreakdown.tokenTotals.cacheWrite))),()=>l(()=>Y(`providerShare`)),()=>l(()=>Y(`providerShareSubtitle`)),()=>l(()=>Y(`breakdown`)),()=>l(()=>Y(`breakdownView`)),()=>l(()=>Y(`list`)),()=>l(()=>Y(`treemap`)),()=>l(()=>Y(`trendStacked`)),()=>l(()=>Y(`model`)),()=>l(()=>Y(`cost`)),()=>l(X),()=>l(()=>Y(`tokens`))]),u(`click`,D,()=>fr(`retail-equivalent`)),u(`click`,A,()=>fr(`tokens`)),u(`click`,ft,()=>b(et,`list`)),u(`click`,mt,()=>b(et,`treemap`)),u(`click`,U,()=>b(et,`trend`)),f(t,a)};i(a,e=>{p(jt),l(()=>p(jt).workbench)&&e(o)}),F(n),f(t,n)};i(v,e=>{p(Xe)===`agents`?e(y):e(x,-1)}),f(t,n)};i(we,e=>{p(jt)?p(Xe)===`models`&&p(Re)&&!p(ke)?e(Ee,1):p(jt)&&e(Oe,2):e(Te)}),F(a);var Ne=s(a,2),Fe=t=>{var n=_U(),a=c(n),o=c(a),m=c(o),h=c(m),_=c(h,!0);F(h);var y=s(h,2),S=c(y,!0);F(y);var C=s(y,2),w=c(C,!0);F(C),F(m);var E=s(m,2);F(o);var M=s(o,2),N=c(M);let I;var te=c(N,!0);F(N);var L=s(N,2);let ne;var ie=c(L,!0);F(L);var ae=s(L,2);let z;var se=c(ae);F(ae);var ce=s(ae,2);let ue;var fe=c(ce,!0);F(ce);var pe=s(ce,2);let me;var he=c(pe,!0);F(pe),F(M);var ge=s(M,2),ve=c(ge),ye=c(ve),be=c(ye),xe=c(be,!0);F(be);var Se=s(be,2),Ce=c(Se,!0);F(Se),F(ye);var we=s(ye,2),Te=e=>{var t=$H(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`connectorsUnavailable`))]),f(e,t)};i(we,e=>{p(Be)&&e(Te)});var Ee=s(we,2);le(Ee,5,()=>p(Ke),e=>e.id,(e,t)=>{var n=eU();let a;var o=c(n),d=c(o),m=c(d,!0);F(d);var h=s(d,2),_=c(h,!0);F(h),F(o);var v=s(o,2),y=c(v,!0);F(v);var x=s(v,2),S=c(x);F(x);var C=s(x,2),w=e=>{var n=xH(),i=c(n),a=c(i,!0);F(i);var o=s(i,2);D(o),F(n),g((e,n)=>{r(a,e),k(o,`aria-label`,n),ee(o,(p(Je),p(t),l(()=>p(Je)[p(t).id]??``)))},[()=>l(()=>Y(`managementKey`)),()=>(p(t),l(()=>`${p(t).displayName} ${Y(`managementKey`)}`))]),u(`input`,o,e=>b(Je,{...p(Je),[p(t).id]:e.currentTarget.value})),f(e,n)};i(C,e=>{p(t),l(()=>p(t).credentialOwner===`agent-usage`)&&e(w)});var T=s(C,2),E=c(T),O=e=>{var n=SH(),i=c(n,!0);F(n),g(e=>{n.disabled=(p(qe),p(t),p(Je),l(()=>p(qe)===p(t).id||!p(Je)[p(t).id])),r(i,e)},[()=>l(()=>Y(`replaceCredential`))]),u(`click`,n,()=>yn(p(t).id,`connect`)),f(e,n)};i(E,e=>{p(t),l(()=>p(t).state===`connected`&&p(t).credentialOwner===`agent-usage`)&&e(O)});var A=s(E,2),j=e=>{var n=SH(),i=c(n,!0);F(n),g(e=>{n.disabled=(p(t),p(qe),p(Je),l(()=>!p(t).installed||p(qe)===p(t).id||p(t).credentialOwner===`agent-usage`&&!p(Je)[p(t).id])),r(i,e)},[()=>l(()=>Y(`connect`))]),u(`click`,n,()=>yn(p(t).id,`connect`)),f(e,n)};i(A,e=>{p(t),l(()=>p(t).state===`discovered`||p(t).state===`skipped`)&&e(j)});var M=s(A,2),N=e=>{var n=CH(),i=c(n,!0);F(n),g(e=>{n.disabled=(p(qe),p(t),l(()=>p(qe)===p(t).id)),r(i,e)},[()=>l(()=>Y(`retry`))]),u(`click`,n,()=>yn(p(t).id,`retry`)),f(e,n)};i(M,e=>{p(t),l(()=>p(t).state===`error`||p(t).state===`not-installed`||p(t).state===`connected`)&&e(N)});var P=s(M,2),I=e=>{var n=CH(),i=c(n,!0);F(n),g(e=>{n.disabled=(p(qe),p(t),l(()=>p(qe)===p(t).id)),r(i,e)},[()=>l(()=>Y(`skip`))]),u(`click`,n,()=>yn(p(t).id,`skip`)),f(e,n)};i(P,e=>{p(t),l(()=>p(t).state!==`skipped`)&&e(I)}),F(T),F(n),g((e,i,o)=>{k(n,`data-settings-target`,(p(t),l(()=>`connector:${p(t).id}`))),k(n,`data-testid`,(p(t),l(()=>`settings-connector-${p(t).id}`))),a=de(n,1,`svelte-1uha8ag`,null,a,{"settings-target-active":p(K)===`connector:${p(t).id}`}),r(m,(p(t),l(()=>p(t).displayName))),r(_,e),r(y,i),r(S,`${o??``} · ${p(t),l(()=>p(t).target.billingDomain.displayName)??``}`)},[()=>(p(t),l(()=>Tn(p(t).state))),()=>(p(t),l(()=>Dn(p(t)))),()=>(p(t),l(()=>En(p(t).credentialOwner)))]),f(e,n)}),F(Ee),F(ve);var De=s(ve,2);let Oe;var ke=c(De),Ae=c(ke),je=c(Ae,!0);F(Ae);var Me=s(Ae,2),Ne=c(Me,!0);F(Me),F(ke);var Pe=s(ke,2),Fe=e=>{var t=$H(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`plansUnavailable`))]),f(e,t)};i(Pe,e=>{p(st)&&e(Fe)});var Ie=s(Pe,2),Le=t=>{var n=aU();le(n,5,()=>(p(ot),l(()=>p(ot).domains)),e=>`${e.providerId}:${e.billingDomainId}`,(t,n)=>{let a=e(()=>(p(n),l(()=>Zt(p(n).providerId,p(n).billingDomainId)))),o=e(()=>(p(ct),d(p(a)),l(()=>p(ct)[p(a)]))),m=e(()=>(p(ot),p(n),l(()=>p(ot).subscriptions.find(e=>e.providerId===p(n).providerId&&e.billingDomainId===p(n).billingDomainId))));var h=iU(),_=c(h),v=c(_),y=c(v,!0);F(v);var b=s(v,2),S=c(b,!0);F(b),F(_);var C=s(_,2),w=e=>{var t=rU(),h=re(t),_=c(h),v=c(_,!0);F(_);var y=s(_,2),b=c(y),S=c(b,!0);F(b),b.value=b.__value=`none`;var C=s(b);le(C,1,()=>(p(n),l(()=>p(n).presets)),e=>e.id,(e,t)=>{var n=tU(),i=c(n,!0);F(n);var a={};g(()=>{r(i,(p(t),l(()=>p(t).displayName))),a!==(a=(p(t),l(()=>p(t).id)))&&(n.value=(n.__value=(p(t),l(()=>p(t).id)))??``)}),f(e,n)});var w=s(C),T=c(w,!0);F(w),w.value=w.__value=`custom`,F(y);var E;A(y),F(h);var O=s(h,2),k=e=>{var t=nU(),n=re(t),i=c(n),m=c(i),h=c(m,!0);F(m);var _=s(m,2);D(_),F(i);var v=s(i,2),y=c(v),b=c(y,!0);F(y);var S=s(y,2);D(S),F(v);var C=s(v,2),w=c(C),T=c(w,!0);F(w);var E=s(w,2),O=c(E),k=c(O,!0);F(O),O.value=O.__value=`monthly`;var j=s(O),M=c(j,!0);F(j),j.value=j.__value=`annual`,F(E);var N;A(E),F(C),F(n);var P=s(n,2),I=c(P),te=c(I,!0);F(I);var L=s(I,2);D(L);var ne=s(L,2),R=c(ne,!0);F(ne),F(P),g((e,t,n,i,a,s,c)=>{r(h,e),ee(_,(d(p(o)),l(()=>p(o).amount))),r(b,t),ee(S,(d(p(o)),l(()=>p(o).currency))),r(T,n),r(k,i),r(M,a),N!==(N=(d(p(o)),l(()=>p(o).billingPeriod)))&&(E.value=(E.__value=(d(p(o)),l(()=>p(o).billingPeriod)))??``,x(E,(d(p(o)),l(()=>p(o).billingPeriod)))),r(te,s),ee(L,(d(p(o)),l(()=>p(o).anchorDate))),r(R,c)},[()=>l(()=>Y(`planAmount`)),()=>l(()=>Y(`planCurrency`)),()=>l(()=>Y(`planPeriod`)),()=>l(()=>Y(`planPeriodMonthly`)),()=>l(()=>Y(`planPeriodAnnual`)),()=>l(()=>Y(`planAnchorDate`)),()=>l(()=>Y(`planAnchorHint`))]),u(`input`,_,e=>Z(p(a),{amount:e.currentTarget.value})),u(`input`,S,e=>Z(p(a),{currency:e.currentTarget.value.toUpperCase()})),u(`change`,E,e=>Z(p(a),{billingPeriod:e.currentTarget.value})),u(`input`,L,e=>Z(p(a),{anchorDate:e.currentTarget.value})),f(e,t)};i(O,e=>{d(p(o)),l(()=>p(o).selection!==`none`)&&e(k)});var j=s(O,2),M=c(j),N=c(M,!0);F(M);var P=s(M,2),I=e=>{var t=bH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>(d(p(m)),l(()=>p(m).priceSource===`catalog-preset`?Y(`planPresetSource`):Y(`planUserEntered`)))]),f(e,t)};i(P,e=>{p(m)&&e(I)}),F(j),g((e,t,n,i)=>{r(v,e),r(S,t),r(T,n),E!==(E=(d(p(o)),l(()=>p(o).selection)))&&(y.value=(y.__value=(d(p(o)),l(()=>p(o).selection)))??``,x(y,(d(p(o)),l(()=>p(o).selection)))),M.disabled=p(lt)===p(a),r(N,i)},[()=>l(()=>Y(`planPreset`)),()=>l(()=>Y(`planNone`)),()=>l(()=>Y(`planCustom`)),()=>(d(p(o)),l(()=>p(o).selection===`none`?Y(`planClear`):Y(`planSave`)))]),u(`change`,y,e=>Z(p(a),{selection:e.currentTarget.value})),u(`click`,M,()=>$t(p(n).providerId,p(n).billingDomainId)),f(e,t)};i(C,e=>{p(o)&&e(w)}),F(h),g(()=>{k(h,`data-testid`,(p(n),l(()=>`plan-domain-${p(n).providerId}-${p(n).billingDomainId}`))),r(y,(p(n),l(()=>p(n).providerDisplayName))),r(S,(p(n),l(()=>p(n).billingDomainDisplayName)))}),f(t,h)}),F(n),f(t,n)};i(Ie,e=>{p(ot)&&e(Le)}),F(De);var Re=s(De,2);let ze;var Ue=c(Re),We=c(Ue),Ye=c(We),Xe=c(Ye,!0);F(Ye);var Ze=s(Ye,2),Qe=c(Ze);let $e;var et=s(Qe);F(Ze),F(We);var tt=s(We,2),nt=c(tt,!0);F(tt),F(Ue);var rt=s(Ue,2),it=e=>{var t=$H(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`customRatesUnavailable`))]),f(e,t)};i(rt,e=>{p(pt)&&e(it)});var bt=s(rt,2),wt=c(bt),Tt=c(wt),Et=c(Tt),Dt=c(Et),Ot=c(Dt,!0);F(Dt);var q=s(Dt,2),At=c(q);le(At,1,()=>ut,e=>e.id,(e,t)=>{var n=tU(),i=c(n);F(n);var a={};g(()=>{r(i,`${p(t),l(()=>p(t).label)??``} (${p(t),l(()=>p(t).id)??``})`),a!==(a=(p(t),l(()=>p(t).id)))&&(n.value=(n.__value=(p(t),l(()=>p(t).id)))??``)}),f(e,n)});var J=s(At),jt=c(J,!0);F(J),J.value=J.__value=`custom`,F(q),F(Et);var Mt=s(Et,2),Nt=e=>{var t=oU(),n=c(t),i=c(n);F(n);var a=s(n,2);D(a),F(t),g((e,t)=>{r(i,`${e??``} ID`),k(a,`placeholder`,t)},[()=>l(()=>Y(`customRateProvider`)),()=>l(()=>Y(`customRateProviderCustomPlaceholder`))]),B(a,()=>p(H).providerId,e=>v(H,p(H).providerId=e)),f(e,t)};i(Mt,e=>{p(dt)===`custom`&&e(Nt)});var Pt=s(Mt,2),Ft=c(Pt),It=c(Ft,!0);F(Ft);var X=s(Ft,2);D(X),F(Pt);var Lt=s(Pt,2),Rt=c(Lt),zt=c(Rt,!0);F(Rt);var Bt=s(Rt,2);D(Bt),F(Lt);var Vt=s(Lt,2),Ht=c(Vt),Ut=c(Ht,!0);F(Ht);var Wt=s(Ht,2);D(Wt),F(Vt);var Gt=s(Vt,2),Kt=c(Gt),qt=c(Kt,!0);F(Kt);var Jt=s(Kt,2);D(Jt),F(Gt);var Yt=s(Gt,2),Xt=c(Yt),Qt=c(Xt,!0);F(Xt);var cn=s(Xt,2);D(cn),F(Yt),F(Tt);var ln=s(Tt,2),un=c(ln),dn=c(un,!0);F(un),F(ln),F(wt);var fn=s(wt,2),pn=e=>{var t=sU(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`loading`))]),f(e,t)},hn=e=>{var t=sU(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`customRateEmpty`))]),f(e,t)},Sn=e=>{var t=dU();le(t,5,()=>p(ft),e=>e.id,(e,t)=>{var n=uU(),a=c(n),o=e=>{var n=cU(),i=c(n),a=c(i),o=c(a,!0);F(a);var d=s(a,2),m=c(d);F(d),F(i);var h=s(i,2),_=c(h),y=c(_),b=c(y,!0);F(y);var x=s(y,2);D(x),F(_);var S=s(_,2),C=c(S),w=c(C,!0);F(C);var T=s(C,2);D(T),F(S);var E=s(S,2),O=c(E),A=c(O,!0);F(O);var j=s(O,2);D(j),F(E);var M=s(E,2),N=c(M),P=c(N,!0);F(N);var ee=s(N,2);D(ee),F(M),F(h);var I=s(h,2),te=c(I),L=c(te,!0);F(te);var ne=s(te,2),R=c(ne,!0);F(ne),F(I),F(n),g((e,n,i,a,s,c,u,d)=>{r(o,(p(t),l(()=>p(t).model))),r(m,`${p(t),l(()=>p(t).providerId)??``} · ${e??``}`),r(b,n),k(x,`placeholder`,i),r(w,a),r(A,s),r(P,c),te.disabled=p(_t),r(L,u),ne.disabled=p(_t),r(R,d)},[()=>(p(t),l(()=>p(t).billingDomainId??Y(`customRateDomainWildcard`))),()=>l(()=>Y(`customRateDomain`)),()=>l(()=>Y(`customRateDomainWildcard`)),()=>l(()=>Y(`customRateInput`)),()=>l(()=>Y(`customRateOutput`)),()=>l(()=>Y(`customRateCacheRead`)),()=>(p(_t),l(()=>p(_t)?Y(`customRateUpdating`):Y(`customRateSave`))),()=>l(()=>Y(`customRateCancel`))]),B(x,()=>p(gt).billingDomainId,e=>v(gt,p(gt).billingDomainId=e)),B(T,()=>p(gt).inputRate,e=>v(gt,p(gt).inputRate=e)),B(j,()=>p(gt).outputRate,e=>v(gt,p(gt).outputRate=e)),B(ee,()=>p(gt).cacheReadRate,e=>v(gt,p(gt).cacheReadRate=e)),u(`click`,ne,an),u(`submit`,n,oe(on)),f(e,n)},d=e=>{var n=lU(),i=re(n),a=c(i),o=c(a),d=c(o,!0);F(o);var m=s(o,2),h=c(m,!0);F(m),F(a);var _=s(a,2),v=c(_);F(_),F(i);var y=s(i,2),b=c(y),x=c(b),S=c(x);F(x);var C=s(x,2),w=c(C);F(C),F(b);var T=s(b,2),E=c(T),D=c(E);F(E);var O=s(E,2),k=c(O);F(O),F(T);var A=s(T,2),j=c(A),M=c(j);F(j);var N=s(j,2),P=c(N);F(N),F(A),F(y);var ee=s(y,2),I=c(ee),te=c(I);F(I);var L=s(I,2),ne=c(L),R=c(ne,!0);F(ne);var ie=s(ne,2),ae=c(ie,!0);F(ie),F(L),F(ee),g((e,n,i,a,o,s,c,u)=>{r(d,(p(t),l(()=>p(t).model))),r(h,(p(t),l(()=>p(t).providerId))),r(v,`${p(t),l(()=>p(t).providerId)??``} · ${e??``}`),r(S,`${n??``}:`),r(w,`$${p(t),l(()=>p(t).ratesPerMillion.input)??``}/M`),r(D,`${i??``}:`),r(k,`$${p(t),l(()=>p(t).ratesPerMillion.output)??``}/M`),r(M,`${a??``}:`),r(P,`$${p(t),l(()=>p(t).ratesPerMillion.cacheRead)??``}/M`),r(te,`${o??``}
|
|
25
|
+
${s??``}`),r(R,c),ie.disabled=(p(vt),p(t),l(()=>p(vt)===p(t).id)),r(ae,u)},[()=>(p(t),l(()=>p(t).billingDomainId??Y(`customRateDomainWildcard`))),()=>l(()=>Y(`customRateInput`)),()=>l(()=>Y(`customRateOutput`)),()=>l(()=>Y(`customRateCacheRead`)),()=>l(()=>Y(`customRateUpdated`)),()=>(p(t),l(()=>Pn(p(t).updatedAt))),()=>l(()=>Y(`customRateEdit`)),()=>(p(vt),p(t),l(()=>p(vt)===p(t).id?Y(`customRateDeleting`):Y(`customRateDelete`)))]),u(`click`,ne,()=>rn(p(t))),u(`click`,ie,()=>sn(p(t).id)),f(e,n)};i(a,e=>{p(ht),p(t),l(()=>p(ht)===p(t).id)?e(o):e(d,-1)}),F(n),g(()=>k(n,`data-testid`,(p(t),l(()=>`custom-rate-${p(t).id}`)))),f(e,n)}),F(t),f(e,t)};i(fn,e=>{p(mt),p(ft),l(()=>p(mt)&&p(ft).length===0)?e(pn):(p(ft),l(()=>p(ft).length===0)?e(hn,1):e(Sn,-1))}),F(bt),F(Re);var Cn=s(Re,2),wn=c(Cn),An=c(wn),jn=c(An,!0);F(An);var Mn=s(An,2),Nn=c(Mn,!0);F(Mn),F(wn);var Fn=s(wn,2),In=e=>{var t=$H(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`monitoringUnavailable`))]),f(e,t)};i(Fn,e=>{p(Ve)&&e(In)});var Ln=s(Fn,2),Rn=e=>{var t=fU(),n=c(t),i=c(n);D(i);var a=s(i);F(n);var o=s(n,2),d=c(o);D(d);var m=s(d);F(o);var h=s(o,2),_=c(h);D(_);var v=s(_);F(h),F(t),g((e,t,n)=>{R(i,(p(at),l(()=>p(at).backgroundCollectionEnabled))),r(a,` ${e??``}`),R(d,(p(at),l(()=>p(at).notificationsEnabled))),r(m,` ${t??``}`),R(_,(p(at),l(()=>p(at).startAtLogin))),r(v,` ${n??``}`)},[()=>l(()=>Y(`backgroundCollection`)),()=>l(()=>Y(`notifications`)),()=>l(()=>Y(`startAtLogin`))]),u(`change`,i,e=>vn({backgroundCollectionEnabled:e.currentTarget.checked})),u(`change`,d,e=>vn({notificationsEnabled:e.currentTarget.checked})),u(`change`,_,e=>vn({startAtLogin:e.currentTarget.checked})),f(e,t)};i(Ln,e=>{p(at)&&e(Rn)}),F(Cn);var zn=s(Cn,2),Bn=c(zn),Vn=c(Bn),Un=c(Vn,!0);F(Vn);var Wn=s(Vn,2),Gn=c(Wn,!0);F(Wn),F(Bn);var Kn=s(Bn,2),qn=e=>{var t=$H(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`diagnosticsUnavailable`))]),f(e,t)};i(Kn,e=>{p(He)&&e(qn)});var Jn=s(Kn,2),Yn=e=>{var t=gU();le(t,5,()=>(p(yt),d(_e),l(()=>p(yt).connectors.filter(e=>!_e(e.category)))),e=>e.id,(e,t)=>{var n=hU();let a;var o=c(n),u=c(o),d=c(u,!0);F(u);var m=s(u,2),h=c(m,!0);F(m),F(o);var _=s(o,2),v=c(_,!0);F(_);var y=s(_,2),b=e=>{var n=pU(),i=c(n,!0);F(n),g(e=>r(i,e),[()=>(p(t),l(()=>p(t).affectedCoverage.map(Hn).join(` · `)))]),f(e,n)};i(y,e=>{p(t),l(()=>p(t).affectedCoverage.length>0)&&e(b)});var x=s(y,2),S=e=>{var n=mU(),i=c(n,!0);F(n),g(e=>r(i,e),[()=>(p(t),l(()=>kn(p(t))))]),f(e,n)},C=O(()=>(p(t),l(()=>kn(p(t)))));i(x,e=>{p(C)&&e(S)}),F(n),g((e,i)=>{k(n,`data-settings-target`,(p(t),l(()=>`diagnostic:${p(t).id}`))),k(n,`data-testid`,(p(t),l(()=>`settings-diagnostic-${p(t).id}`))),a=de(n,1,`svelte-1uha8ag`,null,a,{"diagnostic-degraded":p(t).status===`degraded`,"settings-target-active":p(K)===`diagnostic:${p(t).id}`}),r(d,(p(t),l(()=>p(t).id))),r(h,e),r(v,i)},[()=>(p(t),l(()=>On(p(t)))),()=>(p(t),l(()=>p(t).billingDomainId??Y(`unknown`)))]),f(e,n)}),F(t),f(e,t)};i(Jn,e=>{p(yt)&&e(Yn)}),F(zn);var Xn=s(zn,2),Zn=c(Xn),Qn=c(Zn),$n=c(Qn,!0);F(Qn);var er=s(Qn,2),tr=c(er,!0);F(er),F(Zn);var nr=s(Zn,2),rr=e=>{var t=$H(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`retentionUnavailable`))]),f(e,t)},ir=e=>{var t=bH(),n=c(t);F(t),g((e,t,i)=>r(n,`${p(W),l(()=>p(W).rawRetentionDays)??``}
|
|
26
|
+
${e??``} · ${p(W),l(()=>p(W).rawObservations)??``}
|
|
27
|
+
${t??``} · ${p(W),l(()=>p(W).dailyAggregates)??``}
|
|
28
|
+
${i??``}`),[()=>l(()=>Y(`retentionDays`)),()=>l(()=>Y(`rawObservations`)),()=>l(()=>Y(`dailyAggregates`))]),f(e,t)};i(nr,e=>{p(Ge)?e(rr):p(W)&&e(ir,1)});var ar=s(nr,2),or=e=>{var t=$H(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`privacyActionUnavailable`))]),f(e,t)};i(ar,e=>{p(V)&&e(or)});var sr=s(ar,2),cr=c(sr),lr=c(cr,!0);F(cr);var ur=s(cr,2),dr=c(ur,!0);F(ur);var fr=s(ur,2),pr=c(fr);D(pr);var mr=s(pr);F(fr);var hr=s(fr,2),gr=c(hr);D(gr);var _r=s(gr);F(hr);var vr=s(hr,2),yr=c(vr,!0);F(vr);var br=s(vr,2),xr=c(br,!0);F(br);var Sr=s(br,2),Cr=c(Sr,!0);F(Sr),F(sr),F(Xn),F(ge),F(a),T(a,e=>b(kt,e),()=>p(kt)),F(n),g((e,t,n,i,a,o,s,c,u,d,f,m,h,g,v,y,b,x,C,T,D,O,A,j,P,F,ee,R,re,oe,B,le,ge,_e,ve,ye,be,Se,we,Te,Ee,ke)=>{r(_,e),r(S,t),r(w,n),k(E,`aria-label`,i),k(M,`aria-label`,a),I=de(N,1,`svelte-1uha8ag`,null,I,o),r(te,s),ne=de(L,1,`svelte-1uha8ag`,null,ne,{active:p(K)===`plans`}),r(ie,c),z=de(ae,1,`svelte-1uha8ag`,null,z,{active:p(K)===`rates`}),r(se,`${u??``} (${p(ft),l(()=>p(ft).length)??``})`),ue=de(ce,1,`svelte-1uha8ag`,null,ue,{active:p(K)===`monitoring`}),r(fe,d),me=de(pe,1,`svelte-1uha8ag`,null,me,{active:p(K)===`privacy`}),r(he,f),r(xe,m),r(Ce,h),Oe=de(De,1,`plans-section svelte-1uha8ag`,null,Oe,{"settings-target-active":p(K)===`plans`}),r(je,g),r(Ne,v),ze=de(Re,1,`svelte-1uha8ag`,null,ze,{"settings-target-active":p(K)===`rates`}),r(Xe,y),k(Ze,`title`,b),k(Ze,`aria-label`,x),Ze.disabled=p(mt),$e=de(Qe,1,`svelte-1uha8ag`,null,$e,{spin:p(mt)}),r(et,` ${C??``}`),r(nt,T),r(Ot,D),r(jt,O),r(It,A),k(X,`placeholder`,j),r(zt,P),r(Ut,F),r(qt,ee),r(Qt,R),un.disabled=p(U),r(dn,re),r(jn,oe),r(Nn,B),r(Un,le),r(Gn,ge),r($n,_e),r(tr,ve),r(lr,ye),r(dr,be),r(mr,` ${Se??``}`),r(_r,` ${we??``}`),vr.disabled=p(Ct),r(yr,Te),r(xr,Ee),Sr.disabled=p(St),r(Cr,ke)},[()=>l(()=>Y(`settings`)),()=>l(()=>Y(`settings`)),()=>l(()=>Y(`settingsSubtitle`)),()=>l(()=>Y(`closeSettings`)),()=>l(()=>Y(`settings`)),()=>({active:p(K)===`connections`||p(K)?.startsWith(`connector`)}),()=>l(()=>Y(`connections`)),()=>l(()=>Y(`plans`)),()=>l(()=>Y(`customRatesNav`)),()=>l(()=>Y(`monitoring`)),()=>l(()=>Y(`privacy`)),()=>l(()=>Y(`connections`)),()=>l(()=>Y(`connectionsSubtitle`)),()=>l(()=>Y(`plans`)),()=>l(()=>Y(`plansSubtitle`)),()=>l(()=>Y(`customRates`)),()=>l(()=>Y(`customRateRefreshTitle`)),()=>l(()=>Y(`customRateRefreshTitle`)),()=>l(()=>Y(`customRateRefresh`)),()=>l(()=>Y(`customRatesSubtitle`)),()=>l(()=>Y(`customRateProvider`)),()=>l(()=>Y(`customRateProviderOther`)),()=>l(()=>Y(`customRateDomain`)),()=>l(()=>Y(`customRateDomainWildcard`)),()=>l(()=>Y(`customRateModel`)),()=>l(()=>Y(`customRateInput`)),()=>l(()=>Y(`customRateOutput`)),()=>l(()=>Y(`customRateCacheRead`)),()=>(p(U),l(()=>p(U)?Y(`customRateUpdating`):Y(`customRateAdd`))),()=>l(()=>Y(`monitoring`)),()=>l(()=>Y(`monitoringSubtitle`)),()=>l(()=>Y(`diagnostics`)),()=>l(()=>Y(`diagnosticsSubtitle`)),()=>l(()=>Y(`privacy`)),()=>l(()=>Y(`privacySubtitle`)),()=>l(()=>Y(`exportJson`)),()=>l(()=>Y(`exportCsv`)),()=>l(()=>Y(`includeAccountIdentifiers`)),()=>l(()=>Y(`deleteProductSecrets`)),()=>(p(Ct),l(()=>p(Ct)?Y(`hardRebuilding`):Y(`hardRebuild`))),()=>l(()=>Y(`hardRebuildWarning`)),()=>(p(St),l(()=>p(St)?Y(`clearing`):Y(`clearData`)))]),u(`click`,E,xn),u(`click`,N,()=>bn(`connections`,!1)),u(`click`,L,()=>bn(`plans`,!1)),u(`click`,ae,()=>bn(`rates`,!1)),u(`click`,ce,()=>bn(`monitoring`,!1)),u(`click`,pe,()=>bn(`privacy`,!1)),u(`click`,Ze,en),j(q,()=>p(dt),e=>b(dt,e)),u(`change`,q,tn),B(X,()=>p(H).billingDomainId,e=>v(H,p(H).billingDomainId=e)),B(Bt,()=>p(H).model,e=>v(H,p(H).model=e)),B(Wt,()=>p(H).inputRate,e=>v(H,p(H).inputRate=e)),B(Jt,()=>p(H).outputRate,e=>v(H,p(H).outputRate=e)),B(cn,()=>p(H).cacheReadRate,e=>v(H,p(H).cacheReadRate=e)),u(`submit`,wt,oe(nn)),u(`click`,cr,()=>gn(`json`)),u(`click`,ur,()=>gn(`csv`)),P(pr,()=>p(xt),e=>b(xt,e)),P(gr,()=>p(G),e=>b(G,e)),u(`click`,vr,mn),u(`click`,Sr,_n),f(t,n)};i(Ne,e=>{p(Dt)&&e(Fe)});var Ie=s(Ne,2),Ue=t=>{let n=e(()=>p(At)),a=e(()=>(d(p(n)),l(()=>p(n).retailEquivalent.status===`unavailable`?p(n).reportedEstimate:p(n).retailEquivalent))),o=e(()=>(d(p(n)),l(()=>p(n).priceSnapshots))),m=e(()=>(d(p(n)),l(()=>p(n).composition))),h=e(()=>(d(p(n)),l(()=>Bn(p(n)))));var _=bU(),v=c(_),y=c(v),x=c(y),S=c(x),C=c(S);F(S);var w=s(S,2),E=c(w,!0);F(w);var D=s(w,2),O=e=>{var t=pU(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`separateFromHeadline`))]),f(e,t)};i(D,e=>{d(p(n)),l(()=>p(n).includedInHeadline===!1)&&e(O)}),F(x);var A=s(x,2);F(y);var j=s(y,2),M=c(j),N=c(M),P=c(N),ee=c(P,!0);F(P);var I=s(P,2),te=c(I,!0);F(I),F(N);var L=s(N,2),ne=c(L),R=c(ne,!0);F(ne);var re=s(ne,2),ie=c(re,!0);F(re),F(L);var ae=s(L,2),oe=c(ae),z=c(oe,!0);F(oe);var B=s(oe,2),se=c(B,!0);F(B),F(ae),F(M);var ce=s(M,2),le=e=>{var t=vU(),i=c(t),a=c(i);F(i),F(t),g(e=>r(a,`+ ${e??``}`),[()=>l(()=>Y(`setCustomRateForModel`))]),u(`click`,i,()=>cn(p(n).providerId,p(n).billingDomainId,p(n).model)),f(e,t)};i(ce,e=>{d(p(a)),l(()=>p(a).status===`unavailable`)&&e(le)});var ue=s(ce,2),de=c(ue),fe=c(de,!0);F(de),FB(s(de,2),{get compositionTotals(){return p(m)},get unclassifiedTokens(){return d(p(n)),l(()=>p(n).tokenEvidence.unclassifiedTokens)},get trend(){return d(p(n)),l(()=>p(n).trend)},get trendEvidence(){return p(h)},get locale(){return p(De)},formatNumber:An,formatMoney:lr}),F(ue);var pe=s(ue,2),me=c(pe),he=c(me,!0);F(me);var ge=s(me,2),_e=c(ge),ve=c(_e),ye=c(ve,!0);F(ve);var be=s(ve,2),xe=c(be,!0);F(be),F(_e);var Se=s(_e,2),Ce=c(Se),we=c(Ce,!0);F(Ce);var Te=s(Ce,2),Ee=c(Te,!0);F(Te),F(Se);var Oe=s(Se,2),ke=c(Oe),Ae=c(ke,!0);F(ke);var je=s(ke,2),Me=c(je,!0);F(je),F(Oe);var Ne=s(Oe,2),Pe=e=>{var t=yU(),n=c(t),i=c(n,!0);F(n);var a=s(n,2),u=c(a,!0);F(a),F(t),g((e,t)=>{r(i,e),r(u,t)},[()=>l(()=>Y(`priceSnapshot`)),()=>(d(p(o)),l(()=>p(o).map(e=>`${e.version} · ${e.source}`).join(` + `)))]),f(e,t)};i(Ne,e=>{d(p(o)),l(()=>p(o).length>0)&&e(Pe)}),F(ge),F(pe),F(j),F(v),T(v,e=>b(rt,e),()=>p(rt)),F(_),g((e,t,i,a,o,s,c,u,f,m,h,g,_,y,b,x)=>{k(v,`aria-label`,e),r(C,`${d(p(n)),l(()=>p(n).providerDisplayName)??``} · ${d(p(n)),l(()=>p(n).billingDomainDisplayName)??``}`),r(E,(d(p(n)),l(()=>p(n).model))),k(A,`aria-label`,t),r(ee,i),r(te,a),r(R,o),r(ie,s),r(z,c),r(se,u),r(fe,f),r(he,m),r(ye,h),r(xe,g),r(we,_),r(Ee,y),r(Ae,b),r(Me,x)},[()=>(d(p(n)),l(()=>`${Y(`modelDetail`)}: ${p(n).model}`)),()=>l(()=>Y(`closeModelDetail`)),()=>l(()=>Y(`recordedTotal`)),()=>(d(p(n)),l(()=>An(p(n).tokenEvidence.recordedTokens))),()=>l(()=>Y(`cost`)),()=>(d(p(a)),l(()=>p(a).status===`unavailable`?Y(`notAvailable`):lr(p(a).amount,p(a).comparisonCurrency))),()=>l(()=>Y(`observations`)),()=>(d(p(n)),l(()=>An(p(n).tokenEvidence.observationCount))),()=>l(()=>Y(`activityOverview`)),()=>l(()=>Y(`evidenceSummary`)),()=>l(()=>Y(`scope`)),()=>(d(p(n)),l(()=>p(n).tokenEvidence.usageScopes.map(zn).join(` + `)||Y(`unknown`))),()=>l(()=>Y(`totalDerivation`)),()=>(d(p(n)),l(()=>p(n).tokenEvidence.totalDerivations.map(Vn).join(` + `)||Y(`unknown`))),()=>l(()=>Y(`latestData`)),()=>(d(p(n)),l(()=>Pn(p(n).lastObservedAt)))]),u(`click`,A,yr),f(t,_)};i(Ie,e=>{p(At)&&e(Ue)}),g((e,t,n,i,o,s,c,l,u)=>{a.inert=p(Dt)||p(At)!==null,k(m,`alt`,e),r(y,t),k(S,`aria-label`,n),k(C,`aria-selected`,p(Xe)===`agents`),k(C,`tabindex`,p(Xe)===`agents`?0:-1),r(N,i),k(I,`aria-selected`,p(Xe)===`models`),k(I,`tabindex`,p(Xe)===`models`?0:-1),r(te,o),r(ie,s),k(ae,`aria-label`,c),r(se,w()===`system`?`◐`:E()===`dark`?`☾`:`☀`),r(ue,` ${l??``}`),r(me,p(De)===`en`?`中文`:`EN`),ge.disabled=p(Le),Se=de(ye,1,`svelte-1uha8ag`,null,Se,{spin:p(Le)}),r(Ce,` ${u??``}`)},[()=>l(()=>Y(`bannerAlt`)),()=>l(()=>Y(`title`)),()=>l(()=>Y(`mainViews`)),()=>l(()=>Y(`agentUsageTab`)),()=>l(()=>Y(`tokenModelCostsTab`)),()=>l(()=>Y(`settings`)),()=>l(()=>Y(`themeToggleAria`)),()=>(w(),l(()=>Bt(w()))),()=>(p(Le),l(()=>p(Le)?Y(`refreshing`):Y(`refresh`)))]),u(`click`,C,()=>b(Xe,`agents`)),u(`keydown`,C,wn),u(`click`,I,()=>b(Xe,`models`)),u(`keydown`,I,wn),u(`click`,ne,()=>bn()),u(`click`,ae,zt),u(`click`,fe,Lt),u(`click`,ge,Wt),f(t,n)}),f(t,br),C(),se()}export{SU as component};
|