@file-viewer/web-full 2.1.3 → 2.1.5

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.
@@ -0,0 +1,108 @@
1
+ (function(){var _l=Object.defineProperty,b=(e,t)=>()=>(e&&(t=e(e=0)),t),Dn=(e,t)=>{let i={};for(var n in e)_l(i,n,{get:e[n],enumerable:!0});return t||_l(i,Symbol.toStringTag,{value:"Module"}),i},pp=b((()=>{})),mp=b((()=>{pp()})),pr,mr,_r,xr,yt,_p,Ht=b((()=>{pr=["zip","zipx","7z","rar","tar","gz","gzip","tgz","bz2","bzip2","tbz","tbz2","xz","txz","lzma","zst","tzst","cab","ar","cpio","iso","xar","lha","lzh","jar","war","ear","apk","cbz","cbr"],mr=["glb","gltf","obj","stl","ply","fbx","dae","3ds","3mf","amf","usd","usda","usdc","usdz","kmz","step","stp","iges","igs","ifc","3dm","brep","pcd","wrl","vrml","xyz","vtk","vtp"],_r=["txt","json","js","mjs","cjs","css","java","py","html","htm","jsx","ts","tsx","xml","log","vue","yaml","yml","ini","sh","bash","sql","go","rs","php","c","cpp","cc","h","hpp","cs","diff","patch","bundle","bdl","jsonc","json5","ipynb","toml","proto","hcl","tex","gv","http","react","rb","swift","kt"],xr=["gif","jpg","jpeg","bmp","tiff","tif","png","svg","webp","avif","ico","heic","heif","jxl"],yt=[{id:"office-word-openxml",label:"Word OpenXML",category:"office",extensions:["docx","docm","dotx","dotm"],async:!0,capabilities:{download:!0,print:"adapter",exportHtml:"adapter",zoom:"provider",search:!0}},{id:"office-word-binary",label:"Word Binary",category:"office",extensions:["doc","dot"],async:!0,capabilities:{download:!0,print:"adapter",exportHtml:"adapter",zoom:"provider",search:!0}},{id:"office-presentation",label:"PowerPoint",category:"office",extensions:["pptx","pptm","potx","potm","ppsx","ppsm"],async:!0,capabilities:{download:!0,print:!0,exportHtml:!0,zoom:"provider",search:!0}},{id:"open-document",label:"Open Document",category:"office",extensions:["rtf","odt","odp"],async:!0,capabilities:{download:!0,print:!0,exportHtml:!0,zoom:"provider",search:!0}},{id:"spreadsheet-openxml",label:"Spreadsheet",category:"office",extensions:["xlsx","xltx","xlsm","xlsb","xls","xlt","xltm","csv","ods","fods","numbers"],async:!0,capabilities:{download:!0,print:!1,exportHtml:!1,zoom:"provider",search:!0}},{id:"pdf",label:"PDF",category:"document",extensions:["pdf"],async:!0,capabilities:{download:!0,print:"adapter",exportHtml:"adapter",zoom:"provider",search:"provider"}},{id:"ofd",label:"OFD",category:"document",extensions:["ofd"],async:!0,capabilities:{download:!0,print:!0,exportHtml:!0,zoom:"provider",search:!0}},{id:"typst",label:"Typst",category:"document",extensions:["typ","typst"],async:!0,capabilities:{download:!0,print:"adapter",exportHtml:"adapter",zoom:"provider",search:!0}},{id:"archive",label:"Archive",category:"archive",extensions:pr,async:!0,capabilities:{download:!0,print:!1,exportHtml:!1,zoom:!1,search:!0}},{id:"email",label:"Email",category:"email",extensions:["eml","msg","mbox"],async:!0,capabilities:{download:!0,print:!1,exportHtml:!0,zoom:!1,search:!0}},{id:"eda",label:"EDA",category:"eda",extensions:["olb","dra","gds","oas","oasis"],async:!0,capabilities:{download:!0,print:!0,exportHtml:!0,zoom:!1,search:!0}},{id:"cad",label:"CAD",category:"cad",extensions:["dxf","dwg","dwf","dwfx","xps"],async:!0,capabilities:{download:!0,print:!0,exportHtml:!0,zoom:"provider",search:!1}},{id:"model",label:"3D Model",category:"model",extensions:mr,async:!0,capabilities:{download:!0,print:!1,exportHtml:!1,zoom:"provider",search:!1}},{id:"geo",label:"Geospatial",category:"geo",extensions:["geojson","kml","gpx","shp"],async:!0,capabilities:{download:!0,print:!0,exportHtml:!0,zoom:"provider",search:!0}},{id:"drawing",label:"Drawing",category:"drawing",extensions:["excalidraw","drawio","dio","mermaid","mmd","plantuml","puml"],async:!0,capabilities:{download:!0,print:!0,exportHtml:!0,zoom:"provider",search:!0}},{id:"mindmap",label:"Mind Map",category:"mindmap",extensions:["xmind"],async:!0,capabilities:{download:!0,print:!0,exportHtml:!0,zoom:"provider",search:!0}},{id:"epub",label:"EPUB",category:"ebook",extensions:["epub"],async:!0,capabilities:{download:!0,print:!1,exportHtml:!0,zoom:!1,search:"provider"}},{id:"umd",label:"UMD",category:"ebook",extensions:["umd"],async:!0,capabilities:{download:!0,print:!0,exportHtml:!0,zoom:"provider",search:!0}},{id:"image",label:"Image",category:"image",extensions:xr,async:!0,capabilities:{download:!0,print:!0,exportHtml:!0,zoom:"provider",search:!1}},{id:"markdown",label:"Markdown",category:"markdown",extensions:["md","markdown"],async:!0,capabilities:{download:!0,print:!0,exportHtml:!0,zoom:!1,search:!0}},{id:"code",label:"Code and Text",category:"code",extensions:_r,async:!0,capabilities:{download:!0,print:!0,exportHtml:!0,zoom:!1,search:!0}},{id:"video",label:"Video",category:"media",extensions:["mp4","webm","m3u8"],async:!0,capabilities:{download:!0,print:!1,exportHtml:!1,zoom:!1,search:!1}},{id:"audio",label:"Audio",category:"media",extensions:["mp3","mpeg","wav","ogg","oga","opus","m4a","aac","flac","weba","midi","mid"],async:!0,capabilities:{download:!0,print:!1,exportHtml:!1,zoom:!1,search:!1}},{id:"data-asset",label:"Data Asset",category:"asset",extensions:["ttf","otf","woff","woff2","psd","ai","eps","sqlite","wasm","parquet","avro","webarchive"],async:!0,capabilities:{download:!0,print:!1,exportHtml:!0,zoom:!1,search:!0}}],_p=Object.freeze(Array.from(new Set(yt.flatMap(e=>e.extensions))).sort())})),xp,yp,bp=b((()=>{xp=["[data-viewer-anchor-id]",".pdfViewer .page",".docx-wrapper section",".docx p",".docx li",".docx table",".markdown-body h1",".markdown-body h2",".markdown-body h3",".markdown-body h4",".markdown-body h5",".markdown-body h6",".markdown-body p",".markdown-body li",".markdown-body pre",".markdown-body table","article h1","article h2","article h3","article h4","article h5","article h6","article p","article li","article pre","article table","pre code","p","li","tr","h1","h2","h3","h4","h5","h6","pre","table"].join(","),yp=[".viewer-actions",".viewer-watermark",".state-panel",".pdf-toolbar",".pdf-nav-pane",".flyfish-search-match"].join(",")})),yr,br,wr,wp=b((()=>{yr=new WeakMap,br=(e,t)=>{yr.set(e,t),e.dataset.viewerZoomProvider=e.dataset.viewerZoomProvider||"custom",e.__flyfishViewerZoomProvider=t},wr=e=>{e&&(yr.delete(e),delete e.dataset.viewerZoomProvider,delete e.__flyfishViewerZoomProvider)}})),Wi=b((()=>{bp(),wp()})),Tp,xl=b((()=>{Wi(),Tp=["script","style","textarea","input","select","button",".viewer-actions",".viewer-watermark",".state-panel",".pdf-toolbar",".pdf-nav-pane",".flyfish-search-match",".textLayer",".annotationLayer",".xfaLayer","svg","canvas","iframe","video","audio"].join(",")})),yl=b((()=>{Wi(),xl()})),Tr,$r=b((()=>{Wi(),Tr=()=>{const e=new Set;return{emit(){e.forEach(t=>t())},subscribe(t){return e.add(t),()=>{e.delete(t)}}}}})),bl,$p=b((()=>{bl=e=>new Promise(t=>{const i=e||(typeof window<"u"?window:void 0);if(!i||typeof i.requestAnimationFrame!="function"){(i?.setTimeout?i.setTimeout.bind(i):globalThis.setTimeout.bind(globalThis))(()=>t(),0);return}const n=i.requestAnimationFrame.bind(i);n(()=>{n(()=>t())})})})),qe,Fn=b((()=>{qe=e=>e.trim().replace(/^\./,"").toLowerCase()})),Ap,wl,Tl,Ar,$l,Al,Sl,Sr,kl,Wt,pi=b((()=>{Ap="zh-CN",wl={"toolbar.zoomGroup":"缩放控制","toolbar.zoomOut":"缩小预览","toolbar.zoomIn":"放大预览","toolbar.zoomReset":"还原比例","toolbar.download":"下载","toolbar.downloadTitle":"下载原始文件","toolbar.print":"打印","toolbar.printTitle":"打印完整渲染内容","toolbar.exportHtml":"HTML","toolbar.exportHtmlTitle":"导出当前渲染后的 HTML","state.ready.title":"预览完成","state.ready.message":"文件内容已完成渲染。","state.empty.title":"暂无文件","state.empty.message":"请选择文件或提供可访问的文件地址后开始预览。","state.unsupported.install.title":"需要装配预览能力","state.unsupported.install.message":"{extension} 格式已在支持矩阵中,但当前项目尚未装配 {rendererLabel} renderer。","state.unsupported.install.description":"推荐安装 {presetPackage},通过 options.preset / options.renderers 注入对应能力{rendererTip};Vite 项目也可以使用 @file-viewer/vite-plugin 自动发现已安装 preset。","state.unsupported.title":"暂不支持在线预览","state.unsupported.message":"不支持{extension}格式的在线预览,请下载后预览或转换为支持的格式。","state.unsupported.description":"支持 Office、PDF、OFD、Typst、压缩包、邮件、OLB/DRA、CAD、地理数据、3D 模型、Excalidraw、draw.io、EPUB、UMD、Markdown、代码/文本、图片、音视频、字体和数据资产的在线预览","state.error.title":"预览失败","preview.downloading":"正在下载文件资源...","preview.streamingPdf":"正在建立 PDF 流式预览...","preview.reading":"正在解析文件内容...","error.download":"下载失败","error.print":"打印失败","error.exportHtml":"导出 HTML 失败","error.noDownloadSource":"当前没有可下载的源文件","error.noExportContent":"当前没有可导出的预览内容","error.printUnavailable":"当前文件类型不支持完整打印,请下载原文件后在本地应用中打印","error.printWindowBlocked":"浏览器拦截了打印窗口","error.remoteDownload":"文件下载失败","error.localRead":"读取文件异常","error.load":"加载文件异常","error.stream":"加载 PDF 流式预览异常","error.beforeOperation":"操作前置校验失败","operation.download":"下载原始文件","operation.print":"打印完整渲染内容","operation.exportHtml":"导出渲染 HTML","operation.zoomIn":"放大预览","operation.zoomOut":"缩小预览","operation.zoomReset":"还原预览比例","pdf.toolbar.toggleNavigation":"切换导航窗格","pdf.toolbar.previousPage":"上一页","pdf.toolbar.nextPage":"下一页","pdf.toolbar.fitWidth":"适合宽度","pdf.toolbar.zoomOut":"缩小","pdf.toolbar.zoomIn":"放大","pdf.toolbar.rotateLeft":"向左旋转","pdf.toolbar.rotateRight":"向右旋转","pdf.nav.typeLabel":"PDF 导航类型","pdf.nav.pagesTab":"页面","pdf.nav.outlineTab":"目录","pdf.nav.pagesTitle":"页面导航","pdf.nav.outlineTitle":"目录导航","pdf.nav.pageCount":"{count} 页","pdf.nav.itemCount":"{count} 项","pdf.nav.pageLabel":"第 {page} 页","pdf.nav.outlineEmpty":"当前 PDF 没有可用目录","pdf.nav.outlineFallbackTitle":"目录 {index}","pdf.thumbnail.alt":"第 {page} 页缩略图","pdf.state.loading":"正在加载 PDF...","pdf.error.browserWindow":"PDF 预览需要浏览器窗口","pdf.error.missingSource":"PDF 缺少可读取的数据源","pdf.error.loadFailed":"PDF 加载失败","pdf.error.notLoaded":"PDF 尚未加载完成,请稍后再试","pdf.error.unloaded":"PDF 已卸载,无法继续打印","pdf.error.canvasUnavailable":"当前浏览器无法创建 PDF 打印画布","pdf.export.pageTitle":"{title} - 第 {page} 页","spreadsheet.loading.kicker":"Excel 表格","spreadsheet.loading.title":"正在解析 Excel 工作簿","spreadsheet.loading.hint":"正在准备工作表、样式和大数据视口,请稍候。","spreadsheet.loading.streaming":"正在平滑补充可视区数据","spreadsheet.tabs.ariaLabel":"工作表列表","spreadsheet.state.parsingWorkbook":"正在解析 Excel 工作簿,请耐心等待...","spreadsheet.state.preparingSheet":"正在准备工作表内容...","spreadsheet.state.preparingSheetNamed":"正在准备「{name}」...","spreadsheet.state.cachedRows":"已缓存 {cached} / {total} 行","spreadsheet.state.rows":"共 {rows} 行,按视口预取平滑加载","spreadsheet.state.rowsAndColumns":"共 {rows} 行,{cols} 列,按视口预取平滑加载","spreadsheet.error.parseFailed":"Excel 解析失败","spreadsheet.error.workerFailed":"Excel Worker 运行失败","archive.error.nestedUnsupported":"不支持 .{type} 格式的在线预览,请下载后预览或转换为支持的格式","archive.loading.readingDirectory":"正在读取压缩包目录...","archive.loading.readingDirectoryHint":"大文件会在 Worker 中解析,避免阻塞主线程。","archive.search.placeholder":"筛选压缩包内文件","archive.preview.title":"压缩包内预览","archive.preview.chooseFile":"请选择一个文件","archive.preview.downloadFile":"下载文件","archive.error.title":"压缩包预览提示","archive.stats.summary":"{count} 个文件 · {size} · {previewable} 个可直接预览","archive.warning.encrypted":"检测到加密内容,当前在线预览不接收密码,建议下载后本地解压。","archive.empty.title":"选择左侧文件即可预览","archive.empty.message":"压缩包只读取目录;文件内容会在点击后按需解压,并在体积允许时缓存到 IndexedDB。","archive.loading.initializingCandidate":"正在初始化 {label}...","archive.loading.initializingCandidateHint":"如果当前服务器没有正确发布 Worker/WASM,会自动切换兼容模式。","archive.error.candidateInitTimeout":"{label} 初始化超时","archive.error.encryptedCheckTimeout":"{label} 加密检测超时","archive.loading.directoryReadyHint":"目录读取完成后,点击内部文件才会按需解压。","archive.error.candidateReadTimeout":"{label} 读取目录超时","archive.loading.workerFallback":"Worker 不可用,正在切换 ZIP/TAR 兼容模式...","archive.loading.workerFallbackHint":"兼容模式无需额外静态 Worker,适合手机 WebView 或本地临时服务器。","archive.notice.workerFallback":"当前环境的 libarchive Worker 未能启动,已自动切换到 ZIP/TAR/GZIP 兼容模式。RAR、7z 等格式仍建议发布 vendor/libarchive/worker-bundle.js 与 libarchive.wasm。","archive.error.tooLarge":"压缩包体积 {size} 超过安全上限 {limit},请下载后在本地解压。","archive.loading.initializingWorker":"正在初始化压缩包解析 Worker...","archive.loading.initializingWorkerHint":"大文件会在 Worker 中解析,避免阻塞主线程。","archive.error.workerInitFailed":"压缩包 Worker 初始化失败","archive.error.entryTooLarge":"压缩包内文件 {name} 体积 {size} 超过预览上限 {limit}。","archive.loading.extracting":"正在按需解压 {name}...","archive.loading.rendering":"正在渲染 {name}...","archive.loading.exporting":"正在导出 {name}...","media.audio.title":"音频预览","media.audio.description":"使用浏览器原生播放器打开,兼容性取决于当前浏览器支持的音频编码。","media.audio.unsupported":"当前浏览器不支持音频播放。","media.video.title":"视频预览","media.video.unsupported":"当前浏览器不支持该视频格式。","media.video.hlsHint":"HLS 会优先使用原始 URL 加载分片;如果传入的是本地单文件清单,请确保分片地址可被浏览器访问。","media.midi.title":"MIDI 文件","media.midi.loading":"正在解析 MIDI 轨道...","media.midi.trackHeader":"轨道","media.midi.instrumentHeader":"乐器","media.midi.channelHeader":"通道","media.midi.noteCountHeader":"音符数","media.midi.durationHeader":"时长","media.midi.durationStat":"时长","media.midi.trackStat":"轨道","media.midi.noteStat":"音符","media.midi.parseFailed":"MIDI 解析失败","email.mbox.subject":"{filename} · 第 1 封","email.mbox.summary":"MBOX 共识别 {count} 封邮件,当前展示第 1 封。","email.error.title":"邮件预览提示","email.meta.from":"发件人","email.meta.to":"收件人","email.meta.cc":"抄送","email.meta.date":"时间","email.tabs.text":"正文","email.tabs.headers":"头信息","email.attachments.title":"附件","email.attachments.empty":"暂无附件","email.attachments.download":"下载附件","email.attachments.opening":"正在打开附件 {name}...","email.attachments.nestedUnavailable":"当前运行环境未提供附件嵌套预览入口,请下载 {name} 后查看。","email.loading.parsing":"正在解析邮件...","data.font.sample":"Flyfish Viewer 轻量预览 AaBbCc 1234567890","data.error.fontFaceUnsupported":"当前浏览器不支持 FontFace API","data.title.font":"字体文件预览","data.title.sqlite":"SQLite 数据库预览","data.title.parquet":"Parquet 列式数据预览","data.title.avro":"Avro 对象容器预览","data.title.wasm":"WebAssembly 模块预览","data.title.eps":"EPS 矢量文件摘要","data.title.ai":"Illustrator 文件摘要","data.title.webarchive":"WebArchive 摘要预览","data.title.summary":"数据资产摘要","data.label.format":"格式","data.label.size":"大小","data.label.rendering":"渲染方式","data.label.objects":"对象数","data.label.sampleTable":"示例表","data.label.rows":"行数","data.label.columns":"列数","data.label.sampleRows":"示例行","data.label.imports":"导入","data.label.exports":"导出","data.label.magic":"Magic","data.label.note":"说明","data.label.container":"容器","data.value.schemaRead":"已读取","data.value.schemaUnread":"未读取","data.note.aiSummary":"非 PDF-compatible AI 按摘要展示","data.note.postscriptSummary":"PostScript 摘要展示","data.note.webarchive":"安全提取可读片段,不执行网页脚本","data.image.alt":"资产预览","psd.title":"PSD 图层预览","psd.action.fit":"适合","psd.action.showAll":"全显","psd.action.hideAll":"全隐","psd.layers.title":"图层","psd.layers.redrawable":"{count} 可重绘","psd.layers.empty":"未发现可展示图层,使用合成图预览。","psd.layers.hidden":"隐藏","drawing.error.viewerLoadFailed":"diagrams.net viewer 加载失败","drawing.error.excalidrawEmpty":"Excalidraw 文件中没有可预览图元","drawing.error.excalidrawTimeout":"Excalidraw 官方导出超时,自动切换 rough.js 兼容渲染","drawing.error.drawioParseFailed":"Draw.io XML 解析失败:{message}","drawing.error.drawioNoModel":"当前 Draw.io 文件没有可直接渲染的 mxGraphModel。","drawing.error.drawioNoElements":"当前 Draw.io 文件没有可预览图元。","drawing.error.viewerInitFailed":"diagrams.net viewer 未正确初始化","drawing.error.drawioTimeout":"diagrams.net 官方 Viewer 加载超时,自动切换本地 SVG 预览","drawing.error.svgParseFailed":"SVG 解析失败","drawing.error.plantumlRenderFailed":"PlantUML SVG 渲染失败:{status}","drawing.title.excalidraw":"Excalidraw 官方 SVG 预览","drawing.title.mermaid":"Mermaid SVG 预览","drawing.title.plantuml":"PlantUML SVG 预览","drawing.title.drawio":"Draw.io 离线 SVG 预览","drawing.toolbar.zoomOut":"缩小","drawing.toolbar.zoomIn":"放大","drawing.toolbar.fit":"适合","drawing.toolbar.fitWidth":"适合宽度","drawing.state.loading":"正在加载绘图预览...","text.code.loadingHighlight":"正在加载高亮...","ebook.toc":"目录","ebook.reading":"阅读中","ebook.itemCount":"{count} 项","epub.title":"EPUB 电子书","epub.previousPage":"上一页","epub.nextPage":"下一页","epub.loading":"正在解析 EPUB...","epub.chapterFallback":"章节 {index}","epub.renderIncomplete":"EPUB 正文渲染未完成,请刷新后重试","umd.title":"UMD 电子书","umd.previousChapter":"上一章","umd.nextChapter":"下一章","umd.loading":"正在解析 UMD...","umd.emptyContent":"未解析到正文内容","umd.chapterFallback":"章节 {index}","umd.galleryFallback":"图集 {index}","umd.warningBodyTooShort":"UMD 正文长度小于声明长度,文件可能不完整","umd.error.unexpectedEnd":"UMD 文件结构不完整,读取时遇到意外结尾","umd.error.invalidFile":"不是有效的 UMD 电子书文件","typst.summaryRenderer":"Typst WASM 渲染器","typst.pageSummary.empty":"0 页","typst.pageSummary.ready":"{count} 页 / {width} x {height} pt","typst.status.compiling":"正在编译","typst.status.failed":"编译失败","typst.status.rendered":"已渲染","typst.loading.title":"正在解析 Typst","typst.loading.hint":"加载编译器并生成页面预览...","typst.error.title":"Typst 渲染失败","typst.error.timeout":"Typst WASM / 字体加载或编译超过 {seconds} 秒","typst.error.timeoutHint":"请检查 Typst compiler WASM、renderer WASM、字体目录的下载速度和缓存策略;弱网或跨境部署可通过 options.typst.renderTimeoutMs 调大浏览器端加载/编译超时。","typst.error.assetHint":"Typst 需要本地 compiler / renderer WASM 和字体目录。请运行 file-viewer-copy-assets,或配置 options.typst.compilerWasmUrl / options.typst.rendererWasmUrl / options.typst.fontAssetsUrl,并确认服务器以 application/wasm 返回 WASM。","typst.error.svgParseFailed":"Typst SVG 解析失败","typst.error.wasmLoadFailed":"Typst WASM 加载失败","xmind.toolbar.zoomOut":"缩小","xmind.toolbar.zoomIn":"放大","xmind.toolbar.fit":"适合","xmind.toolbar.fitTitle":"适配画布","xmind.state.loading":"正在解析 XMind 脑图...","xmind.stats.nodes":"节点","xmind.stats.depth":"层级","xmind.stats.theme":"主题","xmind.stats.template":"模板","xmind.badge.paused":"暂停","xmind.badge.collapsed":"折叠","xmind.badge.floating":"浮动","xmind.badge.summary":"概要","xmind.badge.callout":"标注","xmind.imageResource":"图片资源: {name}","xmind.error.unrecognized":"无法识别 XMind 文件: ZIP 中未找到 content.json 或 content.xml","xmind.error.noCanvas":"XMind 文件中没有可预览的画布","cad.toolbar.fit":"适配","cad.toolbar.zoomOut":"缩小","cad.toolbar.zoomIn":"放大","cad.layers.title":"图层","cad.layers.count":"{count} 项","cad.inspector.title":"结构","cad.inspector.entities":"实体","cad.inspector.blocks":"块","cad.inspector.pages":"页面","cad.inspector.drawn":"绘制","cad.state.loadingViewer":"正在加载 CAD 预览器...","cad.state.parsing":"正在解析 CAD...","cad.error.parseFailed":"CAD 文件解析失败","image.alt":"图片","image.lightbox.alt":"图片预览","image.lightbox.close":"关闭图片预览","gitBundle.error.invalid":"当前文件不是标准 Git bundle。","gitBundle.error.missingPack":"Git bundle header 后未找到 PACK 数据。","gitBundle.notice.delta":"当前 bundle 包含 delta 压缩对象。预览器已在浏览器端解析常规 OFS_DELTA / REF_DELTA;若仍有缺失文件,通常是包体过大、对象过多或依赖外部 prerequisite。","gitBundle.title.history":"历史记录","gitBundle.title.fileTree":"文件树","gitBundle.file.choose":"选择文件查看内容","gitBundle.file.noTree":"当前 bundle 的 tree/blob 可能被 delta 压缩,暂未解析到可展开文件。","gitBundle.file.none":"未解析到文件","gitBundle.history.empty":"当前 bundle 未解析到 commit 对象,仅展示 refs 和 pack 摘要。","gitBundle.toolbar.summary":"{commits} commits · {files} files","gitBundle.meta.bundle":"Bundle","gitBundle.meta.refs":"Refs","gitBundle.meta.commits":"Commits","gitBundle.meta.objects":"Objects","gitBundle.meta.deltas":"Deltas","gitBundle.meta.objectFormat":"Object format","gitBundle.meta.objectTypes":"Object types","geo.error.unrecognized":"无法识别的 GeoJSON 数据","geo.error.xmlParseFailed":"XML 解析失败","geo.error.unsupported":"不支持 .{type} 地理格式","geo.title":"地理数据预览","geo.featureCount":"要素数","geo.bounds":"范围","geo.geometryTypes":"几何类型","geo.aria":"地理数据 SVG 预览","geo.loading":"正在解析地理数据...","model.toolbar.fit":"适配","model.toolbar.rotate":"旋转","model.toolbar.wireframe":"线框","model.toolbar.grid":"网格","model.toolbar.axes":"坐标","model.state.loadingSummary":"正在加载模型","model.state.loading":"正在解析 3D 模型...","model.state.loaded":"模型已加载","model.state.parseFailed":"模型解析失败","model.summary.meshes":"{count} 个网格","model.summary.points":"{count} 个点云","model.error.daeEmpty":"DAE 模型未解析出有效场景","model.error.unsupported":"暂不支持 .{type} 模型格式","model.error.parseFailed":"{type} 模型解析失败","model.notice.signature":"检测到文件签名: {signature}。","loading.generic.label":"文件内容","loading.generic.hint":"正在整理内容结构并生成预览。","loading.word.label":"Word 文档","loading.word.hint":"正在准备分页、文本样式和文档结构。","loading.wordWorker.hint":"正在通过 Worker 准备文档结构、文本样式和分页结果。","loading.sheet.label":"Excel 表格","loading.sheet.hint":"正在准备工作表、样式和可视区数据。","loading.csv.label":"表格数据","loading.csv.hint":"正在准备行列数据和基础样式。","loading.presentation.label":"PPT 演示文稿","loading.presentation.hint":"正在构建幻灯片布局和媒体内容。","loading.pdf.label":"PDF 文档","loading.pdf.hint":"正在载入页面位图、文本层和缩放视图。","loading.ofd.label":"OFD 版式文件","loading.ofd.hint":"正在解析国产版式文档和页面对象。","loading.archive.label":"压缩包","loading.archive.hint":"正在启动 Worker 并读取压缩包目录。","loading.email.label":"邮件文件","loading.email.hint":"正在解析邮件头、正文和附件。","loading.msg.hint":"正在解析 Outlook 邮件和附件。","loading.eda.label":"EDA 文件","loading.eda.hint":"正在读取 EDA 容器结构和可读属性。","loading.cad.label":"CAD 图纸","loading.cad.hint":"正在准备 CAD 图层、几何对象和画布视图。","loading.dwg.hint":"正在通过 Worker 加载 DWG 几何和 LibreDWG WASM。","loading.dwf.hint":"正在加载 DWF native renderer 与 W2D/W3D 图形。","loading.dwfx.hint":"正在加载 DWFx/XPS native renderer 与页面图形。","loading.xps.hint":"正在加载 XPS native renderer 与嵌入字体。","loading.drawio.label":"draw.io 图纸","loading.drawio.hint":"正在解析图元、连线和 SVG 预览。","loading.excalidraw.label":"Excalidraw 图纸","loading.excalidraw.hint":"正在解析手绘图元并生成安全 SVG。","loading.epub.label":"EPUB 电子书","loading.epub.hint":"正在解析目录、章节资源和阅读分页。","loading.umd.label":"UMD 电子书","loading.umd.hint":"正在解析移动电子书结构、目录和压缩正文。","loading.image.label":"图片文件","loading.image.hint":"正在解码像素数据并生成预览。","loading.video.label":"视频文件","loading.video.hint":"正在准备媒体资源和播放组件。","loading.audio.label":"音频文件","loading.audio.hint":"正在准备音频资源和播放控件。"},Tl={"toolbar.zoomGroup":"Zoom controls","toolbar.zoomOut":"Zoom out","toolbar.zoomIn":"Zoom in","toolbar.zoomReset":"Reset zoom","toolbar.download":"Download","toolbar.downloadTitle":"Download the original file","toolbar.print":"Print","toolbar.printTitle":"Print the complete rendered document","toolbar.exportHtml":"HTML","toolbar.exportHtmlTitle":"Export the rendered HTML","state.ready.title":"Preview ready","state.ready.message":"The file has been rendered.","state.empty.title":"No file selected","state.empty.message":"Choose a file or provide an accessible URL to start previewing.","state.unsupported.install.title":"Preview capability required","state.unsupported.install.message":"{extension} is in the supported matrix, but {rendererLabel} renderer is not assembled in this project.","state.unsupported.install.description":"Install {presetPackage} and pass the capability through options.preset / options.renderers{rendererTip}. Vite projects can also use @file-viewer/vite-plugin to auto-discover installed presets.","state.unsupported.title":"Online preview is not supported yet","state.unsupported.message":"{extension} cannot be previewed online. Download it or convert it to a supported format.","state.unsupported.description":"Supports online preview for Office, PDF, OFD, Typst, archives, email, OLB/DRA, CAD, geospatial data, 3D models, Excalidraw, draw.io, EPUB, UMD, Markdown, code/text, images, audio/video, fonts, and structured data assets.","state.error.title":"Preview failed","preview.downloading":"Downloading file resources...","preview.streamingPdf":"Preparing streaming PDF preview...","preview.reading":"Parsing file content...","error.download":"Download failed","error.print":"Print failed","error.exportHtml":"HTML export failed","error.noDownloadSource":"There is no original file source to download.","error.noExportContent":"There is no rendered preview content to export.","error.printUnavailable":"This file type does not support full-document printing. Download the original file and print it locally.","error.printWindowBlocked":"The browser blocked the print window.","error.remoteDownload":"File download failed","error.localRead":"Failed to read local file","error.load":"Failed to load file","error.stream":"Failed to load streaming PDF preview","error.beforeOperation":"Before-operation check failed","operation.download":"Download original file","operation.print":"Print complete rendered content","operation.exportHtml":"Export rendered HTML","operation.zoomIn":"Zoom in","operation.zoomOut":"Zoom out","operation.zoomReset":"Reset preview zoom","pdf.toolbar.toggleNavigation":"Toggle navigation pane","pdf.toolbar.previousPage":"Previous page","pdf.toolbar.nextPage":"Next page","pdf.toolbar.fitWidth":"Fit to width","pdf.toolbar.zoomOut":"Zoom out","pdf.toolbar.zoomIn":"Zoom in","pdf.toolbar.rotateLeft":"Rotate left","pdf.toolbar.rotateRight":"Rotate right","pdf.nav.typeLabel":"PDF navigation type","pdf.nav.pagesTab":"Pages","pdf.nav.outlineTab":"Outline","pdf.nav.pagesTitle":"Page navigation","pdf.nav.outlineTitle":"Outline navigation","pdf.nav.pageCount":"{count} pages","pdf.nav.itemCount":"{count} items","pdf.nav.pageLabel":"Page {page}","pdf.nav.outlineEmpty":"This PDF has no available outline.","pdf.nav.outlineFallbackTitle":"Outline {index}","pdf.thumbnail.alt":"Page {page} thumbnail","pdf.state.loading":"Loading PDF...","pdf.error.browserWindow":"PDF preview requires a browser window","pdf.error.missingSource":"PDF has no readable data source","pdf.error.loadFailed":"Failed to load PDF","pdf.error.notLoaded":"The PDF is not loaded yet. Please try again later.","pdf.error.unloaded":"The PDF has been unloaded and cannot continue printing.","pdf.error.canvasUnavailable":"This browser cannot create a PDF print canvas.","pdf.export.pageTitle":"{title} - Page {page}","spreadsheet.loading.kicker":"Excel workbook","spreadsheet.loading.title":"Parsing Excel workbook","spreadsheet.loading.hint":"Preparing worksheets, styles, and virtualized viewport data.","spreadsheet.loading.streaming":"Loading visible worksheet data","spreadsheet.tabs.ariaLabel":"Worksheet list","spreadsheet.state.parsingWorkbook":"Parsing the Excel workbook. Please wait...","spreadsheet.state.preparingSheet":"Preparing worksheet content...","spreadsheet.state.preparingSheetNamed":"Preparing “{name}”...","spreadsheet.state.cachedRows":"Cached {cached} / {total} rows","spreadsheet.state.rows":"{rows} rows, loading smoothly by viewport","spreadsheet.state.rowsAndColumns":"{rows} rows, {cols} columns, loading smoothly by viewport","spreadsheet.error.parseFailed":"Failed to parse Excel","spreadsheet.error.workerFailed":"Excel Worker failed","archive.error.nestedUnsupported":".{type} cannot be previewed online. Download it or convert it to a supported format.","archive.loading.readingDirectory":"Reading archive directory...","archive.loading.readingDirectoryHint":"Large files are parsed in a Worker to keep the main thread responsive.","archive.search.placeholder":"Filter files inside the archive","archive.preview.title":"Archive entry preview","archive.preview.chooseFile":"Choose a file","archive.preview.downloadFile":"Download file","archive.error.title":"Archive preview notice","archive.stats.summary":"{count} files · {size} · {previewable} directly previewable","archive.warning.encrypted":"Encrypted content was detected. Online preview does not accept passwords; download and extract it locally.","archive.empty.title":"Choose a file from the left to preview","archive.empty.message":"The archive directory is read first. File contents are extracted on demand and cached in IndexedDB when size allows.","archive.loading.initializingCandidate":"Initializing {label}...","archive.loading.initializingCandidateHint":"If the server does not publish Worker/WASM assets correctly, the viewer falls back automatically.","archive.error.candidateInitTimeout":"{label} initialization timed out","archive.error.encryptedCheckTimeout":"{label} encryption check timed out","archive.loading.directoryReadyHint":"After the directory is ready, click an entry to extract it on demand.","archive.error.candidateReadTimeout":"{label} directory read timed out","archive.loading.workerFallback":"Worker unavailable. Switching to ZIP/TAR compatibility mode...","archive.loading.workerFallbackHint":"Compatibility mode needs no static Worker and works well in mobile WebViews or temporary local servers.","archive.notice.workerFallback":"The libarchive Worker could not start in this environment, so ZIP/TAR/GZIP compatibility mode is active. RAR, 7z, and similar formats should still publish vendor/libarchive/worker-bundle.js and libarchive.wasm.","archive.error.tooLarge":"Archive size {size} exceeds the safety limit {limit}. Download and extract it locally.","archive.loading.initializingWorker":"Initializing archive parsing Worker...","archive.loading.initializingWorkerHint":"Large files are parsed in a Worker to keep the main thread responsive.","archive.error.workerInitFailed":"Archive Worker initialization failed","archive.error.entryTooLarge":"Entry {name} is {size}, exceeding the preview limit {limit}.","archive.loading.extracting":"Extracting {name} on demand...","archive.loading.rendering":"Rendering {name}...","archive.loading.exporting":"Exporting {name}...","media.audio.title":"Audio preview","media.audio.description":"Opened with the browser-native audio player. Codec support depends on the current browser.","media.audio.unsupported":"This browser does not support audio playback.","media.video.title":"Video preview","media.video.unsupported":"This browser does not support this video format.","media.video.hlsHint":"HLS prefers the original URL for segment loading. If the input is a local single-file playlist, make sure segment URLs are reachable by the browser.","media.midi.title":"MIDI file","media.midi.loading":"Parsing MIDI tracks...","media.midi.trackHeader":"Track","media.midi.instrumentHeader":"Instrument","media.midi.channelHeader":"Channel","media.midi.noteCountHeader":"Notes","media.midi.durationHeader":"Duration","media.midi.durationStat":"Duration","media.midi.trackStat":"Tracks","media.midi.noteStat":"Notes","media.midi.parseFailed":"Failed to parse MIDI","email.mbox.subject":"{filename} · message 1","email.mbox.summary":"Detected {count} messages in the MBOX archive. Showing message 1.","email.error.title":"Email preview notice","email.meta.from":"From","email.meta.to":"To","email.meta.cc":"Cc","email.meta.date":"Date","email.tabs.text":"Body","email.tabs.headers":"Headers","email.attachments.title":"Attachments","email.attachments.empty":"No attachments","email.attachments.download":"Download attachment","email.attachments.opening":"Opening attachment {name}...","email.attachments.nestedUnavailable":"Nested attachment preview is not available in this environment. Download {name} to inspect it.","email.loading.parsing":"Parsing email...","data.font.sample":"Flyfish Viewer preview AaBbCc 1234567890","data.error.fontFaceUnsupported":"This browser does not support the FontFace API","data.title.font":"Font file preview","data.title.sqlite":"SQLite database preview","data.title.parquet":"Parquet columnar data preview","data.title.avro":"Avro object container preview","data.title.wasm":"WebAssembly module preview","data.title.eps":"EPS vector file summary","data.title.ai":"Illustrator file summary","data.title.webarchive":"WebArchive summary preview","data.title.summary":"Data asset summary","data.label.format":"Format","data.label.size":"Size","data.label.rendering":"Renderer","data.label.objects":"Objects","data.label.sampleTable":"Sample table","data.label.rows":"Rows","data.label.columns":"Columns","data.label.sampleRows":"Sample rows","data.label.imports":"Imports","data.label.exports":"Exports","data.label.magic":"Magic","data.label.note":"Note","data.label.container":"Container","data.value.schemaRead":"Read","data.value.schemaUnread":"Not read","data.note.aiSummary":"Non PDF-compatible AI is shown as a safe summary.","data.note.postscriptSummary":"PostScript summary preview","data.note.webarchive":"Readable fragments are extracted safely. Web scripts are not executed.","data.image.alt":"Asset preview","psd.title":"PSD layer preview","psd.action.fit":"Fit","psd.action.showAll":"Show all","psd.action.hideAll":"Hide all","psd.layers.title":"Layers","psd.layers.redrawable":"{count} redrawable","psd.layers.empty":"No displayable layers were found. Showing the composite image.","psd.layers.hidden":"hidden","drawing.error.viewerLoadFailed":"Failed to load the diagrams.net viewer","drawing.error.excalidrawEmpty":"This Excalidraw file has no previewable elements","drawing.error.excalidrawTimeout":"Official Excalidraw export timed out. Falling back to the rough.js renderer.","drawing.error.drawioParseFailed":"Failed to parse Draw.io XML: {message}","drawing.error.drawioNoModel":"This Draw.io file has no directly renderable mxGraphModel.","drawing.error.drawioNoElements":"This Draw.io file has no previewable elements.","drawing.error.viewerInitFailed":"The diagrams.net viewer was not initialized correctly","drawing.error.drawioTimeout":"Official diagrams.net Viewer timed out. Falling back to the local SVG preview.","drawing.error.svgParseFailed":"Failed to parse SVG","drawing.error.plantumlRenderFailed":"Failed to render PlantUML SVG: {status}","drawing.title.excalidraw":"Official Excalidraw SVG preview","drawing.title.mermaid":"Mermaid SVG preview","drawing.title.plantuml":"PlantUML SVG preview","drawing.title.drawio":"Draw.io offline SVG preview","drawing.toolbar.zoomOut":"Zoom out","drawing.toolbar.zoomIn":"Zoom in","drawing.toolbar.fit":"Fit","drawing.toolbar.fitWidth":"Fit width","drawing.state.loading":"Loading drawing preview...","text.code.loadingHighlight":"Loading syntax highlighting...","ebook.toc":"Table of contents","ebook.reading":"Reading","ebook.itemCount":"{count} items","epub.title":"EPUB ebook","epub.previousPage":"Previous","epub.nextPage":"Next","epub.loading":"Parsing EPUB...","epub.chapterFallback":"Chapter {index}","epub.renderIncomplete":"EPUB content did not finish rendering. Refresh and try again.","umd.title":"UMD ebook","umd.previousChapter":"Previous chapter","umd.nextChapter":"Next chapter","umd.loading":"Parsing UMD...","umd.emptyContent":"No readable body content was parsed.","umd.chapterFallback":"Chapter {index}","umd.galleryFallback":"Gallery {index}","umd.warningBodyTooShort":"The UMD body is shorter than declared and may be incomplete.","umd.error.unexpectedEnd":"The UMD structure is incomplete and ended unexpectedly.","umd.error.invalidFile":"This is not a valid UMD ebook file.","typst.summaryRenderer":"Typst WASM renderer","typst.pageSummary.empty":"0 pages","typst.pageSummary.ready":"{count} pages / {width} x {height} pt","typst.status.compiling":"Compiling","typst.status.failed":"Compilation failed","typst.status.rendered":"Rendered","typst.loading.title":"Parsing Typst","typst.loading.hint":"Loading the compiler and generating page previews...","typst.error.title":"Typst render failed","typst.error.timeout":"Typst WASM / font loading or compilation exceeded {seconds} seconds","typst.error.timeoutHint":"Check the download speed and cache strategy for the Typst compiler WASM, renderer WASM, and font directory. On weak networks or cross-region deployments, increase options.typst.renderTimeoutMs.","typst.error.assetHint":"Typst requires local compiler / renderer WASM files and a font directory. Run file-viewer-copy-assets, or configure options.typst.compilerWasmUrl / options.typst.rendererWasmUrl / options.typst.fontAssetsUrl, and make sure the server returns WASM with application/wasm.","typst.error.svgParseFailed":"Failed to parse Typst SVG","typst.error.wasmLoadFailed":"Failed to load Typst WASM","xmind.toolbar.zoomOut":"Zoom out","xmind.toolbar.zoomIn":"Zoom in","xmind.toolbar.fit":"Fit","xmind.toolbar.fitTitle":"Fit canvas","xmind.state.loading":"Parsing XMind mind map...","xmind.stats.nodes":"Nodes","xmind.stats.depth":"Depth","xmind.stats.theme":"Theme","xmind.stats.template":"Template","xmind.badge.paused":"Paused","xmind.badge.collapsed":"Collapsed","xmind.badge.floating":"Floating","xmind.badge.summary":"Summary","xmind.badge.callout":"Callout","xmind.imageResource":"Image resource: {name}","xmind.error.unrecognized":"Unrecognized XMind file: content.json or content.xml was not found in the ZIP package.","xmind.error.noCanvas":"This XMind file has no previewable canvas.","cad.toolbar.fit":"Fit","cad.toolbar.zoomOut":"Zoom out","cad.toolbar.zoomIn":"Zoom in","cad.layers.title":"Layers","cad.layers.count":"{count} items","cad.inspector.title":"Structure","cad.inspector.entities":"Entities","cad.inspector.blocks":"Blocks","cad.inspector.pages":"Pages","cad.inspector.drawn":"Drawn","cad.state.loadingViewer":"Loading CAD viewer...","cad.state.parsing":"Parsing CAD...","cad.error.parseFailed":"Failed to parse CAD file","image.alt":"Image","image.lightbox.alt":"Image preview","image.lightbox.close":"Close image preview","gitBundle.error.invalid":"This file is not a valid Git bundle.","gitBundle.error.missingPack":"No PACK data was found after the Git bundle header.","gitBundle.notice.delta":"This bundle contains delta-compressed objects. The viewer resolves common OFS_DELTA / REF_DELTA objects in the browser. Missing files usually indicate a very large bundle, too many objects, or an external prerequisite.","gitBundle.title.history":"History","gitBundle.title.fileTree":"File tree","gitBundle.file.choose":"Select a file to inspect","gitBundle.file.noTree":"The tree/blob objects in this bundle may be delta-compressed, and no expandable files were parsed.","gitBundle.file.none":"No files parsed","gitBundle.history.empty":"No commit objects were parsed. Showing refs and pack summary only.","gitBundle.toolbar.summary":"{commits} commits · {files} files","gitBundle.meta.bundle":"Bundle","gitBundle.meta.refs":"Refs","gitBundle.meta.commits":"Commits","gitBundle.meta.objects":"Objects","gitBundle.meta.deltas":"Deltas","gitBundle.meta.objectFormat":"Object format","gitBundle.meta.objectTypes":"Object types","geo.error.unrecognized":"Unrecognized GeoJSON data","geo.error.xmlParseFailed":"Failed to parse XML","geo.error.unsupported":".{type} geospatial format is not supported","geo.title":"Geospatial preview","geo.featureCount":"Features","geo.bounds":"Bounds","geo.geometryTypes":"Geometry types","geo.aria":"Geospatial SVG preview","geo.loading":"Parsing geospatial data...","model.toolbar.fit":"Fit","model.toolbar.rotate":"Rotate","model.toolbar.wireframe":"Wireframe","model.toolbar.grid":"Grid","model.toolbar.axes":"Axes","model.state.loadingSummary":"Loading model","model.state.loading":"Parsing 3D model...","model.state.loaded":"Model loaded","model.state.parseFailed":"Failed to parse model","model.summary.meshes":"{count} meshes","model.summary.points":"{count} point clouds","model.error.daeEmpty":"The DAE model did not contain a valid scene.","model.error.unsupported":".{type} model format is not supported yet","model.error.parseFailed":"Failed to parse {type} model","model.notice.signature":"Detected file signature: {signature}.","loading.generic.label":"File content","loading.generic.hint":"Preparing content structure and preview.","loading.word.label":"Word document","loading.word.hint":"Preparing document structure, text styles, and layout.","loading.wordWorker.hint":"Preparing document structure, text styles, and layout in a Worker.","loading.sheet.label":"Excel workbook","loading.sheet.hint":"Preparing worksheets, styles, and viewport data.","loading.csv.label":"Tabular data","loading.csv.hint":"Preparing rows, columns, and basic styling.","loading.presentation.label":"PowerPoint deck","loading.presentation.hint":"Building slide layout and media content.","loading.pdf.label":"PDF document","loading.pdf.hint":"Loading page bitmaps, text layers, and zoom view.","loading.ofd.label":"OFD layout document","loading.ofd.hint":"Parsing OFD pages and layout objects.","loading.archive.label":"Archive","loading.archive.hint":"Starting Worker and reading archive entries.","loading.email.label":"Email file","loading.email.hint":"Parsing message headers, body, and attachments.","loading.msg.hint":"Parsing Outlook message and attachments.","loading.eda.label":"EDA file","loading.eda.hint":"Reading EDA container structure and properties.","loading.cad.label":"CAD drawing","loading.cad.hint":"Preparing CAD layers, geometry, and canvas view.","loading.dwg.hint":"Loading DWG geometry and LibreDWG WASM in a Worker.","loading.dwf.hint":"Loading native DWF renderer and W2D/W3D graphics.","loading.dwfx.hint":"Loading native DWFx/XPS renderer and page graphics.","loading.xps.hint":"Loading native XPS renderer and embedded fonts.","loading.drawio.label":"draw.io diagram","loading.drawio.hint":"Parsing shapes, connectors, and SVG preview.","loading.excalidraw.label":"Excalidraw scene","loading.excalidraw.hint":"Parsing hand-drawn elements and generating safe SVG.","loading.epub.label":"EPUB ebook","loading.epub.hint":"Parsing table of contents, chapter resources, and reading pages.","loading.umd.label":"UMD ebook","loading.umd.hint":"Parsing mobile ebook metadata, table of contents, and compressed chapters.","loading.image.label":"Image file","loading.image.hint":"Decoding pixels and generating preview.","loading.video.label":"Video file","loading.video.hint":"Preparing media resource and player.","loading.audio.label":"Audio file","loading.audio.hint":"Preparing audio resource and playback controls."},Ar=Object.freeze({"zh-CN":wl,"en-US":Tl}),$l=()=>{var e;if(!(typeof navigator>"u"))return((e=navigator.languages)===null||e===void 0?void 0:e[0])||navigator.language},Al=e=>{const t=!e||e==="auto"?$l():e;return String(t||"zh-CN").toLowerCase().startsWith("zh")?"zh-CN":"en-US"},Sl=e=>{var t;return((t=e?.i18n)===null||t===void 0?void 0:t.messages)||e?.messages},Sr=e=>{var t;return Al(((t=e?.i18n)===null||t===void 0?void 0:t.locale)||e?.locale)},kl=(e,t={})=>e.replace(/\{([a-zA-Z0-9_.-]+)\}/g,(i,n)=>{const a=t[n];return a==null?"":String(a)}),Wt=(e,t,i={})=>{const n=Sr(e),a=Sl(e);return kl((typeof a=="function"?a(t,i,n):a?.[t])||Ar[n][t]||Ar["zh-CN"][t],i)}})),kr=b((()=>{pi()})),El,zn,In=b((()=>{Ht(),Fn(),El=e=>({...e,extensions:e.extensions.map(qe)}),zn=(e=yt)=>{const t=new Map,i=new Map,n=a=>{const r=El(a),o=t.get(r.id);o&&o.extensions.forEach(s=>{var l;((l=i.get(s))===null||l===void 0?void 0:l.id)===o.id&&i.delete(s)}),t.set(r.id,r),r.extensions.forEach(s=>{const l=i.get(s);if(l&&l.id!==r.id)throw new Error(`File extension "${s}" is already registered by renderer "${l.id}".`);i.set(s,r)})};return e.forEach(n),{register:n,unregister(a){const r=t.get(a);return r?(r.extensions.forEach(o=>{var s;((s=i.get(o))===null||s===void 0?void 0:s.id)===a&&i.delete(o)}),t.delete(a),!0):!1},getById(a){return t.get(a)},getByExtension(a){return i.get(qe(a))},hasExtension(a){return i.has(qe(a))},list(){return Array.from(t.values())},listExtensions(){return Array.from(i.keys()).sort()}}}})),Er,Cr=b((()=>{Ht(),In(),Fn(),Er=({registry:e=zn(yt),handlers:t,fallbackHandler:i,fallbackKey:n="error"})=>{const a=Array.from(t).reduce((l,c)=>(l.set(c.rendererId,c.handler),l),new Map),r=new Map,o=[];e.list().forEach(l=>{const c=a.get(l.id);if(!c){o.push(l.id);return}l.extensions.forEach(u=>{r.set(qe(u),c)})}),i&&n&&r.set(qe(n),i);const s=l=>r.get(qe(l));return{handlersByRendererId:a,handlersByExtension:r,missingRendererIds:o,get:s,resolve(l){return s(l)||(n?s(n):void 0)},has(l){return r.has(qe(l))},listExtensions(){return Array.from(r.keys()).sort()}}}})),Sp,kp,Ep,Rr=b((()=>{Ht(),Sp=Object.freeze({download:!1,print:!1,exportHtml:!1,zoom:!1,zoomIn:!1,zoomOut:!1,zoomReset:!1}),kp=["pptx","pptm","potx","potm","ppsx","ppsm","ofd","dxf","dwg","dwf","dwfx","xps","excalidraw","drawio","dio","mermaid","mmd","plantuml","puml","umd","md","markdown","olb","dra",..._r,...xr],Ep=["xlsx","xltx","xlsm","xlsb","xls","xlt","xltm","csv","ods","fods","numbers",...pr,"eml","msg","epub","mp4","mp3","mpeg","wav","ogg","oga","opus","m4a","aac","flac","weba",...mr]})),Yi=b((()=>{Rr(),pi(),kr()})),Cp,Mr,Cl,Rl,Ml,Ll,Pl,Dl,Fl,Lr,zl,On=b((()=>{Fn(),Ht(),pi(),Cp=Object.freeze({downloading:"正在下载文件资源...",streamingPdf:"正在建立 PDF 流式预览...",reading:"正在解析文件内容..."}),Mr=Object.freeze({accent:"#5f6f82",soft:"rgba(95, 111, 130, 0.12)",badge:"DOC",label:"文件内容",hint:"正在整理内容结构并生成预览。"}),Cl=e=>{const t=qe(e);return t?`.${t}`:"当前"},Rl={"office-word-openxml":"@file-viewer/renderer-word","office-word-binary":"@file-viewer/renderer-word","office-presentation":"@file-viewer/renderer-presentation","open-document":"@file-viewer/renderer-word","spreadsheet-openxml":"@file-viewer/renderer-spreadsheet",pdf:"@file-viewer/renderer-pdf",ofd:"@file-viewer/renderer-ofd",typst:"@file-viewer/renderer-typst",archive:"@file-viewer/renderer-archive",email:"@file-viewer/renderer-email",eda:"@file-viewer/renderer-eda",cad:"@file-viewer/renderer-cad",model:"@file-viewer/renderer-3d",geo:"@file-viewer/renderer-geo",drawing:"@file-viewer/renderer-drawing",mindmap:"@file-viewer/renderer-mindmap",epub:"@file-viewer/renderer-epub",umd:"@file-viewer/renderer-epub",image:"@file-viewer/renderer-image",markdown:"@file-viewer/renderer-text",code:"@file-viewer/renderer-text",video:"@file-viewer/renderer-media",audio:"@file-viewer/renderer-media","data-asset":"@file-viewer/renderer-data"},Ml=new Set(["office-word-openxml","office-word-binary","office-presentation","open-document","spreadsheet-openxml","pdf","ofd"]),Ll=new Set(["image","markdown","code","video","audio"]),Pl=new Set(["typst","archive","eda","cad","model","geo","drawing","mindmap","data-asset"]),Dl=e=>Ml.has(e.id)?{packageName:"@file-viewer/preset-office",vitePreset:"office",label:"Office preset"}:Pl.has(e.id)?{packageName:"@file-viewer/preset-engineering",vitePreset:"engineering",label:"Engineering preset"}:Ll.has(e.id)?{packageName:"@file-viewer/preset-lite",vitePreset:"lite",label:"Lite preset"}:{packageName:"@file-viewer/preset-all",vitePreset:"all",label:"Full preset"},Fl=(e="")=>{const t=qe(e),i=yt.find(a=>a.extensions.map(qe).includes(t));if(!i)return null;const n=Dl(i);return{extension:t,rendererId:i.id,rendererLabel:i.label,rendererCategory:i.category,rendererPackage:Rl[i.id],presetPackage:n.packageName,vitePreset:n.vitePreset,presetLabel:n.label}},Lr=({state:e,extension:t="",title:i,message:n,description:a,theme:r=Mr,recoverable:o})=>({state:e,extension:qe(t),title:i,message:n,description:a,theme:r,recoverable:o}),zl=(e="",t=Mr,i)=>{const n=Cl(e),a=Fl(e);if(a){const r=Sr(i),o=a.rendererPackage?r==="zh-CN"?`;如果需要极致裁剪,也可以只安装 ${a.rendererPackage}`:`; for a strict custom cut, install only ${a.rendererPackage}`:"";return Lr({state:"unsupported",extension:e,title:Wt(i,"state.unsupported.install.title"),message:Wt(i,"state.unsupported.install.message",{extension:n,rendererLabel:a.rendererLabel}),description:Wt(i,"state.unsupported.install.description",{extension:n,rendererLabel:a.rendererLabel,presetPackage:a.presetPackage,vitePreset:a.vitePreset,rendererTip:o}),theme:t,recoverable:!0})}return Lr({state:"unsupported",extension:e,title:Wt(i,"state.unsupported.title"),message:Wt(i,"state.unsupported.message",{extension:n}),description:Wt(i,"state.unsupported.description"),theme:t,recoverable:!0})}})),Nn=b((()=>{Yi(),On(),pi()})),Il,Pr,Ol,Nl,Bl,Dr=b((()=>{Ht(),Cr(),In(),Nn(),Il=(e,t)=>({rendered:e,destroy:()=>t?t():Pr(e)}),Pr=e=>{if(!e||typeof e!="object")return;const t=e;if(typeof t.unmount=="function")return t.unmount();if(typeof t.$destroy=="function")return t.$destroy();if(typeof t.destroy=="function")return t.destroy()},Ol=({source:e,options:t,registerExportAdapter:i,renderContext:n})=>({filename:e.filename,url:e.url,streamUrl:e.url,options:t,registerExportAdapter:i,...n}),Nl=({handler:e,getTarget:t=a=>a.surface.container,createContext:i=Ol,destroy:n})=>async a=>{const{source:r}=a;if(!r.buffer)throw new Error("FileRenderHandler renderer requires an ArrayBuffer source.");const o=t(a),s=await e(r.buffer,o,r.extension,i(a));return Il(s,()=>n?n(s,a):Pr(s))},Bl=({definitions:e=yt,handlers:t,getTarget:i,createContext:n,destroy:a})=>{const r=zn(e),o=Er({registry:r,handlers:t});return{registry:zn(r.list().map(s=>{const l=o.handlersByRendererId.get(s.id);return l?{...s,load:Nl({handler:l,getTarget:i,createContext:n,destroy:a})}:s})),dispatcher:o,missingRendererIds:o.missingRendererIds}}})),Rp=Dn({default:()=>Mp});async function Mp(e,t,i){const n=await Wl(e,i);let a=1,r=0;const o=Tr(),s=document.createElement("div");s.className="image-viewer",s.dataset.viewerZoomProvider="image";const l=document.createElement("div");l.className="image-stage";const c=document.createElement("img");c.alt="图片",c.src=n,l.append(c),s.append(l);const u=jl(n),d=()=>u.open();c.addEventListener("click",d),document.body.append(u.element);const f=()=>{r=s.clientHeight||0,Fr(c,r,a),o.emit()},h=new ResizeObserver(f);h.observe(s);const g=()=>({scale:a,label:`${Math.round(a*100)}%`,canZoomIn:a<5,canZoomOut:a>.1,canReset:a!==1,minScale:.1,maxScale:5}),p=m=>(a=Yl(m),Fr(c,r,a),o.emit(),g());return br(s,{zoomIn:()=>p(a+.15),zoomOut:()=>p(a-.15),resetZoom:()=>p(1),setZoom:p,getState:g,subscribe:o.subscribe}),t.replaceChildren(Gl(),s),f(),{$el:t,unmount(){wr(s),h.disconnect(),c.removeEventListener("click",d),u.destroy(),t.replaceChildren()}}}var Xl,Vl,Gl,Ul,Hl,Wl,Yl,Fr,jl,Lp=b((()=>{Wi(),$r(),Xl={avif:"image/avif",bmp:"image/bmp",gif:"image/gif",heic:"image/heic",heif:"image/heif",ico:"image/x-icon",jxl:"image/jxl",jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",webp:"image/webp"},Vl=`
2
+ .image-viewer{position:relative;width:100%;height:100%;overflow:auto;background:#eef1f4;box-sizing:border-box}
3
+ .image-stage{min-width:100%;min-height:100%;display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box}
4
+ .image-stage img{display:block;width:auto;max-width:none;margin:0 auto;border:0;box-shadow:0 18px 48px rgba(15,23,42,.16);background:#fff;cursor:zoom-in}
5
+ .image-lightbox{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;padding:40px;background:rgba(15,23,42,.88);box-sizing:border-box}
6
+ .image-lightbox[hidden]{display:none}
7
+ .image-lightbox img{display:block;max-width:100%;max-height:100%;object-fit:contain;background:#fff;box-shadow:0 30px 80px rgba(0,0,0,.4);cursor:zoom-out}
8
+ .image-lightbox button{position:absolute;top:20px;right:20px;width:40px;height:40px;border:0;border-radius:999px;background:rgba(255,255,255,.92);color:#172033;font-size:24px;line-height:40px;cursor:pointer;box-shadow:0 12px 28px rgba(0,0,0,.18)}
9
+ .file-viewer[data-viewer-theme='dark'] .image-viewer{background:#101820}
10
+ @media (prefers-color-scheme:dark){.file-viewer[data-viewer-theme='system'] .image-viewer{background:#101820}}
11
+ @media (max-width:767px){.image-stage{padding:12px}.image-lightbox{padding:16px}.image-lightbox button{top:12px;right:12px}}
12
+ `,Gl=()=>{const e=document.createElement("style");return e.textContent=Vl,e},Ul=e=>Xl[(e||"").trim().toLowerCase()]||"image/*",Hl=async e=>await new Promise((t,i)=>{const n=new FileReader;n.onload=a=>{var r;const o=(r=a.target)===null||r===void 0?void 0:r.result;if(typeof o=="string"){t(o);return}i(new Error("Unable to read image data URL."))},n.onerror=()=>i(n.error||new Error("Unable to read image data URL.")),n.readAsDataURL(e)}),Wl=async(e,t)=>{const i=(t||"").trim().toLowerCase();if(i==="heic"||i==="heif")throw new Error("HEIC/HEIF image conversion has moved out of @file-viewer/core. Install and pass @file-viewer/renderer-image, or use @file-viewer/preset-all.");return Hl(new Blob([e],{type:Ul(i)}))},Yl=e=>Math.min(5,Math.max(.1,Number(e.toFixed(2)))),Fr=(e,t,i)=>{if(t>0){e.style.height=`${Math.max(1,Math.round(t*i))}px`;return}e.style.height=`${i*100}%`},jl=e=>{const t=document.createElement("div");t.className="image-lightbox",t.hidden=!0,t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true");const i=document.createElement("img");i.alt="Preview image",i.src=e;const n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close image preview"),n.textContent="x";const a=()=>{t.hidden=!0};return n.addEventListener("click",a),i.addEventListener("click",a),t.addEventListener("click",r=>{r.target===t&&a()}),t.append(i,n),{element:t,open(){t.hidden=!1},destroy(){n.removeEventListener("click",a),i.removeEventListener("click",a),t.remove()}}}})),Zl,Bn,zr,ql,Kl,Ql,Jl,ec,tc,Xn,Pp,Dp,Fp,ic=b((()=>{Ht(),Dr(),Cr(),On(),Zl=e=>({$el:e,unmount(){}}),Bn=[{rendererId:"image",handler:async(e,t,i)=>{const{default:n}=await Promise.resolve().then(()=>(Lp(),Rp));return n(e,t,i)}}],zr=["image"],ql=Bn.filter(e=>zr.includes(e.rendererId)),Kl=yt.filter(e=>zr.includes(e.id)),Ql=e=>e==="none"?[]:e==="lite"?Kl:yt,Jl=e=>e==="none"?[]:e==="lite"?ql:Bn,ec=async(e,t,i)=>{const n=zl(i),a=document.createElement("div");a.style.textAlign="center",a.style.marginTop="80px";const r=document.createElement("div");if(r.textContent=n.message,a.appendChild(r),n.description){const o=document.createElement("div");o.textContent=n.description,a.appendChild(o)}return t.replaceChildren(a),Zl(t)},tc=(e={})=>{const t=e.builtinRenderers||"all",i=Bl({definitions:Ql(t),handlers:Jl(t)});return{...i,dispatcher:Er({registry:i.registry,handlers:Bn,fallbackHandler:ec})}},Xn=tc(),Pp=Xn.registry,Dp=Xn.dispatcher,Fp=Xn.missingRendererIds})),zp=b((()=>{pi()})),Ip=b((()=>{Yi(),Nn()})),Op=b((()=>{Yi()})),Np=b((()=>{yl(),$r(),kr(),Rr(),Yi(),In(),Dr(),ic(),Nn(),On()})),nc=b((()=>{mp(),Ht(),xl(),yl(),$r(),Wi(),$p(),kr(),pi(),In(),ic(),Rr(),Yi(),zp(),Ip(),Op(),Cr(),Dr(),Fn(),On(),Nn(),Np()})),ac,Yt,Ir=b((()=>{ac="http://www.w3.org/1999/xhtml",Yt={svg:"http://www.w3.org/2000/svg",xhtml:ac,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}}));function Vn(e){var t=e+="",i=t.indexOf(":");return i>=0&&(t=e.slice(0,i))!=="xmlns"&&(e=e.slice(i+1)),Yt.hasOwnProperty(t)?{space:Yt[t],local:e}:e}var Or=b((()=>{Ir()}));function Bp(e){return function(){var t=this.ownerDocument,i=this.namespaceURI;return i==="http://www.w3.org/1999/xhtml"&&t.documentElement.namespaceURI==="http://www.w3.org/1999/xhtml"?t.createElement(e):t.createElementNS(i,e)}}function Xp(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function rc(e){var t=Vn(e);return(t.local?Xp:Bp)(t)}var Nr=b((()=>{Or(),Ir()}));function Vp(){}function Br(e){return e==null?Vp:function(){return this.querySelector(e)}}var Xr=b((()=>{}));function Gp(e){typeof e!="function"&&(e=Br(e));for(var t=this._groups,i=t.length,n=new Array(i),a=0;a<i;++a)for(var r=t[a],o=r.length,s=n[a]=new Array(o),l,c,u=0;u<o;++u)(l=r[u])&&(c=e.call(l,l.__data__,u,r))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new Be(n,this._parents)}var Up=b((()=>{tt(),Xr()}));function oc(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}var sc=b((()=>{}));function Hp(){return[]}function lc(e){return e==null?Hp:function(){return this.querySelectorAll(e)}}var cc=b((()=>{}));function Wp(e){return function(){return oc(e.apply(this,arguments))}}function Yp(e){typeof e=="function"?e=Wp(e):e=lc(e);for(var t=this._groups,i=t.length,n=[],a=[],r=0;r<i;++r)for(var o=t[r],s=o.length,l,c=0;c<s;++c)(l=o[c])&&(n.push(e.call(l,l.__data__,c,o)),a.push(l));return new Be(n,a)}var jp=b((()=>{tt(),sc(),cc()}));function uc(e){return function(){return this.matches(e)}}function dc(e){return function(t){return t.matches(e)}}var Gn=b((()=>{}));function Zp(e){return function(){return fc.call(this.children,e)}}function qp(){return this.firstElementChild}function Kp(e){return this.select(e==null?qp:Zp(typeof e=="function"?e:dc(e)))}var fc,Qp=b((()=>{Gn(),fc=Array.prototype.find}));function Jp(){return Array.from(this.children)}function em(e){return function(){return hc.call(this.children,e)}}function tm(e){return this.selectAll(e==null?Jp:em(typeof e=="function"?e:dc(e)))}var hc,im=b((()=>{Gn(),hc=Array.prototype.filter}));function nm(e){typeof e!="function"&&(e=uc(e));for(var t=this._groups,i=t.length,n=new Array(i),a=0;a<i;++a)for(var r=t[a],o=r.length,s=n[a]=[],l,c=0;c<o;++c)(l=r[c])&&e.call(l,l.__data__,c,r)&&s.push(l);return new Be(n,this._parents)}var am=b((()=>{tt(),Gn()}));function gc(e){return new Array(e.length)}var vc=b((()=>{}));function rm(){return new Be(this._enter||this._groups.map(gc),this._parents)}function Un(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var pc=b((()=>{vc(),tt(),Un.prototype={constructor:Un,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}}}));function om(e){return function(){return e}}var sm=b((()=>{}));function lm(e,t,i,n,a,r){for(var o=0,s,l=t.length,c=r.length;o<c;++o)(s=t[o])?(s.__data__=r[o],n[o]=s):i[o]=new Un(e,r[o]);for(;o<l;++o)(s=t[o])&&(a[o]=s)}function cm(e,t,i,n,a,r,o){var s,l,c=new Map,u=t.length,d=r.length,f=new Array(u),h;for(s=0;s<u;++s)(l=t[s])&&(f[s]=h=o.call(l,l.__data__,s,t)+"",c.has(h)?a[s]=l:c.set(h,l));for(s=0;s<d;++s)h=o.call(e,r[s],s,r)+"",(l=c.get(h))?(n[s]=l,l.__data__=r[s],c.delete(h)):i[s]=new Un(e,r[s]);for(s=0;s<u;++s)(l=t[s])&&c.get(f[s])===l&&(a[s]=l)}function um(e){return e.__data__}function dm(e,t){if(!arguments.length)return Array.from(this,um);var i=t?cm:lm,n=this._parents,a=this._groups;typeof e!="function"&&(e=om(e));for(var r=a.length,o=new Array(r),s=new Array(r),l=new Array(r),c=0;c<r;++c){var u=n[c],d=a[c],f=d.length,h=fm(e.call(u,u&&u.__data__,c,n)),g=h.length,p=s[c]=new Array(g),m=o[c]=new Array(g);i(u,d,p,m,l[c]=new Array(f),h,t);for(var v=0,_=0,x,y;v<g;++v)if(x=p[v]){for(v>=_&&(_=v+1);!(y=m[_])&&++_<g;);x._next=y||null}}return o=new Be(o,n),o._enter=s,o._exit=l,o}function fm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}var hm=b((()=>{tt(),pc(),sm()}));function gm(){return new Be(this._exit||this._groups.map(gc),this._parents)}var vm=b((()=>{vc(),tt()}));function pm(e,t,i){var n=this.enter(),a=this,r=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),i==null?r.remove():i(r),n&&a?n.merge(a).order():a}var mm=b((()=>{}));function _m(e){for(var t=e.selection?e.selection():e,i=this._groups,n=t._groups,a=i.length,r=n.length,o=Math.min(a,r),s=new Array(a),l=0;l<o;++l)for(var c=i[l],u=n[l],d=c.length,f=s[l]=new Array(d),h,g=0;g<d;++g)(h=c[g]||u[g])&&(f[g]=h);for(;l<a;++l)s[l]=i[l];return new Be(s,this._parents)}var xm=b((()=>{tt()}));function ym(){for(var e=this._groups,t=-1,i=e.length;++t<i;)for(var n=e[t],a=n.length-1,r=n[a],o;--a>=0;)(o=n[a])&&(r&&o.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(o,r),r=o);return this}var bm=b((()=>{}));function wm(e){e||(e=Tm);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var i=this._groups,n=i.length,a=new Array(n),r=0;r<n;++r){for(var o=i[r],s=o.length,l=a[r]=new Array(s),c,u=0;u<s;++u)(c=o[u])&&(l[u]=c);l.sort(t)}return new Be(a,this._parents).order()}function Tm(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var $m=b((()=>{tt()}));function Am(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var Sm=b((()=>{}));function km(){return Array.from(this)}var Em=b((()=>{}));function Cm(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var n=e[t],a=0,r=n.length;a<r;++a){var o=n[a];if(o)return o}return null}var Rm=b((()=>{}));function Mm(){let e=0;for(const t of this)++e;return e}var Lm=b((()=>{}));function Pm(){return!this.node()}var Dm=b((()=>{}));function Fm(e){for(var t=this._groups,i=0,n=t.length;i<n;++i)for(var a=t[i],r=0,o=a.length,s;r<o;++r)(s=a[r])&&e.call(s,s.__data__,r,a);return this}var zm=b((()=>{}));function Im(e){return function(){this.removeAttribute(e)}}function Om(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Nm(e,t){return function(){this.setAttribute(e,t)}}function Bm(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Xm(e,t){return function(){var i=t.apply(this,arguments);i==null?this.removeAttribute(e):this.setAttribute(e,i)}}function Vm(e,t){return function(){var i=t.apply(this,arguments);i==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,i)}}function Gm(e,t){var i=Vn(e);if(arguments.length<2){var n=this.node();return i.local?n.getAttributeNS(i.space,i.local):n.getAttribute(i)}return this.each((t==null?i.local?Om:Im:typeof t=="function"?i.local?Vm:Xm:i.local?Bm:Nm)(i,t))}var Um=b((()=>{Or()}));function mc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var Vr=b((()=>{}));function Hm(e){return function(){this.style.removeProperty(e)}}function Wm(e,t,i){return function(){this.style.setProperty(e,t,i)}}function Ym(e,t,i){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,i)}}function jm(e,t,i){return arguments.length>1?this.each((t==null?Hm:typeof t=="function"?Ym:Wm)(e,t,i??"")):mi(this.node(),e)}function mi(e,t){return e.style.getPropertyValue(t)||mc(e).getComputedStyle(e,null).getPropertyValue(t)}var _c=b((()=>{Vr()}));function Zm(e){return function(){delete this[e]}}function qm(e,t){return function(){this[e]=t}}function Km(e,t){return function(){var i=t.apply(this,arguments);i==null?delete this[e]:this[e]=i}}function Qm(e,t){return arguments.length>1?this.each((t==null?Zm:typeof t=="function"?Km:qm)(e,t)):this.node()[e]}var Jm=b((()=>{}));function xc(e){return e.trim().split(/^|\s+/)}function Gr(e){return e.classList||new yc(e)}function yc(e){this._node=e,this._names=xc(e.getAttribute("class")||"")}function bc(e,t){for(var i=Gr(e),n=-1,a=t.length;++n<a;)i.add(t[n])}function wc(e,t){for(var i=Gr(e),n=-1,a=t.length;++n<a;)i.remove(t[n])}function e_(e){return function(){bc(this,e)}}function t_(e){return function(){wc(this,e)}}function i_(e,t){return function(){(t.apply(this,arguments)?bc:wc)(this,e)}}function n_(e,t){var i=xc(e+"");if(arguments.length<2){for(var n=Gr(this.node()),a=-1,r=i.length;++a<r;)if(!n.contains(i[a]))return!1;return!0}return this.each((typeof t=="function"?i_:t?e_:t_)(i,t))}var a_=b((()=>{yc.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}}));function r_(){this.textContent=""}function o_(e){return function(){this.textContent=e}}function s_(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function l_(e){return arguments.length?this.each(e==null?r_:(typeof e=="function"?s_:o_)(e)):this.node().textContent}var c_=b((()=>{}));function u_(){this.innerHTML=""}function d_(e){return function(){this.innerHTML=e}}function f_(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function h_(e){return arguments.length?this.each(e==null?u_:(typeof e=="function"?f_:d_)(e)):this.node().innerHTML}var g_=b((()=>{}));function v_(){this.nextSibling&&this.parentNode.appendChild(this)}function p_(){return this.each(v_)}var m_=b((()=>{}));function __(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function x_(){return this.each(__)}var y_=b((()=>{}));function b_(e){var t=typeof e=="function"?e:rc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var w_=b((()=>{Nr()}));function T_(){return null}function $_(e,t){var i=typeof e=="function"?e:rc(e),n=t==null?T_:typeof t=="function"?t:Br(t);return this.select(function(){return this.insertBefore(i.apply(this,arguments),n.apply(this,arguments)||null)})}var A_=b((()=>{Nr(),Xr()}));function S_(){var e=this.parentNode;e&&e.removeChild(this)}function k_(){return this.each(S_)}var E_=b((()=>{}));function C_(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function R_(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function M_(e){return this.select(e?R_:C_)}var L_=b((()=>{}));function P_(e){return arguments.length?this.property("__data__",e):this.node().__data__}var D_=b((()=>{}));function F_(e){return function(t){e.call(this,t,this.__data__)}}function z_(e){return e.trim().split(/^|\s+/).map(function(t){var i="",n=t.indexOf(".");return n>=0&&(i=t.slice(n+1),t=t.slice(0,n)),{type:t,name:i}})}function I_(e){return function(){var t=this.__on;if(t){for(var i=0,n=-1,a=t.length,r;i<a;++i)r=t[i],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++n]=r;++n?t.length=n:delete this.__on}}}function O_(e,t,i){return function(){var n=this.__on,a,r=F_(t);if(n){for(var o=0,s=n.length;o<s;++o)if((a=n[o]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=r,a.options=i),a.value=t;return}}this.addEventListener(e.type,r,i),a={type:e.type,name:e.name,value:t,listener:r,options:i},n?n.push(a):this.__on=[a]}}function N_(e,t,i){var n=z_(e+""),a,r=n.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(a=0,u=s[l];a<r;++a)if((o=n[a]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?O_:I_,a=0;a<r;++a)this.each(s(n[a],t,i));return this}var B_=b((()=>{}));function Tc(e,t,i){var n=mc(e),a=n.CustomEvent;typeof a=="function"?a=new a(t,i):(a=n.document.createEvent("Event"),i?(a.initEvent(t,i.bubbles,i.cancelable),a.detail=i.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function X_(e,t){return function(){return Tc(this,e,t)}}function V_(e,t){return function(){return Tc(this,e,t.apply(this,arguments))}}function G_(e,t){return this.each((typeof t=="function"?V_:X_)(e,t))}var U_=b((()=>{Vr()}));function*H_(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var n=e[t],a=0,r=n.length,o;a<r;++a)(o=n[a])&&(yield o)}var W_=b((()=>{}));function Be(e,t){this._groups=e,this._parents=t}function _i(){return new Be([[document.documentElement]],Hn)}function Y_(){return this}var Hn,tt=b((()=>{Up(),jp(),Qp(),im(),am(),hm(),pc(),vm(),mm(),xm(),bm(),$m(),Sm(),Em(),Rm(),Lm(),Dm(),zm(),Um(),_c(),Jm(),a_(),c_(),g_(),m_(),y_(),w_(),A_(),E_(),L_(),D_(),B_(),U_(),W_(),Hn=[null],Be.prototype=_i.prototype={constructor:Be,select:Gp,selectAll:Yp,selectChild:Kp,selectChildren:tm,filter:nm,data:dm,enter:rm,exit:gm,join:pm,merge:_m,selection:Y_,order:ym,sort:wm,call:Am,nodes:km,node:Cm,size:Mm,empty:Pm,each:Fm,attr:Gm,style:jm,property:Qm,classed:n_,text:l_,html:h_,raise:p_,lower:x_,append:b_,insert:$_,remove:k_,clone:M_,datum:P_,on:N_,dispatch:G_,[Symbol.iterator]:H_}}));function B(e){return typeof e=="string"?new Be([[document.querySelector(e)]],[document.documentElement]):new Be([[e]],Hn)}var j_=b((()=>{tt()}));function Z_(e){let t;for(;t=e.sourceEvent;)e=t;return e}var $c=b((()=>{}));function Ke(e,t){if(e=Z_(e),t===void 0&&(t=e.currentTarget),t){var i=t.ownerSVGElement||t;if(i.createSVGPoint){var n=i.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(t.getScreenCTM().inverse()),[n.x,n.y]}if(t.getBoundingClientRect){var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}}return[e.pageX,e.pageY]}var q_=b((()=>{$c()}));function Ac(e){return typeof e=="string"?new Be([document.querySelectorAll(e)],[document.documentElement]):new Be([oc(e)],Hn)}var K_=b((()=>{sc(),tt()})),Xe=b((()=>{Nr(),j_(),Gn(),Or(),Ir(),q_(),$c(),K_(),tt(),Xr(),cc(),_c(),Vr()}));function Re(e,t,i,n){function a(r){return e(r=arguments.length===0?new Date:new Date(+r)),r}return a.floor=r=>(e(r=new Date(+r)),r),a.ceil=r=>(e(r=new Date(r-1)),t(r,1),e(r),r),a.round=r=>{const o=a(r),s=a.ceil(r);return r-o<s-r?o:s},a.offset=(r,o)=>(t(r=new Date(+r),o==null?1:Math.floor(o)),r),a.range=(r,o,s)=>{const l=[];if(r=a.ceil(r),s=s==null?1:Math.floor(s),!(r<o)||!(s>0))return l;let c;do l.push(c=new Date(+r)),t(r,s),e(r);while(c<r&&r<o);return l},a.filter=r=>Re(o=>{if(o>=o)for(;e(o),!r(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!r(o););else for(;--s>=0;)for(;t(o,1),!r(o););}),i&&(a.count=(r,o)=>(Wn.setTime(+r),Yn.setTime(+o),e(Wn),e(Yn),Math.floor(i(Wn,Yn))),a.every=r=>(r=Math.floor(r),!isFinite(r)||!(r>0)?null:r>1?a.filter(n?o=>n(o)%r===0:o=>a.count(0,o)%r===0):a)),a}var Wn,Yn,bt=b((()=>{Wn=new Date,Yn=new Date})),ji,Q_,Sc=b((()=>{bt(),ji=Re(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e),ji.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Re(t=>{t.setTime(Math.floor(t/e)*e)},(t,i)=>{t.setTime(+t+i*e)},(t,i)=>(i-t)/e):ji),Q_=ji.range})),ct,je,ut,dt,jn,Ur,Zn,xi=b((()=>{ct=1e3,je=ct*60,ut=je*60,dt=ut*24,jn=dt*7,Ur=dt*30,Zn=dt*365})),Et,J_,kc=b((()=>{bt(),xi(),Et=Re(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ct)},(e,t)=>(t-e)/ct,e=>e.getUTCSeconds()),J_=Et.range})),qn,ex,Kn,tx,Ec=b((()=>{bt(),xi(),qn=Re(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ct)},(e,t)=>{e.setTime(+e+t*je)},(e,t)=>(t-e)/je,e=>e.getMinutes()),ex=qn.range,Kn=Re(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*je)},(e,t)=>(t-e)/je,e=>e.getUTCMinutes()),tx=Kn.range})),Qn,ix,Jn,nx,Cc=b((()=>{bt(),xi(),Qn=Re(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ct-e.getMinutes()*je)},(e,t)=>{e.setTime(+e+t*ut)},(e,t)=>(t-e)/ut,e=>e.getHours()),ix=Qn.range,Jn=Re(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ut)},(e,t)=>(t-e)/ut,e=>e.getUTCHours()),nx=Jn.range})),yi,ax,Zi,rx,Hr,ox,Rc=b((()=>{bt(),xi(),yi=Re(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*je)/dt,e=>e.getDate()-1),ax=yi.range,Zi=Re(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/dt,e=>e.getUTCDate()-1),rx=Zi.range,Hr=Re(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/dt,e=>Math.floor(e/dt)),ox=Hr.range}));function jt(e){return Re(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,i)=>{t.setDate(t.getDate()+i*7)},(t,i)=>(i-t-(i.getTimezoneOffset()-t.getTimezoneOffset())*je)/jn)}function Zt(e){return Re(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,i)=>{t.setUTCDate(t.getUTCDate()+i*7)},(t,i)=>(i-t)/jn)}var qi,Ki,Mc,Lc,qt,Pc,Dc,sx,lx,cx,ux,dx,fx,hx,Qi,Ji,Fc,zc,Kt,Ic,Oc,gx,vx,px,mx,_x,xx,yx,Nc=b((()=>{bt(),xi(),qi=jt(0),Ki=jt(1),Mc=jt(2),Lc=jt(3),qt=jt(4),Pc=jt(5),Dc=jt(6),sx=qi.range,lx=Ki.range,cx=Mc.range,ux=Lc.range,dx=qt.range,fx=Pc.range,hx=Dc.range,Qi=Zt(0),Ji=Zt(1),Fc=Zt(2),zc=Zt(3),Kt=Zt(4),Ic=Zt(5),Oc=Zt(6),gx=Qi.range,vx=Ji.range,px=Fc.range,mx=zc.range,_x=Kt.range,xx=Ic.range,yx=Oc.range})),ea,bx,ta,wx,Bc=b((()=>{bt(),ea=Re(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),bx=ea.range,ta=Re(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),wx=ta.range})),ft,Tx,ht,$x,Xc=b((()=>{bt(),ft=Re(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()),ft.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Re(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,i)=>{t.setFullYear(t.getFullYear()+i*e)}),Tx=ft.range,ht=Re(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear()),ht.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Re(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,i)=>{t.setUTCFullYear(t.getUTCFullYear()+i*e)}),$x=ht.range}));function ia(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}var Wr=b((()=>{}));function Ax(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}var Vc=b((()=>{}));function Yr(e){let t,i,n;e.length!==2?(t=ia,i=(s,l)=>ia(e(s),l),n=(s,l)=>e(s)-l):(t=e===ia||e===Ax?e:Sx,i=e,n=e);function a(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;i(s[d],l)<0?c=d+1:u=d}while(c<u)}return c}function r(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;i(s[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function o(s,l,c=0,u=s.length){const d=a(s,l,c,u-1);return d>c&&n(s[d-1],l)>-n(s[d],l)?d-1:d}return{left:a,center:o,right:r}}function Sx(){return 0}var Gc=b((()=>{Wr(),Vc()}));function kx(e){return e===null?NaN:+e}var Uc=b((()=>{})),jr,Hc,Ex,Cx,Rx=b((()=>{Wr(),Gc(),Uc(),jr=Yr(ia),Hc=jr.right,Ex=jr.left,Cx=Yr(kx).center}));function Wc({_intern:e,_key:t},i){const n=t(i);return e.has(n)?e.get(n):i}function Mx({_intern:e,_key:t},i){const n=t(i);return e.has(n)?e.get(n):(e.set(n,i),i)}function Lx({_intern:e,_key:t},i){const n=t(i);return e.has(n)&&(i=e.get(n),e.delete(n)),i}function Px(e){return e!==null&&typeof e=="object"?e.valueOf():e}var Zr,Dx=b((()=>{Zr=class extends Map{constructor(e,t=Px){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(const[i,n]of e)this.set(i,n)}get(e){return super.get(Wc(this,e))}has(e){return super.has(Wc(this,e))}set(e,t){return super.set(Mx(this,e),t)}delete(e){return super.delete(Lx(this,e))}}}));function na(e,t,i){const n=(t-e)/Math.max(0,i),a=Math.floor(Math.log10(n)),r=n/Math.pow(10,a),o=r>=Yc?10:r>=jc?5:r>=Zc?2:1;let s,l,c;return a<0?(c=Math.pow(10,-a)/o,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,a)*o,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=i&&i<2?na(e,t,i*2):[s,l,c]}function qr(e,t,i){if(t=+t,e=+e,i=+i,!(i>0))return[];if(e===t)return[e];const n=t<e,[a,r,o]=n?na(t,e,i):na(e,t,i);if(!(r>=a))return[];const s=r-a+1,l=new Array(s);if(n)if(o<0)for(let c=0;c<s;++c)l[c]=(r-c)/-o;else for(let c=0;c<s;++c)l[c]=(r-c)*o;else if(o<0)for(let c=0;c<s;++c)l[c]=(a+c)/-o;else for(let c=0;c<s;++c)l[c]=(a+c)*o;return l}function Kr(e,t,i){return t=+t,e=+e,i=+i,na(e,t,i)[2]}function Qr(e,t,i){t=+t,e=+e,i=+i;const n=t<e,a=n?Kr(t,e,i):Kr(e,t,i);return(n?-1:1)*(a<0?1/-a:a)}var Yc,jc,Zc,Fx=b((()=>{Yc=Math.sqrt(50),jc=Math.sqrt(10),Zc=Math.sqrt(2)})),Qt=b((()=>{Rx(),Wr(),Gc(),Vc(),Dx(),Fx(),Uc()}));function qc(e,t,i,n,a,r){const o=[[Et,1,ct],[Et,5,5*ct],[Et,15,15*ct],[Et,30,30*ct],[r,1,je],[r,5,5*je],[r,15,15*je],[r,30,30*je],[a,1,ut],[a,3,3*ut],[a,6,6*ut],[a,12,12*ut],[n,1,dt],[n,2,2*dt],[i,1,jn],[t,1,Ur],[t,3,3*Ur],[e,1,Zn]];function s(c,u,d){const f=u<c;f&&([c,u]=[u,c]);const h=d&&typeof d.range=="function"?d:l(c,u,d),g=h?h.range(c,+u+1):[];return f?g.reverse():g}function l(c,u,d){const f=Math.abs(u-c)/d,h=Yr(([,,m])=>m).right(o,f);if(h===o.length)return e.every(Qr(c/Zn,u/Zn,d));if(h===0)return ji.every(Math.max(Qr(c,u,d),1));const[g,p]=o[f/o[h-1][2]<o[h][2]/f?h-1:h];return g.every(p)}return[s,l]}var Kc,Qc,Jc,eu,zx=b((()=>{Qt(),xi(),Sc(),kc(),Ec(),Cc(),Rc(),Nc(),Bc(),Xc(),[Kc,Qc]=qc(ht,ta,Qi,Hr,Jn,Kn),[Jc,eu]=qc(ft,ea,qi,yi,Qn,qn)})),Jr=b((()=>{bt(),Sc(),kc(),Ec(),Cc(),Rc(),Nc(),Bc(),Xc(),zx()}));function eo(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function to(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function en(e,t,i){return{y:e,m:t,d:i,H:0,M:0,S:0,L:0}}function Ix(e){var t=e.dateTime,i=e.date,n=e.time,a=e.periods,r=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,c=tn(a),u=nn(a),d=tn(r),f=nn(r),h=tn(o),g=nn(o),p=tn(s),m=nn(s),v=tn(l),_=nn(l),x={a:M,A:z,b:I,B:O,c:null,d:ru,e:ru,f:a0,g:g0,G:p0,H:t0,I:i0,j:n0,L:ou,m:r0,M:o0,p:X,q:V,Q:fu,s:hu,S:s0,u:l0,U:c0,V:u0,w:d0,W:f0,x:null,X:null,y:h0,Y:v0,Z:m0,"%":du},y={a:fe,A:ie,b:U,B:Y,c:null,d:lu,e:lu,f:b0,g:M0,G:P0,H:_0,I:x0,j:y0,L:cu,m:w0,M:T0,p:Z,q:re,Q:fu,s:hu,S:$0,u:A0,U:S0,V:k0,w:E0,W:C0,x:null,X:null,y:R0,Y:L0,Z:D0,"%":du},$={a:C,A:E,b:k,B:P,c:w,d:nu,e:nu,f:Kx,g:iu,G:tu,H:au,I:au,j:Yx,L:qx,m:Wx,M:jx,p:R,q:Hx,Q:Jx,s:e0,S:Zx,u:Bx,U:Xx,V:Vx,w:Nx,W:Gx,x:D,X:L,y:iu,Y:tu,Z:Ux,"%":Qx};x.x=T(i,x),x.X=T(n,x),x.c=T(t,x),y.x=T(i,y),y.X=T(n,y),y.c=T(t,y);function T(N,W){return function(K){var F=[],he=-1,oe=0,$e=N.length,De,j,ke;for(K instanceof Date||(K=new Date(+K));++he<$e;)N.charCodeAt(he)===37&&(F.push(N.slice(oe,he)),(j=io[De=N.charAt(++he)])!=null?De=N.charAt(++he):j=De==="e"?" ":"0",(ke=W[De])&&(De=ke(K,j)),F.push(De),oe=he+1);return F.push(N.slice(oe,he)),F.join("")}}function A(N,W){return function(K){var F=en(1900,void 0,1),he=S(F,N,K+="",0),oe,$e;if(he!=K.length)return null;if("Q"in F)return new Date(F.Q);if("s"in F)return new Date(F.s*1e3+("L"in F?F.L:0));if(W&&!("Z"in F)&&(F.Z=0),"p"in F&&(F.H=F.H%12+F.p*12),F.m===void 0&&(F.m="q"in F?F.q:0),"V"in F){if(F.V<1||F.V>53)return null;"w"in F||(F.w=1),"Z"in F?(oe=to(en(F.y,0,1)),$e=oe.getUTCDay(),oe=$e>4||$e===0?Ji.ceil(oe):Ji(oe),oe=Zi.offset(oe,(F.V-1)*7),F.y=oe.getUTCFullYear(),F.m=oe.getUTCMonth(),F.d=oe.getUTCDate()+(F.w+6)%7):(oe=eo(en(F.y,0,1)),$e=oe.getDay(),oe=$e>4||$e===0?Ki.ceil(oe):Ki(oe),oe=yi.offset(oe,(F.V-1)*7),F.y=oe.getFullYear(),F.m=oe.getMonth(),F.d=oe.getDate()+(F.w+6)%7)}else("W"in F||"U"in F)&&("w"in F||(F.w="u"in F?F.u%7:"W"in F?1:0),$e="Z"in F?to(en(F.y,0,1)).getUTCDay():eo(en(F.y,0,1)).getDay(),F.m=0,F.d="W"in F?(F.w+6)%7+F.W*7-($e+5)%7:F.w+F.U*7-($e+6)%7);return"Z"in F?(F.H+=F.Z/100|0,F.M+=F.Z%100,to(F)):eo(F)}}function S(N,W,K,F){for(var he=0,oe=W.length,$e=K.length,De,j;he<oe;){if(F>=$e)return-1;if(De=W.charCodeAt(he++),De===37){if(De=W.charAt(he++),j=$[De in io?W.charAt(he++):De],!j||(F=j(N,K,F))<0)return-1}else if(De!=K.charCodeAt(F++))return-1}return F}function R(N,W,K){var F=c.exec(W.slice(K));return F?(N.p=u.get(F[0].toLowerCase()),K+F[0].length):-1}function C(N,W,K){var F=h.exec(W.slice(K));return F?(N.w=g.get(F[0].toLowerCase()),K+F[0].length):-1}function E(N,W,K){var F=d.exec(W.slice(K));return F?(N.w=f.get(F[0].toLowerCase()),K+F[0].length):-1}function k(N,W,K){var F=v.exec(W.slice(K));return F?(N.m=_.get(F[0].toLowerCase()),K+F[0].length):-1}function P(N,W,K){var F=p.exec(W.slice(K));return F?(N.m=m.get(F[0].toLowerCase()),K+F[0].length):-1}function w(N,W,K){return S(N,t,W,K)}function D(N,W,K){return S(N,i,W,K)}function L(N,W,K){return S(N,n,W,K)}function M(N){return o[N.getDay()]}function z(N){return r[N.getDay()]}function I(N){return l[N.getMonth()]}function O(N){return s[N.getMonth()]}function X(N){return a[+(N.getHours()>=12)]}function V(N){return 1+~~(N.getMonth()/3)}function fe(N){return o[N.getUTCDay()]}function ie(N){return r[N.getUTCDay()]}function U(N){return l[N.getUTCMonth()]}function Y(N){return s[N.getUTCMonth()]}function Z(N){return a[+(N.getUTCHours()>=12)]}function re(N){return 1+~~(N.getUTCMonth()/3)}return{format:function(N){var W=T(N+="",x);return W.toString=function(){return N},W},parse:function(N){var W=A(N+="",!1);return W.toString=function(){return N},W},utcFormat:function(N){var W=T(N+="",y);return W.toString=function(){return N},W},utcParse:function(N){var W=A(N+="",!0);return W.toString=function(){return N},W}}}function se(e,t,i){var n=e<0?"-":"",a=(n?-e:e)+"",r=a.length;return n+(r<i?new Array(i-r+1).join(t)+a:a)}function Ox(e){return e.replace(vu,"\\$&")}function tn(e){return new RegExp("^(?:"+e.map(Ox).join("|")+")","i")}function nn(e){return new Map(e.map((t,i)=>[t.toLowerCase(),i]))}function Nx(e,t,i){var n=Me.exec(t.slice(i,i+1));return n?(e.w=+n[0],i+n[0].length):-1}function Bx(e,t,i){var n=Me.exec(t.slice(i,i+1));return n?(e.u=+n[0],i+n[0].length):-1}function Xx(e,t,i){var n=Me.exec(t.slice(i,i+2));return n?(e.U=+n[0],i+n[0].length):-1}function Vx(e,t,i){var n=Me.exec(t.slice(i,i+2));return n?(e.V=+n[0],i+n[0].length):-1}function Gx(e,t,i){var n=Me.exec(t.slice(i,i+2));return n?(e.W=+n[0],i+n[0].length):-1}function tu(e,t,i){var n=Me.exec(t.slice(i,i+4));return n?(e.y=+n[0],i+n[0].length):-1}function iu(e,t,i){var n=Me.exec(t.slice(i,i+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),i+n[0].length):-1}function Ux(e,t,i){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(i,i+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),i+n[0].length):-1}function Hx(e,t,i){var n=Me.exec(t.slice(i,i+1));return n?(e.q=n[0]*3-3,i+n[0].length):-1}function Wx(e,t,i){var n=Me.exec(t.slice(i,i+2));return n?(e.m=n[0]-1,i+n[0].length):-1}function nu(e,t,i){var n=Me.exec(t.slice(i,i+2));return n?(e.d=+n[0],i+n[0].length):-1}function Yx(e,t,i){var n=Me.exec(t.slice(i,i+3));return n?(e.m=0,e.d=+n[0],i+n[0].length):-1}function au(e,t,i){var n=Me.exec(t.slice(i,i+2));return n?(e.H=+n[0],i+n[0].length):-1}function jx(e,t,i){var n=Me.exec(t.slice(i,i+2));return n?(e.M=+n[0],i+n[0].length):-1}function Zx(e,t,i){var n=Me.exec(t.slice(i,i+2));return n?(e.S=+n[0],i+n[0].length):-1}function qx(e,t,i){var n=Me.exec(t.slice(i,i+3));return n?(e.L=+n[0],i+n[0].length):-1}function Kx(e,t,i){var n=Me.exec(t.slice(i,i+6));return n?(e.L=Math.floor(n[0]/1e3),i+n[0].length):-1}function Qx(e,t,i){var n=gu.exec(t.slice(i,i+1));return n?i+n[0].length:-1}function Jx(e,t,i){var n=Me.exec(t.slice(i));return n?(e.Q=+n[0],i+n[0].length):-1}function e0(e,t,i){var n=Me.exec(t.slice(i));return n?(e.s=+n[0],i+n[0].length):-1}function ru(e,t){return se(e.getDate(),t,2)}function t0(e,t){return se(e.getHours(),t,2)}function i0(e,t){return se(e.getHours()%12||12,t,2)}function n0(e,t){return se(1+yi.count(ft(e),e),t,3)}function ou(e,t){return se(e.getMilliseconds(),t,3)}function a0(e,t){return ou(e,t)+"000"}function r0(e,t){return se(e.getMonth()+1,t,2)}function o0(e,t){return se(e.getMinutes(),t,2)}function s0(e,t){return se(e.getSeconds(),t,2)}function l0(e){var t=e.getDay();return t===0?7:t}function c0(e,t){return se(qi.count(ft(e)-1,e),t,2)}function su(e){var t=e.getDay();return t>=4||t===0?qt(e):qt.ceil(e)}function u0(e,t){return e=su(e),se(qt.count(ft(e),e)+(ft(e).getDay()===4),t,2)}function d0(e){return e.getDay()}function f0(e,t){return se(Ki.count(ft(e)-1,e),t,2)}function h0(e,t){return se(e.getFullYear()%100,t,2)}function g0(e,t){return e=su(e),se(e.getFullYear()%100,t,2)}function v0(e,t){return se(e.getFullYear()%1e4,t,4)}function p0(e,t){var i=e.getDay();return e=i>=4||i===0?qt(e):qt.ceil(e),se(e.getFullYear()%1e4,t,4)}function m0(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+se(t/60|0,"0",2)+se(t%60,"0",2)}function lu(e,t){return se(e.getUTCDate(),t,2)}function _0(e,t){return se(e.getUTCHours(),t,2)}function x0(e,t){return se(e.getUTCHours()%12||12,t,2)}function y0(e,t){return se(1+Zi.count(ht(e),e),t,3)}function cu(e,t){return se(e.getUTCMilliseconds(),t,3)}function b0(e,t){return cu(e,t)+"000"}function w0(e,t){return se(e.getUTCMonth()+1,t,2)}function T0(e,t){return se(e.getUTCMinutes(),t,2)}function $0(e,t){return se(e.getUTCSeconds(),t,2)}function A0(e){var t=e.getUTCDay();return t===0?7:t}function S0(e,t){return se(Qi.count(ht(e)-1,e),t,2)}function uu(e){var t=e.getUTCDay();return t>=4||t===0?Kt(e):Kt.ceil(e)}function k0(e,t){return e=uu(e),se(Kt.count(ht(e),e)+(ht(e).getUTCDay()===4),t,2)}function E0(e){return e.getUTCDay()}function C0(e,t){return se(Ji.count(ht(e)-1,e),t,2)}function R0(e,t){return se(e.getUTCFullYear()%100,t,2)}function M0(e,t){return e=uu(e),se(e.getUTCFullYear()%100,t,2)}function L0(e,t){return se(e.getUTCFullYear()%1e4,t,4)}function P0(e,t){var i=e.getUTCDay();return e=i>=4||i===0?Kt(e):Kt.ceil(e),se(e.getUTCFullYear()%1e4,t,4)}function D0(){return"+0000"}function du(){return"%"}function fu(e){return+e}function hu(e){return Math.floor(+e/1e3)}var io,Me,gu,vu,pu=b((()=>{Jr(),io={"-":"",_:" ",0:"0"},Me=/^\s*\d+/,gu=/^%/,vu=/[\\^$*+?|[\]().{}]/g}));function F0(e){return bi=Ix(e),no=bi.format,mu=bi.parse,ao=bi.utcFormat,_u=bi.utcParse,bi}var bi,no,mu,ao,_u,z0=b((()=>{pu(),F0({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})})),ro=b((()=>{z0(),pu()}));function an(){for(var e=0,t=arguments.length,i={},n;e<t;++e){if(!(n=arguments[e]+"")||n in i||/[\s.]/.test(n))throw new Error("illegal type: "+n);i[n]=[]}return new aa(i)}function aa(e){this._=e}function I0(e,t){return e.trim().split(/^|\s+/).map(function(i){var n="",a=i.indexOf(".");if(a>=0&&(n=i.slice(a+1),i=i.slice(0,a)),i&&!t.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:n}})}function O0(e,t){for(var i=0,n=e.length,a;i<n;++i)if((a=e[i]).name===t)return a.value}function xu(e,t,i){for(var n=0,a=e.length;n<a;++n)if(e[n].name===t){e[n]=yu,e=e.slice(0,n).concat(e.slice(n+1));break}return i!=null&&e.push({name:t,value:i}),e}var yu,N0=b((()=>{yu={value:()=>{}},aa.prototype=an.prototype={constructor:aa,on:function(e,t){var i=this._,n=I0(e+"",i),a,r=-1,o=n.length;if(arguments.length<2){for(;++r<o;)if((a=(e=n[r]).type)&&(a=O0(i[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<o;)if(a=(e=n[r]).type)i[a]=xu(i[a],e.name,t);else if(t==null)for(a in i)i[a]=xu(i[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var i in t)e[i]=t[i].slice();return new aa(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var i=new Array(a),n=0,a,r;n<a;++n)i[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],n=0,a=r.length;n<a;++n)r[n].value.apply(t,i)},apply:function(e,t,i){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],a=0,r=n.length;a<r;++a)n[a].value.apply(t,i)}}})),ra=b((()=>{N0()}));function oo(e){e.stopImmediatePropagation()}function wi(e){e.preventDefault(),e.stopImmediatePropagation()}var bu,Ti,wu=b((()=>{bu={passive:!1},Ti={capture:!0,passive:!1}}));function so(e){var t=e.document.documentElement,i=B(e).on("dragstart.drag",wi,Ti);"onselectstart"in t?i.on("selectstart.drag",wi,Ti):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function lo(e,t){var i=e.document.documentElement,n=B(e).on("dragstart.drag",null);t&&(n.on("click.drag",wi,Ti),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in i?n.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}var Tu=b((()=>{Xe(),wu()})),rn,B0=b((()=>{rn=e=>()=>e}));function co(e,{sourceEvent:t,subject:i,target:n,identifier:a,active:r,x:o,y:s,dx:l,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:r,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}var X0=b((()=>{co.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e}}));function V0(e){return!e.ctrlKey&&!e.button}function G0(){return this.parentNode}function U0(e,t){return t??{x:e.x,y:e.y}}function H0(){return navigator.maxTouchPoints||"ontouchstart"in this}function $u(){var e=V0,t=G0,i=U0,n=H0,a={},r=an("start","drag","end"),o=0,s,l,c,u,d=0;function f(y){y.on("mousedown.drag",h).filter(n).on("touchstart.drag",m).on("touchmove.drag",v,bu).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(y,$){if(!(u||!e.call(this,y,$))){var T=x(this,t.call(this,y,$),y,$,"mouse");T&&(B(y.view).on("mousemove.drag",g,Ti).on("mouseup.drag",p,Ti),so(y.view),oo(y),c=!1,s=y.clientX,l=y.clientY,T("start",y))}}function g(y){if(wi(y),!c){var $=y.clientX-s,T=y.clientY-l;c=$*$+T*T>d}a.mouse("drag",y)}function p(y){B(y.view).on("mousemove.drag mouseup.drag",null),lo(y.view,c),wi(y),a.mouse("end",y)}function m(y,$){if(e.call(this,y,$)){var T=y.changedTouches,A=t.call(this,y,$),S=T.length,R,C;for(R=0;R<S;++R)(C=x(this,A,y,$,T[R].identifier,T[R]))&&(oo(y),C("start",y,T[R]))}}function v(y){var $=y.changedTouches,T=$.length,A,S;for(A=0;A<T;++A)(S=a[$[A].identifier])&&(wi(y),S("drag",y,$[A]))}function _(y){var $=y.changedTouches,T=$.length,A,S;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),A=0;A<T;++A)(S=a[$[A].identifier])&&(oo(y),S("end",y,$[A]))}function x(y,$,T,A,S,R){var C=r.copy(),E=Ke(R||T,$),k,P,w;if((w=i.call(y,new co("beforestart",{sourceEvent:T,target:f,identifier:S,active:o,x:E[0],y:E[1],dx:0,dy:0,dispatch:C}),A))!=null)return k=w.x-E[0]||0,P=w.y-E[1]||0,function D(L,M,z){var I=E,O;switch(L){case"start":a[S]=D,O=o++;break;case"end":delete a[S],--o;case"drag":E=Ke(z||M,$),O=o;break}C.call(L,y,new co(L,{sourceEvent:M,subject:w,target:f,identifier:S,active:O,x:E[0]+k,y:E[1]+P,dx:E[0]-I[0],dy:E[1]-I[1],dispatch:C}),A)}}return f.filter=function(y){return arguments.length?(e=typeof y=="function"?y:rn(!!y),f):e},f.container=function(y){return arguments.length?(t=typeof y=="function"?y:rn(y),f):t},f.subject=function(y){return arguments.length?(i=typeof y=="function"?y:rn(y),f):i},f.touchable=function(y){return arguments.length?(n=typeof y=="function"?y:rn(!!y),f):n},f.on=function(){var y=r.on.apply(r,arguments);return y===r?f:y},f.clickDistance=function(y){return arguments.length?(d=(y=+y)*y,f):Math.sqrt(d)},f}var W0=b((()=>{ra(),Xe(),Tu(),wu(),B0(),X0()})),uo=b((()=>{W0(),Tu()}));function fo(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Au(e,t){var i=Object.create(e.prototype);for(var n in t)i[n]=t[n];return i}var Su=b((()=>{}));function on(){}function ku(){return this.rgb().formatHex()}function Y0(){return this.rgb().formatHex8()}function j0(){return Pu(this).formatHsl()}function Eu(){return this.rgb().formatRgb()}function Jt(e){var t,i;return e=(e+"").trim().toLowerCase(),(t=Fu.exec(e))?(i=t[1].length,t=parseInt(t[1],16),i===6?Cu(t):i===3?new Ve(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):i===8?oa(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):i===4?oa(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=zu.exec(e))?new Ve(t[1],t[2],t[3],1):(t=Iu.exec(e))?new Ve(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ou.exec(e))?oa(t[1],t[2],t[3],t[4]):(t=Nu.exec(e))?oa(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Bu.exec(e))?Lu(t[1],t[2]/100,t[3]/100,1):(t=Xu.exec(e))?Lu(t[1],t[2]/100,t[3]/100,t[4]):go.hasOwnProperty(e)?Cu(go[e]):e==="transparent"?new Ve(NaN,NaN,NaN,0):null}function Cu(e){return new Ve(e>>16&255,e>>8&255,e&255,1)}function oa(e,t,i,n){return n<=0&&(e=t=i=NaN),new Ve(e,t,i,n)}function Z0(e){return e instanceof on||(e=Jt(e)),e?(e=e.rgb(),new Ve(e.r,e.g,e.b,e.opacity)):new Ve}function sa(e,t,i,n){return arguments.length===1?Z0(e):new Ve(e,t,i,n??1)}function Ve(e,t,i,n){this.r=+e,this.g=+t,this.b=+i,this.opacity=+n}function Ru(){return`#${ti(this.r)}${ti(this.g)}${ti(this.b)}`}function q0(){return`#${ti(this.r)}${ti(this.g)}${ti(this.b)}${ti((isNaN(this.opacity)?1:this.opacity)*255)}`}function Mu(){const e=la(this.opacity);return`${e===1?"rgb(":"rgba("}${ei(this.r)}, ${ei(this.g)}, ${ei(this.b)}${e===1?")":`, ${e})`}`}function la(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ei(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ti(e){return e=ei(e),(e<16?"0":"")+e.toString(16)}function Lu(e,t,i,n){return n<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new it(e,t,i,n)}function Pu(e){if(e instanceof it)return new it(e.h,e.s,e.l,e.opacity);if(e instanceof on||(e=Jt(e)),!e)return new it;if(e instanceof it)return e;e=e.rgb();var t=e.r/255,i=e.g/255,n=e.b/255,a=Math.min(t,i,n),r=Math.max(t,i,n),o=NaN,s=r-a,l=(r+a)/2;return s?(t===r?o=(i-n)/s+(i<n)*6:i===r?o=(n-t)/s+2:o=(t-i)/s+4,s/=l<.5?r+a:2-r-a,o*=60):s=l>0&&l<1?0:o,new it(o,s,l,e.opacity)}function K0(e,t,i,n){return arguments.length===1?Pu(e):new it(e,t,i,n??1)}function it(e,t,i,n){this.h=+e,this.s=+t,this.l=+i,this.opacity=+n}function Du(e){return e=(e||0)%360,e<0?e+360:e}function ca(e){return Math.max(0,Math.min(1,e||0))}function ho(e,t,i){return(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)*255}var $i,sn,ii,Ai,nt,Fu,zu,Iu,Ou,Nu,Bu,Xu,go,Q0=b((()=>{Su(),$i=.7,sn=1/$i,ii="\\s*([+-]?\\d+)\\s*",Ai="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",nt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fu=/^#([0-9a-f]{3,8})$/,zu=new RegExp(`^rgb\\(${ii},${ii},${ii}\\)$`),Iu=new RegExp(`^rgb\\(${nt},${nt},${nt}\\)$`),Ou=new RegExp(`^rgba\\(${ii},${ii},${ii},${Ai}\\)$`),Nu=new RegExp(`^rgba\\(${nt},${nt},${nt},${Ai}\\)$`),Bu=new RegExp(`^hsl\\(${Ai},${nt},${nt}\\)$`),Xu=new RegExp(`^hsla\\(${Ai},${nt},${nt},${Ai}\\)$`),go={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},fo(on,Jt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ku,formatHex:ku,formatHex8:Y0,formatHsl:j0,formatRgb:Eu,toString:Eu}),fo(Ve,sa,Au(on,{brighter(e){return e=e==null?sn:Math.pow(sn,e),new Ve(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?$i:Math.pow($i,e),new Ve(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ve(ei(this.r),ei(this.g),ei(this.b),la(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ru,formatHex:Ru,formatHex8:q0,formatRgb:Mu,toString:Mu})),fo(it,K0,Au(on,{brighter(e){return e=e==null?sn:Math.pow(sn,e),new it(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?$i:Math.pow($i,e),new it(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,n=i+(i<.5?i:1-i)*t,a=2*i-n;return new Ve(ho(e>=240?e-240:e+120,a,n),ho(e,a,n),ho(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new it(Du(this.h),ca(this.s),ca(this.l),la(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=la(this.opacity);return`${e===1?"hsl(":"hsla("}${Du(this.h)}, ${ca(this.s)*100}%, ${ca(this.l)*100}%${e===1?")":`, ${e})`}`}}))})),ua=b((()=>{Q0(),Su()}));function Vu(e,t,i,n,a){var r=e*e,o=r*e;return((1-3*e+3*r-o)*t+(4-6*r+3*o)*i+(1+3*e+3*r-3*o)*n+o*a)/6}function J0(e){var t=e.length-1;return function(i){var n=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),a=e[n],r=e[n+1],o=n>0?e[n-1]:2*a-r,s=n<t-1?e[n+2]:2*r-a;return Vu((i-n/t)*t,o,a,r,s)}}var vo=b((()=>{}));function ey(e){var t=e.length;return function(i){var n=Math.floor(((i%=1)<0?++i:i)*t),a=e[(n+t-1)%t],r=e[n%t],o=e[(n+1)%t],s=e[(n+2)%t];return Vu((i-n/t)*t,a,r,o,s)}}var Gu=b((()=>{vo()})),da,Uu=b((()=>{da=e=>()=>e}));function ty(e,t){return function(i){return e+i*t}}function iy(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(n){return Math.pow(e+n*t,i)}}function ny(e){return(e=+e)==1?Hu:function(t,i){return i-t?iy(t,i,e):da(isNaN(t)?i:t)}}function Hu(e,t){var i=t-e;return i?ty(e,i):da(isNaN(e)?t:e)}var Wu=b((()=>{Uu()}));function Yu(e){return function(t){var i=t.length,n=new Array(i),a=new Array(i),r=new Array(i),o,s;for(o=0;o<i;++o)s=sa(t[o]),n[o]=s.r||0,a[o]=s.g||0,r[o]=s.b||0;return n=e(n),a=e(a),r=e(r),s.opacity=1,function(l){return s.r=n(l),s.g=a(l),s.b=r(l),s+""}}}var ln,ay,ry,ju=b((()=>{ua(),vo(),Gu(),Wu(),ln=(function e(t){var i=ny(t);function n(a,r){var o=i((a=sa(a)).r,(r=sa(r)).r),s=i(a.g,r.g),l=i(a.b,r.b),c=Hu(a.opacity,r.opacity);return function(u){return a.r=o(u),a.g=s(u),a.b=l(u),a.opacity=c(u),a+""}}return n.gamma=e,n})(1),ay=Yu(J0),ry=Yu(ey)}));function oy(e,t){t||(t=[]);var i=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(r){for(a=0;a<i;++a)n[a]=e[a]*(1-r)+t[a]*r;return n}}function sy(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var Zu=b((()=>{}));function ly(e,t){var i=t?t.length:0,n=e?Math.min(i,e.length):0,a=new Array(n),r=new Array(i),o;for(o=0;o<n;++o)a[o]=Si(e[o],t[o]);for(;o<i;++o)r[o]=t[o];return function(s){for(o=0;o<n;++o)r[o]=a[o](s);return r}}var qu=b((()=>{po()}));function cy(e,t){var i=new Date;return e=+e,t=+t,function(n){return i.setTime(e*(1-n)+t*n),i}}var Ku=b((()=>{}));function at(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}var fa=b((()=>{}));function uy(e,t){var i={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?i[a]=Si(e[a],t[a]):n[a]=t[a];return function(r){for(a in i)n[a]=i[a](r);return n}}var Qu=b((()=>{po()}));function dy(e){return function(){return e}}function fy(e){return function(t){return e(t)+""}}function Ju(e,t){var i=ha.lastIndex=ga.lastIndex=0,n,a,r,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=ha.exec(e))&&(a=ga.exec(t));)(r=a.index)>i&&(r=t.slice(i,r),s[o]?s[o]+=r:s[++o]=r),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:at(n,a)})),i=ga.lastIndex;return i<t.length&&(r=t.slice(i),s[o]?s[o]+=r:s[++o]=r),s.length<2?l[0]?fy(l[0].x):dy(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}var ha,ga,ed=b((()=>{fa(),ha=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ga=new RegExp(ha.source,"g")}));function Si(e,t){var i=typeof t,n;return t==null||i==="boolean"?da(t):(i==="number"?at:i==="string"?(n=Jt(t))?(t=n,ln):Ju:t instanceof Jt?ln:t instanceof Date?cy:sy(t)?oy:Array.isArray(t)?ly:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?uy:at)(e,t)}var po=b((()=>{ua(),ju(),qu(),Ku(),fa(),Qu(),ed(),Uu(),Zu()}));function hy(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var gy=b((()=>{}));function td(e,t,i,n,a,r){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*i+t*n)&&(i-=e*l,n-=t*l),(s=Math.sqrt(i*i+n*n))&&(i/=s,n/=s,l/=s),e*n<t*i&&(e=-e,t=-t,l=-l,o=-o),{translateX:a,translateY:r,rotate:Math.atan2(t,e)*mo,skewX:Math.atan(l)*mo,scaleX:o,scaleY:s}}var mo,va,vy=b((()=>{mo=180/Math.PI,va={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}}));function py(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?va:td(t.a,t.b,t.c,t.d,t.e,t.f)}function my(e){return e==null||(pa||(pa=document.createElementNS("http://www.w3.org/2000/svg","g")),pa.setAttribute("transform",e),!(e=pa.transform.baseVal.consolidate()))?va:(e=e.matrix,td(e.a,e.b,e.c,e.d,e.e,e.f))}var pa,_y=b((()=>{vy()}));function id(e,t,i,n){function a(c){return c.length?c.pop()+" ":""}function r(c,u,d,f,h,g){if(c!==d||u!==f){var p=h.push("translate(",null,t,null,i);g.push({i:p-4,x:at(c,d)},{i:p-2,x:at(u,f)})}else(d||f)&&h.push("translate("+d+t+f+i)}function o(c,u,d,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:d.push(a(d)+"rotate(",null,n)-2,x:at(c,u)})):u&&d.push(a(d)+"rotate("+u+n)}function s(c,u,d,f){c!==u?f.push({i:d.push(a(d)+"skewX(",null,n)-2,x:at(c,u)}):u&&d.push(a(d)+"skewX("+u+n)}function l(c,u,d,f,h,g){if(c!==d||u!==f){var p=h.push(a(h)+"scale(",null,",",null,")");g.push({i:p-4,x:at(c,d)},{i:p-2,x:at(u,f)})}else(d!==1||f!==1)&&h.push(a(h)+"scale("+d+","+f+")")}return function(c,u){var d=[],f=[];return c=e(c),u=e(u),r(c.translateX,c.translateY,u.translateX,u.translateY,d,f),o(c.rotate,u.rotate,d,f),s(c.skewX,u.skewX,d,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,f),c=u=null,function(h){for(var g=-1,p=f.length,m;++g<p;)d[(m=f[g]).i]=m.x(h);return d.join("")}}}var nd,ad,xy=b((()=>{fa(),_y(),nd=id(py,"px, ","px)","deg)"),ad=id(my,", ",")",")")}));function rd(e){return((e=Math.exp(e))+1/e)/2}function yy(e){return((e=Math.exp(e))-1/e)/2}function by(e){return((e=Math.exp(2*e))-1)/(e+1)}var od,sd,wy=b((()=>{od=1e-12,sd=(function e(t,i,n){function a(r,o){var s=r[0],l=r[1],c=r[2],u=o[0],d=o[1],f=o[2],h=u-s,g=d-l,p=h*h+g*g,m,v;if(p<od)v=Math.log(f/c)/t,m=function(T){return[s+T*h,l+T*g,c*Math.exp(t*T*v)]};else{var _=Math.sqrt(p),x=(f*f-c*c+n*p)/(2*c*i*_),y=(f*f-c*c-n*p)/(2*f*i*_),$=Math.log(Math.sqrt(x*x+1)-x);v=(Math.log(Math.sqrt(y*y+1)-y)-$)/t,m=function(T){var A=T*v,S=rd($),R=c/(i*_)*(S*by(t*A+$)-yy($));return[s+R*h,l+R*g,c*S/rd(t*A+$)]}}return m.duration=v*1e3*t/Math.SQRT2,m}return a.rho=function(r){var o=Math.max(.001,+r),s=o*o;return e(o,s,s*s)},a})(Math.SQRT2,2,4)})),Ct=b((()=>{po(),qu(),vo(),Gu(),Ku(),Wu(),fa(),Zu(),Qu(),gy(),ed(),xy(),wy(),ju(),ua()}));function _o(){return Rt||(bo(Ty),Rt=Ci.now()+dn)}function Ty(){Rt=0}function ma(){this._call=this._time=this._next=null}function ld(e,t,i){var n=new ma;return n.restart(e,t,i),n}function $y(){_o(),++ni;for(var e=_a,t;e;)(t=Rt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ni}function cd(){Rt=(un=Ci.now())+dn,ni=ki=0;try{$y()}finally{ni=0,Sy(),Rt=0}}function Ay(){var e=Ci.now(),t=e-un;t>yo&&(dn-=t,un=e)}function Sy(){for(var e,t=_a,i,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(i=t._next,t._next=null,t=e?e._next=i:_a=i);cn=e,xo(n)}function xo(e){ni||(ki&&(ki=clearTimeout(ki)),e-Rt>24?(e<1/0&&(ki=setTimeout(cd,e-Ci.now()-dn)),Ei&&(Ei=clearInterval(Ei))):(Ei||(un=Ci.now(),Ei=setInterval(Ay,yo)),ni=1,bo(cd)))}var ni,ki,Ei,yo,_a,cn,un,Rt,dn,Ci,bo,ud=b((()=>{ni=0,ki=0,Ei=0,yo=1e3,un=0,Rt=0,dn=0,Ci=typeof performance=="object"&&performance.now?performance:Date,bo=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)},ma.prototype=ld.prototype={constructor:ma,restart:function(e,t,i){if(typeof e!="function")throw new TypeError("callback is not a function");i=(i==null?_o():+i)+(t==null?0:+t),!this._next&&cn!==this&&(cn?cn._next=this:_a=this,cn=this),this._call=e,this._time=i,xo()},stop:function(){this._call&&(this._call=null,this._time=1/0,xo())}}}));function dd(e,t,i){var n=new ma;return t=t==null?0:+t,n.restart(a=>{n.stop(),e(a+t)},t,i),n}var ky=b((()=>{ud()})),fd=b((()=>{ud(),ky()}));function xa(e,t,i,n,a,r){var o=e.__transition;if(!o)e.__transition={};else if(i in o)return;Ey(e,i,{name:t,index:n,group:a,on:hd,tween:gd,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:0})}function wo(e,t){var i=rt(e,t);if(i.state>0)throw new Error("too late; already scheduled");return i}function gt(e,t){var i=rt(e,t);if(i.state>3)throw new Error("too late; already running");return i}function rt(e,t){var i=e.__transition;if(!i||!(i=i[t]))throw new Error("transition not found");return i}function Ey(e,t,i){var n=e.__transition,a;n[t]=i,i.timer=ld(r,0,i.time);function r(c){i.state=1,i.timer.restart(o,i.delay,i.time),i.delay<=c&&o(c-i.delay)}function o(c){var u,d,f,h;if(i.state!==1)return l();for(u in n)if(h=n[u],h.name===i.name){if(h.state===3)return dd(o);h.state===4?(h.state=6,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete n[u]):+u<t&&(h.state=6,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete n[u])}if(dd(function(){i.state===3&&(i.state=4,i.timer.restart(s,i.delay,i.time),s(c))}),i.state=2,i.on.call("start",e,e.__data__,i.index,i.group),i.state===2){for(i.state=3,a=new Array(f=i.tween.length),u=0,d=-1;u<f;++u)(h=i.tween[u].value.call(e,e.__data__,i.index,i.group))&&(a[++d]=h);a.length=d+1}}function s(c){for(var u=c<i.duration?i.ease.call(null,c/i.duration):(i.timer.restart(l),i.state=5,1),d=-1,f=a.length;++d<f;)a[d].call(e,u);i.state===5&&(i.on.call("end",e,e.__data__,i.index,i.group),l())}function l(){i.state=6,i.timer.stop(),delete n[t];for(var c in n)return;delete e.__transition}}var hd,gd,Cy,Ry,My,Ly,Py,Dy,Fy,Ge=b((()=>{ra(),fd(),hd=an("start","end","cancel","interrupt"),gd=[],Cy=0,Ry=1,My=2,Ly=3,Py=4,Dy=5,Fy=6}));function Ri(e,t){var i=e.__transition,n,a,r=!0,o;if(i){t=t==null?null:t+"";for(o in i){if((n=i[o]).name!==t){r=!1;continue}a=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(a?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete i[o]}r&&delete e.__transition}}var vd=b((()=>{Ge()}));function zy(e){return this.each(function(){Ri(this,e)})}var Iy=b((()=>{vd()}));function Oy(e,t){var i,n;return function(){var a=gt(this,e),r=a.tween;if(r!==i){n=i=r;for(var o=0,s=n.length;o<s;++o)if(n[o].name===t){n=n.slice(),n.splice(o,1);break}}a.tween=n}}function Ny(e,t,i){var n,a;if(typeof i!="function")throw new Error;return function(){var r=gt(this,e),o=r.tween;if(o!==n){a=(n=o).slice();for(var s={name:t,value:i},l=0,c=a.length;l<c;++l)if(a[l].name===t){a[l]=s;break}l===c&&a.push(s)}r.tween=a}}function By(e,t){var i=this._id;if(e+="",arguments.length<2){for(var n=rt(this.node(),i).tween,a=0,r=n.length,o;a<r;++a)if((o=n[a]).name===e)return o.value;return null}return this.each((t==null?Oy:Ny)(i,e,t))}function To(e,t,i){var n=e._id;return e.each(function(){var a=gt(this,n);(a.value||(a.value={}))[t]=i.apply(this,arguments)}),function(a){return rt(a,n).value[t]}}var ya=b((()=>{Ge()}));function pd(e,t){var i;return(typeof t=="number"?at:t instanceof Jt?ln:(i=Jt(t))?(t=i,ln):Ju)(e,t)}var md=b((()=>{ua(),Ct()}));function Xy(e){return function(){this.removeAttribute(e)}}function Vy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Gy(e,t,i){var n,a=i+"",r;return function(){var o=this.getAttribute(e);return o===a?null:o===n?r:r=t(n=o,i)}}function Uy(e,t,i){var n,a=i+"",r;return function(){var o=this.getAttributeNS(e.space,e.local);return o===a?null:o===n?r:r=t(n=o,i)}}function Hy(e,t,i){var n,a,r;return function(){var o,s=i(this),l;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=s+"",o===l?null:o===n&&l===a?r:(a=l,r=t(n=o,s)))}}function Wy(e,t,i){var n,a,r;return function(){var o,s=i(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=s+"",o===l?null:o===n&&l===a?r:(a=l,r=t(n=o,s)))}}function Yy(e,t){var i=Vn(e),n=i==="transform"?ad:pd;return this.attrTween(e,typeof t=="function"?(i.local?Wy:Hy)(i,n,To(this,"attr."+e,t)):t==null?(i.local?Vy:Xy)(i):(i.local?Uy:Gy)(i,n,t))}var jy=b((()=>{Ct(),Xe(),ya(),md()}));function Zy(e,t){return function(i){this.setAttribute(e,t.call(this,i))}}function qy(e,t){return function(i){this.setAttributeNS(e.space,e.local,t.call(this,i))}}function Ky(e,t){var i,n;function a(){var r=t.apply(this,arguments);return r!==n&&(i=(n=r)&&qy(e,r)),i}return a._value=t,a}function Qy(e,t){var i,n;function a(){var r=t.apply(this,arguments);return r!==n&&(i=(n=r)&&Zy(e,r)),i}return a._value=t,a}function Jy(e,t){var i="attr."+e;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;var n=Vn(e);return this.tween(i,(n.local?Ky:Qy)(n,t))}var eb=b((()=>{Xe()}));function tb(e,t){return function(){wo(this,e).delay=+t.apply(this,arguments)}}function ib(e,t){return t=+t,function(){wo(this,e).delay=t}}function nb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?tb:ib)(t,e)):rt(this.node(),t).delay}var ab=b((()=>{Ge()}));function rb(e,t){return function(){gt(this,e).duration=+t.apply(this,arguments)}}function ob(e,t){return t=+t,function(){gt(this,e).duration=t}}function sb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?rb:ob)(t,e)):rt(this.node(),t).duration}var lb=b((()=>{Ge()}));function cb(e,t){if(typeof t!="function")throw new Error;return function(){gt(this,e).ease=t}}function ub(e){var t=this._id;return arguments.length?this.each(cb(t,e)):rt(this.node(),t).ease}var db=b((()=>{Ge()}));function fb(e,t){return function(){var i=t.apply(this,arguments);if(typeof i!="function")throw new Error;gt(this,e).ease=i}}function hb(e){if(typeof e!="function")throw new Error;return this.each(fb(this._id,e))}var gb=b((()=>{Ge()}));function vb(e){typeof e!="function"&&(e=uc(e));for(var t=this._groups,i=t.length,n=new Array(i),a=0;a<i;++a)for(var r=t[a],o=r.length,s=n[a]=[],l,c=0;c<o;++c)(l=r[c])&&e.call(l,l.__data__,c,r)&&s.push(l);return new wt(n,this._parents,this._name,this._id)}var pb=b((()=>{Xe(),ai()}));function mb(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,i=e._groups,n=t.length,a=i.length,r=Math.min(n,a),o=new Array(n),s=0;s<r;++s)for(var l=t[s],c=i[s],u=l.length,d=o[s]=new Array(u),f,h=0;h<u;++h)(f=l[h]||c[h])&&(d[h]=f);for(;s<n;++s)o[s]=t[s];return new wt(o,this._parents,this._name,this._id)}var _b=b((()=>{ai()}));function xb(e){return(e+"").trim().split(/^|\s+/).every(function(t){var i=t.indexOf(".");return i>=0&&(t=t.slice(0,i)),!t||t==="start"})}function yb(e,t,i){var n,a,r=xb(t)?wo:gt;return function(){var o=r(this,e),s=o.on;s!==n&&(a=(n=s).copy()).on(t,i),o.on=a}}function bb(e,t){var i=this._id;return arguments.length<2?rt(this.node(),i).on.on(e):this.each(yb(i,e,t))}var wb=b((()=>{Ge()}));function Tb(e){return function(){var t=this.parentNode;for(var i in this.__transition)if(+i!==e)return;t&&t.removeChild(this)}}function $b(){return this.on("end.remove",Tb(this._id))}var Ab=b((()=>{}));function Sb(e){var t=this._name,i=this._id;typeof e!="function"&&(e=Br(e));for(var n=this._groups,a=n.length,r=new Array(a),o=0;o<a;++o)for(var s=n[o],l=s.length,c=r[o]=new Array(l),u,d,f=0;f<l;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&("__data__"in u&&(d.__data__=u.__data__),c[f]=d,xa(c[f],t,i,f,c,rt(u,i)));return new wt(r,this._parents,t,i)}var kb=b((()=>{Xe(),ai(),Ge()}));function Eb(e){var t=this._name,i=this._id;typeof e!="function"&&(e=lc(e));for(var n=this._groups,a=n.length,r=[],o=[],s=0;s<a;++s)for(var l=n[s],c=l.length,u,d=0;d<c;++d)if(u=l[d]){for(var f=e.call(u,u.__data__,d,l),h,g=rt(u,i),p=0,m=f.length;p<m;++p)(h=f[p])&&xa(h,t,i,p,f,g);r.push(f),o.push(u)}return new wt(r,o,t,i)}var Cb=b((()=>{Xe(),ai(),Ge()}));function Rb(){return new _d(this._groups,this._parents)}var _d,Mb=b((()=>{Xe(),_d=_i.prototype.constructor}));function Lb(e,t){var i,n,a;return function(){var r=mi(this,e),o=(this.style.removeProperty(e),mi(this,e));return r===o?null:r===i&&o===n?a:a=t(i=r,n=o)}}function xd(e){return function(){this.style.removeProperty(e)}}function Pb(e,t,i){var n,a=i+"",r;return function(){var o=mi(this,e);return o===a?null:o===n?r:r=t(n=o,i)}}function Db(e,t,i){var n,a,r;return function(){var o=mi(this,e),s=i(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),mi(this,e))),o===l?null:o===n&&l===a?r:(a=l,r=t(n=o,s))}}function Fb(e,t){var i,n,a,r="style."+t,o="end."+r,s;return function(){var l=gt(this,e),c=l.on,u=l.value[r]==null?s||(s=xd(t)):void 0;(c!==i||a!==u)&&(n=(i=c).copy()).on(o,a=u),l.on=n}}function zb(e,t,i){var n=(e+="")=="transform"?nd:pd;return t==null?this.styleTween(e,Lb(e,n)).on("end.style."+e,xd(e)):typeof t=="function"?this.styleTween(e,Db(e,n,To(this,"style."+e,t))).each(Fb(this._id,e)):this.styleTween(e,Pb(e,n,t),i).on("end.style."+e,null)}var Ib=b((()=>{Ct(),Xe(),Ge(),ya(),md()}));function Ob(e,t,i){return function(n){this.style.setProperty(e,t.call(this,n),i)}}function Nb(e,t,i){var n,a;function r(){var o=t.apply(this,arguments);return o!==a&&(n=(a=o)&&Ob(e,o,i)),n}return r._value=t,r}function Bb(e,t,i){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,Nb(e,t,i??""))}var Xb=b((()=>{}));function Vb(e){return function(){this.textContent=e}}function Gb(e){return function(){var t=e(this);this.textContent=t??""}}function Ub(e){return this.tween("text",typeof e=="function"?Gb(To(this,"text",e)):Vb(e==null?"":e+""))}var Hb=b((()=>{ya()}));function Wb(e){return function(t){this.textContent=e.call(this,t)}}function Yb(e){var t,i;function n(){var a=e.apply(this,arguments);return a!==i&&(t=(i=a)&&Wb(a)),t}return n._value=e,n}function jb(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Yb(e))}var Zb=b((()=>{}));function qb(){for(var e=this._name,t=this._id,i=bd(),n=this._groups,a=n.length,r=0;r<a;++r)for(var o=n[r],s=o.length,l,c=0;c<s;++c)if(l=o[c]){var u=rt(l,t);xa(l,e,i,c,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new wt(n,this._parents,e,i)}var Kb=b((()=>{ai(),Ge()}));function Qb(){var e,t,i=this,n=i._id,a=i.size();return new Promise(function(r,o){var s={value:o},l={value:function(){--a===0&&r()}};i.each(function(){var c=gt(this,n),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t}),a===0&&r()})}var Jb=b((()=>{Ge()}));function wt(e,t,i,n){this._groups=e,this._parents=t,this._name=i,this._id=n}function yd(e){return _i().transition(e)}function bd(){return++wd}var wd,vt,ai=b((()=>{Xe(),jy(),eb(),ab(),lb(),db(),gb(),pb(),_b(),wb(),Ab(),kb(),Cb(),Mb(),Ib(),Xb(),Hb(),Zb(),Kb(),ya(),Jb(),wd=0,vt=_i.prototype,wt.prototype=yd.prototype={constructor:wt,select:Sb,selectAll:Eb,selectChild:vt.selectChild,selectChildren:vt.selectChildren,filter:vb,merge:mb,selection:Rb,transition:qb,call:vt.call,nodes:vt.nodes,node:vt.node,size:vt.size,empty:vt.empty,each:vt.each,on:bb,attr:Yy,attrTween:Jy,style:zb,styleTween:Bb,text:Ub,textTween:jb,remove:$b,tween:By,delay:nb,duration:sb,ease:ub,easeVarying:hb,end:Qb,[Symbol.iterator]:vt[Symbol.iterator]}})),Td,ew=b((()=>{Td=e=>+e}));function tw(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var iw=b((()=>{})),$d=b((()=>{ew(),iw()}));function nw(e,t){for(var i;!(i=e.__transition)||!(i=i[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return i}function aw(e){var t,i;e instanceof wt?(t=e._id,e=e._name):(t=bd(),(i=Ad).time=_o(),e=e==null?null:e+"");for(var n=this._groups,a=n.length,r=0;r<a;++r)for(var o=n[r],s=o.length,l,c=0;c<s;++c)(l=o[c])&&xa(l,e,t,c,o,i||nw(l,t));return new wt(n,this._parents,e,t)}var Ad,rw=b((()=>{ai(),Ge(),$d(),fd(),Ad={time:null,delay:0,duration:250,ease:tw}})),ow=b((()=>{Xe(),Iy(),rw(),_i.prototype.interrupt=zy,_i.prototype.transition=aw})),$o=b((()=>{ow(),ai(),Ge(),vd()})),ba,sw=b((()=>{ba=e=>()=>e}));function lw(e,{sourceEvent:t,target:i,selection:n,mode:a,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},selection:{value:n,enumerable:!0,configurable:!0},mode:{value:a,enumerable:!0,configurable:!0},_:{value:r}})}var cw=b((()=>{}));function uw(e){e.stopImmediatePropagation()}function Ao(e){e.preventDefault(),e.stopImmediatePropagation()}var dw=b((()=>{}));function Sd(e){return[+e[0],+e[1]]}function So(e){return[Sd(e[0]),Sd(e[1])]}function fn(e){return{type:e}}function fw(e){return!e.ctrlKey&&!e.button}function hw(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function gw(){return navigator.maxTouchPoints||"ontouchstart"in this}function ko(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function vw(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function kd(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function pw(){return Ed(hn)}function mw(){return Ed(gn)}function Ed(e){var t=hw,i=fw,n=gw,a=!0,r=an("start","brush","end"),o=6,s;function l(m){var v=m.property("__brush",p).selectAll(".overlay").data([fn("overlay")]);v.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",pt.overlay).merge(v).each(function(){var x=ko(this).extent;B(this).attr("x",x[0][0]).attr("y",x[0][1]).attr("width",x[1][0]-x[0][0]).attr("height",x[1][1]-x[0][1])}),m.selectAll(".selection").data([fn("selection")]).enter().append("rect").attr("class","selection").attr("cursor",pt.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var _=m.selectAll(".handle").data(e.handles,function(x){return x.type});_.exit().remove(),_.enter().append("rect").attr("class",function(x){return"handle handle--"+x.type}).attr("cursor",function(x){return pt[x.type]}),m.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(n).on("touchstart.brush",f).on("touchmove.brush",h).on("touchend.brush touchcancel.brush",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(m,v,_){m.tween?m.on("start.brush",function(x){u(this,arguments).beforestart().start(x)}).on("interrupt.brush end.brush",function(x){u(this,arguments).end(x)}).tween("brush",function(){var x=this,y=x.__brush,$=u(x,arguments),T=y.selection,A=e.input(typeof v=="function"?v.apply(this,arguments):v,y.extent),S=Si(T,A);function R(C){y.selection=C===1&&A===null?null:S(C),c.call(x),$.brush()}return T!==null&&A!==null?R:R(1)}):m.each(function(){var x=this,y=arguments,$=x.__brush,T=e.input(typeof v=="function"?v.apply(x,y):v,$.extent),A=u(x,y).beforestart();Ri(x),$.selection=T===null?null:T,c.call(x),A.start(_).brush(_).end(_)})},l.clear=function(m,v){l.move(m,null,v)};function c(){var m=B(this),v=ko(this).selection;v?(m.selectAll(".selection").style("display",null).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(_){return _.type[_.type.length-1]==="e"?v[1][0]-o/2:v[0][0]-o/2}).attr("y",function(_){return _.type[0]==="s"?v[1][1]-o/2:v[0][1]-o/2}).attr("width",function(_){return _.type==="n"||_.type==="s"?v[1][0]-v[0][0]+o:o}).attr("height",function(_){return _.type==="e"||_.type==="w"?v[1][1]-v[0][1]+o:o})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(m,v,_){var x=m.__brush.emitter;return x&&(!_||!x.clean)?x:new d(m,v,_)}function d(m,v,_){this.that=m,this.args=v,this.state=m.__brush,this.active=0,this.clean=_}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,v){return this.starting?(this.starting=!1,this.emit("start",m,v)):this.emit("brush",m),this},brush:function(m,v){return this.emit("brush",m,v),this},end:function(m,v){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,v)),this},emit:function(m,v,_){var x=B(this.that).datum();r.call(m,this.that,new lw(m,{sourceEvent:v,target:l,selection:e.output(this.state.selection),mode:_,dispatch:r}),x)}};function f(m){if(s&&!m.touches||!i.apply(this,arguments))return;var v=this,_=m.target.__data__.type,x=(a&&m.metaKey?_="overlay":_)==="selection"?Eo:a&&m.altKey?oi:ri,y=e===gn?null:Cd[_],$=e===hn?null:Rd[_],T=ko(v),A=T.extent,S=T.selection,R=A[0][0],C,E,k=A[0][1],P,w,D=A[1][0],L,M,z=A[1][1],I,O,X=0,V=0,fe,ie=y&&$&&a&&m.shiftKey,U,Y,Z=Array.from(m.touches||[m],j=>{const ke=j.identifier;return j=Ke(j,v),j.point0=j.slice(),j.identifier=ke,j});Ri(v);var re=u(v,arguments,!0).beforestart();if(_==="overlay"){S&&(fe=!0);const j=[Z[0],Z[1]||Z[0]];T.selection=S=[[C=e===gn?R:ze(j[0][0],j[1][0]),P=e===hn?k:ze(j[0][1],j[1][1])],[L=e===gn?D:Fe(j[0][0],j[1][0]),I=e===hn?z:Fe(j[0][1],j[1][1])]],Z.length>1&&he(m)}else C=S[0][0],P=S[0][1],L=S[1][0],I=S[1][1];E=C,w=P,M=L,O=I;var N=B(v).attr("pointer-events","none"),W=N.selectAll(".overlay").attr("cursor",pt[_]);if(m.touches)re.moved=F,re.ended=oe;else{var K=B(m.view).on("mousemove.brush",F,!0).on("mouseup.brush",oe,!0);a&&K.on("keydown.brush",$e,!0).on("keyup.brush",De,!0),so(m.view)}c.call(v),re.start(m,x.name);function F(j){for(const ke of j.changedTouches||[j])for(const Pn of Z)Pn.identifier===ke.identifier&&(Pn.cur=Ke(ke,v));if(ie&&!U&&!Y&&Z.length===1){const ke=Z[0];Co(ke.cur[0]-ke[0])>Co(ke.cur[1]-ke[1])?Y=!0:U=!0}for(const ke of Z)ke.cur&&(ke[0]=ke.cur[0],ke[1]=ke.cur[1]);fe=!0,Ao(j),he(j)}function he(j){const ke=Z[0],Pn=ke.point0;var Ut;switch(X=ke[0]-Pn[0],V=ke[1]-Pn[1],x){case wa:case Eo:y&&(X=Fe(R-C,ze(D-L,X)),E=C+X,M=L+X),$&&(V=Fe(k-P,ze(z-I,V)),w=P+V,O=I+V);break;case ri:Z[1]?(y&&(E=Fe(R,ze(D,Z[0][0])),M=Fe(R,ze(D,Z[1][0])),y=1),$&&(w=Fe(k,ze(z,Z[0][1])),O=Fe(k,ze(z,Z[1][1])),$=1)):(y<0?(X=Fe(R-C,ze(D-C,X)),E=C+X,M=L):y>0&&(X=Fe(R-L,ze(D-L,X)),E=C,M=L+X),$<0?(V=Fe(k-P,ze(z-P,V)),w=P+V,O=I):$>0&&(V=Fe(k-I,ze(z-I,V)),w=P,O=I+V));break;case oi:y&&(E=Fe(R,ze(D,C-X*y)),M=Fe(R,ze(D,L+X*y))),$&&(w=Fe(k,ze(z,P-V*$)),O=Fe(k,ze(z,I+V*$)));break}M<E&&(y*=-1,Ut=C,C=L,L=Ut,Ut=E,E=M,M=Ut,_ in Ro&&W.attr("cursor",pt[_=Ro[_]])),O<w&&($*=-1,Ut=P,P=I,I=Ut,Ut=w,w=O,O=Ut,_ in Mo&&W.attr("cursor",pt[_=Mo[_]])),T.selection&&(S=T.selection),U&&(E=S[0][0],M=S[1][0]),Y&&(w=S[0][1],O=S[1][1]),(S[0][0]!==E||S[0][1]!==w||S[1][0]!==M||S[1][1]!==O)&&(T.selection=[[E,w],[M,O]],c.call(v),re.brush(j,x.name))}function oe(j){if(uw(j),j.touches){if(j.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else lo(j.view,fe),K.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);N.attr("pointer-events","all"),W.attr("cursor",pt.overlay),T.selection&&(S=T.selection),vw(S)&&(T.selection=null,c.call(v)),re.end(j,x.name)}function $e(j){switch(j.keyCode){case 16:ie=y&&$;break;case 18:x===ri&&(y&&(L=M-X*y,C=E+X*y),$&&(I=O-V*$,P=w+V*$),x=oi,he(j));break;case 32:(x===ri||x===oi)&&(y<0?L=M-X:y>0&&(C=E-X),$<0?I=O-V:$>0&&(P=w-V),x=wa,W.attr("cursor",pt.selection),he(j));break;default:return}Ao(j)}function De(j){switch(j.keyCode){case 16:ie&&(U=Y=ie=!1,he(j));break;case 18:x===oi&&(y<0?L=M:y>0&&(C=E),$<0?I=O:$>0&&(P=w),x=ri,he(j));break;case 32:x===wa&&(j.altKey?(y&&(L=M-X*y,C=E+X*y),$&&(I=O-V*$,P=w+V*$),x=oi):(y<0?L=M:y>0&&(C=E),$<0?I=O:$>0&&(P=w),x=ri),W.attr("cursor",pt[_]),he(j));break;default:return}Ao(j)}}function h(m){u(this,arguments).moved(m)}function g(m){u(this,arguments).ended(m)}function p(){var m=this.__brush||{selection:null};return m.extent=So(t.apply(this,arguments)),m.dim=e,m}return l.extent=function(m){return arguments.length?(t=typeof m=="function"?m:ba(So(m)),l):t},l.filter=function(m){return arguments.length?(i=typeof m=="function"?m:ba(!!m),l):i},l.touchable=function(m){return arguments.length?(n=typeof m=="function"?m:ba(!!m),l):n},l.handleSize=function(m){return arguments.length?(o=+m,l):o},l.keyModifiers=function(m){return arguments.length?(a=!!m,l):a},l.on=function(){var m=r.on.apply(r,arguments);return m===r?l:m},l}var Eo,wa,ri,oi,Co,Fe,ze,hn,gn,_w,pt,Ro,Mo,Cd,Rd,xw=b((()=>{ra(),uo(),Ct(),Xe(),$o(),sw(),cw(),dw(),Eo={name:"drag"},wa={name:"space"},ri={name:"handle"},oi={name:"center"},{abs:Co,max:Fe,min:ze}=Math,hn={name:"x",handles:["w","e"].map(fn),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},gn={name:"y",handles:["n","s"].map(fn),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},_w={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(fn),input:function(e){return e==null?null:So(e)},output:function(e){return e}},pt={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ro={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Mo={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Cd={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Rd={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1}})),yw=b((()=>{xw()}));function Md(e){return new Function("d","return {"+e.map(function(t,i){return JSON.stringify(t)+": d["+i+'] || ""'}).join(",")+"}")}function bw(e,t){var i=Md(e);return function(n,a){return t(i(n),a,e)}}function Ld(e){var t=Object.create(null),i=[];return e.forEach(function(n){for(var a in n)a in t||i.push(t[a]=a)}),i}function Ue(e,t){var i=e+"",n=i.length;return n<t?new Array(t-n+1).join(0)+i:i}function ww(e){return e<0?"-"+Ue(-e,6):e>9999?"+"+Ue(e,6):Ue(e,4)}function Tw(e){var t=e.getUTCHours(),i=e.getUTCMinutes(),n=e.getUTCSeconds(),a=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":ww(e.getUTCFullYear(),4)+"-"+Ue(e.getUTCMonth()+1,2)+"-"+Ue(e.getUTCDate(),2)+(a?"T"+Ue(t,2)+":"+Ue(i,2)+":"+Ue(n,2)+"."+Ue(a,3)+"Z":n?"T"+Ue(t,2)+":"+Ue(i,2)+":"+Ue(n,2)+"Z":i||t?"T"+Ue(t,2)+":"+Ue(i,2)+"Z":"")}function Pd(e){var t=new RegExp('["'+e+`
13
+ \r]`),i=e.charCodeAt(0);function n(d,f){var h,g,p=a(d,function(m,v){if(h)return h(m,v-1);g=m,h=f?bw(m,f):Md(m)});return p.columns=g||[],p}function a(d,f){var h=[],g=d.length,p=0,m=0,v,_=g<=0,x=!1;d.charCodeAt(g-1)===Mi&&--g,d.charCodeAt(g-1)===Aa&&--g;function y(){if(_)return Ta;if(x)return x=!1,Lo;var T,A=p,S;if(d.charCodeAt(A)===$a){for(;p++<g&&d.charCodeAt(p)!==$a||d.charCodeAt(++p)===$a;);return(T=p)>=g?_=!0:(S=d.charCodeAt(p++))===Mi?x=!0:S===Aa&&(x=!0,d.charCodeAt(p)===Mi&&++p),d.slice(A+1,T-1).replace(/""/g,'"')}for(;p<g;){if((S=d.charCodeAt(T=p++))===Mi)x=!0;else if(S===Aa)x=!0,d.charCodeAt(p)===Mi&&++p;else if(S!==i)continue;return d.slice(A,T)}return _=!0,d.slice(A,g)}for(;(v=y())!==Ta;){for(var $=[];v!==Lo&&v!==Ta;)$.push(v),v=y();f&&($=f($,m++))==null||h.push($)}return h}function r(d,f){return d.map(function(h){return f.map(function(g){return u(h[g])}).join(e)})}function o(d,f){return f==null&&(f=Ld(d)),[f.map(u).join(e)].concat(r(d,f)).join(`
14
+ `)}function s(d,f){return f==null&&(f=Ld(d)),r(d,f).join(`
15
+ `)}function l(d){return d.map(c).join(`
16
+ `)}function c(d){return d.map(u).join(e)}function u(d){return d==null?"":d instanceof Date?Tw(d):t.test(d+="")?'"'+d.replace(/"/g,'""')+'"':d}return{parse:n,parseRows:a,format:o,formatBody:s,formatRows:l,formatRow:c,formatValue:u}}var Lo,Ta,$a,Mi,Aa,Po=b((()=>{Lo={},Ta={},$a=34,Mi=10,Aa=13})),Mt,Dd,Fd,$w,Aw,Sw,kw,Ew,Cw=b((()=>{Po(),Mt=Pd(","),Dd=Mt.parse,Fd=Mt.parseRows,$w=Mt.format,Aw=Mt.formatBody,Sw=Mt.formatRows,kw=Mt.formatRow,Ew=Mt.formatValue})),Lt,zd,Id,Rw,Mw,Lw,Pw,Dw,Fw=b((()=>{Po(),Lt=Pd(" "),zd=Lt.parse,Id=Lt.parseRows,Rw=Lt.format,Mw=Lt.formatBody,Lw=Lt.formatRows,Pw=Lt.formatRow,Dw=Lt.formatValue})),zw=b((()=>{Po(),Cw(),Fw()}));function Li(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var si=b((()=>{}));function Od(){var e=new Zr,t=[],i=[],n=Do;function a(r){let o=e.get(r);if(o===void 0){if(n!==Do)return n;e.set(r,o=t.push(r)-1)}return i[o%i.length]}return a.domain=function(r){if(!arguments.length)return t.slice();t=[],e=new Zr;for(const o of r)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(r){return arguments.length?(i=Array.from(r),a):i.slice()},a.unknown=function(r){return arguments.length?(n=r,a):n},a.copy=function(){return Od(t,i).unknown(n)},Li.apply(a,arguments),a}var Do,Iw=b((()=>{Qt(),si(),Do=Symbol("implicit")}));function Ow(e){return function(){return e}}var Nw=b((()=>{}));function Bw(e){return+e}var Nd=b((()=>{}));function Pi(e){return e}function Fo(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:Ow(isNaN(t)?NaN:.5)}function Xw(e,t){var i;return e>t&&(i=e,e=t,t=i),function(n){return Math.max(e,Math.min(t,n))}}function Vw(e,t,i){var n=e[0],a=e[1],r=t[0],o=t[1];return a<n?(n=Fo(a,n),r=i(o,r)):(n=Fo(n,a),r=i(r,o)),function(s){return r(n(s))}}function Gw(e,t,i){var n=Math.min(e.length,t.length)-1,a=new Array(n),r=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)a[o]=Fo(e[o],e[o+1]),r[o]=i(t[o],t[o+1]);return function(s){var l=Hc(e,s,1,n)-1;return r[l](a[l](s))}}function Sa(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function zo(){var e=Io,t=Io,i=Si,n,a,r,o=Pi,s,l,c;function u(){var f=Math.min(e.length,t.length);return o!==Pi&&(o=Xw(e[0],e[f-1])),s=f>2?Gw:Vw,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?r:(l||(l=s(e.map(n),t,i)))(n(o(f)))}return d.invert=function(f){return o(a((c||(c=s(t,e.map(n),at)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,Bw),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),i=hy,u()},d.clamp=function(f){return arguments.length?(o=f?!0:Pi,u()):o!==Pi},d.interpolate=function(f){return arguments.length?(i=f,u()):i},d.unknown=function(f){return arguments.length?(r=f,d):r},function(f,h){return n=f,a=h,u()}}function Bd(){return zo()(Pi,Pi)}var Io,vn=b((()=>{Qt(),Ct(),Nw(),Nd(),Io=[0,1]}));function Uw(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ka(e,t){if(!isFinite(e)||e===0)return null;var i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,i);return[n.length>1?n[0]+n.slice(2):n,+e.slice(i+1)]}var Ea=b((()=>{}));function Di(e){return e=ka(Math.abs(e)),e?e[1]:NaN}var Ca=b((()=>{Ea()}));function Hw(e,t){return function(i,n){for(var a=i.length,r=[],o=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),r.push(i.substring(a-=s,a+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return r.reverse().join(t)}}var Ww=b((()=>{}));function Yw(e){return function(t){return t.replace(/[0-9]/g,function(i){return e[+i]})}}var jw=b((()=>{}));function Fi(e){if(!(t=Xd.exec(e)))throw new Error("invalid format: "+e);var t;return new Ra({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Ra(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}var Xd,Vd=b((()=>{Xd=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,Fi.prototype=Ra.prototype,Ra.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type}}));function Zw(e){e:for(var t=e.length,i=1,n=-1,a;i<t;++i)switch(e[i]){case".":n=a=i;break;case"0":n===0&&(n=i),a=i;break;default:if(!+e[i])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var qw=b((()=>{}));function Kw(e,t){var i=ka(e,t);if(!i)return Ma=void 0,e.toPrecision(t);var n=i[0],a=i[1],r=a-(Ma=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return r===o?n:r>o?n+new Array(r-o+1).join("0"):r>0?n.slice(0,r)+"."+n.slice(r):"0."+new Array(1-r).join("0")+ka(e,Math.max(0,t+r-1))[0]}var Ma,Gd=b((()=>{Ea()}));function Ud(e,t){var i=ka(e,t);if(!i)return e+"";var n=i[0],a=i[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}var Qw=b((()=>{Ea()})),Oo,Jw=b((()=>{Ea(),Gd(),Qw(),Oo={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Uw,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Ud(e*100,t),r:Ud,s:Kw,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}}));function Hd(e){return e}var eT=b((()=>{}));function Wd(e){var t=e.grouping===void 0||e.thousands===void 0?Hd:Hw(No.call(e.grouping,Number),e.thousands+""),i=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",r=e.numerals===void 0?Hd:Yw(No.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d,f){d=Fi(d);var h=d.fill,g=d.align,p=d.sign,m=d.symbol,v=d.zero,_=d.width,x=d.comma,y=d.precision,$=d.trim,T=d.type;T==="n"?(x=!0,T="g"):Oo[T]||(y===void 0&&(y=12),$=!0,T="g"),(v||h==="0"&&g==="=")&&(v=!0,h="0",g="=");var A=(f&&f.prefix!==void 0?f.prefix:"")+(m==="$"?i:m==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():""),S=(m==="$"?n:/[%p]/.test(T)?o:"")+(f&&f.suffix!==void 0?f.suffix:""),R=Oo[T],C=/[defgprs%]/.test(T);y=y===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function E(k){var P=A,w=S,D,L,M;if(T==="c")w=R(k)+w,k="";else{k=+k;var z=k<0||1/k<0;if(k=isNaN(k)?l:R(Math.abs(k),y),$&&(k=Zw(k)),z&&+k==0&&p!=="+"&&(z=!1),P=(z?p==="("?p:s:p==="-"||p==="("?"":p)+P,w=(T==="s"&&!isNaN(k)&&Ma!==void 0?Bo[8+Ma/3]:"")+w+(z&&p==="("?")":""),C){for(D=-1,L=k.length;++D<L;)if(M=k.charCodeAt(D),48>M||M>57){w=(M===46?a+k.slice(D+1):k.slice(D))+w,k=k.slice(0,D);break}}}x&&!v&&(k=t(k,1/0));var I=P.length+k.length+w.length,O=I<_?new Array(_-I+1).join(h):"";switch(x&&v&&(k=t(O+k,O.length?_-w.length:1/0),O=""),g){case"<":k=P+k+w+O;break;case"=":k=P+O+k+w;break;case"^":k=O.slice(0,I=O.length>>1)+P+k+w+O.slice(I);break;default:k=O+P+k+w;break}return r(k)}return E.toString=function(){return d+""},E}function u(d,f){var h=Math.max(-8,Math.min(8,Math.floor(Di(f)/3)))*3,g=Math.pow(10,-h),p=c((d=Fi(d),d.type="f",d),{suffix:Bo[8+h/3]});return function(m){return p(g*m)}}return{format:c,formatPrefix:u}}var No,Bo,Yd=b((()=>{Ca(),Ww(),jw(),Vd(),qw(),Jw(),Gd(),eT(),No=Array.prototype.map,Bo=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]}));function jd(e){return La=Wd(e),Pa=La.format,Xo=La.formatPrefix,La}var La,Pa,Xo,tT=b((()=>{Yd(),jd({thousands:",",grouping:[3],currency:["$",""]})}));function Zd(e){return Math.max(0,-Di(Math.abs(e)))}var iT=b((()=>{Ca()}));function qd(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Di(t)/3)))*3-Di(Math.abs(e)))}var nT=b((()=>{Ca()}));function Kd(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Di(t)-Di(e))+1}var aT=b((()=>{Ca()})),rT=Dn({FormatSpecifier:()=>Ra,format:()=>Pa,formatDefaultLocale:()=>jd,formatLocale:()=>Wd,formatPrefix:()=>Xo,formatSpecifier:()=>Fi,precisionFixed:()=>Zd,precisionPrefix:()=>qd,precisionRound:()=>Kd}),Vo=b((()=>{tT(),Yd(),Vd(),iT(),nT(),aT()}));function oT(e,t,i,n){var a=Qr(e,t,i),r;switch(n=Fi(n??",f"),n.type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(r=qd(a,o))&&(n.precision=r),Xo(n,o);case"":case"e":case"g":case"p":case"r":n.precision==null&&!isNaN(r=Kd(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=r-(n.type==="e"));break;case"f":case"%":n.precision==null&&!isNaN(r=Zd(a))&&(n.precision=r-(n.type==="%")*2);break}return Pa(n)}var Qd=b((()=>{Qt(),Vo()}));function Jd(e){var t=e.domain;return e.ticks=function(i){var n=t();return qr(n[0],n[n.length-1],i??10)},e.tickFormat=function(i,n){var a=t();return oT(a[0],a[a.length-1],i??10,n)},e.nice=function(i){i==null&&(i=10);var n=t(),a=0,r=n.length-1,o=n[a],s=n[r],l,c,u=10;for(s<o&&(c=o,o=s,s=c,c=a,a=r,r=c);u-- >0;){if(c=Kr(o,s,i),c===l)return n[a]=o,n[r]=s,t(n);if(c>0)o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c;else if(c<0)o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function Da(){var e=Bd();return e.copy=function(){return Sa(e,Da())},Li.apply(e,arguments),Jd(e)}var ef=b((()=>{Qt(),vn(),si(),Qd()}));function tf(e,t){e=e.slice();var i=0,n=e.length-1,a=e[i],r=e[n],o;return r<a&&(o=i,i=n,n=o,o=a,a=r,r=o),e[i]=t.floor(a),e[n]=t.ceil(r),e}var nf=b((()=>{}));function af(e){return Math.log(e)}function rf(e){return Math.exp(e)}function sT(e){return-Math.log(-e)}function lT(e){return-Math.exp(-e)}function cT(e){return isFinite(e)?+("1e"+e):e<0?0:e}function uT(e){return e===10?cT:e===Math.E?Math.exp:t=>Math.pow(e,t)}function dT(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function of(e){return(t,i)=>-e(-t,i)}function fT(e){const t=e(af,rf),i=t.domain;let n=10,a,r;function o(){return a=dT(n),r=uT(n),i()[0]<0?(a=of(a),r=of(r),e(sT,lT)):e(af,rf),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(i(s),o()):i()},t.ticks=s=>{const l=i();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let f=a(c),h=a(u),g,p;const m=s==null?10:+s;let v=[];if(!(n%1)&&h-f<m){if(f=Math.floor(f),h=Math.ceil(h),c>0){for(;f<=h;++f)for(g=1;g<n;++g)if(p=f<0?g/r(-f):g*r(f),!(p<c)){if(p>u)break;v.push(p)}}else for(;f<=h;++f)for(g=n-1;g>=1;--g)if(p=f>0?g/r(-f):g*r(f),!(p<c)){if(p>u)break;v.push(p)}v.length*2<m&&(v=qr(c,u,m))}else v=qr(f,h,Math.min(h-f,m)).map(r);return d?v.reverse():v},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Fi(l)).precision==null&&(l.trim=!0),l=Pa(l)),s===1/0)return l;const c=Math.max(1,n*s/t.ticks().length);return u=>{let d=u/r(Math.round(a(u)));return d*n<n-.5&&(d*=n),d<=c?l(u):""}},t.nice=()=>i(tf(i(),{floor:s=>r(Math.floor(a(s))),ceil:s=>r(Math.ceil(a(s)))})),t}function sf(){const e=fT(zo()).domain([1,10]);return e.copy=()=>Sa(e,sf()).base(e.base()),Li.apply(e,arguments),e}var hT=b((()=>{Qt(),Vo(),nf(),vn(),si()}));function lf(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function cf(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function gT(e){var t=1,i=e(lf(t),cf(t));return i.constant=function(n){return arguments.length?e(lf(t=+n),cf(t)):t},Jd(i)}function uf(){var e=gT(zo());return e.copy=function(){return Sa(e,uf()).constant(e.constant())},Li.apply(e,arguments)}var vT=b((()=>{ef(),vn(),si()}));function pT(e){return new Date(e)}function mT(e){return e instanceof Date?+e:+new Date(+e)}function Go(e,t,i,n,a,r,o,s,l,c){var u=Bd(),d=u.invert,f=u.domain,h=c(".%L"),g=c(":%S"),p=c("%I:%M"),m=c("%I %p"),v=c("%a %d"),_=c("%b %d"),x=c("%B"),y=c("%Y");function $(T){return(l(T)<T?h:s(T)<T?g:o(T)<T?p:r(T)<T?m:n(T)<T?a(T)<T?v:_:i(T)<T?x:y)(T)}return u.invert=function(T){return new Date(d(T))},u.domain=function(T){return arguments.length?f(Array.from(T,mT)):f().map(pT)},u.ticks=function(T){var A=f();return e(A[0],A[A.length-1],T??10)},u.tickFormat=function(T,A){return A==null?$:c(A)},u.nice=function(T){var A=f();return(!T||typeof T.range!="function")&&(T=t(A[0],A[A.length-1],T??10)),T?f(tf(A,T)):u},u.copy=function(){return Sa(u,Go(e,t,i,n,a,r,o,s,l,c))},u}function _T(){return Li.apply(Go(Jc,eu,ft,ea,qi,yi,Qn,qn,Et,no).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var df=b((()=>{Jr(),ro(),vn(),si(),nf()}));function xT(){return Li.apply(Go(Kc,Qc,ht,ta,Qi,Zi,Jn,Kn,Et,ao).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}var yT=b((()=>{Jr(),ro(),df(),si()})),bT=b((()=>{Qt(),si(),Iw(),ef(),Nd(),hT(),vT(),vn(),df(),yT(),Ct(),Qd()}));function ae(e){return function(){return e}}var pn=b((()=>{}));function wT(e){return e>1?0:e<-1?zi:Math.acos(e)}function ff(e){return e>=1?mn:e<=-1?-mn:Math.asin(e)}var Uo,Ie,Pt,hf,Fa,ot,li,TT,zi,mn,_n,za=b((()=>{Uo=Math.abs,Ie=Math.atan2,Pt=Math.cos,hf=Math.max,Fa=Math.min,ot=Math.sin,li=Math.sqrt,TT=1e-12,zi=Math.PI,mn=zi/2,_n=2*zi}));function gf(e){this._+=e[0];for(let t=1,i=e.length;t<i;++t)this._+=arguments[t]+e[t]}function $T(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return gf;const i=10**t;return function(n){this._+=n[0];for(let a=1,r=n.length;a<r;++a)this._+=Math.round(arguments[a]*i)/i+n[a]}}function AT(){return new Na}var Ia,Oa,Dt,vf,Na,ST=b((()=>{Ia=Math.PI,Oa=2*Ia,Dt=1e-6,vf=Oa-Dt,Na=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?gf:$T(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,i,n){this._append`Q${+e},${+t},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(e,t,i,n,a,r){this._append`C${+e},${+t},${+i},${+n},${this._x1=+a},${this._y1=+r}`}arcTo(e,t,i,n,a){if(e=+e,t=+t,i=+i,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let r=this._x1,o=this._y1,s=i-e,l=n-t,c=r-e,u=o-t,d=c*c+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Dt)if(!(Math.abs(u*s-l*c)>Dt)||!a)this._append`L${this._x1=e},${this._y1=t}`;else{let f=i-r,h=n-o,g=s*s+l*l,p=f*f+h*h,m=Math.sqrt(g),v=Math.sqrt(d),_=a*Math.tan((Ia-Math.acos((g+d-p)/(2*m*v)))/2),x=_/v,y=_/m;Math.abs(x-1)>Dt&&this._append`L${e+x*c},${t+x*u}`,this._append`A${a},${a},0,0,${+(u*f>c*h)},${this._x1=e+y*s},${this._y1=t+y*l}`}}arc(e,t,i,n,a,r){if(e=+e,t=+t,i=+i,r=!!r,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),s=i*Math.sin(n),l=e+o,c=t+s,u=1^r,d=r?n-a:a-n;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Dt||Math.abs(this._y1-c)>Dt)&&this._append`L${l},${c}`,i&&(d<0&&(d=d%Oa+Oa),d>vf?this._append`A${i},${i},0,1,${u},${e-o},${t-s}A${i},${i},0,1,${u},${this._x1=l},${this._y1=c}`:d>Dt&&this._append`A${i},${i},0,${+(d>=Ia)},${u},${this._x1=e+i*Math.cos(a)},${this._y1=t+i*Math.sin(a)}`)}rect(e,t,i,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}},AT.prototype=Na.prototype})),kT=b((()=>{ST()}));function Ho(e){let t=3;return e.digits=function(i){if(!arguments.length)return t;if(i==null)t=null;else{const n=Math.floor(i);if(!(n>=0))throw new RangeError(`invalid digits: ${i}`);t=n}return e},()=>new Na(t)}var Ba=b((()=>{kT()}));function ET(e){return e.innerRadius}function CT(e){return e.outerRadius}function RT(e){return e.startAngle}function MT(e){return e.endAngle}function LT(e){return e&&e.padAngle}function PT(e,t,i,n,a,r,o,s){var l=i-e,c=n-t,u=o-a,d=s-r,f=d*l-u*c;if(!(f*f<1e-12))return f=(u*(t-r)-d*(e-a))/f,[e+f*l,t+f*c]}function Xa(e,t,i,n,a,r,o){var s=e-i,l=t-n,c=(o?r:-r)/li(s*s+l*l),u=c*l,d=-c*s,f=e+u,h=t+d,g=i+u,p=n+d,m=(f+g)/2,v=(h+p)/2,_=g-f,x=p-h,y=_*_+x*x,$=a-r,T=f*p-g*h,A=(x<0?-1:1)*li(hf(0,$*$*y-T*T)),S=(T*x-_*A)/y,R=(-T*_-x*A)/y,C=(T*x+_*A)/y,E=(-T*_+x*A)/y,k=S-m,P=R-v,w=C-m,D=E-v;return k*k+P*P>w*w+D*D&&(S=C,R=E),{cx:S,cy:R,x01:-u,y01:-d,x11:S*(a/$-1),y11:R*(a/$-1)}}function pf(){var e=ET,t=CT,i=ae(0),n=null,a=RT,r=MT,o=LT,s=null,l=Ho(c);function c(){var u,d,f=+e.apply(this,arguments),h=+t.apply(this,arguments),g=a.apply(this,arguments)-mn,p=r.apply(this,arguments)-mn,m=Uo(p-g),v=p>g;if(s||(s=u=l()),h<f&&(d=h,h=f,f=d),!(h>1e-12))s.moveTo(0,0);else if(m>_n-1e-12)s.moveTo(h*Pt(g),h*ot(g)),s.arc(0,0,h,g,p,!v),f>1e-12&&(s.moveTo(f*Pt(p),f*ot(p)),s.arc(0,0,f,p,g,v));else{var _=g,x=p,y=g,$=p,T=m,A=m,S=o.apply(this,arguments)/2,R=S>1e-12&&(n?+n.apply(this,arguments):li(f*f+h*h)),C=Fa(Uo(h-f)/2,+i.apply(this,arguments)),E=C,k=C,P,w;if(R>1e-12){var D=ff(R/f*ot(S)),L=ff(R/h*ot(S));(T-=D*2)>1e-12?(D*=v?1:-1,y+=D,$-=D):(T=0,y=$=(g+p)/2),(A-=L*2)>1e-12?(L*=v?1:-1,_+=L,x-=L):(A=0,_=x=(g+p)/2)}var M=h*Pt(_),z=h*ot(_),I=f*Pt($),O=f*ot($);if(C>1e-12){var X=h*Pt(x),V=h*ot(x),fe=f*Pt(y),ie=f*ot(y),U;if(m<zi)if(U=PT(M,z,fe,ie,X,V,I,O)){var Y=M-U[0],Z=z-U[1],re=X-U[0],N=V-U[1],W=1/ot(wT((Y*re+Z*N)/(li(Y*Y+Z*Z)*li(re*re+N*N)))/2),K=li(U[0]*U[0]+U[1]*U[1]);E=Fa(C,(f-K)/(W-1)),k=Fa(C,(h-K)/(W+1))}else E=k=0}A>1e-12?k>1e-12?(P=Xa(fe,ie,M,z,h,k,v),w=Xa(X,V,I,O,h,k,v),s.moveTo(P.cx+P.x01,P.cy+P.y01),k<C?s.arc(P.cx,P.cy,k,Ie(P.y01,P.x01),Ie(w.y01,w.x01),!v):(s.arc(P.cx,P.cy,k,Ie(P.y01,P.x01),Ie(P.y11,P.x11),!v),s.arc(0,0,h,Ie(P.cy+P.y11,P.cx+P.x11),Ie(w.cy+w.y11,w.cx+w.x11),!v),s.arc(w.cx,w.cy,k,Ie(w.y11,w.x11),Ie(w.y01,w.x01),!v))):(s.moveTo(M,z),s.arc(0,0,h,_,x,!v)):s.moveTo(M,z),!(f>1e-12)||!(T>1e-12)?s.lineTo(I,O):E>1e-12?(P=Xa(I,O,X,V,f,-E,v),w=Xa(M,z,fe,ie,f,-E,v),s.lineTo(P.cx+P.x01,P.cy+P.y01),E<C?s.arc(P.cx,P.cy,E,Ie(P.y01,P.x01),Ie(w.y01,w.x01),!v):(s.arc(P.cx,P.cy,E,Ie(P.y01,P.x01),Ie(P.y11,P.x11),!v),s.arc(0,0,f,Ie(P.cy+P.y11,P.cx+P.x11),Ie(w.cy+w.y11,w.cx+w.x11),v),s.arc(w.cx,w.cy,E,Ie(w.y11,w.x11),Ie(w.y01,w.x01),!v))):s.arc(0,0,f,$,y,v)}if(s.closePath(),u)return s=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+a.apply(this,arguments)+ +r.apply(this,arguments))/2-zi/2;return[Pt(d)*u,ot(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:ae(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:ae(+u),c):t},c.cornerRadius=function(u){return arguments.length?(i=typeof u=="function"?u:ae(+u),c):i},c.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:ae(+u),c):n},c.startAngle=function(u){return arguments.length?(a=typeof u=="function"?u:ae(+u),c):a},c.endAngle=function(u){return arguments.length?(r=typeof u=="function"?u:ae(+u),c):r},c.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:ae(+u),c):o},c.context=function(u){return arguments.length?(s=u??null,c):s},c}var DT=b((()=>{pn(),za(),Ba()}));function Wo(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}var FT,Va=b((()=>{FT=Array.prototype.slice}));function mf(e){this._context=e}function Yo(e){return new mf(e)}var jo=b((()=>{mf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}}}));function _f(e){return e[0]}function xf(e){return e[1]}var Zo=b((()=>{}));function yf(e,t){var i=ae(!0),n=null,a=Yo,r=null,o=Ho(s);e=typeof e=="function"?e:e===void 0?_f:ae(e),t=typeof t=="function"?t:t===void 0?xf:ae(t);function s(l){var c,u=(l=Wo(l)).length,d,f=!1,h;for(n==null&&(r=a(h=o())),c=0;c<=u;++c)!(c<u&&i(d=l[c],c,l))===f&&((f=!f)?r.lineStart():r.lineEnd()),f&&r.point(+e(d,c,l),+t(d,c,l));if(h)return r=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:ae(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ae(+l),s):t},s.defined=function(l){return arguments.length?(i=typeof l=="function"?l:ae(!!l),s):i},s.curve=function(l){return arguments.length?(a=l,n!=null&&(r=a(n)),s):a},s.context=function(l){return arguments.length?(l==null?n=r=null:r=a(n=l),s):n},s}var bf=b((()=>{Va(),pn(),jo(),Ba(),Zo()}));function zT(e,t,i){var n=null,a=ae(!0),r=null,o=Yo,s=null,l=Ho(c);e=typeof e=="function"?e:e===void 0?_f:ae(+e),t=typeof t=="function"?t:ae(t===void 0?0:+t),i=typeof i=="function"?i:i===void 0?xf:ae(+i);function c(d){var f,h,g,p=(d=Wo(d)).length,m,v=!1,_,x=new Array(p),y=new Array(p);for(r==null&&(s=o(_=l())),f=0;f<=p;++f){if(!(f<p&&a(m=d[f],f,d))===v)if(v=!v)h=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=f-1;g>=h;--g)s.point(x[g],y[g]);s.lineEnd(),s.areaEnd()}v&&(x[f]=+e(m,f,d),y[f]=+t(m,f,d),s.point(n?+n(m,f,d):x[f],i?+i(m,f,d):y[f]))}if(_)return s=null,_+""||null}function u(){return yf().defined(a).curve(o).context(r)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:ae(+d),n=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:ae(+d),c):e},c.x1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:ae(+d),c):n},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:ae(+d),i=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:ae(+d),c):t},c.y1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:ae(+d),c):i},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(i)},c.lineX1=function(){return u().x(n).y(t)},c.defined=function(d){return arguments.length?(a=typeof d=="function"?d:ae(!!d),c):a},c.curve=function(d){return arguments.length?(o=d,r!=null&&(s=o(r)),c):o},c.context=function(d){return arguments.length?(d==null?r=s=null:s=o(r=d),c):r},c}var IT=b((()=>{Va(),pn(),jo(),bf(),Ba(),Zo()}));function OT(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}var NT=b((()=>{}));function BT(e){return e}var XT=b((()=>{}));function VT(){var e=BT,t=OT,i=null,n=ae(0),a=ae(_n),r=ae(0);function o(s){var l,c=(s=Wo(s)).length,u,d,f=0,h=new Array(c),g=new Array(c),p=+n.apply(this,arguments),m=Math.min(_n,Math.max(-_n,a.apply(this,arguments)-p)),v,_=Math.min(Math.abs(m)/c,r.apply(this,arguments)),x=_*(m<0?-1:1),y;for(l=0;l<c;++l)(y=g[h[l]=l]=+e(s[l],l,s))>0&&(f+=y);for(t!=null?h.sort(function($,T){return t(g[$],g[T])}):i!=null&&h.sort(function($,T){return i(s[$],s[T])}),l=0,d=f?(m-c*x)/f:0;l<c;++l,p=v)u=h[l],y=g[u],v=p+(y>0?y*d:0)+x,g[u]={data:s[u],index:l,value:y,startAngle:p,endAngle:v,padAngle:_};return g}return o.value=function(s){return arguments.length?(e=typeof s=="function"?s:ae(+s),o):e},o.sortValues=function(s){return arguments.length?(t=s,i=null,o):t},o.sort=function(s){return arguments.length?(i=s,t=null,o):i},o.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:ae(+s),o):n},o.endAngle=function(s){return arguments.length?(a=typeof s=="function"?s:ae(+s),o):a},o.padAngle=function(s){return arguments.length?(r=typeof s=="function"?s:ae(+s),o):r},o}var GT=b((()=>{Va(),pn(),NT(),XT(),za()}));function Ft(){}var Ga=b((()=>{}));function Ua(e,t,i){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+i)/6)}function Ha(e){this._context=e}function UT(e){return new Ha(e)}var Wa=b((()=>{Ha.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ua(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ua(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}}));function wf(e){this._context=e}function HT(e){return new wf(e)}var WT=b((()=>{Ga(),Wa(),wf.prototype={areaStart:Ft,areaEnd:Ft,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ua(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}}));function Tf(e){this._context=e}function YT(e){return new Tf(e)}var jT=b((()=>{Wa(),Tf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(i,n):this._context.moveTo(i,n);break;case 3:this._point=4;default:Ua(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}}));function $f(e,t){this._basis=new Ha(e),this._beta=t}var Af,ZT=b((()=>{Wa(),$f.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,i=e.length-1;if(i>0)for(var n=e[0],a=t[0],r=e[i]-n,o=t[i]-a,s=-1,l;++s<=i;)l=s/i,this._basis.point(this._beta*e[s]+(1-this._beta)*(n+l*r),this._beta*t[s]+(1-this._beta)*(a+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Af=(function e(t){function i(n){return t===1?new Ha(n):new $f(n,t)}return i.beta=function(n){return e(+n)},i})(.85)}));function Ya(e,t,i){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-i),e._x2,e._y2)}function qo(e,t){this._context=e,this._k=(1-t)/6}var Sf,ja=b((()=>{qo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ya(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ya(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},Sf=(function e(t){function i(n){return new qo(n,t)}return i.tension=function(n){return e(+n)},i})(0)}));function Ko(e,t){this._context=e,this._k=(1-t)/6}var kf,Ef=b((()=>{Ga(),ja(),Ko.prototype={areaStart:Ft,areaEnd:Ft,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ya(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},kf=(function e(t){function i(n){return new Ko(n,t)}return i.tension=function(n){return e(+n)},i})(0)}));function Qo(e,t){this._context=e,this._k=(1-t)/6}var Cf,Rf=b((()=>{ja(),Qo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ya(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},Cf=(function e(t){function i(n){return new Qo(n,t)}return i.tension=function(n){return e(+n)},i})(0)}));function Jo(e,t,i){var n=e._x1,a=e._y1,r=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,a=(a*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>1e-12){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);r=(r*c+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*c+e._y1*e._l23_2a-i*e._l12_2a)/u}e._context.bezierCurveTo(n,a,r,o,e._x2,e._y2)}function Mf(e,t){this._context=e,this._alpha=t}var Lf,es=b((()=>{za(),ja(),Mf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Jo(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},Lf=(function e(t){function i(n){return t?new Mf(n,t):new qo(n,0)}return i.alpha=function(n){return e(+n)},i})(.5)}));function Pf(e,t){this._context=e,this._alpha=t}var Df,qT=b((()=>{Ef(),Ga(),es(),Pf.prototype={areaStart:Ft,areaEnd:Ft,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Jo(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},Df=(function e(t){function i(n){return t?new Pf(n,t):new Ko(n,0)}return i.alpha=function(n){return e(+n)},i})(.5)}));function Ff(e,t){this._context=e,this._alpha=t}var zf,KT=b((()=>{Rf(),es(),Ff.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Jo(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},zf=(function e(t){function i(n){return t?new Ff(n,t):new Qo(n,0)}return i.alpha=function(n){return e(+n)},i})(.5)}));function If(e){this._context=e}function QT(e){return new If(e)}var JT=b((()=>{Ga(),If.prototype={areaStart:Ft,areaEnd:Ft,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}}}));function Of(e){return e<0?-1:1}function Nf(e,t,i){var n=e._x1-e._x0,a=t-e._x1,r=(e._y1-e._y0)/(n||a<0&&-0),o=(i-e._y1)/(a||n<0&&-0),s=(r*a+o*n)/(n+a);return(Of(r)+Of(o))*Math.min(Math.abs(r),Math.abs(o),.5*Math.abs(s))||0}function Bf(e,t){var i=e._x1-e._x0;return i?(3*(e._y1-e._y0)/i-t)/2:t}function ts(e,t,i){var n=e._x0,a=e._y0,r=e._x1,o=e._y1,s=(r-n)/3;e._context.bezierCurveTo(n+s,a+s*t,r-s,o-s*i,r,o)}function Za(e){this._context=e}function Xf(e){this._context=new Vf(e)}function Vf(e){this._context=e}function e1(e){return new Za(e)}function t1(e){return new Xf(e)}var i1=b((()=>{Za.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ts(this,this._t0,Bf(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var i=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ts(this,Bf(this,i=Nf(this,e,t)),i);break;default:ts(this,this._t0,i=Nf(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=i}}},(Xf.prototype=Object.create(Za.prototype)).point=function(e,t){Za.prototype.point.call(this,t,e)},Vf.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,i,n,a,r){this._context.bezierCurveTo(t,e,n,i,r,a)}}}));function Gf(e){this._context=e}function Uf(e){var t,i=e.length-1,n,a=new Array(i),r=new Array(i),o=new Array(i);for(a[0]=0,r[0]=2,o[0]=e[0]+2*e[1],t=1;t<i-1;++t)a[t]=1,r[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[i-1]=2,r[i-1]=7,o[i-1]=8*e[i-1]+e[i],t=1;t<i;++t)n=a[t]/r[t-1],r[t]-=n,o[t]-=n*o[t-1];for(a[i-1]=o[i-1]/r[i-1],t=i-2;t>=0;--t)a[t]=(o[t]-a[t+1])/r[t];for(r[i-1]=(e[i]+a[i-1])/2,t=0;t<i-1;++t)r[t]=2*e[t+1]-a[t+1];return[a,r]}function n1(e){return new Gf(e)}var a1=b((()=>{Gf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,i=e.length;if(i)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),i===2)this._context.lineTo(e[1],t[1]);else for(var n=Uf(e),a=Uf(t),r=0,o=1;o<i;++r,++o)this._context.bezierCurveTo(n[0][r],a[0][r],n[1][r],a[1][r],e[o],t[o]);(this._line||this._line!==0&&i===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}}}));function qa(e,t){this._context=e,this._t=t}function r1(e){return new qa(e,.5)}function o1(e){return new qa(e,0)}function s1(e){return new qa(e,1)}var l1=b((()=>{qa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var i=this._x*(1-this._t)+e*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,t)}break}this._x=e,this._y=t}}})),c1=b((()=>{DT(),IT(),bf(),GT(),jo(),Va(),pn(),Ba(),Zo(),za(),WT(),jT(),Wa(),ZT(),Ef(),Rf(),ja(),qT(),KT(),es(),JT(),i1(),a1(),l1()}));function u1(e){return e}var d1=b((()=>{}));function f1(e){return"translate("+e+",0)"}function h1(e){return"translate(0,"+e+")"}function g1(e){return t=>+e(t)}function v1(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),i=>+e(i)+t}function p1(){return!this.__axis}function Ka(e,t){var i=[],n=null,a=null,r=6,o=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===xn||e===Ii?-1:1,u=e===Ii||e===yn?"x":"y",d=e===xn||e===Qa?f1:h1;function f(h){var g=n??(t.ticks?t.ticks.apply(t,i):t.domain()),p=a??(t.tickFormat?t.tickFormat.apply(t,i):u1),m=Math.max(r,0)+s,v=t.range(),_=+v[0]+l,x=+v[v.length-1]+l,y=(t.bandwidth?v1:g1)(t.copy(),l),$=h.selection?h.selection():h,T=$.selectAll(".domain").data([null]),A=$.selectAll(".tick").data(g,t).order(),S=A.exit(),R=A.enter().append("g").attr("class","tick"),C=A.select("line"),E=A.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(R),C=C.merge(R.append("line").attr("stroke","currentColor").attr(u+"2",c*r)),E=E.merge(R.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",e===xn?"0em":e===Qa?"0.71em":"0.32em")),h!==$&&(T=T.transition(h),A=A.transition(h),C=C.transition(h),E=E.transition(h),S=S.transition(h).attr("opacity",is).attr("transform",function(k){return isFinite(k=y(k))?d(k+l):this.getAttribute("transform")}),R.attr("opacity",is).attr("transform",function(k){var P=this.parentNode.__axis;return d((P&&isFinite(P=P(k))?P:y(k))+l)})),S.remove(),T.attr("d",e===Ii||e===yn?o?"M"+c*o+","+_+"H"+l+"V"+x+"H"+c*o:"M"+l+","+_+"V"+x:o?"M"+_+","+c*o+"V"+l+"H"+x+"V"+c*o:"M"+_+","+l+"H"+x),A.attr("opacity",1).attr("transform",function(k){return d(y(k)+l)}),C.attr(u+"2",c*r),E.attr(u,c*m).text(p),$.filter(p1).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===yn?"start":e===Ii?"end":"middle"),$.each(function(){this.__axis=y})}return f.scale=function(h){return arguments.length?(t=h,f):t},f.ticks=function(){return i=Array.from(arguments),f},f.tickArguments=function(h){return arguments.length?(i=h==null?[]:Array.from(h),f):i.slice()},f.tickValues=function(h){return arguments.length?(n=h==null?null:Array.from(h),f):n&&n.slice()},f.tickFormat=function(h){return arguments.length?(a=h,f):a},f.tickSize=function(h){return arguments.length?(r=o=+h,f):r},f.tickSizeInner=function(h){return arguments.length?(r=+h,f):r},f.tickSizeOuter=function(h){return arguments.length?(o=+h,f):o},f.tickPadding=function(h){return arguments.length?(s=+h,f):s},f.offset=function(h){return arguments.length?(l=+h,f):l},f}function m1(e){return Ka(xn,e)}function _1(e){return Ka(yn,e)}function Hf(e){return Ka(Qa,e)}function Wf(e){return Ka(Ii,e)}var xn,yn,Qa,Ii,is,x1=b((()=>{d1(),xn=1,yn=2,Qa=3,Ii=4,is=1e-6})),y1=b((()=>{x1()}));function b1(e){var t=0,i=e.children,n=i&&i.length;if(!n)t=1;else for(;--n>=0;)t+=i[n].value;e.value=t}function w1(){return this.eachAfter(b1)}var T1=b((()=>{}));function $1(e,t){let i=-1;for(const n of this)e.call(t,n,++i,this);return this}var A1=b((()=>{}));function S1(e,t){for(var i=this,n=[i],a,r,o=-1;i=n.pop();)if(e.call(t,i,++o,this),a=i.children)for(r=a.length-1;r>=0;--r)n.push(a[r]);return this}var k1=b((()=>{}));function E1(e,t){for(var i=this,n=[i],a=[],r,o,s,l=-1;i=n.pop();)if(a.push(i),r=i.children)for(o=0,s=r.length;o<s;++o)n.push(r[o]);for(;i=a.pop();)e.call(t,i,++l,this);return this}var C1=b((()=>{}));function R1(e,t){let i=-1;for(const n of this)if(e.call(t,n,++i,this))return n}var M1=b((()=>{}));function L1(e){return this.eachAfter(function(t){for(var i=+e(t.data)||0,n=t.children,a=n&&n.length;--a>=0;)i+=n[a].value;t.value=i})}var P1=b((()=>{}));function D1(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}var F1=b((()=>{}));function z1(e){for(var t=this,i=I1(t,e),n=[t];t!==i;)t=t.parent,n.push(t);for(var a=n.length;e!==i;)n.splice(a,0,e),e=e.parent;return n}function I1(e,t){if(e===t)return e;var i=e.ancestors(),n=t.ancestors(),a=null;for(e=i.pop(),t=n.pop();e===t;)a=e,e=i.pop(),t=n.pop();return a}var O1=b((()=>{}));function N1(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var B1=b((()=>{}));function X1(){return Array.from(this)}var V1=b((()=>{}));function G1(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}var U1=b((()=>{}));function H1(){var e=this,t=[];return e.each(function(i){i!==e&&t.push({source:i.parent,target:i})}),t}var W1=b((()=>{}));function*Y1(){var e=this,t,i=[e],n,a,r;do for(t=i.reverse(),i=[];e=t.pop();)if(yield e,n=e.children)for(a=0,r=n.length;a<r;++a)i.push(n[a]);while(i.length)}var j1=b((()=>{}));function ns(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=K1)):t===void 0&&(t=q1);for(var i=new Ja(e),n,a=[i],r,o,s,l;n=a.pop();)if((o=t(n.data))&&(l=(o=Array.from(o)).length))for(n.children=o,s=l-1;s>=0;--s)a.push(r=o[s]=new Ja(o[s])),r.parent=n,r.depth=n.depth+1;return i.eachBefore(J1)}function Z1(){return ns(this).eachBefore(Q1)}function q1(e){return e.children}function K1(e){return Array.isArray(e)?e[1]:null}function Q1(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function J1(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Ja(e){this.data=e,this.depth=this.height=0,this.parent=null}var e$=b((()=>{T1(),A1(),k1(),C1(),M1(),P1(),F1(),O1(),B1(),V1(),U1(),W1(),j1(),Ja.prototype=ns.prototype={constructor:Ja,count:w1,each:$1,eachAfter:E1,eachBefore:S1,find:R1,sum:L1,sort:D1,path:z1,ancestors:N1,descendants:X1,leaves:G1,links:H1,copy:Z1,[Symbol.iterator]:Y1}}));function t$(e){if(typeof e!="function")throw new Error;return e}var Yf=b((()=>{}));function bn(){return 0}function wn(e){return function(){return e}}var jf=b((()=>{}));function i$(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}var Zf=b((()=>{}));function er(e,t,i,n,a){for(var r=e.children,o,s=-1,l=r.length,c=e.value&&(n-t)/e.value;++s<l;)o=r[s],o.y0=i,o.y1=a,o.x0=t,o.x1=t+=o.value*c}var tr=b((()=>{}));function ir(e,t,i,n,a){for(var r=e.children,o,s=-1,l=r.length,c=e.value&&(a-i)/e.value;++s<l;)o=r[s],o.x0=t,o.x1=n,o.y0=i,o.y1=i+=o.value*c}var nr=b((()=>{}));function qf(e,t,i,n,a,r){for(var o=[],s=t.children,l,c,u=0,d=0,f=s.length,h,g,p=t.value,m,v,_,x,y,$,T;u<f;){h=a-i,g=r-n;do m=s[d++].value;while(!m&&d<f);for(v=_=m,$=Math.max(g/h,h/g)/(p*e),T=m*m*$,y=Math.max(_/T,T/v);d<f;++d){if(m+=c=s[d].value,c<v&&(v=c),c>_&&(_=c),T=m*m*$,x=Math.max(_/T,T/v),x>y){m-=c;break}y=x}o.push(l={value:m,dice:h<g,children:s.slice(u,d)}),l.dice?er(l,i,n,a,p?n+=g*m/p:r):ir(l,i,n,p?i+=h*m/p:a,r),p-=m,u=d}return o}var as,rs,os=b((()=>{tr(),nr(),as=(1+Math.sqrt(5))/2,rs=(function e(t){function i(n,a,r,o,s){qf(t,n,a,r,o,s)}return i.ratio=function(n){return e((n=+n)>1?n:1)},i})(as)}));function n$(){var e=rs,t=!1,i=1,n=1,a=[0],r=bn,o=bn,s=bn,l=bn,c=bn;function u(f){return f.x0=f.y0=0,f.x1=i,f.y1=n,f.eachBefore(d),a=[0],t&&f.eachBefore(i$),f}function d(f){var h=a[f.depth],g=f.x0+h,p=f.y0+h,m=f.x1-h,v=f.y1-h;m<g&&(g=m=(g+m)/2),v<p&&(p=v=(p+v)/2),f.x0=g,f.y0=p,f.x1=m,f.y1=v,f.children&&(h=a[f.depth+1]=r(f)/2,g+=c(f)-h,p+=o(f)-h,m-=s(f)-h,v-=l(f)-h,m<g&&(g=m=(g+m)/2),v<p&&(p=v=(p+v)/2),e(f,g,p,m,v))}return u.round=function(f){return arguments.length?(t=!!f,u):t},u.size=function(f){return arguments.length?(i=+f[0],n=+f[1],u):[i,n]},u.tile=function(f){return arguments.length?(e=t$(f),u):e},u.padding=function(f){return arguments.length?u.paddingInner(f).paddingOuter(f):u.paddingInner()},u.paddingInner=function(f){return arguments.length?(r=typeof f=="function"?f:wn(+f),u):r},u.paddingOuter=function(f){return arguments.length?u.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):u.paddingTop()},u.paddingTop=function(f){return arguments.length?(o=typeof f=="function"?f:wn(+f),u):o},u.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:wn(+f),u):s},u.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:wn(+f),u):l},u.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:wn(+f),u):c},u}var a$=b((()=>{Zf(),os(),Yf(),jf()}));function Kf(e,t,i,n,a){var r=e.children,o,s=r.length,l,c=new Array(s+1);for(c[0]=l=o=0;o<s;++o)c[o+1]=l+=r[o].value;u(0,s,e.value,t,i,n,a);function u(d,f,h,g,p,m,v){if(d>=f-1){var _=r[d];_.x0=g,_.y0=p,_.x1=m,_.y1=v;return}for(var x=c[d],y=h/2+x,$=d+1,T=f-1;$<T;){var A=$+T>>>1;c[A]<y?$=A+1:T=A}y-c[$-1]<c[$]-y&&d+1<$&&--$;var S=c[$]-x,R=h-S;if(m-g>v-p){var C=h?(g*R+m*S)/h:m;u(d,$,S,g,p,C,v),u($,f,R,C,p,m,v)}else{var E=h?(p*R+v*S)/h:v;u(d,$,S,g,p,m,E),u($,f,R,g,E,m,v)}}}var r$=b((()=>{}));function o$(e,t,i,n,a){(e.depth&1?ir:er)(e,t,i,n,a)}var s$=b((()=>{tr(),nr()})),Qf,l$=b((()=>{tr(),nr(),os(),Qf=(function e(t){function i(n,a,r,o,s){if((l=n._squarify)&&l.ratio===t)for(var l,c,u,d,f=-1,h,g=l.length,p=n.value;++f<g;){for(c=l[f],u=c.children,d=c.value=0,h=u.length;d<h;++d)c.value+=u[d].value;c.dice?er(c,a,r,o,p?r+=(s-r)*c.value/p:s):ir(c,a,r,p?a+=(o-a)*c.value/p:o,s),p-=c.value}else n._squarify=l=qf(t,n,a,r,o,s),l.ratio=t}return i.ratio=function(n){return e((n=+n)>1?n:1)},i})(as)})),c$=b((()=>{e$(),Yf(),jf(),Zf(),tr(),a$(),r$(),nr(),s$(),os(),l$()})),Tn,u$=b((()=>{Tn=e=>()=>e}));function d$(e,{sourceEvent:t,target:i,transform:n,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:a}})}var f$=b((()=>{}));function Tt(e,t,i){this.k=e,this.x=t,this.y=i}function ss(e){for(;!e.__zoom;)if(!(e=e.parentNode))return st;return e.__zoom}var st,Jf=b((()=>{Tt.prototype={constructor:Tt,scale:function(e){return e===1?this:new Tt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Tt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},st=new Tt(1,0,0),ss.prototype=Tt.prototype}));function ls(e){e.stopImmediatePropagation()}function $n(e){e.preventDefault(),e.stopImmediatePropagation()}var h$=b((()=>{}));function g$(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function v$(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function eh(){return this.__zoom||st}function p$(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function m$(){return navigator.maxTouchPoints||"ontouchstart"in this}function _$(e,t,i){var n=e.invertX(t[0][0])-i[0][0],a=e.invertX(t[1][0])-i[1][0],r=e.invertY(t[0][1])-i[0][1],o=e.invertY(t[1][1])-i[1][1];return e.translate(a>n?(n+a)/2:Math.min(0,n)||Math.max(0,a),o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o))}function x$(){var e=g$,t=v$,i=_$,n=p$,a=m$,r=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,l=sd,c=an("start","zoom","end"),u,d,f,h=500,g=150,p=0,m=10;function v(w){w.property("__zoom",eh).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",R).on("dblclick.zoom",C).filter(a).on("touchstart.zoom",E).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(w,D,L,M){var z=w.selection?w.selection():w;z.property("__zoom",eh),w!==z?$(w,D,L,M):z.interrupt().each(function(){T(this,arguments).event(M).start().zoom(null,typeof D=="function"?D.apply(this,arguments):D).end()})},v.scaleBy=function(w,D,L,M){v.scaleTo(w,function(){return this.__zoom.k*(typeof D=="function"?D.apply(this,arguments):D)},L,M)},v.scaleTo=function(w,D,L,M){v.transform(w,function(){var z=t.apply(this,arguments),I=this.__zoom,O=L==null?y(z):typeof L=="function"?L.apply(this,arguments):L,X=I.invert(O),V=typeof D=="function"?D.apply(this,arguments):D;return i(x(_(I,V),O,X),z,o)},L,M)},v.translateBy=function(w,D,L,M){v.transform(w,function(){return i(this.__zoom.translate(typeof D=="function"?D.apply(this,arguments):D,typeof L=="function"?L.apply(this,arguments):L),t.apply(this,arguments),o)},null,M)},v.translateTo=function(w,D,L,M,z){v.transform(w,function(){var I=t.apply(this,arguments),O=this.__zoom,X=M==null?y(I):typeof M=="function"?M.apply(this,arguments):M;return i(st.translate(X[0],X[1]).scale(O.k).translate(typeof D=="function"?-D.apply(this,arguments):-D,typeof L=="function"?-L.apply(this,arguments):-L),I,o)},M,z)};function _(w,D){return D=Math.max(r[0],Math.min(r[1],D)),D===w.k?w:new Tt(D,w.x,w.y)}function x(w,D,L){var M=D[0]-L[0]*w.k,z=D[1]-L[1]*w.k;return M===w.x&&z===w.y?w:new Tt(w.k,M,z)}function y(w){return[(+w[0][0]+ +w[1][0])/2,(+w[0][1]+ +w[1][1])/2]}function $(w,D,L,M){w.on("start.zoom",function(){T(this,arguments).event(M).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(M).end()}).tween("zoom",function(){var z=this,I=arguments,O=T(z,I).event(M),X=t.apply(z,I),V=L==null?y(X):typeof L=="function"?L.apply(z,I):L,fe=Math.max(X[1][0]-X[0][0],X[1][1]-X[0][1]),ie=z.__zoom,U=typeof D=="function"?D.apply(z,I):D,Y=l(ie.invert(V).concat(fe/ie.k),U.invert(V).concat(fe/U.k));return function(Z){if(Z===1)Z=U;else{var re=Y(Z),N=fe/re[2];Z=new Tt(N,V[0]-re[0]*N,V[1]-re[1]*N)}O.zoom(null,Z)}})}function T(w,D,L){return!L&&w.__zooming||new A(w,D)}function A(w,D){this.that=w,this.args=D,this.active=0,this.sourceEvent=null,this.extent=t.apply(w,D),this.taps=0}A.prototype={event:function(w){return w&&(this.sourceEvent=w),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(w,D){return this.mouse&&w!=="mouse"&&(this.mouse[1]=D.invert(this.mouse[0])),this.touch0&&w!=="touch"&&(this.touch0[1]=D.invert(this.touch0[0])),this.touch1&&w!=="touch"&&(this.touch1[1]=D.invert(this.touch1[0])),this.that.__zoom=D,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(w){var D=B(this.that).datum();c.call(w,this.that,new d$(w,{sourceEvent:this.sourceEvent,target:v,type:w,transform:this.that.__zoom,dispatch:c}),D)}};function S(w,...D){if(!e.apply(this,arguments))return;var L=T(this,D).event(w),M=this.__zoom,z=Math.max(r[0],Math.min(r[1],M.k*Math.pow(2,n.apply(this,arguments)))),I=Ke(w);if(L.wheel)(L.mouse[0][0]!==I[0]||L.mouse[0][1]!==I[1])&&(L.mouse[1]=M.invert(L.mouse[0]=I)),clearTimeout(L.wheel);else{if(M.k===z)return;L.mouse=[I,M.invert(I)],Ri(this),L.start()}$n(w),L.wheel=setTimeout(O,g),L.zoom("mouse",i(x(_(M,z),L.mouse[0],L.mouse[1]),L.extent,o));function O(){L.wheel=null,L.end()}}function R(w,...D){if(f||!e.apply(this,arguments))return;var L=w.currentTarget,M=T(this,D,!0).event(w),z=B(w.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",fe,!0),I=Ke(w,L),O=w.clientX,X=w.clientY;so(w.view),ls(w),M.mouse=[I,this.__zoom.invert(I)],Ri(this),M.start();function V(ie){if($n(ie),!M.moved){var U=ie.clientX-O,Y=ie.clientY-X;M.moved=U*U+Y*Y>p}M.event(ie).zoom("mouse",i(x(M.that.__zoom,M.mouse[0]=Ke(ie,L),M.mouse[1]),M.extent,o))}function fe(ie){z.on("mousemove.zoom mouseup.zoom",null),lo(ie.view,M.moved),$n(ie),M.event(ie).end()}}function C(w,...D){if(e.apply(this,arguments)){var L=this.__zoom,M=Ke(w.changedTouches?w.changedTouches[0]:w,this),z=L.invert(M),I=L.k*(w.shiftKey?.5:2),O=i(x(_(L,I),M,z),t.apply(this,D),o);$n(w),s>0?B(this).transition().duration(s).call($,O,M,w):B(this).call(v.transform,O,M,w)}}function E(w,...D){if(e.apply(this,arguments)){var L=w.touches,M=L.length,z=T(this,D,w.changedTouches.length===M).event(w),I,O,X,V;for(ls(w),O=0;O<M;++O)X=L[O],V=Ke(X,this),V=[V,this.__zoom.invert(V),X.identifier],z.touch0?!z.touch1&&z.touch0[2]!==V[2]&&(z.touch1=V,z.taps=0):(z.touch0=V,I=!0,z.taps=1+!!u);u&&(u=clearTimeout(u)),I&&(z.taps<2&&(d=V[0],u=setTimeout(function(){u=null},h)),Ri(this),z.start())}}function k(w,...D){if(this.__zooming){var L=T(this,D).event(w),M=w.changedTouches,z=M.length,I,O,X,V;for($n(w),I=0;I<z;++I)O=M[I],X=Ke(O,this),L.touch0&&L.touch0[2]===O.identifier?L.touch0[0]=X:L.touch1&&L.touch1[2]===O.identifier&&(L.touch1[0]=X);if(O=L.that.__zoom,L.touch1){var fe=L.touch0[0],ie=L.touch0[1],U=L.touch1[0],Y=L.touch1[1],Z=(Z=U[0]-fe[0])*Z+(Z=U[1]-fe[1])*Z,re=(re=Y[0]-ie[0])*re+(re=Y[1]-ie[1])*re;O=_(O,Math.sqrt(Z/re)),X=[(fe[0]+U[0])/2,(fe[1]+U[1])/2],V=[(ie[0]+Y[0])/2,(ie[1]+Y[1])/2]}else if(L.touch0)X=L.touch0[0],V=L.touch0[1];else return;L.zoom("touch",i(x(O,X,V),L.extent,o))}}function P(w,...D){if(this.__zooming){var L=T(this,D).event(w),M=w.changedTouches,z=M.length,I,O;for(ls(w),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),I=0;I<z;++I)O=M[I],L.touch0&&L.touch0[2]===O.identifier?delete L.touch0:L.touch1&&L.touch1[2]===O.identifier&&delete L.touch1;if(L.touch1&&!L.touch0&&(L.touch0=L.touch1,delete L.touch1),L.touch0)L.touch0[1]=this.__zoom.invert(L.touch0[0]);else if(L.end(),L.taps===2&&(O=Ke(O,this),Math.hypot(d[0]-O[0],d[1]-O[1])<m)){var X=B(this).on("dblclick.zoom");X&&X.apply(this,arguments)}}}return v.wheelDelta=function(w){return arguments.length?(n=typeof w=="function"?w:Tn(+w),v):n},v.filter=function(w){return arguments.length?(e=typeof w=="function"?w:Tn(!!w),v):e},v.touchable=function(w){return arguments.length?(a=typeof w=="function"?w:Tn(!!w),v):a},v.extent=function(w){return arguments.length?(t=typeof w=="function"?w:Tn([[+w[0][0],+w[0][1]],[+w[1][0],+w[1][1]]]),v):t},v.scaleExtent=function(w){return arguments.length?(r[0]=+w[0],r[1]=+w[1],v):[r[0],r[1]]},v.translateExtent=function(w){return arguments.length?(o[0][0]=+w[0][0],o[1][0]=+w[1][0],o[0][1]=+w[0][1],o[1][1]=+w[1][1],v):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},v.constrain=function(w){return arguments.length?(i=w,v):i},v.duration=function(w){return arguments.length?(s=+w,v):s},v.interpolate=function(w){return arguments.length?(l=w,v):l},v.on=function(){var w=c.on.apply(c,arguments);return w===c?v:w},v.clickDistance=function(w){return arguments.length?(p=(w=+w)*w,v):Math.sqrt(p)},v.tapDistance=function(w){return arguments.length?(m=+w,v):m},v}var y$=b((()=>{ra(),uo(),Ct(),Xe(),$o(),u$(),f$(),Jf(),h$()})),b$=b((()=>{y$(),Jf()})),w$=Dn({area:()=>Bs,areaLineRange:()=>Xs,areaSpline:()=>Gs,areaSplineRange:()=>Us,areaStep:()=>Hs,areaStepRange:()=>Vs,bar:()=>el,bb:()=>dl,bubble:()=>tl,candlestick:()=>il,default:()=>dl,donut:()=>Zs,funnel:()=>al,gauge:()=>qs,line:()=>Ws,pie:()=>Ks,polar:()=>Qs,radar:()=>Js,scatter:()=>nl,selection:()=>ll,spline:()=>Ys,step:()=>js,subchart:()=>cl,treemap:()=>rl,zoom:()=>ul});function Ae(e,t,i){if(i||arguments.length===2)for(var n=0,a=t.length,r;n<a;n++)(r||!(n in t))&&(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return e.concat(r||Array.prototype.slice.call(t))}function T$(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof global=="object"&&global!==null&&global.Object===Object&&global||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function $$(e){var t=typeof e?.requestAnimationFrame=="function"&&typeof e?.cancelAnimationFrame=="function",i=typeof e?.requestIdleCallback=="function"&&typeof e?.cancelIdleCallback=="function",n=function(r){return setTimeout(r,1)},a=function(r){return clearTimeout(r)};return[t?e.requestAnimationFrame:n,t?e.cancelAnimationFrame:a,i?e.requestIdleCallback:n,i?e.cancelIdleCallback:a]}function cs(e){return e.replace(/&colon;/gi,":").replace(/&newline;/gi,`
17
+ `).replace(/&tab;/gi," ").replace(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&amp;/gi,"&").replace(/&quot;/gi,'"').replace(/&apos;/gi,"'").replace(/&#(\d+);/gi,function(t,i){return String.fromCharCode(parseInt(i,10))}).replace(/&#x([0-9a-f]+);/gi,function(t,i){return String.fromCharCode(parseInt(i,16))})}function th(e){var t=cs(e).trim().replace(/[\s\u0000-\u001f]/g,"").toLowerCase();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||!t.includes(":"))return!0;var i=t.indexOf(":");if(i>0){var n=t.substring(0,i+1);return Kh.has(n)}return!1}function A$(e){var t=cs(e).replace(/[\u0000-\u001f]/g,"");Cs.lastIndex=0;for(var i;(i=Cs.exec(t))!==null;)if(!th(i[1]))return null;for(var n=t.toLowerCase().replace(/\s/g,""),a=0,r=ig;a<r.length;a++){var o=r[a];if(n.includes(o))return null}return e}function us(e){return e.replace(ag,function(t){return ng[t]})}function S$(e,t,i){if(i===void 0&&(i=!1),Qh.has(e))return th(t)?i?us(t):t:null;if(e==="style"){var n=A$(t);return n===null?null:i?us(n):n}var a=cs(t).toLowerCase().replace(/\s/g,"");return/\bon\w+=/.test(a)?null:i?us(t):t}function k$(e){var t=e.match(Jh);return t?t[1].toLowerCase():null}function E$(e){var t=k$(e);return t!==null&&qh.has(t)}function C$(e){var t=e.match(eg);if(t)return"</".concat(t[1].toLowerCase(),">");var i=e.match(tg);if(!i)return"";var n=i[1],a=i[2],r=i[3],o=n.toLowerCase(),s=[];Es.lastIndex=0;for(var l;(l=Es.exec(a))!==null;){var c=l[1].toLowerCase(),u=l[2],d=l[3],f=l[4];if(!c.startsWith("on")){var h=void 0,g=void 0;if(u!==void 0)h=u,g='"';else if(d!==void 0)h=d,g="'";else if(f!==void 0)h=f,g='"';else{ks.has(c)&&s.push(c);continue}if(ks.has(c)){var p=S$(c,h,f!==void 0);p!==null&&s.push("".concat(c,"=").concat(g).concat(p).concat(g))}}}var m=s.length>0?" ".concat(s.join(" ")):"",v=r?"/>":">";return"<".concat(o).concat(m).concat(v)}function Oi(e){return typeof e!="string"||!e||e.indexOf("<")===-1?e:e.replace(/<\/?[^>]*>|[^<>\s]+>/g,function(t){return t.startsWith("<!--")?"":t.startsWith("<")?E$(t)?C$(t):t.replace(/</g,"&lt;"):t.slice(0,-1)+"&gt;"})}function ih(e,t,i){i===void 0&&(i=!1);var n=function(a){return a[e?"getBoundingClientRect":"getBBox"]()};return i?n(t):!("rect"in t)||"rect"in t&&t.hasAttribute("width")&&t.rect.width!==+(t.getAttribute("width")||0)?t.rect=n(t):t.rect}function nh(e,t){for(var i=0;i<e.length;i++){var n=e[i];n&&t(n,i)}}function zt(e,t,i){return ve(e[t])?e[t]:i}function R$(e,t){var i=!1;return Object.keys(e).forEach(function(n){return e[n]===t&&(i=!0)}),i}function me(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var a=H(e);return a&&e.call.apply(e,Ae([t],i,!1)),a}function ar(e,t){var i=0,n=function(){for(var a=[],r=0;r<arguments.length;r++)a[r]=arguments[r];!--i&&t.apply.apply(t,Ae([this],a,!1))};"duration"in e?e.each(function(){return++i}).on("end",n):(++i,e.call(n))}function Ni(e,t,i,n){if(i===void 0&&(i=[-1,1]),n===void 0&&(n=!1),!(!e||!le(t)))if(t.indexOf(`
18
+ `)===-1)e.text(t);else{var a=[e.text(),t].map(function(s){return s.replace(/[\s\n]/g,"")});if(a[0]!==a[1]){var r=t.split(`
19
+ `),o=n?r.length-1:1;e.html(""),r.forEach(function(s,l){e.append("tspan").attr("x",0).attr("dy","".concat(l===0?i[0]*o:i[1],"em")).text(s)})}}}function ah(e){var t=e.getBBox(),i=t.x,n=t.y,a=t.width,r=t.height;return[{x:i,y:n+r},{x:i,y:n},{x:i+a,y:n},{x:i+a,y:n+r}]}function rh(e){var t=Le(e),i=t.width,n=t.height,a=ah(e);return{x:a[0].x,y:Math.min(a[0].y,a[1].y),width:i,height:n}}function Qe(e,t){var i,n=e&&((i=e.touches||e.sourceEvent&&e.sourceEvent.touches)===null||i===void 0?void 0:i[0]),a=[0,0];try{a=Ke(n||e,t)}catch{}return a.map(function(r){return isNaN(r)?0:r})}function oh(e){var t=e.event,i=e.$el,n=i.subchart.main||i.main,a;return t&&t.type==="brush"?a=t.selection:n&&(a=n.select(".bb-brush").node())&&(a=kd(a)),a}function Le(e,t){return t===void 0&&(t=!1),ih(!0,e,t)}function It(e,t){return t===void 0&&(t=!1),ih(!1,e,t)}function mt(e,t,i){e===void 0&&(e=!0),t===void 0&&(t=0),i===void 0&&(i=1e4);var n=ee.crypto||ee.msCrypto,a=n?t+n.getRandomValues(new Uint32Array(1))[0]%(i-t+1):Math.floor(Math.random()*(i-t)+t);return e?String(a):a}function ds(e,t,i,n,a){if(i>n)return-1;var r=Math.floor((i+n)/2),o=e[r],s=o.x,l=o.w,c=l===void 0?0:l;return a&&(s=e[r].y,c=e[r].h),t>=s&&t<=s+c?r:t<s?ds(e,t,i,r-1,a):ds(e,t,r+1,n,a)}function sh(e){var t=oh(e);return t?t[0]===t[1]:!0}function M$(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=function(n){if(ce(n)&&n.constructor){var a=new n.constructor;for(var r in n)a[r]=i(n[r]);return a}return n};return e.map(function(n){return i(n)}).reduce(function(n,a){return J(J({},n),a)})}function Pe(e,t){e===void 0&&(e={}),de(t)&&t.forEach(function(n){return Pe(e,n)});for(var i in t)/^\d+$/.test(i)||i in e||(e[i]=t[i]);return e}function L$(e,t){return t===void 0&&(t="-"),e.split(t).map(function(i,n){return n?i.charAt(0).toUpperCase()+i.slice(1).toLowerCase():i.toLowerCase()}).join("")}function P$(e,t,i){var n=e.rootSelector,a=n===void 0?"":n,r=e.sheet,o=function(l){return l.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,".")},s="".concat(a," ").concat(o(t)," {").concat(i.join(";"),"}");return r[r.insertRule?"insertRule":"addRule"](s,r.cssRules.length)}function D$(e){var t=[];return e.forEach(function(i){var n;try{i.cssRules&&i.cssRules.length&&(t=t.concat(Bt(i.cssRules)))}catch(a){(n=ee.console)===null||n===void 0||n.warn("Error while reading rules from ".concat(i.href,": ").concat(a.toString()))}}),t}function lh(e){var t,i,n,a,r,o;return{x:((i=(t=ee.pageXOffset)!==null&&t!==void 0?t:ee.scrollX)!==null&&i!==void 0?i:0)+((n=e.scrollLeft)!==null&&n!==void 0?n:0),y:((r=(a=ee.pageYOffset)!==null&&a!==void 0?a:ee.scrollY)!==null&&r!==void 0?r:0)+((o=e.scrollTop)!==null&&o!==void 0?o:0)}}function rr(e,t,i,n){t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=!0);var a=new DOMPoint(t,i),r=e.getScreenCTM(),o=a.matrixTransform(n?r?.inverse():r);if(n===!1){var s=Le(e);o.x-=s.x,o.y-=s.y}return o}function ch(e){var t=e?e.transform:null,i=t&&t.baseVal;return i&&i.numberOfItems?i.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function fs(e){var t=e[0]instanceof Date,i=(t?e.map(Number):e).filter(function(n,a,r){return r.indexOf(n)===a});return t?i.map(function(n){return new Date(n)}):i}function uh(e){return e&&e.length?e.reduce(function(t,i){return t.concat(i)}):[]}function Bi(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(!t.length||t.length===1&&!t[0])return e;var n=t.shift();return ce(e)&&ce(n)&&Object.keys(n).forEach(function(a){if(!/^(__proto__|constructor|prototype)$/i.test(a)){var r=n[a];ce(r)?(!e[a]&&(e[a]={}),e[a]=Bi(e[a],r)):e[a]=de(r)?r.concat():r}}),Bi.apply(void 0,Ae([e],t,!1))}function Xi(e,t){t===void 0&&(t=!0);var i;return e[0]instanceof Date?i=t?function(n,a){return n-a}:function(n,a){return a-n}:t&&!e.every(isNaN)?i=function(n,a){return n-a}:t||(i=function(n,a){return n>a&&-1||n<a&&1||n===a&&0}),e.concat().sort(i)}function lt(e,t){var i=t.filter(function(n){return Se(n)});return i.length?q(i[0])?i=Math[e].apply(Math,i):i[0]instanceof Date&&(i=Xi(i,e==="min")[0]):i=void 0,i}function An(e,t){var i=e;for(var n in t)i=i.replace(new RegExp("{=".concat(n,"}"),"g"),t[n]);return Oi(i)}function Je(e){var t,i;if(e instanceof Date)i=e;else if(le(e)){var n=this,a=n.config;i=(t=n.format.dataTime(a.data_xFormat)(e))!==null&&t!==void 0?t:new Date(e)}else q(e)&&!isNaN(e)&&(i=new Date(+e));return(!i||isNaN(+i))&&console&&console.error&&console.error("Failed to parse x '".concat(e,"' to Date object")),i}function hs(e){var t=e.attr("viewBox");return t?/(\d+(\.\d+)?){3}/.test(t):!1}function F$(e,t,i){i===void 0&&(i=!1);for(var n=!!e.node,a=!1,r=0,o=Object.entries(t);r<o.length;r++){var s=o[r],l=s[0],c=s[1];if(a=n?e.style(l)===c:e.style[l]===c,i===!1&&a)break}return a}function Sn(){return xe?.hidden===!1||xe?.visibilityState==="visible"}function z$(e,t){var i=ee.DocumentTouch,n=ee.matchMedia,a=ee.navigator,r=n?.("(pointer:coarse)").matches,o=!1;if(t)if(a&&"maxTouchPoints"in a)o=a.maxTouchPoints>0;else if("ontouchmove"in ee||i&&xe instanceof i)o=!0;else if(r)o=!0;else{var s=a.userAgent;o=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(s)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(s)}return e&&!r&&n?.("(pointer:fine)").matches&&"mouse"||o&&"touch"||"mouse"}function dh(e,t){t()===!1?Zh(function(){return dh(e,t)}):e()}function I$(e){if(ce(e)&&!le(e)){var t=e;return{top:t.top||0,right:t.right||0,bottom:t.bottom||0,left:t.left||0}}var i=(le(e)?e.trim().split(/\s+/):[e]).map(function(c){return+c||0}),n=i[0],a=i[1],r=a===void 0?n:a,o=i[2],s=o===void 0?n:o,l=i[3];return{top:n,right:r,bottom:s,left:l===void 0?r:l}}function fh(e,t){e.pendingRaf!==null?(ee.cancelAnimationFrame(e.pendingRaf),e.pendingRaf=ee.requestAnimationFrame(function(){e.pendingRaf=null,t()})):(e.pendingRaf=ee.requestAnimationFrame(function(){e.pendingRaf=null}),t())}function hh(e,t){t===void 0&&(t=(function(n){return n}));var i=new Set;return nh(e,function(n,a){i.add(t(n,a))}),i}function gh(e,t,i){i===void 0&&(i=(function(a){return a}));var n=new Map;return nh(e,function(a,r){n.set(t(a,r),i(a,r))}),n}function O$(e){var t=e,i=t.config,n="";if(Ze(i.data_type||i.data_types)&&!t[dr.LINE])n="line";else for(var a in dr){var r=G[a];if(t.hasType(r)&&!t[dr[a]]){n=r;break}}n&&N$("Please, make sure if %c".concat(L$(n)),"module has been imported and specified correctly.","https://github.com/naver/billboard.js/wiki/CHANGELOG-v2#modularization-by-its-functionality")}function N$(e,t,i){var n,a="[billboard.js]";if(!((n=ee.console)===null||n===void 0)&&n.error){var r=["background:red;color:white;display:block;font-size:15px",t];console.error.apply(console,Ae(["❌ ".concat(a," ").concat(e),"background:red;color:white;display:block;font-size:15px"],r,!1)),console.info("%cℹ️","font-size:15px",i)}throw Error("".concat(a," ").concat(e.replace(/\%c([a-z-]+)/i,"'$1' ")," ").concat(t))}function B$(e){var t=[],i,n=function(){n.clear(),e===!1?Ss(function(){t.forEach(function(a){return a()})},{timeout:200}):i=ug(function(){t.forEach(function(a){return a()})},q(e)?e:200)};return n.clear=function(){i&&(dg(i),i=null)},n.add=function(a){return t.push(a)},n.remove=function(a){return t.splice(t.indexOf(a),1)},n}function vh(){var e=[],t=function(i,n){function a(){for(var r,o=0,s=0,l=void 0;l=e[s];s++){if(l===!0||!((r=l.empty)===null||r===void 0)&&r.call(l)){o++;continue}if(Sn()===!1){o=e.length;break}try{l.transition()}catch{o++}}return o===e.length}dh(function(){n?.()},a)};return t.add=function(i){de(i)?e=e.concat(i):e.push(i)},t}function X$(e,t){var i,n=e.toString(),a=n.replace(/(function|[\s\W\n])/g,"").substring(0,15);return a in fr||(fr[a]=new ee.Blob(["".concat((i=t?.map(String).join(";"))!==null&&i!==void 0?i:"",`
20
+
21
+ self.onmessage=function({data}) {
22
+ const result = (`).concat(n,`).apply(null, data);
23
+ self.postMessage(result);
24
+ };`)],{type:"text/javascript"})),ee.URL.createObjectURL(fr[a])}function V$(e){var t=new ee.Worker(e);return t.onerror=function(i){console.error?console.error(i):console.log(i)},t}function gs(e,t,i,n){e===void 0&&(e=!0);var a=function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];i(t.apply(void 0,s))};if(ee.Worker&&e){var r=X$(t,n),o=V$(r);a=function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];o.postMessage(s),o.onmessage=function(c){return ee.URL.revokeObjectURL(r),i(c.data)}}}return a}function vs(e){var t=[];return e.forEach(function(i,n){var a=i[0];i.forEach(function(r,o){if(o>0){if(typeof t[o-1]>"u"&&(t[o-1]={}),typeof r>"u")throw new Error("Source data is missing a component at (".concat(n,", ").concat(o,")!"));t[o-1][a]=r}})}),t}function ps(e){var t=e[0],i=[];return e.forEach(function(n,a){if(a>0){var r={};n.forEach(function(o,s){if(typeof o>"u")throw new Error("Source data is missing a component at (".concat(a,", ").concat(s,")!"));r[t[s]]=o}),i.push(r)}}),i}function ph(e,t){var i=[],n,a;if(Array.isArray(e)){var r=function(o,s){if(o[s]!==void 0)return o[s];var l=s.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),c=o;return l.some(function(u){return!(c=c&&u in c?c[u]:void 0)}),c};t.x?n=t.value.concat(t.x):n=t.value,i.push(n),e.forEach(function(o){var s=n.map(function(l){var c=r(o,l);return typeof c>"u"&&(c=null),c});i.push(s)}),a=ps(i)}else Object.keys(e).forEach(function(o){var s,l=e[o].concat();(s=l.unshift)===null||s===void 0||s.call(l,o),i.push(l)}),a=vs(i);return a}function G$(e,t,i,n,a){t===void 0&&(t="csv");var r=new XMLHttpRequest,o={csv:U$,tsv:H$,json:ph};r.open("GET",e),i&&Object.keys(i).forEach(function(s){r.setRequestHeader(s,i[s])}),r.onreadystatechange=function(){if(r.readyState===4)if(r.status===200){var s=r.responseText;s&&a.call(this,o[t](t==="json"?JSON.parse(s):s,n))}else throw new Error("".concat(e,": Something went wrong loading!"))},r.send()}function mh(e,t){var i=e.rows(t),n;return i.length===1?(n=[{}],i[0].forEach(function(a){n[0][a]=null})):n=e.parse(t),n}function U$(e){return mh({rows:Fd,parse:Dd},e)}function H$(e){return mh({rows:Id,parse:zd},e)}function _h(e,t){var i=e||t?.data_keys;return i?.x&&(t.data_x=i.x),i}function W$(e,t,i){var n=this,a=this,r=a.config,o;e.forEach(function(s){var l=a.getXKey(s);if(i.customX||i.timeSeries?i.xs.indexOf(l)>=0?o=(i.appendXs&&a.data.xs[s]||[]).concat(t.map(function(c,u){var d=te(c[l]);return d?a.generateTargetX(d,s,u):!1}).filter(function(c){return c!==!1})):r.data_x?o=n.getOtherTargetXs():Se(r.data_xs)&&(o=a.getXValuesOfXKey(l,a.data.targets)):o=t.map(function(c,u){return u}),o)a.data.xs[s]=o;else throw new Error('x is not defined for id = "'.concat(s,'".'))})}function xh(e,t){t===void 0&&(t=!1);var i=this,n=i.api;t&&i.api.flush(!0),e?.call(n)}function Y$(e){var t=Te.colorPattern,i=xe.body,n=i[t];if(!n){var a=";",r=e.classed(lr.colorPattern,!0).style("background-image");e.classed(lr.colorPattern,!1),r.indexOf(a)>-1&&(n=r.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(a).map(function(o){return o.trim().replace(/[\"'\s]/g,"")}).filter(Boolean),i[t]=n)}return n}function yh(e,t,i){var n=e.config,a="axis_".concat(t,"_tick_format");return(n[a]?n[a]:e.defaultValueFormat).call(e.api,i)}function or(e){var t=this,i=t.getDataById(e);return t.levelColor?t.levelColor(i.values[0].value):t.color(i)}function ms(e,t){var i;t===void 0&&(t=!0);var n=this.config,a=(i=n.data_names[e])!==null&&i!==void 0?i:e;return t&&H(n.legend_format)&&(a=n.legend_format(a,e!==a?e:void 0)),a}function j$(e,t){if(!(!t||t.empty())){var i=[];t.each(function(a){i.push({id:a,node:this})});var n=gh(i,function(a){return a.id},function(a){return a.node});e.cache.add(Te.legendItemMap,n)}}function ci(e,t,i){e===void 0&&(e="linear");var n={linear:Da,log:uf,_log:sf,time:_T,utc:xT}[e]();return n.type=e,/_?log/.test(e)&&n.clamp(!0),n.range([t??0,i??1])}function Z$(e){var t="middle";return e>0&&e<=170?t="end":e>190&&e<=360&&(t="start"),t}function q$(e,t,i,n,a){var r,o=this,s=e.value,l=o.isCandlestickType(e),c=q(s)&&s<0||l&&!(!((r=o.getCandlestickData(e))===null||r===void 0)&&r._isUp),u=t.x,d=t.y,f=4,h=f*2;return n?i==="start"?(u+=c?0:h,d+=f):i==="middle"?(u+=h,d-=h):i==="end"&&(c&&(u-=h),d+=f):(i==="start"?(u+=f,c&&(d+=h*2)):i==="middle"?d-=h:i==="end"&&(u-=f,c&&(d+=h*2)),a&&(d+=c?-17:l?13:7)),{x:u,y:d}}function bh(e,t){var i,n=this.config.data_labels_position,a=e.id,r=e.index,o=e.value;return(i=H(n)?n.bind(this.api)(t,o,a,r,this.$el.text):(a in n?n[a]:n)[t])!==null&&i!==void 0?i:0}function K$(e,t,i){var n,a,r=this,o=r.config,s=r.$T,l=o.axis_rotated,c=o.data_labels.border,u=c.padding,d=u===void 0?"3 5":u,f=c.radius,h=f===void 0?10:f,g=c.stroke,p=g===void 0?"#000":g,m=c.strokeWidth,v=m===void 0?1:m,_=c.fill,x=_===void 0?"none":_,y=I$(d),$=o.data_labels.border!==!0,T=It(e),A=B(e.previousElementSibling);(A.empty()||((n=A.node())===null||n===void 0?void 0:n.tagName)!=="rect"||!(!((a=A.attr("class"))===null||a===void 0)&&a.includes(i)))&&(A=B(e.parentNode).insert("rect",function(){return e}).attr("class","".concat(Ce.textBorderRect," ").concat(i)).attr("width",T.width+($?y.left+y.right:0)).attr("height",T.height+($?y.top+y.bottom:0)),$&&A.style("fill",x).style("stroke",p).style("stroke-width","".concat(v,"px")).attr("rx",h).attr("ry",h)),s(A).attr("x",t.x-($?y.left:0)-(l?0:T.width/2)).attr("y",t.y-($?y.top:0)-T.height/4*3.2)}function _s(e,t){e===void 0&&(e=0);var i=this.config["".concat(t,"_label_threshold")]||0;return e>=i}function wh(){var e=this,t=e.$el.text,i=e.config;(e.state.arcWidth?e.getArcLabelConfig("image"):i.data_labels.image)&&t.filter(function(){var n=this.previousElementSibling;return n?n.tagName!=="image"||!n.classList.contains(Ce.textLabelImage):!0}).each(function(n){var a,r,o,s,l=Q$.call(e,n),c=l.url,u=l.width,d=l.height,f=l.pos;if(c){var h=B(this.parentNode);h?.insert("image","".concat((r=(a=this.getAttribute("class"))===null||a===void 0?void 0:a.replace(/(?:^(.)|\s)/g,".$1"))!==null&&r!==void 0?r:"text")).style("opacity","0").attr("href",function(g){return An(c,{ID:"id"in g?g.id:g.data.id})}).attr("class",Ce.textLabelImage).style("pointer-events","none").attr("width",u).attr("height",d).attr("transform",f?"translate(".concat((o=f.x)!==null&&o!==void 0?o:0," ").concat((s=f.y)!==null&&s!==void 0?s:0,")"):null)}})}function Q$(e){var t,i=this,n=i.config,a=i.state.arcWidth?i.getArcLabelConfig("image"):n.data_labels.image;if(H(a))return(t=a.call(i.api,e.value,e.id,e.index))!==null&&t!==void 0?t:{url:"",width:0,height:0,pos:{x:0,y:0}};if(a){var r=a.url,o=r===void 0?"":r,s=a.width,l=s===void 0?0:s,c=a.height;return{url:o,width:l,height:c===void 0?0:c,pos:a.pos}}return null}function Th(e,t){var i=this,n,a=this,r=a.config,o=a.state,s=o.arcWidth,l=o.hasTreemap,c=r.axis_rotated,u=B(e.previousElementSibling),d=function(v){var _,x=v.style.opacity!=="0"&&v.style.fillOpacity!=="0";return(s?v.textContent:x)&&((_=i.previousElementSibling)===null||_===void 0?void 0:_.tagName)!=="image"};if(!u.empty()&&((n=u.node())===null||n===void 0?void 0:n.tagName)==="image"){var f=Le(e),h=+u.attr("width")/2,g=+u.attr("height")/2,p=t.x-h,m=t.y-g-f.height/2;c?t.x+=h:(l&&(p=-h,m=-(g*2+f.height)),a.hasType("pie")||a.hasType("polar")||(t.y+=g)),a.$T(u).style("opacity",d(e)?null:"0").attr("x",p).attr("y",m)}}function J$(e){return gh(e,function(t){return t},function(t){return It(t)})}function $h(e,t){e===void 0&&(e="left");var i=q(t),n;return e.indexOf("center")>-1?n=i?t/2:"middle":e.indexOf("right")>-1?n=i?t:"end":n=i?0:"start",n}function eA(e){var t=this,i;return t.isLineType(e)?i=t.generateGetLinePoints(t.getShapeIndices(t.isLineType)):t.isBarType(e)&&(i=t.generateGetBarPoints(t.getShapeIndices(t.isBarType))),i}function tA(e){var t=this.config,i,n,a,r=function(){var o=n.shift();if(o&&i&&Ye(i)&&o in i)return i=i[o],r();if(!o)return i};Object.keys(t).forEach(function(o){i=e,n=o.split("_"),a=r(),ve(a)&&(t[o]=a)}),this.api&&(this.state.orgConfig=e)}function iA(e,t,i){var n=t||i,a=n.width,r=n.height,o=new XMLSerializer,s=e.cloneNode(!0),l=D$(Bt(xe.styleSheets)).filter(function(h){return h.cssText}).map(function(h){return h.cssText});s.setAttribute("xmlns",Yt.xhtml),s.style.margin="0",s.style.padding="0",t.preserveFontStyle&&s.querySelectorAll("text").forEach(function(h){h.innerHTML=""});var c=o.serializeToString(s),u=xe.createElement("style");u.appendChild(xe.createTextNode(l.join(`
25
+ `)));var d=o.serializeToString(u),f='<svg xmlns="'.concat(Yt.svg,'" width="').concat(a,'" height="').concat(r,`"
26
+ viewBox="0 0 `).concat(i.width," ").concat(i.height,`"
27
+ preserveAspectRatio="`).concat(t?.preserveAspectRatio===!1?"none":"xMinYMid meet",`">
28
+ <foreignObject width="100%" height="100%">
29
+ `).concat(d,`
30
+ `).concat(c.replace(/(url\()[^#]+/g,"$1"),`
31
+ </foreignObject></svg>`);return"data:image/svg+xml;base64,".concat(Ig(f))}function nA(e,t){var i=t.top,n=t.left,a=It(e,!0),r=a.x,o=a.y,s=e.getScreenCTM(),l=s.a,c=s.b,u=s.c,d=s.d,f=s.e,h=s.f,g=Le(e,!0),p=g.width,m=g.height;return{x:l*r+u*o+f-n,y:c*r+d*o+h-i+(m-Math.round(m/4)),width:p,height:m}}function aA(e){var t=Le(e),i=t.left,n=t.top,a=function(o){return o.textContent||o.childElementCount},r=[];return Bt(e.querySelectorAll("text")).filter(a).forEach(function(o){var s=function(c){var u,d=ee.getComputedStyle(c),f=d.fill,h=d.fontFamily,g=d.fontSize,p=d.textAnchor,m=d.transform,v=nA(c,{left:i,top:n}),_=v.x,x=v.y,y=v.width,$=v.height;return u={},u[c.textContent]={x:_,y:x,width:y,height:$,fill:f,fontFamily:h,fontSize:g,textAnchor:p,transform:m},u};if(o.childElementCount>1){var l=[];return Bt(o.querySelectorAll("tspan")).filter(a).forEach(function(c){r.push(s(c))}),l}else r.push(s(o))}),r}function rA(e,t){t.forEach(function(i){Object.keys(i).forEach(function(n){var a=i[n],r=a.x,o=a.y,s=a.width,l=a.height,c=a.fill,u=a.fontFamily,d=a.fontSize,f=a.transform;if(e.save(),e.font="".concat(d," ").concat(u),e.fillStyle=c,f==="none")e.fillText(n,r,o);else{var h=f.replace(/(matrix|\(|\))/g,"").split(",");h.splice(4).every(function(g){return+g==0})?(h.push(r+s-s/4),h.push(o-l+l/3)):(h.push(r),h.push(o)),e.transform.apply(e,h),e.fillText(n,0,0)}e.restore()})})}function Ah(e,t,i){var n=this,a=this.internal,r=a.mapToTargetIds(t),o=a.state.hiddenTargetIds.map(function(c){return r.indexOf(c)>-1&&c}).filter(Boolean);a.state.toggling=!0,a["".concat(e?"remove":"add","HiddenTargetIds")](r);var s=a.$el.svg.selectAll(a.selectorTargets(r)),l=e?null:"0";e&&o.length&&(s.style("display",null),me(a.config.data_onshown,this,o)),a.$T(s).style("opacity",l,"important").call(ar,function(){var c;!e&&o.length===0&&(s.style("display","none"),me((c=a.config)===null||c===void 0?void 0:c.data_onhidden,n,r)),s.style("opacity",l)}),i.withLegend&&a["".concat(e?"show":"hide","Legend")](r),a.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),a.state.toggling=!1}function Sh(e,t,i){var n=e.config,a=function(r,o){var s=q(o)?o:o===!1?void 0:null;s!==null&&(n["axis_".concat(r,"_").concat(t)]=s)};ve(i)&&(Ye(i)?Object.keys(i).forEach(function(r){a(r,i[r])}):(q(i)||i===!1)&&["y","y2"].forEach(function(r){a(r,i)}),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function kh(e,t){var i=e.config;return{x:i["axis_x_".concat(t)],y:i["axis_y_".concat(t)],y2:i["axis_y2_".concat(t)]}}function xs(e,t){var i=this.internal,n=i.config,a=n.transition_duration&&Sn(),r="grid_".concat(t,"_lines");return e&&(n[r]=e,i.updateGrid(),i.redrawGrid(a)),n[r]}function Eh(e,t){var i="grid_".concat(t,"_lines");return xs.bind(this)(this.internal.config[i].concat(e||[]),t)}function Ch(e,t){this.internal.removeGridLines(e,t)}function Rh(e,t){t===void 0&&(t=!1);var i=this.internal,n=i.config,a=n.transition_duration&&Sn();return e?(n.regions=t?n.regions.concat(e):e,i.updateRegion(),i.redrawRegion(a),t?n.regions:e):n.regions}function Mh(e,t,i){return function(n){var a=e?0:t;return n.position==="start"?a=e?-i:0:n.position==="middle"&&(a=(e?-i:t)/2),a}}function Lh(e,t){e.each(function(){var i=B(this);["x1","x2","y1","y2"].forEach(function(n){return i.attr(n,+i.attr(n))})})}function oA(e){e===void 0&&(e=!1);var t=this;return["donut","pie","polar","gauge"].find(function(i){return t.hasType(i)&&!(i==="gauge"&&e&&t.hasMultiArcGauge())})}function Ph(){var e=this,t=e.config,i=oA.call(e,!0),n=i&&t["".concat(i,"_label_line")],a=Ye(n),r=function(l,c,u){return u},o={show:n===!0||a&&n?.show!==!1,distance:a&&n?.distance||Is};if(n===!0)return{chartType:i,line:o,text:{formatter:r}};if(!a)return{chartType:i,line:{show:!1,distance:Is},text:{formatter:null}};var s=r;return H(n.text)?s=n.text:n.text===!1&&(s=null),{chartType:i,line:o,text:{formatter:s}}}function sA(e,t){var i=this,n=i.state,a=i.updateAngle(e);if(!a)return null;var r=i.getRadius(e).outerRadius,o=r;i.hasType("polar")&&(o=i.getPolarOuterRadius(e,r),r=n.radius);var s=(a.startAngle+a.endAngle)/2;Math.abs(a.endAngle-a.startAngle-2*Math.PI)<.01&&(s=Math.PI/2);var l=Math.sin(s),c=-Math.cos(s),u={x:l*o,y:c*o},d=r+hv,f={x:l*d,y:c*d},h=l>=0;return{startPoint:u,breakPoint:f,endPoint:{x:f.x+t*(h?1:-1),y:f.y},isRight:h,midAngle:s}}function Dh(){return Ph.call(this).line.show}function lA(e){var t=this,i=t.$el.arcs,n=t.$T,a=Ph.call(t),r=a.line,o=a.text,s=r.distance,l=null;i.selectAll(".".concat(ne.chartArc)).each(function(c){var u,d,f,h=B(this),g=sA.call(t,c,s),p=(u=c._cache)!==null&&u!==void 0?u:{},m=p.ratio,v=p.meetsThreshold,_=p.updated;if(!(!_||!g)){var x=t.isTargetToShow(c.data.id)&&v,y=g.startPoint,$=g.breakPoint,T=g.endPoint,A=g.isRight,S="".concat(y.x,",").concat(y.y," ").concat($.x,",").concat($.y," ").concat(T.x,",").concat(T.y);if(r.show){var R=h.select(".".concat(ne.arcLabelLine));R.empty()&&(R=h.append("polyline").attr("class",ne.arcLabelLine)),n(R,e).attr("points",S).style("stroke",t.color(c.data)).style("opacity",x?null:"0")}var C=h.select(".".concat(ne.arcLabelLineText));if(C.empty()&&(C=h.append("text").attr("class",ne.arcLabelLineText).style("pointer-events","none")),x){var E=_.value,k=c.data.id,P=((f=(d=o.formatter)!==null&&d!==void 0?d:t.getArcLabelConfig("format"))!==null&&f!==void 0?f:t.defaultArcValueFormat)(E,m,k).toString();Ni(C,P,[-1,1],!1);var w={x:T.x+5*(A?1:-1),y:T.y};C.style("text-anchor",A?"start":"end");var D=C.node(),L=D?.querySelectorAll("tspan");if(l===null&&(l=parseFloat(ee.getComputedStyle(D).fontSize)||12),L&&L.length>1){var M=(L.length-3)/2;w.y+=(-M+Os)*l}else w.y+=Os*l;n(C,e).attr("transform","translate(".concat(w.x,",").concat(w.y,")")).style("opacity",null).style("fill",t.updateTextColor.bind(t)(c))}else n(C,e).style("opacity","0")}})}function cA(e){return["donut","pie","polar","gauge"].find(function(t){return e.hasType(t)})}function uA(e,t,i,n){var a,r,o=e.config,s=e.state.radiusExpanded,l=i.endAngle-Math.PI/2,c=Math.sin(l),u={x:Math.cos(l)*(s+(n?5:25)),y:c*(s+15-Math.abs(c*10))+3};if(n){var d=o.arc_rangeText_position;if(d){var f=o.arc_rangeText_values,h=H(d)?d(f[t.index]):d;u.x+=(a=h?.x)!==null&&a!==void 0?a:0,u.y+=(r=h?.y)!==null&&r!==void 0?r:0}}return u}function dA(e,t,i,n){var a=e.config,r=cA(e),o=r?a["".concat(r,"_label_ratio")]:void 0;if(o)o=H(o)?o.bind(e.api)(t,i,n):o;else{var s=36,l=.375,c=1.175,u=.8,d=s/i;o=i&&n?(d>l?c-d:u)*i/n:0}return o}function fA(e,t,i){var n=e.getRadius(t).outerRadius;e.hasType("polar")&&(n=e.getPolarOuterRadius(t,n));var a=e.svgArc.centroid(i).map(function(c){return isNaN(c)?0:c}),r=a[0],o=a[1],s=Math.sqrt(r*r+o*o),l=dA(e,t,n,s);return{pos:{x:r,y:o},ratio:l}}function Fh(e){e===void 0&&(e=0);var t=this,i=t.config,n=t.state,a=t.hasMultiArcGauge(),r=n.gaugeArcWidth/t.filterTargetsToShow(t.data.targets).length,o=e?Math.min(n.radiusExpanded*e-n.radius,r*.8-(1-e)*100):0;return{inner:function(s){var l=t.getRadius(s).innerRadius;return a?n.radius-r*(s.index+1):q(l)?l:0},outer:function(s){var l=t.getRadius(s).outerRadius,c;if(a)c=n.radius-r*s.index+o;else if(t.hasType("polar")&&!e)c=t.getPolarOuterRadius(s,l);else if(c=l,e){var u=n.radiusExpanded;n.radius!==l&&(u-=Math.abs(n.radius-l)),c=u*e}return c},corner:function(s,l){var c=i.arc_cornerRadius_ratio,u=c===void 0?0:c,d=i.arc_cornerRadius,f=d===void 0?0:d,h=s.data.id,g=s.value,p=0;return u?p=u*l:p=q(f)?f:f.call(t.api,h,g,l),p}}}function ys(e){return function(t){var i=function(a){var r=a.startAngle,o=r===void 0?0:r,s=a.endAngle,l=s===void 0?0:s,c=a.padAngle;return{startAngle:o,endAngle:l,padAngle:c===void 0?0:c}},n=Si(i(this._current),i(t));return this._current=t,function(a){var r=n(a),o=t.data,s=t.index,l=t.value;return e(J(J({},r),{data:o,index:s,value:l}))}}}function bs(e){var t=this.config.bar_connectLine,i=t?.[e]||t;return/^(start|end)\-(start|end)$/.test(i)?i:null}function sr(e){e===void 0&&(e=!1);var t=this,i=t.config,n=t.state.current,a=n.width,r=n.height,o=t.getCurrentPadding(),s=J({width:a-(o.left+o.right),height:r-(i.legend_show?t.getLegendHeight()+10:0)-(o.top+o.bottom)},o);if(e){var l=zh.call(t,{width:s.width,height:s.height}),c=l.width,u=l.height;s.width<c&&(s.width=c),s.height<u&&(s.height=u)}return s}function zh(e){var t,i=this.config,n=i.funnel_neck_width,a=i.funnel_neck_height;return t=[n,a].map(function(r,o){var s=r;return ce(r)&&(s=e[o?"height":"width"]*r.ratio),s}),n=t[0],a=t[1],{width:n,height:a}}function hA(e){var t=this,i=sr.call(t,!0),n=i.top,a=i.left,r=i.width,o=[];return e.forEach(function(s,l){var c=s.ratio,u=l>0?o[l-1][2][1]:n;o.push(s.coords=[[a,u],[a+r,u],[a+r,l>0?c+u:c+n],[a,l>0?c+u:c+n],[a,u]])}),o}function Ih(e){e===void 0&&(e=!1);var t=this,i=sr.call(t,!0),n=i.width,a=i.height,r=i.top,o=i.left,s=zh.call(t,{width:n,height:a}),l=(n-s.width)/2,c=(n+s.width)/2,u=a-s.height,d=[[0,0],[n,0],[c,u],[c,a],[l,a],[l,u],[0,0]];return e&&d.forEach(function(f){f[0]+=o,f[1]+=r}),"M".concat(d.join("L"),"z")}function gA(e){var t=this,i=t.config,n=e.map(function(a){return{id:a.id,value:a.values.reduce(function(r,o){return r+o.value},0)}});return i.data_order&&n.sort(t.getSortCompareFn.bind(t)(!0)),Oh.call(t,n)}function Oh(e){var t=this,i=sr.call(t).height,n=t.getTotalDataSum(!0);return e.forEach(function(a){a.ratio=a.value/n*i}),e}function vA(e,t,i,n){n===void 0&&(n=!1);for(var a=e?[e,0]:i,r=function(l){i.forEach(function(c){l+c<=t&&a.push(c),l+=c}),o=l},o,s=e||i.reduce(function(l,c){return l+c});s<=t;)r(s),s=o;return a.length%2!==0&&a.push(n?i[1]:0),{dash:a.join(" "),length:a.reduce(function(l,c){return l+c},0)}}function pA(e,t,i){var n=this,a=[],r="2 2";if(ve(t))for(var o=function(c,u){return we(c)?u:i?Je.call(n,c):c},s=0,l=void 0;l=t[s];s++)a[s]={start:o(l.start,e[0].x),end:o(l.end,e[e.length-1].x),style:l.style||{dasharray:r}};return a}function mA(e){return Ye(e)&&H(e.create)&&H(e.update)}function _A(e,t){var i,n=this,a=function(l,c){for(var u=l.attributes,d=0,f;f=u[d];d++)f=f.name,c.setAttribute(f,l.getAttribute(f))},r=new DOMParser().parseFromString(Oi(e),"image/svg+xml").documentElement,o=xe.createElementNS(Yt.svg,r.nodeName.toLowerCase());if(o.id=t,o.style.fill="inherit",o.style.stroke="inherit",a(r,o),!((i=r.childNodes)===null||i===void 0)&&i.length){var s=B(o);"innerHTML"in o?s.html(Oi(r.innerHTML)):Bt(r.childNodes).forEach(function(l){a(l,s.append(l.tagName).node())})}n.$el.defs.node().appendChild(o)}function Nh(e){var t=e.config.polar_level_max,i=e.getMinMaxData().max[0].value;return t&&t>i&&(i=t),i}function xA(e,t,i,n,a,r){var o=e&&n>0?i-n:n,s=2*Math.PI;return a*(1-r*(t==="x"?Math.sin:Math.cos)(o*s/i))}function yA(e,t){var i=this,n=i.scale,a=n.x,r=n.y,o=i.state.width;e.selectAll("g").attr("transform",function(s){return"translate(".concat(s===t?"0,0":"".concat(a(s.x0),",").concat(r(s.y0)),")")}).select("rect").attr("width",function(s){return s===t?o:a(s.x1)-a(s.x0)}).attr("height",function(s){return s===t?0:r(s.y1)-r(s.y0)})}function bA(e){var t=this;return e.map(function(i){var n=i.id,a=i.values;return{name:n,id:n,value:a[0].value,ratio:t.getRatio("treemap",a[0])}})}function wA(e){var t=this,i=ns(e).sum(function(a){return a.value}),n=t.getSortCompareFn(!0);return[t.treemap(n?i.sort(n):i)]}function Vi(e,t){Pe(Vt.prototype,Object.values(Fs).concat(e)),Pe(ui.prototype,fv),Xt.setOptions(Object.values(zs).concat(t||[]))}function $t(e,t){Vi([hi,Mn,yv].concat(e||[])),Xt.setOptions([Gt,kv].concat(t||[]))}function Gi(e,t){Pe(Vt.prototype,[gv,hi].concat(e||[])),Xt.setOptions([Gt].concat(t||[]))}function Bh(e,t,i,n){e===void 0&&(e=!1);var a=this,r=a.config,o=a.$el.main,s=r.data_selection_grouped,l=r.data_selection_isselectable.bind(a.api);r.data_selection_enabled&&o.selectAll(".".concat(be.shapes)).selectAll(".".concat(be.shape)).each(function(c){var u=B(this),d=c.data?c.data:c,f=d.id,h=d.index,g=a.getToggle(this,c).bind(a),p=s||!t||t.indexOf(f)>=0,m=!i||i.indexOf(h)>=0,v=u.classed(_e.SELECTED);u.classed(xt.line)||u.classed(kn.area)||(e?p&&m&&l(c)&&!v?g(!0,u.classed(_e.SELECTED,!0),c,h):ve(n)&&n&&v&&g(!1,u.classed(_e.SELECTED,!1),c,h):p&&m&&l(c)&&v&&g(!1,u.classed(_e.SELECTED,!1),c,h))})}var J,Q,ne,kn,Ee,He,_t,Oe,lr,Ot,Ui,We,ge,xt,et,pe,ye,At,ws,Hi,_e,be,Ts,Ce,En,$s,cr,ue,Xh,Vh,Gh,Uh,Hh,Wh,Yh,jh,ee,xe,As,Zh,Ss,qh,ks,Kh,Qh,Jh,eg,tg,Es,Cs,ig,ng,ag,te,H,le,q,we,ve,ur,rg,Cn,Nt,Ye,og,Ze,Se,de,ce,Ne,Bt,Rn,sg,Xt,Rs,lg,Te,cg,G,dr,St,ug,dg,fr,fg,hg,gg,vg,pg,mg,_g,xg,yg,bg,wg,Tg,$g,Ag,Sg,kg,Eg,Cg,Rg,Mg,Lg,Pg,Vt,Dg,Fg,Ms,zg,Ig,Og,Ng,Bg,Xg,Vg,Gg,ui,Ug,Hg,Wg,Ls,Ps,Yg,jg,Ds,Zg,qg,Kg,Qg,Jg,ev,tv,iv,nv,av,rv,ov,sv,lv,cv,uv,dv,fv,Fs,zs,hv,Is,Os,gv,di,vv,pv,mv,_v,xv,yv,fi,Mn,hi,bv,gi,Ns,wv,Tv,Gt,vi,$v,Av,Sv,kv,Ev,hr,Ln,Cv,Rv,Mv,Lv,Pv,Dv,Fv,Bs,Xs,Vs,Gs,Us,Hs,Ws,Ys,js,Zs,qs,Ks,Qs,Js,el,tl,il,nl,al,rl,zv,ol,Iv,sl,Ov,Nv,Bv,Xv,Vv,Gv,Uv,ll,cl,ul,gr,dl,TA=b((()=>{Xe(),ro(),yw(),zw(),uo(),bT(),$o(),c1(),y1(),$d(),Ct(),c$(),b$(),J=function(){return J=Object.assign||function(t){for(var i,n=1,a=arguments.length;n<a;n++){i=arguments[n];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},J.apply(this,arguments)},Q={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_",dummy:"_dummy_"},ne={arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcLabelLineText:"bb-arc-label-line-text",arcRange:"bb-arc-range",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title",needle:"bb-needle"},kn={area:"bb-area",areas:"bb-areas"},Ee={axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label",axisXTooltip:"bb-axis-x-tooltip",axisYTooltip:"bb-axis-y-tooltip",axisY2Tooltip:"bb-axis-y2-tooltip",axisTooltipX:"bb-axis-tooltip-x",axisTooltipY:"bb-axis-tooltip-y"},He={bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars",barConnectLine:"bb-bar-connectLine"},_t={candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"},Oe={chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"},lr={colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"},Ot={dragarea:"bb-dragarea",INCLUDED:"_included_"},Ui={funnel:"bb-funnel",chartFunnel:"bb-chart-funnel",chartFunnels:"bb-chart-funnels",funnelBackground:"bb-funnel-background"},We={chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"},ge={legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"},xt={chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"},et={eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"},pe={focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"},ye={grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"},At={level:"bb-level",levels:"bb-levels"},ws={chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"},Hi={region:"bb-region",regions:"bb-regions"},_e={selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"},be={shape:"bb-shape",shapes:"bb-shapes"},Ts={brush:"bb-brush",subchart:"bb-subchart"},Ce={chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",textBorderRect:"bb-text-border",textLabelImage:"bb-text-label-image",TextOverlapping:"text-overlapping"},En={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"},$s={treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"},cr={buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"},ue=J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J({},Q),ne),kn),Ee),He),_t),Oe),lr),Ot),We),ge),xt),et),pe),Ui),ye),ws),Hi),_e),be),Ts),Ce),En),$s),cr),Xh={boost_useCssRule:!1,boost_useWorker:!1},Vh={color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0},Gh={legend_contents_bindto:void 0,legend_contents_template:"<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_format:void 0,legend_padding:0,legend_position:"bottom",legend_show:!0,legend_tooltip:!1,legend_usePoint:!1},Uh={bindto:"#chart",background:{},clipPath:!0,svg_classname:void 0,size_width:void 0,size_height:void 0,padding:!0,padding_mode:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,resize_timer:!0,onclick:void 0,onover:void 0,onout:void 0,onresize:void 0,onresized:void 0,onbeforeinit:void 0,oninit:void 0,onafterinit:void 0,onrendered:void 0,transition_duration:250,plugins:[],render:{},regions:[]},Hh={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},Wh={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:void 0,tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:function(){},tooltip_onhide:function(){},tooltip_onshown:function(){},tooltip_onhidden:function(){},tooltip_order:null},Yh={data_x:void 0,data_idConverter:function(e){return e},data_names:{},data_classes:{},data_type:void 0,data_types:{},data_order:"desc",data_groups:[],data_groupsZeroAs:"positive",data_color:void 0,data_colors:{},data_labels:{},data_labels_backgroundColors:void 0,data_labels_colors:void 0,data_labels_position:{},data_labels_imgUrl:void 0,data_hide:!1,data_filter:void 0,data_onclick:function(){},data_onover:function(){},data_onout:function(){},data_onshown:void 0,data_onhidden:void 0,data_onmin:void 0,data_onmax:void 0,data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:"csv",data_keys:void 0,data_empty_label_text:""},jh={interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},interaction_onout:!0},ee=T$(),xe=ee?.document,As=$$(ee),Zh=As[0],Ss=As[2],qh=new Set(["span","div","p","br","b","i","em","strong","u","s","sub","sup","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","hr","pre","code","blockquote","a","img","svg","g","path","circle","ellipse","rect","line","polyline","polygon","text","tspan","textPath","use","defs","symbol","clipPath","mask","linearGradient","radialGradient","stop","pattern","marker","title","desc"]),ks=new Set(["class","id","style","title","lang","dir","href","src","alt","width","height","colspan","rowspan","scope","headers","d","points","x","y","x1","x2","y1","y2","cx","cy","r","rx","ry","dx","dy","viewBox","preserveAspectRatio","transform","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","opacity","clip-path","clip-rule","mask","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternTransform","marker-start","marker-mid","marker-end","markerWidth","markerHeight","refX","refY","xlink:href"]),Kh=new Set(["http:","https:","mailto:"]),Qh=new Set(["href","src","xlink:href"]),Jh=/^<\/?([a-zA-Z][a-zA-Z0-9]*)/,eg=/^<\/([a-zA-Z][a-zA-Z0-9]*)\s*>$/,tg=/^<([a-zA-Z][a-zA-Z0-9]*)([\s\S]*?)(\/?)>$/,Es=/([a-zA-Z][\w:-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,Cs=/url\s*\(\s*["']?([^"')]+)["']?\s*\)/gi,ig=["expression(","behavior:","binding:","@import","@charset","-moz-binding:"],ng={'"':"&quot;","'":"&#39;","`":"&#96;"},ag=/["'`]/g,te=function(e){return e||e===0},H=function(e){return typeof e=="function"},le=function(e){return typeof e=="string"},q=function(e){return typeof e=="number"},we=function(e){return typeof e>"u"},ve=function(e){return typeof e<"u"},ur=function(e){return typeof e=="boolean"},rg=function(e){return Math.ceil(e/10)*10},Cn=function(e){return Math.ceil(e)+.5},Nt=function(e){return e[1]-e[0]},Ye=function(e){return typeof e=="object"},og=function(e){for(var t in e)return!1;return!0},Ze=function(e){return we(e)||e===null||le(e)&&e.length===0||Ye(e)&&!(e instanceof Date)&&og(e)||q(e)&&isNaN(e)},Se=function(e){return!Ze(e)},de=function(e){return Array.isArray(e)},ce=function(e){return e&&!e?.nodeType&&Ye(e)&&!de(e)},Ne=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Bt=function(e){return[].slice.call(e)},Rn=function(e,t,i){i===void 0&&(i=1);for(var n=[],a=Math.max(0,Math.ceil((t-e)/i))|0,r=e;r<a;r++)n.push(e+r*i);return n},sg={mouse:(function(){var e=function(){return{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}};try{return new MouseEvent("t"),function(t,i,n){n===void 0&&(n=e()),t.dispatchEvent(new MouseEvent(i,n))}}catch{return function(i,n,a){a===void 0&&(a=e());var r=xe.createEvent("MouseEvent");r.initMouseEvent(n,a.bubbles,a.cancelable,ee,0,a.screenX,a.screenY,a.clientX,a.clientY,!1,!1,!1,!1,0,null),i.dispatchEvent(r)}}})(),touch:function(e,t,i){var n=new Touch(Bi({identifier:Date.now(),target:e,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},i));e.dispatchEvent(new TouchEvent(t,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[n],targetTouches:[],changedTouches:[n]}))}},Xt=(function(){function e(){return M$(Uh,Xh,Yh,Vh,jh,Gh,Hh,Wh,e.data)}return e.setOptions=function(t){this.data=t.reduce(function(i,n){return J(J({},i),n)},this.data)},e.data={},e})(),Rs={element:(function(){function e(){return{chart:null,main:null,svg:null,axis:{x:null,y:null,y2:null,subX:null},axisTooltip:{x:null,y:null,y2:null},defs:null,tooltip:null,legend:null,title:null,subchart:{main:null,bar:null,line:null,area:null},arcs:null,bar:null,candlestick:null,line:null,area:null,circle:null,radar:null,text:null,grid:{main:null,x:null,y:null},gridLines:{main:null,x:null,y:null},region:{main:null,list:null},eventRect:null,zoomResetBtn:null}}return e})(),state:(function(){function e(){return{width:0,width2:0,height:0,height2:0,margin:{top:0,bottom:0,left:0,right:0},margin2:{top:0,bottom:0,left:0,right:0},margin3:{top:0,bottom:0,left:0,right:0},arcWidth:0,arcHeight:0,xAxisHeight:0,hasAxis:!1,hasFunnel:!1,hasRadar:!1,hasTreemap:!1,cssRule:{},loading:void 0,domain:void 0,current:{domain:void 0,width:0,height:0,dataMax:0,maxTickSize:{x:{width:0,height:0,ticks:[],clipPath:0,domain:""},y:{width:0,height:0,domain:""},y2:{width:0,height:0,domain:""}},types:[],needle:void 0,zoomDomain:null},isLegendRight:!1,isLegendInset:!1,isLegendTop:!1,isLegendLeft:!1,legendStep:0,legendItemWidth:0,legendItemHeight:0,legendHasRendered:!1,eventReceiver:{currentIdx:-1,rect:{},data:[],coords:[]},axis:{x:{padding:{left:0,right:0},tickCount:0}},rotatedPadding:{left:30,right:0,top:5},withoutFadeIn:{},inputType:"",datetimeId:"",clip:{id:"",idXAxis:"",idYAxis:"",idXAxisTickTexts:"",idGrid:"",idSubchart:"",path:"",pathXAxis:"",pathYAxis:"",pathXAxisTickTexts:"",pathGrid:""},event:null,dragStart:null,dragging:!1,flowing:!1,cancelClick:!1,mouseover:!1,rendered:!1,transiting:!1,redrawing:!1,resizing:!1,toggling:!1,zooming:!1,hasNegativeValue:!1,hasPositiveValue:!0,orgAreaOpacity:"0.2",orgConfig:{},hiddenTargetIds:[],hiddenLegendIds:[],focusedTargetIds:[],defocusedTargetIds:[],radius:0,innerRadius:0,outerRadius:void 0,innerRadiusRatio:0,gaugeArcWidth:0,radiusExpanded:0,xgridAttr:{x1:null,x2:null,y1:null,y2:null},pendingRaf:null,rafBatchQueue:[]}}return e})()},lg=(function(){function e(){var t=this;Object.keys(Rs).forEach(function(i){t[i]=new Rs[i]})}return e.prototype.getStore=function(t){return this[t]},e})(),Te={bubbleBaseLength:"$baseLength",colorPattern:"__colorPattern__",dataMinMax:"$dataMinMax",dataTotalSum:"$dataTotalSum",dataTotalPerIndex:"$totalPerIndex",filteredTargets:"$filteredTargets",visibilityChecksum:"visibilityChecksum",legendItemTextBox:"legendItemTextBox",legendItemMap:"$legendItemMap",radarPoints:"$radarPoints",radarTextWidth:"$radarTextWidth",setOverOut:"setOverOut",callOverOutForTouch:"callOverOutForTouch",textRect:"textRect",shapeOffset:"$shapeOffset"},cg=(function(){function e(){this.cache={}}return e.prototype.add=function(t,i,n){return n===void 0&&(n=!1),this.cache[t]=n?this.cloneTarget(i):i,this.cache[t]},e.prototype.remove=function(t){var i=this;(le(t)?[t]:t).forEach(function(n){return delete i.cache[n]})},e.prototype.get=function(t,i){if(i===void 0&&(i=!1),i&&Array.isArray(t)){for(var n=[],a=0,r=void 0;r=t[a];a++)r in this.cache&&n.push(this.cloneTarget(this.cache[r]));return n}else{var o=this.cache[t];return te(o)?o:null}},e.prototype.has=function(t){return t in this.cache&&this.cache[t]!==null},e.prototype.getKeys=function(){return Object.keys(this.cache)},e.prototype.reset=function(t){var i=this;for(var n in i.cache)(t||/^\$/.test(n))&&(i.cache[n]=null)},e.prototype.cloneTarget=function(t){return{id:t.id,id_org:t.id_org,values:t.values.map(function(i){return{x:i.x,value:i.value,id:i.id}})}},e})(),G={AREA:"area",AREA_LINE_RANGE:"area-line-range",AREA_SPLINE:"area-spline",AREA_SPLINE_RANGE:"area-spline-range",AREA_STEP:"area-step",AREA_STEP_RANGE:"area-step-range",BAR:"bar",BUBBLE:"bubble",CANDLESTICK:"candlestick",DONUT:"donut",FUNNEL:"funnel",GAUGE:"gauge",LINE:"line",PIE:"pie",POLAR:"polar",RADAR:"radar",SCATTER:"scatter",SPLINE:"spline",STEP:"step",TREEMAP:"treemap"},dr={AREA:"initArea",AREA_LINE_RANGE:"initArea",AREA_SPLINE:"initArea",AREA_SPLINE_RANGE:"initArea",AREA_STEP:"initArea",AREA_STEP_RANGE:"initArea",BAR:"initBar",BUBBLE:"initCircle",CANDLESTICK:"initCandlestick",DONUT:"initArc",FUNNEL:"initFunnel",GAUGE:"initArc",LINE:"initLine",PIE:"initArc",POLAR:"initPolar",RADAR:"initCircle",SCATTER:"initCircle",SPLINE:"initLine",STEP:"initLine",TREEMAP:"initTreemap"},St={Area:[G.AREA,G.AREA_SPLINE,G.AREA_SPLINE_RANGE,G.AREA_LINE_RANGE,G.AREA_STEP,G.AREA_STEP_RANGE],AreaRange:[G.AREA_SPLINE_RANGE,G.AREA_LINE_RANGE,G.AREA_STEP_RANGE],Arc:[G.PIE,G.DONUT,G.GAUGE,G.POLAR,G.RADAR],Line:[G.LINE,G.SPLINE,G.AREA,G.AREA_SPLINE,G.AREA_SPLINE_RANGE,G.AREA_LINE_RANGE,G.STEP,G.AREA_STEP,G.AREA_STEP_RANGE],Step:[G.STEP,G.AREA_STEP,G.AREA_STEP_RANGE],Spline:[G.SPLINE,G.AREA_SPLINE,G.AREA_SPLINE_RANGE]},ug=ee.setTimeout,dg=ee.clearTimeout,fr={},fg={convertData:function(e,t){var i=this.config,n=function(r){return r?.length&&!Ze(r[0])?i.boost_useWorker:!1},a=e;if(e.bindto&&(a={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach(function(r){var o="data_".concat(r);o in e&&(a[r]=e[o])})),a.url&&t)G$(a.url,a.mimeType,a.headers,_h(a.keys,i),t);else if(a.json)gs(n(a.json),ph,t,[vs,ps])(a.json,_h(a.keys,i));else if(a.rows)gs(n(a.rows),ps,t)(a.rows);else if(a.columns)gs(n(a.columns),vs,t)(a.columns);else if(e.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets:function(e,t){var i=this,n=i.axis,a=i.config,r=i.state,o=a.data_type,s=Object.keys(e[0]||{}),l=s.length?s.reduce(function(h,g){return i.isX.call(i,g)?h.xs.push(g):i.isNotX.call(i,g)&&h.ids.push(g),h},{ids:[],xs:[]}):{ids:[],xs:[]},c=l.ids,u={appendXs:t,xs:l.xs,idConverter:a.data_idConverter.bind(i.api),categorized:n?.isCategorized(),timeSeries:n?.isTimeSeries(),customX:n?.isCustomX()};W$.bind(i)(c,e,u);var d=c.map(function(h,g){var p=a.data_idConverter.bind(i.api)(h),m=i.getXKey(h),v=u.customX&&u.categorized,_=v&&(function(){var $=hh(a.axis_x_categories);return e.every(function(T){return $.has(T.x)})})(),x=e.__append__,y=m===null&&x?i.api.data.values(h).length:0;return{id:p,id_org:h,values:e.map(function($,T){var A=$[m],S=$[h],R;return S=S!==null&&!isNaN(S)&&!ce(S)?+S:de(S)||ce(S)?S:null,(v||r.hasRadar)&&g===0&&!we(A)?(!_&&g===0&&T===0&&!x&&(a.axis_x_categories=[]),R=a.axis_x_categories.indexOf(A),R===-1&&(R=a.axis_x_categories.length,a.axis_x_categories.push(A))):R=i.generateTargetX(A,h,y+T),(we(S)||i.data.xs[h].length<=T)&&(R=void 0),{x:R,value:S,id:p,index:-1}}).filter(function($){return ve($.x)})}});if(d.forEach(function(h){var g;a.data_xSort&&(h.values=h.values.sort(function(p,m){return(p.x||p.x===0?p.x:1/0)-(m.x||m.x===0?m.x:1/0)})),h.values.forEach(function(p,m){return p.index=m}),(g=i.data.xs[h.id])===null||g===void 0||g.sort(function(p,m){return p-m})}),r.hasNegativeValue=i.hasNegativeValueInTargets(d),r.hasPositiveValue=i.hasPositiveValueInTargets(d),o&&i.isValidChartType(o)){var f=i.mapToIds(d).filter(function(h){return!(h in a.data_types)||!i.isValidChartType(a.data_types[h])});i.setTargetType(f,o)}return d.forEach(function(h){return i.cache.add(h.id_org,h,!0)}),d}},hg={isX:function(e){var t=this.config,i=t.data_x&&e===t.data_x,n=Se(t.data_xs)&&R$(t.data_xs,e);return i||n},isNotX:function(e){return!this.isX(e)},isStackNormalized:function(){var e=this.config;return!!((e.data_stack_normalize===!0||Ye(e.data_stack_normalize))&&e.data_groups.length)},isStackNormalizedPerGroup:function(){var e,t=this.config;return!!(Ye(t.data_stack_normalize)&&(!((e=t.data_stack_normalize)===null||e===void 0)&&e.perGroup)&&t.data_groups.length)},isGrouped:function(e){var t=this.config.data_groups;return e?t.some(function(i){return i.indexOf(e)>=0&&i.length>1}):t.length>0},hasAxisGroupedData:function(e){var t=this,i=t.axis;return t.data.targets.filter(function(n){return i.getId(n.id)===e}).map(function(n){return n.id}).some(function(n){return t.isGrouped(n)})},getXKey:function(e){var t=this.config;return t.data_x?t.data_x:Se(t.data_xs)?t.data_xs[e]:null},getXValuesOfXKey:function(e,t){var i=this,n=t&&Se(t)?i.mapToIds(t):[],a;return n.forEach(function(r){i.getXKey(r)===e&&(a=i.data.xs[r])}),a},getIndexByX:function(e,t){var i=this;return t?t.indexOf(le(e)?e:+e):(i.filterByX(i.data.targets,e)[0]||{index:null}).index},getXValue:function(e,t){var i=this;return e in i.data.xs&&i.data.xs[e]&&te(i.data.xs[e][t])?i.data.xs[e][t]:t},getOtherTargetXs:function(){var e=this,t=Object.keys(e.data.xs);return t.length?e.data.xs[t[0]]:null},getOtherTargetX:function(e){var t=this.getOtherTargetXs();return t&&e<t.length?t[e]:null},addXs:function(e){var t=this.config;Object.keys(e).forEach(function(i){t.data_xs[i]=e[i]})},isMultipleX:function(){return!this.config.axis_x_forceAsSingle&&(Se(this.config.data_xs)||this.hasType("bubble")||this.hasType("scatter"))},addName:function(e){var t=this.config,i;return e&&(i=t.data_names[e.id],e.name=i!==void 0?i:e.id),e},getAllValuesOnIndex:function(e,t){t===void 0&&(t=!1);var i=this,n=i.filterTargetsToShow(i.data.targets).map(function(a){return i.addName(i.getValueOnIndex(a.values,e))});return t&&(n=n.filter(function(a){return a&&"value"in a&&te(a.value)})),n},getValueOnIndex:function(e,t){var i=e.filter(function(n){return n.index===t});return i.length?i[0]:null},updateTargetX:function(e,t){var i=this;e.forEach(function(n){n.values.forEach(function(a,r){a.x=i.generateTargetX(t[r],n.id,r)}),i.data.xs[n.id]=t})},updateTargetXs:function(e,t){var i=this;e.forEach(function(n){t[n.id]&&i.updateTargetX([n],t[n.id])})},generateTargetX:function(e,t,i){var n=this,a=n.axis,r=a?.isCategorized()?i:e||i;if(a?.isTimeSeries()){var o=Je.bind(n);r=o(e||n.getXValue(t,i))}else a?.isCustomX()&&!a?.isCategorized()&&(r=te(e)?+e:n.getXValue(t,i));return r},updateXs:function(e){e.length&&(this.axis.xs=e.map(function(t){return t.x}))},getPrevX:function(e){var t=this.axis.xs[e-1];return ve(t)?t:null},getNextX:function(e){var t=this.axis.xs[e+1];return ve(t)?t:null},getBaseValue:function(e){var t=this,i=t.state.hasAxis,n=e.value;return n&&i&&(t.isAreaRangeType(e)?n=t.getRangedData(e,"mid"):t.isBubbleZType(e)&&(n=t.getBubbleZData(n,"y"))),n},getMinMaxValue:function(e){var t=this.getBaseValue.bind(this),i,n;return(e||this.data.targets.map(function(a){return a.values})).forEach(function(a,r){var o=a.map(t).filter(q);i=Math.min.apply(Math,Ae([r?i:1/0],o,!1)),n=Math.max.apply(Math,Ae([r?n:-1/0],o,!1))}),{min:i,max:n}},getMinMaxData:function(){var e=this,t=Te.dataMinMax,i=e.cache.get(t);if(!i){var n=e.data.targets.map(function(c){return c.values}),a=e.getMinMaxValue(n),r=[],o=[],s=a.min,l=a.max;n.forEach(function(c){var u=e.getFilteredDataByValue(c,s),d=e.getFilteredDataByValue(c,l);u.length&&(r=r.concat(u)),d.length&&(o=o.concat(d))}),e.cache.add(t,i={min:r,max:o})}return i},getTotalPerIndex:function(e){var t=this,i=t.config,n=e?"".concat(Te.dataTotalPerIndex,"-").concat(e):Te.dataTotalPerIndex,a=t.cache.get(n);if((t.config.data_groups.length||t.isStackNormalized())&&!a){a=[];var r=t.data.targets;if(t.isStackNormalizedPerGroup()&&e){var o=i.data_groups.find(function(s){return s.indexOf(e)>=0});if(o)r=r.filter(function(s){return o.indexOf(s.id)>=0});else return null}r.forEach(function(s){s.values.forEach(function(l,c){a[c]||(a[c]=0),a[c]+=~~l.value})}),t.cache.add(n,a)}return a},getTotalDataSum:function(e){var t=this,i=Te.dataTotalSum,n=t.cache.get(i);return q(n)||(n=t.data.targets.reduce(function(a,r){return a+r.values.reduce(function(o,s){var l;return o+((l=s.value)!==null&&l!==void 0?l:0)},0)},0),t.cache.add(i,n)),e&&(n-=t.getHiddenTotalDataSum()),n},getHiddenTotalDataSum:function(){var e=this,t=e.api,i=e.state.hiddenTargetIds,n=0;return i.length&&(n=t.data.values.bind(t)(i).reduce(function(a,r){return a+r})),n},getFilteredDataByValue:function(e,t){var i=this;return e.filter(function(n){return i.getBaseValue(n)===t})},getMaxDataCount:function(){return Math.max.apply(Math,Ae(Ae([],this.data.targets.map(function(e){return e.values.length}),!1),[0],!1))},getMaxDataCountTarget:function(){var e=this.filterTargetsToShow()||[],t=e.length,i=this.config.axis_x_inverted;return t>1?(e=e.map(function(n){return n.values}).reduce(function(n,a){return n.concat(a)}).map(function(n){return n.x}),e=Xi(fs(e)).map(function(n,a,r){return{x:n,index:i?r.length-a-1:a}})):t&&(e=e[0].values.concat()),e},mapToIds:function(e){return e.map(function(t){return t.id})},mapToTargetIds:function(e){var t=this;return e?de(e)?e.concat():[e]:t.mapToIds(t.data.targets)},hasTarget:function(e,t){for(var i=this.mapToIds(e),n=0,a=void 0;a=i[n];n++)if(a===t)return!0;return!1},isTargetToShow:function(e){return this.state.hiddenTargetIds.indexOf(e)<0},isLegendToShow:function(e){return this.state.hiddenLegendIds.indexOf(e)<0},filterTargetsToShow:function(e){var t=this;if(!e){var i=t.cache,n=t.data,a=t.state,r=Te.filteredTargets,o=a.hiddenTargetIds.join(",");if(o!==i.get(Te.visibilityChecksum)&&(i.remove(r),i.add(Te.visibilityChecksum,o)),i.has(r))return i.get(r);var s=n.targets.filter(function(l){return t.isTargetToShow(l.id)});return i.add(r,s),s}return e.filter(function(l){return t.isTargetToShow(l.id)})},mapTargetsToUniqueXs:function(e){var t=this.axis,i=[];return e?.length&&(i=fs(uh(e.map(function(n){return n.values.map(function(a){return+a.x})}))),i=t?.isTimeSeries()?i.map(function(n){return new Date(+n)}):i.map(Number)),Xi(i)},addTargetIds:function(e,t){var i=this.state;(de(t)?t:[t]).forEach(function(n){i[e].indexOf(n)<0&&i[e].push(n)})},removeTargetIds:function(e,t){var i=this.state;(de(t)?t:[t]).forEach(function(n){var a=i[e].indexOf(n);a>=0&&i[e].splice(a,1)})},addHiddenTargetIds:function(e){this.addTargetIds("hiddenTargetIds",e)},removeHiddenTargetIds:function(e){this.removeTargetIds("hiddenTargetIds",e)},addHiddenLegendIds:function(e){this.addTargetIds("hiddenLegendIds",e)},removeHiddenLegendIds:function(e){this.removeTargetIds("hiddenLegendIds",e)},getValuesAsIdKeyed:function(e){var t=this,i=t.state.hasAxis,n={},a=t.isMultipleX(),r=a?t.mapTargetsToUniqueXs(e).map(function(s){return le(s)?s:+s}):null,o=r?new Map(r.map(function(s,l){return[s,l]})):null;return e.forEach(function(s){var l=[];s.values.filter(function(c){var u=c.value;return te(u)||u===null}).forEach(function(c){var u=c.value;if(u!==null&&t.isCandlestickType(c)&&(u=de(u)?u.slice(0,4):[u.open,u.high,u.low,u.close]),de(u))l.push.apply(l,u);else if(ce(u)&&"high"in u)l.push.apply(l,Object.values(u));else if(t.isBubbleZType(c))l.push(i&&t.getBubbleZData(u,"y"));else if(a&&o){var d=le(c.x)?c.x:+c.x,f=o.get(d);f!==void 0&&(l[f]=u)}else l.push(u)}),n[s.id]=l}),n},checkValueInTargets:function(e,t){return Object.keys(e).some(function(i){return e[i].values.some(function(n){return t(n.value)})})},hasMultiTargets:function(){return this.filterTargetsToShow().length>1},hasNegativeValueInTargets:function(e){return this.checkValueInTargets(e,function(t){return t<0})},hasPositiveValueInTargets:function(e){return this.checkValueInTargets(e,function(t){return t>0})},orderTargets:function(e){var t=this,i=Ae([],e,!0),n=t.getSortCompareFn();return n&&i.sort(n),i},getSortCompareFn:function(e){e===void 0&&(e=!1);var t=this,i=t.config.data_order,n=/asc/i.test(i),a=/desc/i.test(i),r;if(n||a){var o=function(l,c){return l+Math.abs(c.value)},s=function(l){return q(l)?l:"values"in l?l.values.reduce(o,0):l.value};r=function(l,c){var u=s(l),d=s(c);return e?n?u-d:d-u:n?d-u:u-d}}else H(i)&&(r=i.bind(t.api));return r||null},filterByX:function(e,t){return uh(e.map(function(i){return i.values})).filter(function(i){return i.x-t===0})},filterNullish:function(e){var t=function(i){return te(i.value)};return e&&e.filter(function(i){return"value"in i?t(i):i.values.some(t)})},filterRemoveNull:function(e){var t=this;return e.filter(function(i){return te(t.getBaseValue(i))})},filterByXDomain:function(e,t){return e.map(function(i){return{id:i.id,id_org:i.id_org,values:i.values.filter(function(n){return t[0]<=n.x&&n.x<=t[1]})}})},hasDataLabel:function(){var e=this.config.data_labels;return ur(e)&&e||Ye(e)&&Se(e)},hasNullDataValue:function(e){return e.some(function(t){return t.value===null})},getDataIndexFromEvent:function(e){var t=this,i=t.$el,n=t.config,a=t.state,r=a.hasRadar,o=a.inputType,s=a.eventReceiver,l=s.coords,c=s.rect,u;if(r){var d=e.target;/tspan/i.test(d.tagName)&&(d=d.parentNode);var f=B(d).datum();u=f&&Object.keys(f).length===1?f.index:void 0}else{var h=n.axis_rotated,g=lh(i.chart.node()),p=o==="touch"&&e.changedTouches?e.changedTouches[0]:e,m=h?p.clientY+g.y:p.clientX+g.x;if(hs(i.svg)){var v=[m,0];h&&v.reverse(),m=rr.apply(void 0,Ae([i.eventRect.node()],v,!1))[h?"y":"x"]}else m-=h?c.top:c.left;u=ds(l,m,0,l.length-1,h)}return u},getDataLabelLength:function(e,t,i){var n,a=this,r=1.3;return((n=a.getTextRect([e,t].map(function(o){return a.dataLabelFormat()(o)})))===null||n===void 0?void 0:n.map(function(o){return o[i]*r}))||[0,0]},isNoneArc:function(e){return this.hasTarget(this.data.targets,e.id)},isArc:function(e){return"data"in e&&this.hasTarget(this.data.targets,e.data.id)},findSameXOfValues:function(e,t){var i=e[t].x,n=[],a;for(a=t-1;a>=0&&i===e[a].x;a--)n.push(e[a]);for(a=t;a<e.length&&i===e[a].x;a++)n.push(e[a]);return n},findClosestFromTargets:function(e,t){var i=this,n=e.map(function(a){return i.findClosest(a.values,t)});return i.findClosest(n,t)},findClosest:function(e,t){var i=this,n=i.$el.main,a=e.filter(function(s){return s&&te(s.value)}),r,o;return a.filter(function(s){return i.isBarType(s.id)||i.isCandlestickType(s.id)}).forEach(function(s){var l=i.isBarType(s.id)?".".concat(He.chartBar,".").concat(Q.target).concat(i.getTargetSelectorSuffix(s.id)," .").concat(He.bar,"-").concat(s.index):".".concat(_t.chartCandlestick,".").concat(Q.target).concat(i.getTargetSelectorSuffix(s.id)," .").concat(_t.candlestick,"-").concat(s.index," path");!o&&i.isWithinBar(n.select(l).node())&&(o=s)}),a.filter(function(s){return!i.isBarType(s.id)&&!i.isCandlestickType(s.id)}).forEach(function(s){var l=i.dist(s,t);r=i.getPointSensitivity(s),l<r&&(r=l,o=s)}),o},dist:function(e,t){var i=this,n=i.config.axis_rotated,a=i.scale,r=+n,o=+!n,s=i.circleY(e,e.index),l=(a.zoom||a.x)(e.x);return Math.sqrt(Math.pow(l-t[r],2)+Math.pow(s-t[o],2))},convertValuesToStep:function(e){var t=this,i=t.axis,n=t.config.line_step_type,a=i?i.isCategorized():!1,r=de(e)?e.concat():[e];if(!(a||/step\-(after|before)/.test(n)))return e;if(r.length){var o=r[0],s=r[r.length-1],l=o.id,c=o.x;r.unshift({x:--c,value:o.value,id:l}),a&&n==="step-after"&&r.unshift({x:--c,value:o.value,id:l}),c=s.x,r.push({x:++c,value:s.value,id:l}),a&&n==="step-before"&&r.push({x:++c,value:s.value,id:l})}return r},convertValuesToRange:function(e){var t=de(e)?e.concat():[e],i=[];return t.forEach(function(n){var a=n.x,r=n.id;i.push({x:a,id:r,value:n.value[0]}),i.push({x:a,id:r,value:n.value[2]})}),i},updateDataAttributes:function(e,t){var i=this,n=i.config["data_".concat(e)];return we(t)||(Object.keys(t).forEach(function(a){n[a]=t[a]}),i.redraw({withLegend:!0})),n},getRangedData:function(e,t,i){t===void 0&&(t=""),i===void 0&&(i="areaRange");var n=e?.value;if(de(n)){if(i==="bar")return n.reduce(function(r,o){return o-r});var a={areaRange:["high","mid","low"],candlestick:["open","high","low","close","volume"]}[i].indexOf(t);return a>=0&&n?n[a]:void 0}else if(n&&t)return n[t];return n},setRatioForGroupedData:function(e){var t=this;if(t.config.data_groups.length&&e.some(function(n){return t.isGrouped(n.id)})){var i=function(n){return t.getRatio("index",n,!0)};e.forEach(function(n){"values"in n?n.values.forEach(i):i(n)})}},getRatio:function(e,t,i){i===void 0&&(i=!1);var n=this,a=n.config,r=n.state,o=n.api,s=0;if(t&&o.data.shown().length)if(s=t.ratio||t.value,e==="arc")if(n.pie.padAngle()())s=t.value/n.getTotalDataSum(!0);else{var l=a.gauge_fullCircle?n.getArcLength():n.getStartingAngle()*-2,c=n.hasType("gauge")?l:Math.PI*2;s=(t.endAngle-t.startAngle)/c}else if(e==="index"){var u=o.data.values.bind(o),d=r.hiddenTargetIds,f=this.getTotalPerIndex(n.isStackNormalizedPerGroup()?t.id:void 0);if(f===null)return s;if(d.length){var h=d;if(n.isStackNormalizedPerGroup()&&t.id){var g=a.data_groups.find(function(_){return _.indexOf(t.id)>=0});g&&(h=h.filter(function(_){return g.indexOf(_)>=0}))}if(h.length){var p=u(h,!1);p.length&&(p=p.reduce(function(_,x){return _.map(function(y,$){return~~y+x[$]})}),f=f.map(function(_,x){return _-p[x]}))}}var m=f[t.index];t.ratio=q(t.value)&&f&&m?t.value/m:0,s=t.ratio}else if(e==="radar")s=parseFloat(String(Math.max(t.value,0)))/r.current.dataMax*a.radar_size_ratio;else if(e==="bar"){var v=n.getYScaleById.bind(n)(t.id).domain().reduce(function(_,x){return x-_});s=v===0?0:Math.abs(n.getRangedData(t,null,e)/v)}else e==="treemap"&&(s/=n.getTotalDataSum(!0));return i&&s?s*100:s},updateDataIndexByX:function(e){var t=this,i=e.reduce(function(n,a,r){return n[Number(a.x)]=r,n},{});t.data.targets.forEach(function(n){n.values.forEach(function(a,r){var o=i[Number(a.x)];o===void 0&&(o=r),a.index=o})})},isBubbleZType:function(e){return this.isBubbleType(e)&&(ce(e.value)&&("z"in e.value||"y"in e.value)||de(e.value)&&e.value.length>=2)},isBarRangeType:function(e){var t=this,i=e.value;return t.isBarType(e)&&de(i)&&i.length>=2&&i.every(q)},getDataById:function(e){var t,i=this.cache.get(e)||this.api.data(e);return(t=i?.[0])!==null&&t!==void 0?t:i}},gg={load:function(e,t){var i=this,n=i.axis,a=i.data,r=i.org,o=i.scale,s=t.append,l={domain:null,currentDomain:null,x:null},c=e;c&&(t.filter&&(c=c.filter(t.filter)),(t.type||t.types)&&c.forEach(function(u){var d,f=((d=t.types)===null||d===void 0?void 0:d[u.id])||t.type;i.setTargetType(u.id,f)}),a.targets.forEach(function(u){for(var d=0;d<c.length;d++)if(u.id===c[d].id){u.values=s?u.values.concat(c[d].values):c[d].values,c.splice(d,1);break}}),a.targets=a.targets.concat(c)),i.updateTargets(a.targets),o.zoom&&(l.x=n.isCategorized()?o.x.orgScale():(r.xScale||o.x).copy(),l.domain=i.getXDomain(a.targets),l.x.domain(l.domain),l.currentDomain=i.zoom.getDomain(),i.withinRange(l.currentDomain,void 0,l.domain)||(o.x.domain(l.domain),o.zoom=null,i.$el.eventRect.property("__zoom",null))),i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),o.zoom?(r.xDomain=l.domain,r.xScale=l.x,n.isCategorized()&&(l.currentDomain=i.getZoomDomainValue(l.currentDomain),r.xDomain=i.getZoomDomainValue(r.xDomain),r.xScale=l.x.domain(r.xDomain)),i.updateCurrentZoomTransform(l.x,l.currentDomain)):r.xScale&&r.xScale.domain(r.xDomain),i.updateTypesElements(),xh.call(i,t.done,t.resizeAfter)},loadFromArgs:function(e){var t=this;t.config&&(t.cache.reset(),t.convertData(e,function(i){var n=e.data||i;e.append&&(n.__append__=!0),n&&t.load(t.convertDataToTargets.call(t,n),e)}))},unload:function(e,t){var i,n=this,a=n.state,r=n.$el,o=n.$T,s=!!(!((i=n.hasLegendDefsPoint)===null||i===void 0)&&i.call(n)),l=t,c=e;if(n.cache.reset(),l||(l=function(){}),c=c.filter(function(u){return n.hasTarget(n.data.targets,u)}),!c||c.length===0){l();return}c.forEach(function(u){var d,f=n.getTargetSelectorSuffix(u);a.withoutFadeIn[u]=!1,r.legend&&r.legend.selectAll(".".concat(ge.legendItem).concat(f)).remove(),n.data.targets=n.data.targets.filter(function(h){return h.id!==u}),s&&((d=r.defs)===null||d===void 0||d.select("#".concat(n.getDefsPointId(f))).remove())}),a.hasFunnel&&n.updateFunnel(n.data.targets),a.hasTreemap&&n.updateTargetsForTreemap(n.data.targets),n.updateTypesElements(),o(r.svg.selectAll(c.map(function(u){return n.selectorTarget(u)}))).style("opacity","0").remove().call(ar,l)}},vg={setExpand:function(e,t,i){var n=this,a=n.config;n.$el.circle&&a.point_focus_expand_enabled&&n.expandCircles(e,t,i),n.expandBarTypeShapes(!0,e,t,i)},expandBarTypeShapes:function(e,t,i,n){e===void 0&&(e=!0);var a=this;["bar","candlestick"].filter(function(r){return a.$el[r]}).forEach(function(r){n&&a.$el[r].classed(Q.EXPANDED,!1),a.getShapeByIndex(r,t,i).classed(Q.EXPANDED,e)})},setOverOut:function(e,t){var i=this,n=i.config,a=i.state,r=a.hasFunnel,o=a.hasRadar,s=a.hasTreemap,l=i.$el.main,c=ce(t);if(c||t!==-1){var u=n[e?"data_onover":"data_onout"].bind(i.api);if(n.color_onover&&i.setOverColor(e,t,c),c){var d=i.getTargetSelectorSuffix(t.id),f=r||s?"".concat(Q.target+d," .").concat(be.shape):ne.arc+d;u(t,l.select(".".concat(f)).node())}else if(n.tooltip_grouped)e&&(o&&i.isPointFocusOnly()?i.showCircleFocus(i.getAllValuesOnIndex(t,!0)):i.setExpand(t,null,!0)),!i.isMultipleX()&&l.selectAll(".".concat(be.shape,"-").concat(t)).each(function(v){u(v,this)});else{var h=i.cache.get(Te.setOverOut)||[],g=l.selectAll(".".concat(be.shape,"-").concat(t)).filter(function(v){return i.isWithinShape(this,v)}),p=g.filter(function(){var v=this;return h.every(function(_){return _!==v})});if(!e||g.empty()||h.length===p.size()&&p.nodes().every(function(v,_){return v!==h[_]}))for(;h.length;){var m=h.pop();n.data_onout.bind(i.api)(B(m).datum(),m)}p.each(function(){e&&(u(B(this).datum(),this),h.push(this))}),i.cache.add(Te.setOverOut,h)}}},callOverOutForTouch:function(e){var t=this,i=t.cache.get(Te.callOverOutForTouch);(ce(e)&&i?e.id!==i.id:e!==i)&&((i||q(i))&&t.setOverOut(!1,i),(e||q(e))&&t.setOverOut(!0,e),t.cache.add(Te.callOverOutForTouch,e))},getDraggableSelection:function(){var e=this,t=e.config,i=e.state;return t.interaction_enabled&&t.data_selection_draggable&&e.drag?$u().on("drag",function(n){i.event=n,e.drag(Qe(n,this))}).on("start",function(n){i.event=n,e.dragstart(Qe(n,this))}).on("end",function(n){i.event=n,e.dragend()}):function(){}},dispatchEvent:function(e,t,i){var n,a,r,o=this,s=o.config,l=o.state,c=l.eventReceiver,u=l.hasAxis,d=l.hasFunnel,f=l.hasRadar,h=l.hasTreemap,g=o.$el,p=g.eventRect,m=g.funnel,v=g.radar,_=g.svg,x=g.treemap,y=(r=(a=(d||h)&&c.rect||f&&v.axes.select(".".concat(Ee.axis,"-").concat(t," text"))||p||((n=o.getArcElementByIdOrIndex)===null||n===void 0?void 0:n.call(o,t)))===null||a===void 0?void 0:a.node)===null||r===void 0?void 0:r.call(a);if(y){var $=o.isMultipleX(),T=s.axis_rotated,A=Le(y),S=A.width,R=A.left,C=A.top;if(u&&!f&&!$){var E=c.coords[t];E?(S=E.w,R+=E.x,C+=E.y):(S=0,R=0,C=0)}var k=R+(i?i[0]:0)+($||T?0:S/2),P=C+(i?i[1]:0)+(T?4:0);if(hs(_)){var w=rr(o.$el.eventRect.node(),k,P,!1);k=w.x,P=w.y}var D={screenX:k,screenY:P,clientX:k,clientY:P,bubbles:f};(d||h)&&(y=(m??x).node()),sg[/^(mouse|click)/.test(e)?"mouse":"touch"](y,e,D)}},setDragStatus:function(e){this.state.dragging=e},unbindZoomEvent:function(){var e=this.$el,t=e.eventRect,i=e.zoomResetBtn;t?.on(".zoom wheel.zoom .drag",null),i?.on("click",null).style("display","none")},unbindAllEvents:function(){var e,t=this,i=t.$el,n=i.arcs,a=i.eventRect,r=i.legend,o=i.region,s=i.svg,l=i.treemap,c=t.brush,u=["wheel","click","mouseover","mousemove","mouseout","touchstart","touchmove","touchend","touchstart.eventRect","touchmove.eventRect","touchend.eventRect",".brush",".drag",".zoom","wheel.zoom","dblclick.zoom"].join(" ");[s,a,o?.list,c?.getSelection(),n?.selectAll("path"),r?.selectAll("g"),l].forEach(function(d){return d?.on(u,null)}),(e=t.unbindZoomEvent)===null||e===void 0||e.call(t)}},pg={categoryName:function(e){var t,i=this.config.axis_x_categories;return(t=i?.[e])!==null&&t!==void 0?t:e}},mg={generateClass:function(e,t){return" ".concat(e," ").concat(e+this.getTargetSelectorSuffix(t))},getClass:function(e,t){var i=this,n=/s$/.test(e),a=/^(area|arc|line|funnel|treemap)s?$/.test(e),r=n?"id":"index";return function(o){var s=o.data||o;return((t?i.generateClass(ue[n?"shapes":"shape"],s[r]):"")+i.generateClass(ue[e],s[a?"id":r])).trim()}},getChartClass:function(e){var t=this;return function(i){return ue["chart".concat(e)]+t.classTarget((i.data?i.data:i).id)}},generateExtraLineClass:function(){var e=this.config.line_classes||[],t=[];return function(i){var n,a=i.id||((n=i.data)===null||n===void 0?void 0:n.id)||i;return t.indexOf(a)<0&&t.push(a),e[t.indexOf(a)%e.length]}},classRegion:function(e,t){return"".concat(this.generateClass(ue.region,t)," ").concat("class"in e?e.class:"")},classTarget:function(e){var t=this.config.data_classes[e],i="";return t&&(i=" ".concat(ue.target,"-").concat(t)),this.generateClass(ue.target,e)+i},classFocus:function(e){return this.classFocused(e)+this.classDefocused(e)},classFocused:function(e){return" ".concat(this.state.focusedTargetIds.indexOf(e.id)>=0?ue.focused:"")},classDefocused:function(e){return" ".concat(this.state.defocusedTargetIds.indexOf(e.id)>=0?ue.defocused:"")},getTargetSelectorSuffix:function(e){return(e||e===0?"-".concat(e):"").replace(/[\x00-\x20\x7F-\xA0\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-")},selectorTarget:function(e,t,i){t===void 0&&(t=""),i===void 0&&(i="");var n=this.getTargetSelectorSuffix(e);return"".concat(t,".").concat(ue.target+n," ").concat(i,", ").concat(t,".").concat(ue.circles+n," ").concat(i)},selectorTargets:function(e,t){var i=this,n=e||[];return n.length?n.map(function(a){return i.selectorTarget(a,t)}):null},selectorLegend:function(e){return".".concat(ue.legendItem+this.getTargetSelectorSuffix(e))},selectorLegends:function(e){var t=this;return e?.length?e.map(function(i){return t.selectorLegend(i)}):null}},_g=function(e,t,i){var n=B(e.cloneNode(!0));return n.attr("id",i).insert("rect",":first-child").attr("width",n.attr("width")).attr("height",n.attr("height")).style("fill",t),{id:i,node:n.node()}},xg=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],yg={generateColor:function(){var e=this,t=e.$el,i=e.config,n=[],a=i.area_linearGradient||i.bar_linearGradient||i.point_radialGradient,r=Se(i.color_pattern)?i.color_pattern:Od(Y$(t.chart)||xg).range(),o=r;if(H(i.color_tiles)){var s=i.color_tiles.bind(e.api)(),l=r.map(function(c,u){var d=c.replace(/[#\(\)\s,]/g,""),f="".concat(e.state.datetimeId,"-pattern-").concat(d,"-").concat(u);return _g(s[u%s.length],c,f)});r=l.map(function(c){return"url(#".concat(c.id,")")}),e.patterns=l}return function(c){var u,d=i.data_colors,f=i.data_color,h=c.id||((u=c.data)===null||u===void 0?void 0:u.id)||c,g=e.isTypeOf(h,["line","spline","step"])||!i.data_types[h],p;if(H(d[h])?p=d[h].bind(e.api)(c):d[h]?p=d[h]:(n.indexOf(h)<0&&n.push(h),p=g?o[n.indexOf(h)%o.length]:r[n.indexOf(h)%r.length],d[h]=p),p=H(f)?f.call(e.api,p,c):p,a){var m=e.$el.defs.selectAll("[id$='-gradient".concat(e.getTargetSelectorSuffix(h),"'] stop")),v;m.each(function(_,x){v=x===0?this.style.stopColor:this.style.stopColor===v}),v===!0&&m.attr("stop-color",p)}return p}},generateLevelColor:function(){var e=this.config,t=e.color_pattern,i=e.color_threshold,n=i.unit==="value",a=i.max||100,r=i.values&&i.values.length?i.values:[];return Se(i)?function(o){for(var s=n?o:o*100/a,l=t[t.length-1],c=0,u=r.length;c<u;c++)if(s<=r[c]){l=t[c];break}return l}:null},generateTextBGColorFilter:function(e,t){t===void 0&&(t={x:0,y:0,width:1,height:1});var i=this,n=i.$el.defs,a=i.state;if(e){var r=[];le(e)?r.push(""):ce(e)?r=Object.keys(e):H(e)&&(r=i.mapToTargetIds()),r.forEach(function(o){var s="".concat(a.datetimeId,"-labels-bg").concat(i.getTargetSelectorSuffix(o)).concat(le(e)?i.getTargetSelectorSuffix(e):""),l=Oi(o===""?e:e?.[o]||"");n.select("#".concat(s)).empty()&&n.append("filter").attr("x",t.x).attr("y",t.y).attr("width",t.width).attr("height",t.height).attr("id",s).html('<feFlood flood-color="'.concat(l,`" />
32
+ <feComposite in="SourceGraphic" />`))})}},getGradienColortUrl:function(e){return"url(#".concat(this.state.datetimeId,"-gradient").concat(this.getTargetSelectorSuffix(e),")")},updateLinearGradient:function(){var e=this,t=e.config,i=e.data.targets,n=e.state.datetimeId,a=e.$el.defs;i.forEach(function(r){var o="".concat(n,"-gradient").concat(e.getTargetSelectorSuffix(r.id)),s=e.hasPointType()&&t.point_radialGradient,l=e.isAreaType(r)&&"area"||e.isBarType(r)&&"bar";if((s||l)&&a.select("#".concat(o)).empty()){var c=e.color(r),u={defs:null,stops:[]};if(s){var d=s.cx,f=d===void 0?.3:d,h=s.cy,g=h===void 0?.3:h,p=s.r,m=p===void 0?.7:p,v=s.stops,_=v===void 0?[[.1,c,0],[.9,c,1]]:v;u.stops=_,u.defs=a.append("radialGradient").attr("id","".concat(o)).attr("cx",f).attr("cy",g).attr("r",m)}else{var x=t.axis_rotated,y=t["".concat(l,"_linearGradient")],$=y.x,T=$===void 0?x?[1,0]:[0,0]:$,A=y.y,S=A===void 0?x?[0,0]:[0,1]:A,R=y.stops,_=R===void 0?[[0,c,1],[1,c,0]]:R;u.stops=_,u.defs=a.append("linearGradient").attr("id","".concat(o)).attr("x1",T[0]).attr("x2",T[1]).attr("y1",S[0]).attr("y2",S[1])}u.stops.forEach(function(C){var E=C[0],k=C[1],P=C[2],w=H(k)?k.bind(e.api)(r.id):k;u.defs&&u.defs.append("stop").attr("offset",E).attr("stop-color",w||c).attr("stop-opacity",P)})}})},setOverColor:function(e,t){var i=this,n=i.config,a=i.$el.main,r=n.color_onover,o=e?r:i.color;ce(o)?o=function(s){var l=s.id;return l in r?r[l]:i.color(l)}:le(o)?o=function(){return r}:H(r)&&(o=o.bind(i.api)),a.selectAll(ce(t)?".".concat(ne.arc).concat(i.getTargetSelectorSuffix(t.id)):".".concat(be.shape,"-").concat(t)).style("fill",o)}},bg={getYDomainMinMax:function(e,t){var i=this,n=i.axis,a=i.config,r=t==="min",o=a.data_groups,s=i.mapToIds(e),l=hh(s),c=i.getValuesAsIdKeyed(e);if(o.length>0){var u=i["has".concat(r?"Negative":"Positive","ValueInTargets")](e),d=new Map(s.map(function(f){return[f,n.getId(f)]}));o.forEach(function(f){var h=f.filter(function(m){return l.has(m)});if(h.length){var g=h[0],p=d.get(g);u&&c[g]&&(c[g]=c[g].map(function(m){return(r?m<0:m>0)?m:0})),h.filter(function(m,v){return v>0}).forEach(function(m){if(c[m]){var v=d.get(m);c[m].forEach(function(_,x){var y=+_;v===p&&!(u&&(r?y>0:y<0))&&(c[g][x]+=y)})}})}})}return lt(t,Object.keys(c).map(function(f){return lt(t,c[f])}))},isHiddenTargetWithYDomain:function(e){var t=this;return t.state.hiddenTargetIds.some(function(i){return t.axis.getId(i)===e})},getYDomain:function(e,t,i){var n=this,a=n.axis,r=n.config,o=n.scale,s="axis_".concat(t);if(n.isStackNormalized()&&e.filter(function(w){return a.getId(w.id)===t}).map(function(w){return w.id}).some(function(w){return n.isGrouped(w)}))return[0,100];var l=o?.[t]&&o[t].type==="log",c=e.filter(function(w){return a.getId(w.id)===t}),u=i?n.filterByXDomain(c,i):c;if(u.length===0)return n.isHiddenTargetWithYDomain(t)?o[t].domain():t==="y2"?o.y.domain():n.getYDomain(e,"y2",i);var d=r["".concat(s,"_min")],f=r["".concat(s,"_max")],h=r["".concat(s,"_center")],g=r["".concat(s,"_inverted")],p=n.hasDataLabel()&&r.axis_rotated,m=n.hasDataLabel()&&!r.axis_rotated,v=n.getYDomainMinMax(u,"min"),_=n.getYDomainMinMax(u,"max"),x=Ae([G.BAR,G.BUBBLE,G.SCATTER],St.Line,!0).some(function(w){var D=w.indexOf("area")>-1?"area":w;return n.hasType(w,u,!0)&&r["".concat(D,"_zerobased")]});v=te(d)?d:te(f)?v<=f?v:f-10:v,_=te(f)?f:te(d)?d<=_?_:d+10:_,isNaN(v)&&(v=0),isNaN(_)&&(_=v),v===_&&(v<0?_=0:v=0);var y=v>=0&&_>=0,$=v<=0&&_<=0;(te(d)&&y||te(f)&&$)&&(x=!1),x&&(y&&(v=0),$&&(_=0));var T=Math.abs(_-v),A={top:T*.1,bottom:T*.1};if(ve(h)){var S=Math.max(Math.abs(v),Math.abs(_));_=h+S,v=h-S}if(p){var R=Nt(o.y.range()),C=n.getDataLabelLength(v,_,"width").map(function(w){var D=w/R;return isFinite(D)?D:0});["bottom","top"].forEach(function(w,D){A[w]+=T*(C[D]/(1-C[0]-C[1]))})}else if(m){var E=n.getDataLabelLength(v,_,"height");["bottom","top"].forEach(function(w,D){A[w]+=n.convertPixelToScale("y",E[D],T)})}A=n.getResettedPadding(A);var k=r["".concat(s,"_padding")];Se(k)&&["bottom","top"].forEach(function(w){A[w]=a.getPadding(k,w,A[w],T)}),x&&(y&&(A.bottom=v),$&&(A.top=-_));var P=l?[v,_].map(function(w){return w<0?0:w}):[v-A.bottom,_+A.top];return g?P.reverse():P},getXDomainMinMax:function(e,t){var i,n=this,a=n.config["axis_x_".concat(t)],r=lt(t,e.map(function(s){return lt(t,s.values.map(function(l){return l.x}))})),o=ce(a)?a.value:a;return o=ve(o)&&(!((i=n.axis)===null||i===void 0)&&i.isTimeSeries())?Je.bind(this)(o):o,ce(a)&&a.fit&&(t==="min"&&o<r||t==="max"&&o>r)&&(o=void 0),ve(o)?o:r},getXDomainPadding:function(e,t){var i=this,n=i.axis,a=i.config.axis_x_padding,r=n.isTimeSeries()&&t,o=Nt(e),s;if(n.isCategorized()||r)s=0;else if(i.hasType("bar")){var l=i.getMaxDataCount();s=l>1?o/(l-1)/2:.5}else s=i.getResettedPadding(o*.01);var c=q(a)?{left:a,right:a}:a,u=c.left,d=u===void 0?s:u,f=c.right,h=f===void 0?s:f;if(a.unit==="px"){var g=Math.abs(o+o*.2);d=n.getPadding(a,"left",s,g),h=n.getPadding(a,"right",s,g)}else{var p=o+d+h;if(r&&p){var m=o/t/p;d=d/p/m,h=h/p/m}}return{left:d,right:h}},getXDomain:function(e){var t=this,i=t.axis,n=t.config,a=t.scale.x,r=n.axis_x_inverted,o=[t.getXDomainMinMax(e,"min"),t.getXDomainMinMax(e,"max")],s=o[0],l=s===void 0?0:s,c=o[1],u=c===void 0?0:c;if(a.type!=="log"){var d=i.isCategorized(),f=i.isTimeSeries(),h=t.getXDomainPadding(o),g=o[0],p=o[1];g-p===0&&!d&&(f?(g=new Date(g.getTime()*.5),p=new Date(p.getTime()*1.5)):(g=g===0?1:g*.5,p=p===0?-1:p*1.5)),(g||g===0)&&(l=f?new Date(g.getTime()-h.left):g-h.left),(p||p===0)&&(u=f?new Date(p.getTime()+h.right):p+h.right)}return r?[u,l]:[l,u]},updateXDomain:function(e,t,i,n,a){var r,o=this,s=o.config,l=o.org,c=o.scale,u=c.x,d=c.subX,f=s.zoom_enabled;if(i&&(u.domain(a||Xi(o.getXDomain(e),!s.axis_x_inverted)),l.xDomain=u.domain(),d.domain(u.domain()),(r=o.brush)===null||r===void 0||r.scale(d)),t){var h=a||!o.brush||sh(o)?l.xDomain:oh(o).map(d.invert);u.domain(h)}return(i||t)&&f&&o.zoom.updateScaleExtent(),n&&u.domain(o.trimXDomain(u.orgDomain())),u.domain()},trimXDomain:function(e){var t=this,i=t.config.axis_x_inverted,n=t.getZoomDomain(),a=n[0],r=n[1];return(i?e[0]>=a:e[0]<=a)&&(e[1]=+e[1]+(a-e[0]),e[0]=a),(i?e[1]<=r:e[1]>=r)&&(e[0]=+e[0]-(e[1]-r),e[1]=r),e},getZoomDomain:function(e,t){e===void 0&&(e="zoom"),t===void 0&&(t=!1);var i=this,n=i.config,a=i.scale,r=i.org,o=t&&a[e]?a[e].domain():r.xDomain,s=o[0],l=o[1];return e==="zoom"&&(ve(n.zoom_x_min)&&(s=lt("min",[s,n.zoom_x_min])),ve(n.zoom_x_max)&&(l=lt("max",[l,n.zoom_x_max]))),[s,l]},getZoomDomainValue:function(e){var t=this,i=t.config;if(t.axis.isCategorized()&&Array.isArray(e)){var n=i.axis_x_inverted;return e.map(function(a,r){return Number(a)+(r===0?+n:+!n)})}return e},convertPixelToScale:function(e,t,i){var n=this,a=n.config,r=n.state,o=a.axis_rotated,s;return e==="x"?s=o?"height":"width":s=o?"width":"height",i*(t/r[s])},withinRange:function(e,t,i){t===void 0&&(t=[0,0]);var n=this.config.axis_x_inverted,a=i,r=a[0],o=a[1];if(Array.isArray(e)){var s=Ae([],e,!0);if(n&&s.reverse(),s[0]<s[1])return e.every(function(l,c){return(c===0?n?+l<=r:+l>=r:n?+l>=o:+l<=o)&&!e.every(function(u,d){return u===t[d]})})}return!1}},wg={yFormat:function(e){return yh(this,"y",e)},y2Format:function(e){return yh(this,"y2",e)},getDefaultValueFormat:function(){var e=this,t=e.defaultArcValueFormat,i=e.yFormat,n=e.y2Format,a=e.hasArcType(null,["gauge","polar","radar"]);return function(r,o,s){return(a?t:e.axis&&e.axis.getId(s)==="y2"?n:i).call(e,r,o)}},defaultValueFormat:function(e){return de(e)?e.join("~"):te(e)?+e:""},defaultArcValueFormat:function(e,t){return"".concat((t*100).toFixed(1),"%")},defaultPolarValueFormat:function(e){return"".concat(e)},dataLabelFormat:function(e){var t=this,i=t.config.data_labels,n=function(r){var o="~",s=r;return de(r)?s=r.join(o):ce(r)&&(s=Object.values(r).join(o)),s},a=n;return H(i.format)?a=i.format:Ye(i.format)&&(i.format[e]?a=i.format[e]===!0?n:i.format[e]:a=function(){return""}),a.bind(t.api)}},Tg={initLegend:function(){var e=this,t=e.config,i=e.$el;e.legendItemTextBox={},e.state.legendHasRendered=!1,t.legend_show?(t.legend_contents_bindto||(i.legend=e.$el.svg.append("g").classed(ge.legend,!0).attr("transform",e.getTranslate("legend"))),e.updateLegend()):e.state.hiddenLegendIds=e.mapToIds(e.data.targets)},updateLegend:function(e,t,i){var n,a=this,r=a.config,o=a.state,s=a.scale,l=a.$el,c=t||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};c.withTransition=zt(c,"withTransition",!0),c.withTransitionForTransform=zt(c,"withTransitionForTransform",!0),r.legend_contents_bindto&&r.legend_contents_template?a.updateLegendTemplate():o.hasTreemap||a.updateLegendElement(e||a.mapToIds(a.data.targets),c,i),(n=l.legend)===null||n===void 0||n.selectAll(".".concat(ge.legendItem)).classed(ge.legendItemHidden,function(u){var d=!a.isTargetToShow(u);return d&&(this.style.opacity=null),d}),a.updateScales(!1,!s.zoom),a.updateSvgSize(),a.transformAll(c.withTransitionForTransform,i),o.legendHasRendered=!0},updateLegendTemplate:function(){var e=this,t=e.config,i=e.$el,n=B(t.legend_contents_bindto),a=t.legend_contents_template;if(!n.empty()){var r=e.mapToIds(e.data.targets),o=[],s="";r.forEach(function(c){var u=H(a)?Oi(a.call(e.api,c,e.color(c),e.api.data(c)[0].values)):An(a,{COLOR:e.color(c),TITLE:c});u&&(o.push(c),s+=u)});var l=n.html(s).selectAll(function(){return this.childNodes}).data(o);e.setLegendItem(l),i.legend=n}},updateSizeForLegend:function(e){var t=this,i=t.config,n=t.state,a=n.isLegendTop,r=n.isLegendLeft,o=n.isLegendRight,s=n.isLegendInset,l=n.current,c=e.width,u=e.height,d={top:a?t.getCurrentPaddingByDirection("top")+i.legend_inset_y+5.5:l.height-u-t.getCurrentPaddingByDirection("bottom")-i.legend_inset_y,left:r?t.getCurrentPaddingByDirection("left")+i.legend_inset_x+.5:l.width-c-t.getCurrentPaddingByDirection("right")-i.legend_inset_x+.5};t.state.margin3={top:o?0:s?d.top:l.height-u,right:NaN,bottom:0,left:o?l.width-c:s?d.left:0}},transformLegend:function(e){var t=this,i=t.$el.legend,n=t.$T;n(i,e).attr("transform",t.getTranslate("legend"))},updateLegendStep:function(e){this.state.legendStep=e},updateLegendItemWidth:function(e){this.state.legendItemWidth=e},updateLegendItemHeight:function(e){this.state.legendItemHeight=e},updateLegendItemColor:function(e,t){var i=this;if(i.$el.legend){var n=i.getLegendItemById(e);n&&B(n).select("line").style("stroke",t)}},getLegendWidth:function(){var e=this,t=e.state,i=t.current.width,n=t.isLegendRight,a=t.isLegendInset,r=t.legendItemWidth,o=t.legendStep;return e.config.legend_show?n||a?r*(o+1):i:0},getLegendHeight:function(){var e,t=this,i=t.state,n=i.current,a=i.isLegendRight,r=i.legendItemHeight,o=i.legendStep,s=((e=t.config.padding)===null||e===void 0?void 0:e.mode)==="fit";return t.config.legend_show?a?n.height:Math.max(s?10:20,r)*(o+1):0},opacityForUnfocusedLegend:function(e){return e.classed(ge.legendItemHidden)?null:"0.3"},toggleFocusLegend:function(e,t){var i=this,n=i.$el.legend,a=i.$T,r=i.mapToTargetIds(e);n&&a(n.selectAll(".".concat(ge.legendItem)).filter(function(o){return r.indexOf(o)>=0}).classed(pe.legendItemFocused,t)).style("opacity",function(){return t?null:i.opacityForUnfocusedLegend.call(i,B(this))})},revertLegend:function(){var e=this,t=e.$el.legend,i=e.$T;t&&i(t.selectAll(".".concat(ge.legendItem)).classed(pe.legendItemFocused,!1)).style("opacity",null)},showLegend:function(e){var t=this,i=t.config,n=t.$el,a=t.$T;i.legend_show||(i.legend_show=!0,n.legend?n.legend.style("visibility",null):t.initLegend(),!t.state.legendHasRendered&&t.updateLegend()),t.removeHiddenLegendIds(e),a(n.legend.selectAll(t.selectorLegends(e)).style("visibility",null)).style("opacity",null)},hideLegend:function(e){var t=this,i=t.config,n=t.$el.legend;i.legend_show&&Ze(e)&&(i.legend_show=!1,n.style("visibility","hidden")),t.addHiddenLegendIds(e),n.selectAll(t.selectorLegends(e)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox:function(e,t){var i=this,n=i.cache,a=i.state,r,o=Te.legendItemTextBox;return e&&(r=!a.redrawing&&n.get(o)||{},r[e]||(r[e]=i.getTextRect(t,ge.legendItem),n.add(o,r)),r=r[e]),r},setLegendItem:function(e){var t=this,i=t.$el,n=t.api,a=t.config,r=t.state,o=r.inputType==="touch",s=t.hasType("gauge"),l=a.boost_useCssRule,c=a.legend_item_interaction;e.attr("class",function(u){var d=B(this);return(!d.empty()&&d.attr("class")||"")+t.generateClass(ge.legendItem,u)}).style("visibility",function(u){return t.isLegendToShow(u)?null:"hidden"}),a.interaction_enabled&&(l&&[[".".concat(ge.legendItem),"cursor:pointer"],[".".concat(ge.legendItem," text"),"pointer-events:none"],[".".concat(ge.legendItemPoint," text"),"pointer-events:none"],[".".concat(ge.legendItemTile),"pointer-events:none"],[".".concat(ge.legendItemEvent),"fill-opacity:0"]].forEach(function(u){var d=u[0],f=u[1];t.setCssRule(!1,d,[f])(i.legend)}),e.on(c.dblclick?"dblclick":"click",c||H(a.legend_item_onclick)?function(u,d){if(!me(a.legend_item_onclick,n,d,!r.hiddenTargetIds.includes(d))){var f=u.altKey,h=u.target;u.type==="dblclick"||f?r.hiddenTargetIds.length&&h.parentNode.getAttribute("class").indexOf(ge.legendItemHidden)===-1?n.show():(n.hide(),n.show(d)):(n.toggle(d),B(this).classed(pe.legendItemFocused,!1))}o&&t.hideTooltip()}:null),!o&&e.on("mouseout",c||H(a.legend_item_onout)?function(u,d){me(a.legend_item_onout,n,d,!r.hiddenTargetIds.includes(d))||(B(this).classed(pe.legendItemFocused,!1),s&&t.undoMarkOverlapped(t,".".concat(We.gaugeValue)),t.api.revert())}:null).on("mouseover",c||H(a.legend_item_onover)?function(u,d){me(a.legend_item_onover,n,d,!r.hiddenTargetIds.includes(d))||(B(this).classed(pe.legendItemFocused,!0),s&&t.markOverlapped(d,t,".".concat(We.gaugeValue)),!r.transiting&&t.isTargetToShow(d)&&n.focus(d))}:null),!e.empty()&&e.on("click mouseout mouseover")&&e.style("cursor",t.getStylePropValue("pointer"))),j$(t,e)},getLegendItemById:function(e){var t,i=this,n=i.cache.get(Te.legendItemMap);if(n&&n instanceof Map)return n.get(e)||null;var a=(t=i.$el.legend)===null||t===void 0?void 0:t.selectAll(".".concat(ge.legendItem)).filter(function(r){return r===e});return a?.node()||null},updateLegendElement:function(e,t){var i=this,n=i.config,a=i.state,r=i.$el.legend,o=i.$T,s=n.legend_item_tile_type!=="circle",l=n.legend_item_tile_r,c={width:s?n.legend_item_tile_width:l*2,height:s?n.legend_item_tile_height:l*2},u={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:c.width+5,totalLength:0},d={offsets:{},widths:{},heights:{},margins:[0],steps:{}},f,h,g,p=e.filter(function(x){return!ve(n.data_names[x])||n.data_names[x]!==null}),m=t.withTransition,v=i.getUpdateLegendPositions(p,u,d);a.isLegendInset&&(u.step=n.legend_inset_step?n.legend_inset_step:p.length,i.updateLegendStep(u.step)),a.isLegendRight?(f=function(x){return u.max.width*d.steps[x]},h=function(x){return d.margins[d.steps[x]]+d.offsets[x]}):a.isLegendInset?(f=function(x){return u.max.width*d.steps[x]+10},h=function(x){return d.margins[d.steps[x]]+d.offsets[x]}):(f=function(x){return d.margins[d.steps[x]]+d.offsets[x]},h=function(x){return u.max.height*d.steps[x]});var _={xText:function(x,y){return f(x,y)+4+c.width},xRect:function(x,y){return f(x,y)},x1Tile:function(x,y){return f(x,y)-2},x2Tile:function(x,y){return f(x,y)-2+c.width},yText:function(x,y){return h(x,y)+9},yRect:function(x,y){return h(x,y)-5},yTile:function(x,y){return h(x,y)+4}};i.generateLegendItem(p,c,v,_),g=r.select(".".concat(ge.legendBackground," rect")),a.isLegendInset&&u.max.width>0&&g.size()===0&&(g=r.insert("g",".".concat(ge.legendItem)).attr("class",ge.legendBackground).append("rect")),n.legend_tooltip&&r.selectAll("title").data(p).text(function(x){return ms.bind(i)(x,!1)}),o(r.selectAll("text").data(p).text(function(x){return ms.bind(i)(x)}).each(function(x,y){v(this,x,y)}),m).attr("x",_.xText).attr("y",_.yText),o(r.selectAll("rect.".concat(ge.legendItemEvent)).data(p),m).attr("width",function(x){return d.widths[x]}).attr("height",function(x){return d.heights[x]}).attr("x",_.xRect).attr("y",_.yRect),i.updateLegendItemPos(p,m,_),g&&o(g,m).attr("height",i.getLegendHeight()-12).attr("width",u.max.width*(u.step+1)+10),i.updateLegendItemWidth(u.max.width),i.updateLegendItemHeight(u.max.height),i.updateLegendStep(u.step)},getUpdateLegendPositions:function(e,t,i){var n=this,a=n.config,r=n.state,o=r.isLegendRight||r.isLegendInset;return function(s,l,c){var u=c===0,d=c===e.length-1,f=n.getLegendItemTextBox(l,s),h=f.width+t.tileWidth+(d&&!o?0:t.padding.right)+a.legend_padding,g=f.height+t.padding.top,p=o?g:h,m=o?n.getLegendHeight():n.getLegendWidth(),v,_=function(y,$){$||(v=(m-t.totalLength-p)/2,v<t.posMin&&(v=(m-p)/2,t.totalLength=0,t.step++)),i.steps[y]=t.step,i.margins[t.step]=r.isLegendInset?10:v,i.offsets[y]=t.totalLength,t.totalLength+=p};if(u&&(t.totalLength=0,t.step=0,t.max.width=0,t.max.height=0),a.legend_show&&!n.isLegendToShow(l)){i.widths[l]=0,i.heights[l]=0,i.steps[l]=0,i.offsets[l]=0;return}i.widths[l]=h,i.heights[l]=g,(!t.max.width||h>=t.max.width)&&(t.max.width=h),(!t.max.height||g>=t.max.height)&&(t.max.height=g);var x=o?t.max.height:t.max.width;a.legend_equally?(Object.keys(i.widths).forEach(function(y){return i.widths[y]=t.max.width}),Object.keys(i.heights).forEach(function(y){return i.heights[y]=t.max.height}),v=(m-x*e.length)/2,v<t.posMin?(t.totalLength=0,t.step=0,e.forEach(function(y){return _(y)})):_(l,!0)):_(l)}},generateLegendItem:function(e,t,i,n){var a=this,r=a.config,o=a.state,s=a.$el.legend,l=r.legend_usePoint,c=r.legend_item_tile_r,u=r.legend_item_tile_type,d=u!=="circle",f=o.isLegendRight||o.isLegendInset,h=-200,g=s.selectAll(".".concat(ge.legendItem)).data(e).enter().append("g");if(a.setLegendItem(g),r.legend_tooltip&&g.append("title").text(function(v){return v}),g.append("text").text(function(v){return ms.bind(a)(v)}).each(function(v,_){i(this,v,_)}).style("pointer-events",a.getStylePropValue("none")).attr("x",f?n.xText:h).attr("y",f?h:n.yText),g.append("rect").attr("class",ge.legendItemEvent).style("fill-opacity",a.getStylePropValue("0")).attr("x",f?n.xRect:h).attr("y",f?h:n.yRect),l){var p=[],m=a.getValidPointPattern();g.append(function(v){p.indexOf(v)===-1&&p.push(v);var _=m[p.indexOf(v)%m.length];return _==="rectangle"&&(_="rect"),xe.createElementNS(Yt.svg,"hasValidPointType"in a&&a.hasValidPointType(_)?_:"use")}).attr("class",ge.legendItemPoint).style("fill",or.bind(a)).style("pointer-events",a.getStylePropValue("none")).attr("href",function(v,_,x){var y=x[_].nodeName.toLowerCase(),$=a.getTargetSelectorSuffix(v);return y==="use"?"#".concat(o.datetimeId,"-point").concat($):void 0})}else g.append(d?"line":u).attr("class",ge.legendItemTile).style("stroke",or.bind(a)).style("pointer-events",a.getStylePropValue("none")).call(function(v){u==="circle"?v.attr("r",c).style("fill",or.bind(a)).attr("cx",f?n.x2Tile:h).attr("cy",f?h:n.yTile):d&&v.attr("stroke-width",t.height).attr("x1",f?n.x1Tile:h).attr("y1",f?h:n.yTile).attr("x2",f?n.x2Tile:h).attr("y2",f?h:n.yTile)})},updateLegendItemPos:function(e,t,i){var n=this,a=n.config,r=n.$el.legend,o=n.$T,s=a.legend_usePoint,l=a.legend_item_tile_type,c=l!=="circle";if(s){var u=r.selectAll(".".concat(ge.legendItemPoint)).data(e);o(u,t).each(function(){var d=this.nodeName.toLowerCase(),f=a.point_r,h="x",g="y",p=2,m=2.5,v=null,_=null,x=null;if(d==="circle"){var y=f*.2;h="cx",g="cy",v=f+y,p=f*2,m=-y}else if(d==="rect"){var y=f*2.5;_=y,x=y,m=3}B(this).attr(h,function($){return i.x1Tile($)+p}).attr(g,function($){return i.yTile($)-m}).attr("r",v).attr("width",_).attr("height",x)})}else{var u=r.selectAll(".".concat(ge.legendItemTile)).data(e);o(u,t).style("stroke",or.bind(n)).call(function(f){l==="circle"?f.attr("cx",function(h){var g=i.x2Tile(h);return g-(g-i.x1Tile(h))/2}).attr("cy",i.yTile):c&&f.attr("x1",i.x1Tile).attr("y1",i.yTile).attr("x2",i.x2Tile).attr("y2",i.yTile)})}}},$g={redraw:function(e){var t,i,n,a;e===void 0&&(e={});var r=this,o=r.config,s=r.state,l=r.$el,c=l.main,u=l.treemap;s.redrawing=!0;var d=r.filterTargetsToShow(r.data.targets),f=e.flow,h=e.initializing,g=r.getWithOption(e),p=g.Transition?o.transition_duration:0,m=g.TransitionForExit?p:0,v=g.TransitionForAxis?p:0,_=(t=r.axis)===null||t===void 0?void 0:t.generateTransitions(v);r.updateSizes(h),g.Legend&&o.legend_show?(e.withTransition=!!p,!u&&r.updateLegend(r.mapToIds(r.data.targets),e,_)):g.Dimension&&r.updateDimension(!0),o.data_empty_label_text&&c.select("text.".concat(Ce.text,".").concat(Q.empty)).attr("x",s.width/2).attr("y",s.height/2).text(o.data_empty_label_text).style("display",d.length?"none":null),s.hasAxis?(r.axis.redrawAxis(d,g,_,f,h),r.hasGrid()&&r.updateGrid(),o.regions.length&&r.updateRegion(),["bar","candlestick","line","area"].forEach(function(x){var y=Ne(x);(/^(line|area)$/.test(x)&&r.hasTypeOf(y)||r.hasType(x))&&r["update".concat(y)](g.TransitionForExit)}),l.text&&c.selectAll(".".concat(_e.selectedCircles)).filter(r.isBarType.bind(r)).selectAll("circle").remove(),o.interaction_enabled&&!f&&g.EventRect&&(r.redrawEventRect(),(i=r.bindZoomEvent)===null||i===void 0||i.call(r))):(l.arcs&&r.redrawArc(p,m,g.Transform),l.radar&&r.redrawRadar(),l.polar&&r.redrawPolar(),l.funnel&&r.redrawFunnel(),u&&r.updateTreemap(m)),!s.resizing&&!u&&(r.hasPointType()||s.hasRadar)?r.updateCircle():!((n=r.hasLegendDefsPoint)===null||n===void 0)&&n.call(r)&&r.data.targets.forEach(r.point("create",this)),r.hasDataLabel()&&!r.hasArcType(null,["radar"])&&r.updateText(),(a=r.redrawTitle)===null||a===void 0||a.call(r),h&&r.updateTypesElements(),r.generateRedrawList(d,f,p,g.Subchart),r.updateTooltipOnRedraw(),r.callPluginHook("$redraw",e,p)},generateRedrawList:function(e,t,i,n){var a=this,r=a.config,o=a.state,s=a.getDrawShape();o.hasAxis&&r.subchart_show&&a.redrawSubchart(n,i,s);var l=t&&a.generateFlow({targets:e,flow:t,duration:t.duration,shape:s,xv:a.xv.bind(a)}),c=(i||l)&&Sn(),u=a.getRedrawList(s,t,l,c),d=function(){l&&l(),o.redrawing=!1,me(r.onrendered,a.api)};if(d)if(c&&u.length){var f=vh();yd().duration(i).each(function(){u.reduce(function(h,g){return h.concat(g)},[]).forEach(function(h){return f.add(h)})}).call(f,d)}else o.transiting||d();a.mapToIds(a.data.targets).forEach(function(h){o.withoutFadeIn[h]=!0})},getRedrawList:function(e,t,i,n){var a=this,r=a.config,o=a.state,s=o.hasAxis,l=o.hasRadar,c=o.hasTreemap,u=a.$el.grid,d=e.pos,f=d.cx,h=d.cy,g=d.xForText,p=d.yForText,m=[];return s&&((r.grid_x_lines.length||r.grid_y_lines.length)&&m.push(a.redrawGrid(n)),r.regions.length&&m.push(a.redrawRegion(n)),Object.keys(e.type).forEach(function(v){var _=Ne(v),x=e.type[v];(/^(area|line)$/.test(v)&&a.hasTypeOf(_)||a.hasType(v))&&m.push(a["redraw".concat(_)](x,n))}),!t&&u.main&&m.push(a.updateGridFocus())),(!a.hasArcType()||l)&&Se(r.data_labels)&&r.data_labels!==!1&&m.push(a.redrawText(g,p,t,n)),(a.hasPointType()||l)&&!a.isPointFocusOnly()&&a.redrawCircle&&m.push(a.redrawCircle(f,h,n,i)),c&&m.push(a.redrawTreemap(n)),m},updateAndRedraw:function(e){e===void 0&&(e={});var t=this,i=t.config,n=t.state,a;e.withTransition=zt(e,"withTransition",!0),e.withTransform=zt(e,"withTransform",!1),e.withLegend=zt(e,"withLegend",!1),e.withUpdateXDomain=!0,e.withUpdateOrgXDomain=!0,e.withTransitionForExit=!1,e.withTransitionForTransform=zt(e,"withTransitionForTransform",e.withTransition),e.withLegend&&i.legend_show||(n.hasAxis&&(a=t.axis.generateTransitions(e.withTransitionForAxis?i.transition_duration:0)),t.updateScales(),t.updateSvgSize(),t.transformAll(e.withTransitionForTransform,a)),t.redraw(e,a)}},Ag={getXScale:function(e,t,i,n){var a=this,r=a.state.loading!=="append"&&a.scale.zoom||ci(a.axis.getAxisType("x"),e,t);return a.getCustomizedXScale(i?r.domain(i):r,n)},getYScale:function(e,t,i,n){var a=ci(this.axis.getAxisType(e),t,i);return n&&a.domain(n),a},getYScaleById:function(e,t){var i;t===void 0&&(t=!1);var n=((i=this.axis)===null||i===void 0?void 0:i.getId(e))==="y2",a=t?n?"subY2":"subY":n?"y2":"y";return this.scale[a]},getCustomizedXScale:function(e,t){var i=this,n=t||(function(){return i.axis.x.tickOffset()}),a=i.config.axis_x_inverted,r=function(s){return e(s)+n()};for(var o in e)r[o]=e[o];return r.orgDomain=function(){return e.domain()},r.orgScale=function(){return e},i.axis.isCategorized()&&(r.domain=function(s){var l=s;return arguments.length?(e.domain(l),r):(l=this.orgDomain(),a?[l[0]+1,l[1]]:[l[0],l[1]+1])}),r},updateScales:function(e,t){var i,n;t===void 0&&(t=!0);var a=this,r=a.axis,o=a.config,s=a.format,l=a.org,c=a.scale,u=a.state,d=u.current,f=u.width,h=u.height,g=u.width2,p=u.height2,m=u.hasAxis,v=u.hasTreemap;if(m){var _=o.axis_rotated,x=a.getResettedPadding(1),y={x:_?x:0,y:_?0:h,subX:_?1:0,subY:_?0:p},$={x:_?h:f,y:_?f:x,subX:_?h:f,subY:_?g:1},T=t&&((i=c.x)===null||i===void 0?void 0:i.orgDomain()),A=t&&l.xDomain;c.x=a.getXScale(y.x,$.x,T,function(){return r.x.tickOffset()}),c.subX=a.getXScale(y.x,$.x,A,function(R){var C;return R%1?0:((C=r.subX)!==null&&C!==void 0?C:r.x).tickOffset()}),s.xAxisTick=r.getXAxisTickFormat(),s.subXAxisTick=r.getXAxisTickFormat(!0),r.setAxis("x",c.x,o.axis_x_tick_outer,e),o.subchart_show&&r.setAxis("subX",c.subX,o.axis_x_tick_outer,e),c.y=a.getYScale("y",y.y,$.y,c.y?c.y.domain():o.axis_y_default),c.subY=a.getYScale("y",y.subY,$.subY,c.subY?c.subY.domain():o.axis_y_default),r.setAxis("y",c.y,o.axis_y_tick_outer,e),o.axis_y2_show&&(c.y2=a.getYScale("y2",y.y,$.y,c.y2?c.y2.domain():o.axis_y2_default),c.subY2=a.getYScale("y2",y.subY,$.subY,c.subY2?c.subY2.domain():o.axis_y2_default),r.setAxis("y2",c.y2,o.axis_y2_tick_outer,e))}else if(v){var S=a.getCurrentPadding();c.x=Da().rangeRound([S.left,d.width-S.right]),c.y=Da().rangeRound([S.top,d.height-S.bottom])}else(n=a.updateArc)===null||n===void 0||n.call(a)},xx:function(e){var t=this,i=t.config,n=t.scale,a=n.x,r=n.zoom,o=i.zoom_enabled&&r?r:a;return e?o(te(e.x)?e.x:e):null},xv:function(e){var t=this,i=t.axis,n=t.config,a=t.scale,r=a.x,o=a.zoom,s=n.zoom_enabled&&o?o:r,l=t.getBaseValue(e);return i.isTimeSeries()?l=Je.call(t,l):i.isCategorized()&&le(l)&&(l=n.axis_x_categories.indexOf(l)),s(l)},yv:function(e){var t=this,i=t.scale,n=i.y,a=i.y2;return(e.axis&&e.axis==="y2"?a:n)(t.getBaseValue(e))},subxx:function(e){return e?this.scale.subX(e.x):null}},Sg={setContainerSize:function(){var e=this,t=e.state;t.current.width=e.getCurrentWidth(),t.current.height=e.getCurrentHeight()},getCurrentWidth:function(){var e=this;return e.config.size_width||e.getParentWidth()},getCurrentHeight:function(){var e=this,t=e.config,i=t.size_height||e.getParentHeight();return i>0?i:320/(e.hasType("gauge")&&!t.gauge_fullCircle?2:1)},getParentRectValue:function(e){for(var t="offset".concat(Ne(e)),i=this.$el.chart.node(),n=0;n<30&&i&&i.tagName!=="BODY";){try{n=Le(i,!0)[e]}catch{t in i&&(n=i[t])}i=i.parentNode}var a=xe.body[t];return n>a&&(n=a),n},getParentWidth:function(){return this.getParentRectValue("width")},getParentHeight:function(){var e=this.$el.chart.style("height"),t=0;return e&&(t=/px$/.test(e)?parseInt(e,10):this.getParentRectValue("height")),t},getSvgLeft:function(e){var t=this,i=t.config,n=t.state.hasAxis,a=t.$el,r=i.axis_rotated,o=r||!r&&!i.axis_y_inner,s=r?Ee.axisX:Ee.axisY,l=a.main.select(".".concat(s)).node(),c=n&&i["axis_".concat(r?"x":"y","_label")],u=0;if(n&&(le(c)||le(c.text)||/^inner-/.test(c?.position))){var d=a.main.select(".".concat(s,"-label"));d.empty()||(u=Le(d.node()).left)}var f=l&&o?Le(l,!e):{right:0},h=Le(a.chart.node(),!e).left+u,g=t.hasArcType(),p=f.right-h-(g?0:t.getCurrentPaddingByDirection("left",e));return p>0?p:0},updateDimension:function(e){var t,i=this,n=i.config,a=i.state.hasAxis,r=i.$el;a&&!e&&i.axis.x&&n.axis_rotated&&((t=i.axis.subX)===null||t===void 0||t.create(r.axis.subX)),i.updateScales(e),i.updateSvgSize(),i.transformAll(!1)},updateSvgSize:function(){var e=this,t=e.config,i=e.state,n=i.clip,a=i.current,r=i.hasAxis,o=i.width,s=i.height,l=e.$el.svg;if(t.resize_auto==="viewBox"?l.attr("viewBox","0 0 ".concat(a.width," ").concat(a.height)):l.attr("width",a.width).attr("height",a.height),r){var c=l.select(".".concat(Ts.brush," .overlay")),u={width:0,height:0};c.size()&&(u.width=+c.attr("width"),u.height=+c.attr("height")),l.selectAll(["#".concat(n.id),"#".concat(n.idGrid)]).select("rect").attr("width",o).attr("height",s),l.select("#".concat(n.idXAxis)).select("rect").call(e.setXAxisClipPath.bind(e)),l.select("#".concat(n.idYAxis)).select("rect").call(e.setYAxisClipPath.bind(e)),n.idSubchart&&l.select("#".concat(n.idSubchart)).select("rect").attr("width",o).attr("height",u.height)}},getCurrentPaddingByDirection:function(e,t,i){var n;t===void 0&&(t=!1),i===void 0&&(i=!1);var a=this,r=a.config,o=a.$el,s=a.state.hasAxis,l=r.axis_rotated,c=((n=r.padding)===null||n===void 0?void 0:n.mode)==="fit",u=q(r["padding_".concat(e)])?r["padding_".concat(e)]:void 0,d=s?{top:l?"y2":null,bottom:l?"y":"x",left:l?"x":"y",right:l?null:"y2"}[e]:null,f=/^(left|right)$/.test(e),h=d&&r["axis_".concat(d,"_inner")],g=d&&r["axis_".concat(d,"_show")],p=d?r["axis_".concat(d,"_axes")].length:0,m=d?f?a.getAxisWidthByAxisId(d,t):a.getHorizontalAxisHeight(d):0,v=20,_=0;!c&&f&&(m=rg(m));var x=s&&f&&(h||we(u)&&!g)?0:c?(g?m:0)+(u??0):we(u)?m:u;return f&&s?(d&&(c||h)&&r["axis_".concat(d,"_label")].text&&(x+=a.axis.getAxisLabelPosition(d).isOuter?v:0),e==="right"?(x+=l?!c&&we(u)?10:2:!g||h?c?2:1:0,x+=i?a.axis.getXAxisTickTextY2Overflow(v):0):e==="left"&&l&&we(u)&&(x=r.axis_x_show?c?m:Math.max(m,40):1)):e==="top"?(o.title&&o.title.node()&&(x+=a.getTitlePadding()),_=l&&!h?p:0):e==="bottom"&&s&&l&&!g&&(x+=1),x+m*p-_},getCurrentPadding:function(e){e===void 0&&(e=!1);var t=this,i=["top","bottom","left","right"].map(function(n){return t.getCurrentPaddingByDirection(n,null,e)});return{top:i[0],bottom:i[1],left:i[2],right:i[3]}},getResettedPadding:function(e){var t=this.config,i=q(e),n=i?0:{};return t.padding===!1?!i&&Object.keys(e).forEach(function(a){n[a]=!Ze(t.data_labels)&&t.data_labels!==!1&&a==="top"?e[a]:0}):n=e,n},updateSizes:function(e){var t,i,n,a,r,o=this,s=o.config,l=o.state,c=o.$el.legend,u=s.axis_rotated,d=o.hasArcType()||l.hasFunnel||l.hasTreemap,f=((t=s.padding)===null||t===void 0?void 0:t.mode)==="fit";!e&&o.setContainerSize();var h={width:c?o.getLegendWidth():0,height:c?o.getLegendHeight():0};!d&&s.axis_x_show&&s.axis_x_tick_autorotate&&o.updateXAxisTickClip();var g={right:s.legend_show&&l.isLegendRight?o.getLegendWidth()+(f?0:20):0,bottom:!s.legend_show||l.isLegendRight||l.isLegendInset?0:h.height},p=u||d?0:o.getHorizontalAxisHeight("x"),m=s.subchart_axis_x_show&&s.subchart_axis_x_tick_text_show?p:30,v=s.subchart_show&&!d?s.subchart_size_height+m:0,_=o.hasType("gauge")&&s.arc_needle_show&&!s.gauge_fullCircle&&!s.gauge_label_show?10:0,x=o.getCurrentPadding(!0);if(l.margin=!d&&u?{top:x.top,right:d?0:x.right+g.right,bottom:g.bottom+x.bottom,left:v+(d?0:x.left)}:{top:(f?0:4)+x.top,right:d?0:x.right+g.right,bottom:_+v+g.bottom+x.bottom,left:d?0:x.left},l.margin=o.getResettedPadding(l.margin),l.margin2=u?{top:l.margin.top,right:NaN,bottom:20+g.bottom,left:o.state.rotatedPadding.left}:{top:l.current.height-v-g.bottom,right:NaN,bottom:m+g.bottom,left:l.margin.left},l.margin3={top:0,right:NaN,bottom:0,left:0},(i=o.updateSizeForLegend)===null||i===void 0||i.call(o,h),l.width=l.current.width-l.margin.left-l.margin.right,l.height=l.current.height-l.margin.top-l.margin.bottom,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l.width2=u?l.margin.left-l.rotatedPadding.left-l.rotatedPadding.right:l.width,l.height2=u?l.height:l.current.height-l.margin2.top-l.margin2.bottom,l.width2<0&&(l.width2=0),l.height2<0&&(l.height2=0),o.hasArcType()){var y=o.hasType("gauge"),$=s.legend_show&&l.isLegendRight,T=(n=l.hasRadar&&o.cache.get(Te.radarTextWidth))!==null&&n!==void 0?n:0;l.arcWidth=l.width-($?h.width+10:0)-T,l.arcHeight=l.height-($&&!y?0:10),!((a=s.arc_rangeText_values)===null||a===void 0)&&a.length&&(y?(l.arcWidth-=25,l.arcHeight-=10,l.margin.left+=10):(l.arcHeight-=20,l.margin.top+=10)),y&&!s.gauge_fullCircle&&(l.arcHeight+=l.height-o.getPaddingBottomForGauge()),(r=o.updateRadius)===null||r===void 0||r.call(o)}l.isLegendRight&&d&&(l.margin3.left=l.arcWidth/2+l.radiusExpanded*1.1)}},kg={setCssRule:function(e,t,i,n){var a=this,r=a.config,o=a.state,s=o.cssRule,l=o.style;return r.boost_useCssRule?function(c){c.each(function(u){var d=n&&n?.call(a,u),f="".concat(e?".".concat(be.shapes+a.getTargetSelectorSuffix(u.id)):"").concat(t);t in s&&l.sheet.deleteRule(s[f]),a.state.cssRule[f]=P$(l,f,i.filter(Boolean).map(function(h){return le(d)&&h.indexOf(":")===-1?"".concat(h,": ").concat(d):h||""}))})}:function(){}},getStylePropValue:function(e){return this.config.boost_useCssRule?null:H(e)?e.bind(this):e}},Eg={opacityForText:function(e){var t=this;return t.isBarType(e)&&!_s.call(t,Math.abs(t.getRatio("bar",e)),"bar")?"0":t.hasDataLabel?null:"0"},initText:function(){var e=this.$el;e.main.select(".".concat(Q.chart)).append("g").attr("class",Ce.chartTexts).style("pointer-events",e.funnel||e.treemap?"none":null)},updateTargetsForText:function(e){var t=this,i=t.getChartClass("Text"),n=t.getClass("texts","id"),a=t.classFocus.bind(t);t.$el.main.select(".".concat(Ce.chartTexts)).selectAll(".".concat(Ce.chartText)).data(t.filterNullish(e)).attr("class",function(r){return"".concat(i(r)).concat(a(r)).trim()}).enter().append("g").style("opacity","0").attr("class",i).call(t.setCssRule(!0," .".concat(Ce.text),["fill","pointer-events:none"],t.updateTextColor)).append("g").attr("class",n)},updateText:function(){var e=this,t=e.$el,i=e.$T,n=e.config,a=e.axis,r=e.getClass("text","index"),o=n.data_labels.centered,s=t.main.selectAll(".".concat(Ce.texts)).selectAll(".".concat(Ce.text)).data(e.labelishData.bind(e));i(s.exit()).style("fill-opacity","0").remove(),t.text=s.enter().append("text").merge(s).attr("class",r).attr("text-anchor",function(l){var c=n["axis_".concat(a?.getId(l.id),"_inverted")]?l.value>0:l.value<0;if(e.isCandlestickType(l)){var u=e.getCandlestickData(l);c=!u?._isUp}else if(e.isTreemapType(l))return o?"middle":"start";return n.axis_rotated?c?"end":"start":"middle"}).style("fill",e.getStylePropValue(e.updateTextColor)).style("fill-opacity","0").each(function(l,c,u){var d=B(this),f=l.value;if(e.isBubbleZType(l))f=e.getBubbleZData(f,"z");else if(e.isCandlestickType(l)){var h=e.getCandlestickData(l);h&&(f=h.close)}f=e.isTreemapType(l)?e.treemapDataLabelFormat(l)(d):e.dataLabelFormat(l.id)(f,l.id,l.index,u),q(f)?this.textContent=f:Ni(d,f,void 0,!0)}),wh.call(e)},updateTextColor:function(e){var t=this,i=t.config,n=i.data_labels_colors,a=t.isArcType(e)&&!t.isRadarType(e)||t.isFunnelType(e)||t.isTreemapType(e)?null:t.color(e),r;if(le(n)?r=n:ce(n)?r=n[(e.data||e).id]:H(n)&&(r=n.bind(t.api)(a,e)),t.isCandlestickType(e)&&!H(n)){var o=t.getCandlestickData(e);if(!o?._isUp){var s=i.candlestick_color_down;r=ce(s)?s[e.id]:s}}return r||a},updateTextBGColor:function(e,t){var i=this,n=i.$el.defs,a="";if(t){var r=le(t)?"":i.getTargetSelectorSuffix("id"in e?e.id:e.data.id),o=n.select(["filter[id*='labels-bg","']"].join(r));if(o.size()&&(a="url(#".concat(o.attr("id"),")")),H(t)){i.generateTextBGColorFilter(t);var s=i.color(e),l=t.bind(i.api)(s,e);l?o.select("feFlood").attr("flood-color",l):a=""}}return a||null},redrawText:function(e,t,i,n){var a=this,r=a.$T,o=a.axis,s=a.config,l=a.state.hasTreemap,c=mt(!0),u=s.axis_rotated,d=s.data_labels.rotate,f=Z$(d),h=d?"rotate(".concat(d,")"):"",g=new Map;if(s.data_labels.centered){var p=[];a.$el.text.each(function(m){(a.isBarType(m)||a.isTreemapType(m))&&p.push(this)}),p.length>0&&(g=J$(p))}return a.$el.text.style("fill",a.getStylePropValue(a.updateTextColor)).attr("filter",function(m){return a.updateTextBGColor.bind(a)(m,s.data_labels_backgroundColors)}).style("fill-opacity",i?0:a.opacityForText.bind(a)).each(function(m,v){var _=g.get(this),x=r(l&&this.childElementCount?this.parentNode:this,!!(n&&(this.getAttribute("x")||this.getAttribute("transform"))),c),y=s["axis_".concat(o?.getId(m.id),"_inverted")],$={x:e.bind(this)(m,v,_),y:t.bind(this)(m,v,_)};d&&($=q$.bind(a)(m,$,f,u,y),x.attr("text-anchor",f)),Th.call(a,this,$),this.childElementCount||d?x.attr("transform","translate(".concat($.x," ").concat($.y,") ").concat(h)):x.attr("x",$.x).attr("y",$.y),s.data_labels.border&&K$.call(a,x.node(),$,"".concat(Ce.textBorderRect,"-").concat(v))}),!0},getTextRect:function(e,t){var i,n,a,r=this,o,s,l;Array.isArray(e)?o="".concat(Te.textRect,"-").concat(e.join("_")):(s=(a=(n=(i=e).node)===null||n===void 0?void 0:n.call(i))!==null&&a!==void 0?a:e,/text/i.test(s.tagName)||(s=s.querySelector("text")),l=s.textContent,o="".concat(Te.textRect,"-").concat(l.replace(/\W/g,"_")));var c=r.cache.get(o)||[];return c.length===0&&((r.$el.svg||r.$el.chart.select("svg")).selectAll(".".concat(Q.dummy)).data(l?[l]:e).enter().append("text").style("visibility","hidden").style("font",s?B(s).style("font"):null).classed(t||Q.dummy,!0).text(function(u){return u}).each(function(u,d){c[d]=Le(this)}).remove(),r.cache.add(o,c)),c.length>1?c:c[0]},generateXYForText:function(e,t){var i=this,n=i.state,a=n.hasRadar,r=n.hasFunnel,o=n.hasTreemap,s=Object.keys(e),l={},c=t?i.getXForText:i.getYForText;return r&&s.push("funnel"),a&&s.push("radar"),o&&s.push("treemap"),s.forEach(function(u){l[u]=i["generateGet".concat(Ne(u),"Points")](e[u],!1)}),function(u,d){var f=i.isAreaType(u)&&"area"||i.isBarType(u)&&"bar"||i.isCandlestickType(u)&&"candlestick"||i.isFunnelType(u)&&"funnel"||i.isRadarType(u)&&"radar"||i.isTreemapType(u)&&"treemap"||"line";return c.call(i,l[f](u,d),u,this)}},getCenteredTextPos:function(e,t,i,n,a){var r=this,o=r.config,s=o.axis_rotated,l=r.isBarType(e),c=r.isTreemapType(e);if(o.data_labels.centered&&(l||c)){var u=a||It(i);if(l){var d=r.getRangedData(e,null,"bar")>=0;if(s){var f=(d?t[1][1]-t[0][1]:t[0][1]-t[1][1])/2+u.width/2;return d?-f-3:f+2}else{var h=(d?t[0][1]-t[1][1]:t[1][1]-t[0][1])/2+u.height/2;return d?h:-h-2}}else if(c)return n==="x"?(t[1][0]-t[0][0])/2:(t[1][1]-t[0][1])/2-u.y-u.height/2}return 0},getXForText:function(e,t,i,n){var a,r=this,o=r.config,s=o.axis_rotated,l=r.isFunnelType(t),c=r.isTreemapType(t),u=e?e[0][0]:0;if(r.isCandlestickType(t))s?u=!((a=r.getCandlestickData(t))===null||a===void 0)&&a._isUp?e[2][2]+4:e[2][1]-4:u+=(e[1][0]-u)/2;else if(l)u+=r.state.current.width/2;else if(c)u+=o.data_labels.centered?0:5;else if(s){var d=o["axis_".concat(r.axis.getId(t.id),"_inverted")],f=r.isBarType(t)?4:6,h=t.value;u=e[2][1],d?u-=f*(h>0?1:-1):u+=f*(h<0?-1:1)}else u=r.hasType("bar")?(e[2][0]+e[0][0])/2:u;return(s||c)&&(u+=r.getCenteredTextPos(t,e,i,"x",n)),u+bh.call(this,t,"x")},getYForText:function(e,t,i,n){var a=this,r=a.axis,o=a.config,s=a.state,l=o.axis_rotated,c=o["axis_".concat(r?.getId(t.id),"_inverted")],u=a.isBarType(t),d=a.isFunnelType(t),f=a.isTreemapType(t),h=o.point_r,g=Le(i),p=t.value,m=3,v;if(a.isCandlestickType(t))p=a.getCandlestickData(t),l?(v=e[0][0],v+=(e[1][0]-v)/2+m):(v=p&&p._isUp?e[2][2]-m:e[2][1]+m*4,c&&(v+=15*(p._isUp?1:-1)));else if(d)v=e?e[0][1]+(e[1][1]-e[0][1])/2+g.height/2-3:0;else if(f)v=e[0][1]+(o.data_labels.centered?0:g.height+5);else if(l)v=(e[0][0]+e[2][0]+g.height*.6)/2;else if(v=e[2][1],q(h)&&h>5&&(a.isLineType(t)||a.isScatterType(t))&&(m+=o.point_r/2.3),p<0||p===0&&!s.hasPositiveValue&&s.hasNegativeValue)v+=c?u?-3:-5:g.height+(u?-m:m);else{var _=-m*2;u?_=-m:a.isBubbleType(t)&&(_=m),c&&(_=u?10:15),v+=_}return(!l||f)&&(v+=a.getCenteredTextPos(t,e,i,"y",n)),v+bh.call(this,t,"y")},markOverlapped:function(e,t,i){var n=t.$el.arcs.selectAll(i),a=n.filter(function(l){return l.data.id!==e}),r=n.filter(function(l){return l.data.id===e}),o=ch(r.node()),s=function(l,c){return Math.sqrt(Math.pow(l,2)+Math.pow(c,2))};r.node()&&a.each(function(){var l=ch(this),c=B(this),u=s(o.e,o.f)>s(l.e,l.f)?r:c,d=Math.ceil(Math.abs(o.e-l.e))<Math.ceil(u.node().getComputedTextLength()),f=Math.ceil(Math.abs(o.f-l.f))<parseInt(r.style("font-size"),10);c.classed(Ce.TextOverlapping,d&&f)})},undoMarkOverlapped:function(e,t){e.$el.arcs.selectAll(t).each(function(){Ac([this,this.previousSibling]).classed(Ce.TextOverlapping,!1)})}},Cg={initTitle:function(){var e=this,t=e.config,i=e.$el;t.title_text&&(i.title=i.svg.append("g"),Ni(i.title.append("text").style("text-anchor",$h(t.title_position)).attr("class",Ce.title),t.title_text,[.3,1.5]))},redrawTitle:function(){var e=this,t=e.config,i=e.state.current,n=e.$el.title;if(n){var a=$h(t.title_position,i.width),r=(t.title_padding.top||0)+e.getTextRect(e.$el.title,Ce.title).height;n.attr("transform","translate(".concat(a,", ").concat(r,")"))}},getTitlePadding:function(){var e=this,t=e.$el.title,i=e.config;return(i.title_padding.top||0)+(t?e.getTextRect(t,Ce.title).height:0)+(i.title_padding.bottom||0)}},Rg={initTooltip:function(){var e=this,t=e.config,i=e.$el;i.tooltip=B(t.tooltip_contents.bindto),i.tooltip.empty()&&(i.tooltip=i.chart.append("div").attr("class",En.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),e.bindTooltipResizePos()},initShowTooltip:function(){var e,t,i=this,n=i.config,a=i.$el,r=i.state,o=r.hasAxis,s=r.hasRadar;if(n.tooltip_init_show){var l=!(o||s);!((t=i.axis)===null||t===void 0)&&t.isTimeSeries()&&le(n.tooltip_init_x)&&(n.tooltip_init_x=Je.call(i,n.tooltip_init_x)),i.api.tooltip.show({data:(e={},e[l?"index":"x"]=n.tooltip_init_x,e)});var c=n.tooltip_init_position;if(!n.tooltip_contents.bindto&&!Ze(c)){var u=c.top,d=u===void 0?0:u,f=c.left,h=f===void 0?50:f;a.tooltip.style("top",le(d)?d:"".concat(d,"px")).style("left",le(h)?h:"".concat(h,"px")).style("display",null)}}},getTooltipHTML:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this,n=i.api,a=i.config;return Oi(H(a.tooltip_contents)?a.tooltip_contents.bind(n).apply(void 0,e):i.getTooltipContent.apply(i,e))},getTooltipContent:function(e,t,i,n){var a,r=this,o=r.api,s=r.config,l=r.state,c=r.$el,u=["title","name","value"].map(function(M){var z=s["tooltip_format_".concat(M)];return H(z)?z.bind(o):z}),d=u[0],f=u[1],h=u[2],g=function(){for(var M=[],z=0;z<arguments.length;z++)M[z]=arguments[z];return(d||t).apply(void 0,M)},p=function(){for(var M=[],z=0;z<arguments.length;z++)M[z]=arguments[z];return(f||(function(I){return I})).apply(void 0,M)},m=function(M,z,I,O){var X=h;return X||(l.hasTreemap||r.isStackNormalized()&&(!r.isStackNormalizedPerGroup()||r.isGrouped(I))?X=function(V,fe){return"".concat((fe*100).toFixed(2),"%")}:X=i),X(M,z,I,O)},v=s.tooltip_order,_=function(M){return r.axis&&r.isBubbleZType(M)?r.getBubbleZData(M.value,"z"):r.getBaseValue(M)},x=r.levelColor?function(M){return r.levelColor(M.value)}:function(M){return n(M)},y=s.tooltip_contents,$=y.template,T=r.mapToTargetIds();if(v===null&&s.data_groups.length){var A=r.orderTargets(r.data.targets).map(function(M){return M.id}).reverse();e.sort(function(M,z){var I=M?M.value:null,O=z?z.value:null;return I>0&&O>0&&(I=M.id?A.indexOf(M.id):null,O=z.id?A.indexOf(z.id):null),I-O})}else if(/^(asc|desc)$/.test(v)){var S=v==="asc";e.sort(function(M,z){var I=M?_(M):null,O=z?_(z):null;return S?I-O:O-I})}else H(v)&&e.sort(v.bind(o));var R=r.getTooltipContentTemplate($),C=e.length,E,k,P,w,D,L=function(){if(k=e[D],!k||!(_(k)||_(k)===0))return"continue";if(we(E)){var M=(l.hasAxis||l.hasRadar)&&g(k.x);E=An(R[0],{CLASS_TOOLTIP:En.tooltip,TITLE:te(M)?$?M:'<tr><th colspan="2">'.concat(M,"</th></tr>"):""})}if(!k.ratio&&c.arcs&&(P=["arc",r.$el.arcs.select("path.".concat(ne.arc,"-").concat(k.id)).data()[0]],k.ratio=r.getRatio.apply(r,P)),P=[k.ratio,k.id,k.index],r.isAreaRangeType(k)){var z=["high","low"].map(function(he){return m.apply(void 0,Ae([r.getRangedData(k,he)],P,!1))}),I=z[0],O=z[1],X=m.apply(void 0,Ae([_(k)],P,!1));w="<b>Mid:</b> ".concat(X," <b>High:</b> ").concat(I," <b>Low:</b> ").concat(O)}else if(r.isCandlestickType(k)){var V=["open","high","low","close","volume"].map(function($e){return r.getRangedData(k,$e,"candlestick")?m.apply(void 0,Ae([r.getRangedData(k,$e,"candlestick")],P,!1)):void 0}),fe=V[0],I=V[1],O=V[2],ie=V[3],U=V[4];w="<b>Open:</b> ".concat(fe," <b>High:</b> ").concat(I," <b>Low:</b> ").concat(O," <b>Close:</b> ").concat(ie).concat(U?" <b>Volume:</b> ".concat(U):"")}else if(r.isBarRangeType(k)){var Y=k.value,Z=k.id,re=k.index;w="".concat(m(Y,void 0,Z,re))}else w=m.apply(void 0,Ae([_(k)],P,!1));if(w!==void 0){if(k.name===null)return"continue";var N=p.apply(void 0,Ae([(a=k.name)!==null&&a!==void 0?a:k.id],P,!1)),W=x(k),K={CLASS_TOOLTIP_NAME:En.tooltipName+r.getTargetSelectorSuffix(k.id),COLOR:$||!r.patterns?W:'<svg><rect style="fill:'.concat(W,'" width="10" height="10"></rect></svg>'),NAME:N,VALUE:w};if($&&ce(y.text)){var F=T.indexOf(k.id);Object.keys(y.text).forEach(function(he){K[he]=y.text[he][F]})}E+=An(R[1],K)}};for(D=0;D<C;D++)L();return"".concat(E,"</table>")},getTooltipContentTemplate:function(e){return(e||`<table class="{=CLASS_TOOLTIP}"><tbody>
33
+ {=TITLE}
34
+ {{<tr class="{=CLASS_TOOLTIP_NAME}">
35
+ <td class="name">`.concat(this.patterns?"{=COLOR}":'<span style="background-color:{=COLOR}"></span>',`{=NAME}</td>
36
+ <td class="value">{=VALUE}</td>
37
+ </tr>}}
38
+ </tbody></table>`)).replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},setTooltipPosition:function(e,t){var i,n,a=this,r=a.config,o=a.scale,s=a.state,l=a.$el,c=l.eventRect,u=l.tooltip,d=l.svg,f=r.tooltip_contents.bindto,h=r.axis_rotated,g=u?.datum();if(!f&&g){var p=e??JSON.parse(g.current),m=Qe(s.event,t??c?.node()),v={x:m[0],y:m[1]};if(s.hasAxis&&o.x&&g&&"x"in g){var _=function(S,R,C){var E;S===void 0&&(S=0),C===void 0&&(C="y");var k=o[R?(E=a.axis)===null||E===void 0?void 0:E.getId(R):C];return k?k(S)+(h?s.margin.left:s.margin.top):0};v.xAxis=o.x(g.x)+(r.tooltip_position?h?s.margin.top:s.margin.left:0),p.length===1?v.yAxis=_(p[0].value,p[0].id):v.yAxis=_}var x=g.width,y=x===void 0?0:x,$=g.height,T=$===void 0?0:$,A=(n=(i=r.tooltip_position)===null||i===void 0?void 0:i.bind(a.api)(p,y,T,c?.node(),v))!==null&&n!==void 0?n:hs(d)?a.getTooltipPositionViewBox.bind(a)(y,T,v):a.getTooltipPosition.bind(a)(y,T,v);["top","left"].forEach(function(S){var R=A[S];u.style(S,"".concat(R,"px")),S==="left"&&!g.xPosInPercent&&(g.xPosInPercent=R/s.current.width*100)})}},getTooltipPositionViewBox:function(e,t,i){var n,a,r=this,o=r.$el,s=o.eventRect,l=o.svg,c=r.config,u=r.state,d=c.axis_rotated,f=r.hasArcType()||u.hasFunnel||u.hasTreemap,h=(a=(n=f?l:s)===null||n===void 0?void 0:n.node())!==null&&a!==void 0?a:u.event.target,g=i.x,p=i.y;u.hasAxis&&(g=d?g:i.xAxis,p=d?i.xAxis:p);var m=rr(h,g,p,!1),v=Le(h),_=rr(h,20,0,!1).x,x=m.y,y=m.x+e/2+_;return f&&(u.hasFunnel||u.hasTreemap||u.hasRadar?(y-=e/2+_,x+=t):(x+=v.height/2,y+=v.width/2-(e-_))),y+e>v.width&&(y=v.width-e-_),x+t>v.height&&(x-=t*2),{top:x,left:y}},getTooltipPosition:function(e,t,i){var n,a,r,o=this,s=o.config,l=o.scale,c=o.state,u=c.width,d=c.height,f=c.current,h=c.hasFunnel,g=c.hasRadar,p=c.hasTreemap,m=c.isLegendRight,v=c.inputType,_=o.hasType("gauge")&&!s.gauge_fullCircle,x=s.axis_rotated,y=o.hasArcType(),$=o.getSvgLeft(!0),T=$+f.width-o.getCurrentPaddingByDirection("right"),A=20,S=i.x,R=i.y;if(g)S+=S>=u/2?15:-(e+15),R+=15;else if(y){if(v!=="touch"){var C=(a=(n=o.getTitlePadding)===null||n===void 0?void 0:n.call(o))!==null&&a!==void 0?a:0;C&&_&&(!((r=s.arc_rangeText_values)===null||r===void 0)&&r.length)&&(C+=10),S+=(u-(m?o.getLegendWidth():0))/2,R+=(_?d:d/2+t)+C}}else if(h||p)R+=t;else{var E={top:o.getCurrentPaddingByDirection("top",!0),left:o.getCurrentPaddingByDirection("left",!0)};x?(S+=$+E.left+A,R=E.top+i.xAxis+A,T-=$):(S=$+E.left+A+(l.zoom?S:i.xAxis),R+=E.top-5)}if(S+e+15>T&&(S-=e+(h||p||y?0:x?A*2:38)),R+t>f.height){var k=p?t+10:30;R-=_?t*1.5:t+k}var P={top:R,left:S};return Object.keys(P).forEach(function(w){P[w]<0&&(P[w]=0)}),P},showTooltip:function(e,t){var i=this,n=i.config,a=i.$el.tooltip,r=e.filter(function(d){return d&&te(i.getBaseValue(d))});if(!(!a||r.length===0||!n.tooltip_show)){var o=a.datum(),s=JSON.stringify(e);if(!o||o.current!==s){var l=e.concat().sort()[0],c=l.index,u=l.x;me(n.tooltip_onshow,i.api,e),a.html(i.getTooltipHTML(e,i.axis?i.axis.getXAxisTickFormat():i.categoryName.bind(i),i.getDefaultValueFormat(),i.color)).style("display",null).style("visibility",null).datum(o={index:c,x:u,current:s,width:a.property("offsetWidth"),height:a.property("offsetHeight")}),me(n.tooltip_onshown,i.api,e),i._handleLinkedCharts(!0,c)}i.setTooltipPosition(r,t)}},bindTooltipResizePos:function(){var e=this,t=e.resizeFunction,i=e.state,n=e.$el.tooltip;t.add(function(){if(n.style("display")==="block"){var a=i.current,r=n.datum(),o=r.width,s=r.xPosInPercent,l=a.width/100*s,c=a.width-(l+o);c<0&&(l+=c),n.style("left","".concat(l,"px"))}})},hideTooltip:function(e){var t,i=this,n=i.api,a=i.config,r=i.$el.tooltip;if(r&&r.style("display")!=="none"&&(!a.tooltip_doNotHide||e)){var o=JSON.parse((t=r.datum().current)!==null&&t!==void 0?t:{});me(a.tooltip_onhide,n,o),r.style("display","none").datum(null),me(a.tooltip_onhidden,n,o)}},_handleLinkedCharts:function(e,t){var i=this,n=i.charts,a=i.config,r=i.state.event;if(r?.isTrusted&&a.tooltip_linked&&n.length>1){var o=a.tooltip_linked_name;n.filter(function(s){return s!==i.api}).forEach(function(s){var l=s.internal,c=l.config,u=l.$el,d=c.tooltip_linked,f=c.tooltip_linked_name,h=xe.body.contains(u.chart.node());if(d&&o===f&&h){var g=u.tooltip.data()[0],p=t!==g?.index;try{s.tooltip[e&&p?"show":"hide"]({index:t})}catch{}}})}},updateTooltipOnRedraw:function(e,t){var i,n=this,a=n.config,r=n.$el,o=r.eventRect,s=r.svg,l=r.tooltip,c=n.state,u=c.event,d=c.hasAxis,f=c.hasRadar,h=c.hasTreemap;if(l?.style("display")==="block"&&u){var g=e??((i=f?s:o)===null||i===void 0?void 0:i.node());if(d||f)if(n.isMultipleX())n.selectRectForMultipleXs(g,!1);else{var p=t??n.getDataIndexFromEvent(u);t===-1?n.api.tooltip.hide():(n.selectRectForSingle(g,p),n.setExpand(p,null,!0))}else{var m=u.clientX,v=u.clientY;setTimeout(function(){var _=[m,v].every(Number.isFinite)&&xe.elementFromPoint(m,v),x=_&&B(_).datum();if(x){var y=n.hasArcType()?n.convertToArcData(n.updateAngle(x)):x?.data;h&&(_=s.node()),y&&n.showTooltip([y],_)}else n.api.tooltip.hide()},a.transition_duration)}}}},Mg={getTranslate:function(e,t){var i;t===void 0&&(t=0);var n=this,a=n.config,r=n.state,o=a.axis_rotated,s=0,l,c;if(t&&/^(x|y2?)$/.test(e)&&(s=n.getAxisSize(e)*t),e==="main")l=Cn(r.margin.left),c=Cn(r.margin.top);else if(e==="context")l=Cn(r.margin2.left),c=Cn(r.margin2.top);else if(e==="legend")l=r.margin3.left,c=r.margin3.top;else if(e==="x")l=o?-s:0,c=o?0:r.height+s;else if(e==="y")l=o?0:-s,c=o?r.height+s:0;else if(e==="y2")l=o?0:r.width+s,c=o?-s-1:0;else if(e==="subX")l=0,c=o?0:r.height2;else if(e==="arc")l=r.arcWidth/2,c=r.arcHeight/2,!((i=a.arc_rangeText_values)===null||i===void 0)&&i.length&&(c+=5+(n.hasType("gauge")&&a.title_text?10:0));else if(e==="polar")l=r.arcWidth/2,c=r.arcHeight/2;else if(e==="radar"){var u=n.getRadarSize(),d=u[0],f=u[1];l=r.width/2-d,c=r.height/2-f}return"translate(".concat(l,", ").concat(c,")")},transformMain:function(e,t){var i=this,n=i.$el.main,a=i.$T,r=t?.axisX?t.axisX:a(n.select(".".concat(Ee.axisX)),e),o=t?.axisY?t.axisY:a(n.select(".".concat(Ee.axisY)),e),s=t?.axisY2?t.axisY2:a(n.select(".".concat(Ee.axisY2)),e);a(n,e).attr("transform",i.getTranslate("main")),r.attr("transform",i.getTranslate("x")),o.attr("transform",i.getTranslate("y")),s.attr("transform",i.getTranslate("y2")),n.select(".".concat(ne.chartArcs)).attr("transform",i.getTranslate("arc"))},transformAll:function(e,t){var i=this,n=i.config,a=i.state,r=a.hasAxis,o=a.hasFunnel,s=a.hasTreemap,l=i.$el;!o&&!s&&i.transformMain(e,t),r&&n.subchart_show&&i.transformContext(e,t),l.legend&&i.transformLegend(e)}},Lg={isValidChartType:function(e){return!!(e&&Object.values(G).indexOf(e)>-1)},setTargetType:function(e,t){var i=this,n=i.config,a=i.state.withoutFadeIn;i.mapToTargetIds(e).forEach(function(r){a[r]=t===n.data_types[r],n.data_types[r]=t}),e||(n.data_type=t)},updateTypesElements:function(){var e=this,t=e.state.current;Object.keys(G).forEach(function(i){var n=G[i],a=e.hasType(n,null,!0),r=t.types.indexOf(n);r===-1&&a?t.types.push(n):r>-1&&!a&&t.types.splice(r,1)}),e.setChartElements()},hasType:function(e,t,i){var n;i===void 0&&(i=!1);var a=this,r=a.config,o=a.state.current,s=r.data_types,l=t||a.data.targets,c=!1;return!i&&((n=o.types)===null||n===void 0?void 0:n.indexOf(e))>-1?c=!0:l?.length?l.forEach(function(u){var d=s[u.id];(d===e||!d&&e==="line")&&(c=!0)}):Object.keys(s).length?Object.keys(s).forEach(function(u){s[u]===e&&(c=!0)}):c=r.data_type===e,c},hasTypeOf:function(e,t,i){var n=this;return i===void 0&&(i=[]),e in St?!St[e].filter(function(a){return i.indexOf(a)===-1}).every(function(a){return!n.hasType(a,t)}):!1},isTypeOf:function(e,t){var i,n=le(e)?e:e.id,a=this.config&&(((i=this.config.data_types)===null||i===void 0?void 0:i[n])||this.config.data_type);return de(t)?t.indexOf(a)>=0:a===t},hasPointType:function(){var e=this;return e.hasTypeOf("Line")||e.hasType("bubble")||e.hasType("scatter")},hasArcType:function(e,t){return this.hasTypeOf("Arc",e,t)},hasMultiArcGauge:function(){return this.hasType("gauge")&&this.config.gauge_type==="multi"},isLineType:function(e){var t=le(e)?e:e.id;return!this.config.data_types[t]||this.isTypeOf(t,St.Line)},isStepType:function(e){return this.isTypeOf(e,St.Step)},isSplineType:function(e){return this.isTypeOf(e,St.Spline)},isAreaType:function(e){return this.isTypeOf(e,St.Area)},isAreaRangeType:function(e){return this.isTypeOf(e,St.AreaRange)},isBarType:function(e){return this.isTypeOf(e,"bar")},isBubbleType:function(e){return this.isTypeOf(e,"bubble")},isCandlestickType:function(e){return this.isTypeOf(e,"candlestick")},isScatterType:function(e){return this.isTypeOf(e,"scatter")},isTreemapType:function(e){return this.isTypeOf(e,"treemap")},isPieType:function(e){return this.isTypeOf(e,"pie")},isFunnelType:function(e){return this.isTypeOf(e,"funnel")},isGaugeType:function(e){return this.isTypeOf(e,"gauge")},isDonutType:function(e){return this.isTypeOf(e,"donut")},isPolarType:function(e){return this.isTypeOf(e,"polar")},isRadarType:function(e){return this.isTypeOf(e,"radar")},isArcType:function(e){return this.isPieType(e)||this.isDonutType(e)||this.isGaugeType(e)||this.isPolarType(e)||this.isRadarType(e)},isCirclePoint:function(e){var t=this.config,i=t.point_pattern,n=!1;return e?.tagName==="circle"?n=!0:n=t.point_type==="circle"&&(!i||de(i)&&i.length===0),n},lineData:function(e){return this.isLineType(e)?[e]:[]},arcData:function(e){return this.isArcType(e.data)?[e]:[]},labelishData:function(e){return this.isBarType(e)||this.isLineType(e)||this.isScatterType(e)||this.isBubbleType(e)||this.isCandlestickType(e)||this.isFunnelType(e)||this.isRadarType(e)||this.isTreemapType(e)?e.values.filter(function(t){return q(t.value)||!!t.value}):[]},barLineBubbleData:function(e){return this.isBarType(e)||this.isLineType(e)||this.isBubbleType(e)?e.values:[]},isInterpolationType:function(e){return["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"].indexOf(e)>=0}},Pg={getDrawShape:function(){var e=this,t=e.config.axis_rotated,i=e.state,n=i.hasRadar,a=i.hasTreemap,r={type:{},indices:{},pos:{}};if(!a&&["bar","candlestick","line","area"].forEach(function(l){var c=Ne(/^(bubble|scatter)$/.test(l)?"line":l);if(e.hasType(l)||e.hasTypeOf(c)||l==="line"&&(e.hasType("bubble")||e.hasType("scatter"))){var u=e.getShapeIndices(e["is".concat(c,"Type")]),d=e["generateDraw".concat(c)];r.indices[l]=u,r.type[l]=d?d.bind(e)(u,!1):void 0}}),!e.hasArcType()||n||a){var o=void 0,s=void 0;a||(o=n?e.radarCircleX:t?e.circleY:e.circleX,s=n?e.radarCircleY:t?e.circleX:e.circleY),r.pos={xForText:e.generateXYForText(r.indices,!0),yForText:e.generateXYForText(r.indices,!1),cx:(o||function(){}).bind(e),cy:(s||function(){}).bind(e)}}return r},getShapeIndices:function(e){var t=this,i=t.config,n=i.data_xs,a=Se(n),r={},o=a?{}:0;return a&&fs(Object.keys(n).map(function(s){return n[s]})).forEach(function(s){o[s]=0,r[s]={}}),t.filterTargetsToShow(t.data.targets.filter(e,t)).forEach(function(s){for(var l,c=(s.id in n)?n[s.id]:"",u=c?r[c]:r,d=0,f=void 0;f=i.data_groups[d];d++)if(!(f.indexOf(s.id)<0))for(var h=0,g=void 0;g=f[h];h++){if(g in u){u[s.id]=u[g];break}s.id!==g&&c&&(u[g]=(l=u[s.id])!==null&&l!==void 0?l:o[c])}we(u[s.id])&&(u[s.id]=c?o[c]++:o++,u.__max__=(c?o[c]:o)-1)}),r},getIndices:function(e,t,i){var n=this,a=n.config,r=a.data_xs,o=a.bar_indices_removeNull,s=t.id,l=t.index;if(n.isBarType(s)&&o){var c={};return n.getAllValuesOnIndex(l,!0).forEach(function(u,d){c[u.id]=d,c.__max__=d}),c}return Se(r)?e[r[s]]:e},getIndicesMax:function(e){return Se(this.config.data_xs)?Object.keys(e).map(function(t){return e[t].__max__||0}).reduce(function(t,i){return t+i}):e.__max__},getShapeX:function(e,t,i){var n=this,a=n.config,r=n.scale,o=i?r.subX:r.zoom||r.x,s=a.bar_overlap,l=a.bar_padding,c=function(d,f){return d+f},u=Ye(e)&&(e._$total.length?e._$total.reduce(c)/2:0);return function(d){var f=n.getIndices(t,d,"getShapeX"),h=d.id in f?f[d.id]:0,g=(f.__max__||0)+1,p=0;if(Se(d.x)){var m=o(d.x,!0);if(u){var v=e[d.id]||e._$width;p=s?m-v/2:m-v+e._$total.slice(0,h+1).reduce(c)-u}else p=m-(q(e)?e:e._$width)*(g/2-(s?1:h))}return e&&p&&g>1&&l&&(h&&(p+=l*h),g>2?p-=(g-1)*l/2:g===2&&(p-=l/2)),p}},getShapeY:function(e){var t=this,i=t.isStackNormalized();return function(n){var a=n.value;return q(n)?a=n:t.isAreaRangeType(n)?a=t.getBaseValue(n,"mid"):i?a=t.getRatio("index",n,!0):t.isBubbleZType(n)?a=t.getBubbleZData(n.value,"y"):t.isBarRangeType(n)&&(a=a[1]),t.getYScaleById(n.id,e)(a)}},getShapeYMin:function(e){var t=this,i=t.axis.getId(e),n=t.scale[i].domain()[0],a=t.config["axis_".concat(i,"_inverted")];return!t.isGrouped(e)&&!a&&n>0?n:0},getShapeOffsetData:function(e){var t=this,i=t.orderTargets(t.filterTargetsToShow(t.data.targets.filter(e,t))),n=i.map(function(c){return c.id}).join("_"),a="".concat(Te.shapeOffset,"_").concat(n),r=t.cache.get(a);if(r)return r;var o=t.isStackNormalized(),s=i.map(function(c){var u=c.values,d={};t.isStepType(c)&&(u=t.convertValuesToStep(u));var f=u.reduce(function(h,g){var p=Number(g.x);return h[p]=g,d[p]=o?t.getRatio("index",g,!0):g.value,h},{});return{id:c.id,rowValues:u,rowValueMapByXValue:f,values:d}}),l={indexMapByTargetId:i.reduce(function(c,u,d){var f=u.id;return c[f]=d,c},{}),shapeOffsetTargets:s};return t.cache.add(a,l),l},getShapeOffset:function(e,t,i){var n=this,a=n.getShapeOffsetData(e),r=a.shapeOffsetTargets,o=a.indexMapByTargetId,s=n.config.data_groupsZeroAs;return function(l,c){var u=l.id,d=l.value,f=l.x,h=n.getIndices(t,l),g=n.getYScaleById(u,i);if(n.isBarRangeType(l))return g(d[0]);var p=Number(f),m=g(s==="zero"?0:n.getShapeYMin(u)),v=m;return r.filter(function(_){return _.id!==u&&h[_.id]===h[u]}).forEach(function(_){var x=_.id,y=_.rowValueMapByXValue,$=_.rowValues,T=_.values;if(o[x]<o[u]){var A=T[p],S=$[c];(!S||Number(S.x)!==p)&&(S=y[p]),S?.value*d>=0&&q(A)&&(d!==0||s==="positive"&&A>0||s==="negative"&&A<0)&&(v+=g(A)-m)}}),v}},circleY:function(e,t){var i=this,n=e.id,a;return i.isGrouped(n)&&(a=eA.bind(i)(e)),a?a(e,t)[0][1]:i.getYScaleById(n)(i.getBaseValue(e))},getBarW:function(e,t,i){var n,a,r,o,s,l=this,c=l.config,u=l.org,d=l.scale,f=l.state,h=l.getMaxDataCount(),g=e==="bar"&&((n=c.data_groups)===null||n===void 0?void 0:n.length),p="".concat(e,"_width"),m=((r=(a=l.getZoomTransform)===null||a===void 0?void 0:a.call(l))!==null&&r!==void 0?r:{k:1}).k,v=[(o=c.axis_x_min)!==null&&o!==void 0?o:u.xDomain[0],(s=c.axis_x_max)!==null&&s!==void 0?s:u.xDomain[1]].map(l.axis.isTimeSeries()?Je.bind(l):Number),_=t.tickInterval(h);if(d.zoom&&!l.axis.isCategorized()&&m>1){var x=v.every(function(T,A){return T===u.xDomain[A]});_=u.xDomain.map(function(T,A){var S=x?T:T-Math.abs(v[A]);return d.zoom(S)}).reduce(function(T,A){return Math.abs(T)+A})/h}var y=function(T){var A=T?c[p][T]:c[p],S=T?A.ratio:c["".concat(p,"_ratio")],R=T?A.max:c["".concat(p,"_max")],C=q(A)?A:H(A)?A.call(l,f.width,i,h):i?_*S/i:0;return R&&C>R?R:C},$=y();return!g&&Ye(c[p])&&($={_$width:$,_$total:[]},l.filterTargetsToShow(l.data.targets).forEach(function(T){c[p][T.id]&&($[T.id]=y(T.id),$._$total.push($[T.id]||$._$width))})),$},getShapeByIndex:function(e,t,i){var n=this,a=n.$el,r=te(t)?"-".concat(t):"",o=a[e];return o&&!o.empty()?o=o.filter(function(s){return i?s.id===i:!0}).filter(function(s){return te(t)?s.index===t:!0}):o=(i?a.main.selectAll(".".concat(ue["".concat(e,"s")]).concat(n.getTargetSelectorSuffix(i))):a.main).selectAll(".".concat(ue[e]).concat(r)),o},isWithinShape:function(e,t){var i,n=this,a=B(e),r;return n.isTargetToShow(t.id)?!((i=n.hasValidPointType)===null||i===void 0)&&i.call(n,e.nodeName)?r=n.isStepType(t)?n.isWithinStep(e,n.getYScaleById(t.id)(n.getBaseValue(t))):n.isWithinCircle(e,n.isBubbleType(t)?n.pointSelectR(t)*1.5:0):e.nodeName==="path"&&(r=a.classed(ue.bar)?n.isWithinBar(e):!0):r=!1,r},getInterpolate:function(e){var t=this.getInterpolateType(e);return{basis:UT,"basis-closed":HT,"basis-open":YT,bundle:Af,cardinal:Sf,"cardinal-closed":kf,"cardinal-open":Cf,"catmull-rom":Lf,"catmull-rom-closed":Df,"catmull-rom-open":zf,"monotone-x":e1,"monotone-y":t1,natural:n1,"linear-closed":QT,linear:Yo,step:r1,"step-after":s1,"step-before":o1}[t]},getInterpolateType:function(e){var t=this,i=t.config,n=i.spline_interpolation_type,a=t.isInterpolationType(n)?n:"cardinal";return t.isSplineType(e)?a:t.isStepType(e)?i.line_step_type:"linear"},isWithinBar:function(e){var t=Qe(this.state.event,e),i=ah(e),n=i[0],a=i[1],r=Math.min(n.x,a.x),o=Math.min(n.y,a.y),s=this.config.bar_sensitivity,l=It(e,!0),c=l.width,u=l.height,d=r-s,f=r+c+s,h=o+u+s,g=o-s;return d<t[0]&&t[0]<f&&g<t[1]&&t[1]<h}},Vt=(function(){function e(t){this.data={xs:{},targets:[]},this.scale={x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null},this.org={xScale:null,xDomain:null},this.format={extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null};var i=this;i.api=t,i.config=new Xt,i.cache=new cg;var n=new lg;i.$el=n.getStore("element"),i.state=n.getStore("state"),i.$T=i.$T.bind(i)}return e.prototype.$T=function(t,i,n){var a=this,r=a.config,o=a.state,s=r.transition_duration,l=r.subchart_show,c=t;return c&&("tagName"in c&&(c=B(c)),c=(i!==!1&&s||i)&&(!o.zooming||o.dragging)&&!o.resizing&&o.rendered&&!l?c.transition(n).duration(s):c),c},e.prototype.beforeInit=function(){var t=this;t.callPluginHook("$beforeInit"),me(t.config.onbeforeinit,t.api)},e.prototype.afterInit=function(){var t=this;t.callPluginHook("$afterInit"),me(t.config.onafterinit,t.api)},e.prototype.init=function(){var t=this,i=t.config,n=t.state,a=t.$el,r=i.boost_useCssRule,o=i.bindto;O$(t);var s=t.hasArcType();if(n.hasRadar=!n.hasAxis&&t.hasType("radar"),n.hasFunnel=!n.hasAxis&&t.hasType("funnel"),n.hasTreemap=!n.hasAxis&&t.hasType("treemap"),n.hasAxis=!s&&!n.hasFunnel&&!n.hasTreemap,n.datetimeId="bb-".concat(+new Date*mt()),r){var l=xe.createElement("style");l.type="text/css",xe.head.appendChild(l),n.style={rootSelctor:".".concat(n.datetimeId),sheet:l.sheet},a.style=l}var c={element:o,classname:"bb"};ce(o)&&(c.element=o.element||"#chart",c.classname=o.classname||c.classname),a.chart=H(c.element.node)?o.element:B(c.element||[]),a.chart.empty()&&(a.chart=B(xe.body.appendChild(xe.createElement("div")))),a.chart.html("").classed(c.classname,!0).classed(n.datetimeId,r).style("position","relative"),t.initParams(),t.initToRender()},e.prototype.initToRender=function(t){var i=this,n=i.config,a=i.state,r=i.$el.chart,o=function(){return F$(r,{display:"none",visibility:"hidden"})},s=n.render.lazy===!1?!1:n.render.lazy||o(),l=ee.MutationObserver;s&&l&&n.render.observe!==!1&&!t&&new l(function(c,u){o()||(u.disconnect(),!a.rendered&&i.initToRender(!0))}).observe(r.node(),{attributes:!0,attributeFilter:["class","style"]}),(!s||t)&&i.convertData(n,function(c){i.initWithData(c),i.afterInit()})},e.prototype.initParams=function(){var t,i=this,n=i.config,a=i.format,r=i.state;if(i.color=i.generateColor(),i.levelColor=i.generateLevelColor(),n.padding===!1&&(n.axis_x_show=!1,n.axis_y_show=!1,n.axis_y2_show=!1,n.subchart_show=!1),(i.hasPointType()||!((t=i.hasLegendDefsPoint)===null||t===void 0)&&t.call(i))&&(i.point=i.generatePoint()),r.hasAxis){i.initClip(),a.extraLineClasses=i.generateExtraLineClass(),a.dataTime=n.data_xLocaltime?mu:_u,a.axisTime=n.axis_x_localtime?no:ao;var o=n.zoom_enabled&&n.zoom_type==="drag";a.defaultAxisTime=function(u){var d=i.scale,f=d.x,h=d.zoom,g=o?h:h&&f.orgDomain().toString()!==h.domain().toString(),p=u.getMilliseconds()&&".%L"||u.getSeconds()&&".:%S"||u.getMinutes()&&"%I:%M"||u.getHours()&&"%I %p"||u.getDate()!==1&&"%b %d"||g&&u.getDate()===1&&"%b'%y"||u.getMonth()&&"%-m/%-d"||"%Y";return a.axisTime(p)(u)}}var s=n.legend_position,l=n.legend_inset_anchor,c=n.axis_rotated;r.isLegendRight=s==="right",r.isLegendInset=s==="inset",r.isLegendTop=l==="top-left"||l==="top-right",r.isLegendLeft=l==="top-left"||l==="bottom-left",r.rotatedPadding.top=i.getResettedPadding(r.rotatedPadding.top),r.rotatedPadding.right=c&&!n.axis_x_show?0:30,r.inputType=z$(n.interaction_inputType_mouse,n.interaction_inputType_touch)},e.prototype.initWithData=function(t){var i,n,a,r=this,o=r.config,s=r.scale,l=r.state,c=r.$el,u=r.org,d=l.hasAxis,f=l.hasFunnel,h=l.hasTreemap,g=o.interaction_enabled,p=r.hasType("polar"),m=o.data_labels_backgroundColors;if(d&&(r.axis=r.getAxisInstance(),o.zoom_enabled&&r.initZoom()),r.data.xs={},r.data.targets=r.convertDataToTargets(t),o.data_filter&&(r.data.targets=r.data.targets.filter(o.data_filter.bind(r.api))),o.data_hide&&r.addHiddenTargetIds(o.data_hide===!0?r.mapToIds(r.data.targets):o.data_hide),o.legend_hide&&r.addHiddenLegendIds(o.legend_hide===!0?r.mapToIds(r.data.targets):o.legend_hide),r.updateSizes(),r.updateScales(!0),d){var v=s.x,_=s.y,x=s.y2,y=s.subX,$=s.subY,T=s.subY2;v&&(v.domain(Xi(r.getXDomain(r.data.targets),!o.axis_x_inverted)),y.domain(v.domain()),u.xDomain=v.domain()),_&&(_.domain(r.getYDomain(r.data.targets,"y")),$.domain(_.domain())),x&&(x.domain(r.getYDomain(r.data.targets,"y2")),T&&T.domain(x.domain()))}if(c.svg=c.chart.append("svg").style("overflow","hidden").style("display","block"),g&&l.inputType){var A=l.inputType==="touch",S=o.onclick,R=o.onover,C=o.onout;c.svg.on("click",S?.bind(r.api)||null).on(A?"touchstart":"mouseenter",R?.bind(r.api)||null,A?{passive:!0}:void 0).on(A?"touchend":"mouseleave",C?.bind(r.api)||null)}o.svg_classname&&c.svg.attr("class",o.svg_classname);var E=H(o.color_tiles)&&r.patterns;(d||E||p||h||m||!((i=r.hasLegendDefsPoint)===null||i===void 0)&&i.call(r))&&(c.defs=c.svg.append("defs"),d&&["id","idXAxis","idYAxis","idGrid"].forEach(function(w){r.appendClip(c.defs,l.clip[w])}),r.generateTextBGColorFilter(m),E&&r.patterns.forEach(function(w){return c.defs.append(function(){return w.node})})),r.updateSvgSize(),r.bindResize();var k=c.svg.append("g").classed(Q.main,!0).attr("transform",f||h?null:r.getTranslate("main"));if(c.main=k,o.subchart_show&&r.initSubchart(),o.tooltip_show&&r.initTooltip(),o.title_text&&r.initTitle(),!h&&o.legend_show&&r.initLegend(),o.data_empty_label_text&&k.append("text").attr("class","".concat(Ce.text," ").concat(Q.empty)).attr("text-anchor","middle").attr("dominant-baseline","middle"),d&&(o.regions.length&&r.initRegion(),!o.clipPath&&r.axis.init()),k.append("g").classed(Q.chart,!0).attr("clip-path",d?l.clip.path:null),r.callPluginHook("$init"),r.initChartElements(),d&&(g&&((n=r.initEventRect)===null||n===void 0||n.call(r)),r.initGrid(),o.clipPath&&((a=r.axis)===null||a===void 0||a.init())),r.updateTargets(r.data.targets),r.updateDimension(),me(o.oninit,r.api),r.setBackground(),r.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),o.data_onmin||o.data_onmax){var P=r.getMinMaxData();me(o.data_onmin,r.api,P.min),me(o.data_onmax,r.api,P.max)}o.tooltip_show&&r.initShowTooltip(),l.rendered=!0},e.prototype.initChartElements=function(){var t=this,i=t.state,n=i.hasAxis,a=i.hasRadar,r=i.hasTreemap,o=[];if(n){var s=["bar","bubble","candlestick","line"];t.config.bar_front&&s.push(s.shift());for(var l=0,c=s;l<c.length;l++){var u=c[l],d=Ne(u);(u==="line"&&t.hasTypeOf(d)||t.hasType(u))&&o.push(d)}}else if(r)o.push("Treemap");else if(t.hasType("funnel"))o.push("Funnel");else{var f=t.hasType("polar"),h=t.hasType("gauge");a||o.push("Arc","Pie"),h?o.push("Gauge"):a?o.push("Radar"):f&&o.push("Polar")}for(var g=0,p=o;g<p.length;g++){var m=p[g];t["init".concat(m)]()}Se(t.config.data_labels)&&!t.hasArcType(null,["radar"])&&t.initText()},e.prototype.setChartElements=function(){var t=this,i=t.$el,n=i.chart,a=i.svg,r=i.defs,o=i.main,s=i.tooltip,l=i.legend,c=i.title,u=i.grid,d=i.needle,f=i.arcs,h=i.circle,g=i.bar,p=i.candlestick,m=i.line,v=i.area,_=i.text;t.api.$={chart:n,svg:a,defs:r,main:o,tooltip:s,legend:l,title:c,grid:u,arc:f,circles:h,bar:{bars:g},candlestick:p,line:{lines:m,areas:v},needle:d,text:{texts:_}}},e.prototype.setBackground=function(){var t=this,i=t.config.background,n=t.state,a=t.$el.svg;if(Se(i)){var r=a.select("g").insert(i.imgUrl?"image":"rect",":first-child");i.imgUrl?r.attr("href",i.imgUrl):i.color&&r.style("fill",i.color).attr("clip-path",n.clip.path),r.attr("class",i.class||null).attr("width","100%").attr("height","100%")}},e.prototype.updateTargets=function(t){var i,n,a=this,r=a.state,o=r.hasAxis,s=r.hasFunnel,l=r.hasRadar,c=r.hasTreemap,u=function(_){return a["updateTargetsFor".concat(_)](t.filter(a["is".concat(_,"Type")].bind(a)))};if(a.updateTargetsForText(t),o){for(var d=["bar","candlestick","line"],f=0,h=d;f<h.length;f++){var g=h[f],p=Ne(g);(g==="line"&&a.hasTypeOf(p)||a.hasType(g))&&u(p)}(i=a.updateTargetsForSubchart)===null||i===void 0||i.call(a,t)}else if(a.hasArcType(t)){var m="Arc";l?m="Radar":a.hasType("polar")&&(m="Polar"),u(m)}else s?u("Funnel"):c&&u("Treemap");var v=a.hasType("bubble")||a.hasType("scatter");v&&((n=a.updateTargetForCircle)===null||n===void 0||n.call(a)),a.filterTargetsToShowAtInit(v)},e.prototype.filterTargetsToShowAtInit=function(t){t===void 0&&(t=!1);var i=this,n=i.$el.svg,a=i.$T,r=".".concat(Q.target);t&&(r+=", .".concat(Oe.chartCircles," > .").concat(Oe.circles)),a(n.selectAll(r).filter(function(o){return i.isTargetToShow(o.id)})).style("opacity",null)},e.prototype.getWithOption=function(t){for(var i={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0},n=0,a=Object.entries(i);n<a.length;n++){var r=a[n],o=r[0],s=r[1],l=le(s)?i[s]:s;i[o]=zt(t,"with".concat(o),l)}return i},e.prototype.initialOpacity=function(t){var i=this,n=i.state.withoutFadeIn;return i.getBaseValue(t)!==null&&n[t.id]?null:"0"},e.prototype.bindResize=function(){var t=this,i=t.$el,n=t.config,a=t.state,r=B$(n.resize_timer),o=n.resize_auto,s=[];s.push(function(){return me(n.onresize,t.api)}),/^(true|parent)$/.test(o)&&s.push(function(){a.resizing=!0,n.legend_show&&(t.updateSizes(),t.updateLegend()),t.api.flush(!1)}),s.push(function(){me(n.onresized,t.api),a.resizing=!1}),s.forEach(function(l){return r.add(l)}),t.resizeFunction=r,o==="parent"?(t.resizeFunction.resizeObserver=new ResizeObserver(t.resizeFunction.bind(t))).observe(i.chart.node().parentNode):ee.addEventListener("resize",t.resizeFunction)},e.prototype.callPluginHook=function(t){for(var i=this,n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];this.config.plugins.forEach(function(r){t==="$beforeInit"&&(r.$$=i,i.api.plugins.push(r)),r[t].apply(r,n)})},e})(),Pe(Vt.prototype,[fg,hg,gg,pg,mg,yg,bg,vg,wg,Tg,$g,Ag,Pg,Sg,kg,Eg,Cg,Rg,Mg,Lg]),Dg={resize:function(e){var t=this.internal,i=t.config,n=t.state;n.rendered&&(i.size_width=e?e.width:null,i.size_height=e?e.height:null,n.resizing=!0,this.flush(!1),t.resizeFunction())},flush:function(e){var t,i,n=this.internal,a=n.state,r=n.$el.zoomResetBtn;a.rendered?(a.resizing?(t=n.brush)===null||t===void 0||t.updateResize():(i=n.axis)===null||i===void 0||i.setOrient(),r?.style("display","none"),n.scale.zoom&&(a.current.zoomDomain=n.scale.zoom.domain()),n.scale.zoom=null,e?n.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):n.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1}),!a.resizing&&n.brush&&(n.brush.getSelection().call(n.brush.move),n.unselectRect()),a.current.zoomDomain&&(n.api.zoom(a.current.zoomDomain),a.current.zoomDomain=null)):n.initToRender(!0)},destroy:function(){var e=this,t,i=this.internal,n=i.$el,a=n.chart,r=n.style,o=n.svg;if(Se(i)){i.callPluginHook("$willDestroy"),i.charts.splice(i.charts.indexOf(this),1),i.unbindAllEvents(),o.select("*").interrupt(),i.resizeFunction.clear(),(t=i.resizeFunction.resizeObserver)===null||t===void 0||t.disconnect(),ee.removeEventListener("resize",i.resizeFunction),a.classed("bb",!1).style("position",null).selectChildren().remove(),r&&r.parentNode.removeChild(r),Object.keys(this).forEach(function(l){l==="internal"&&Object.keys(i).forEach(function(c){i[c]=null}),e[l]=null,delete e[l]});for(var s in this)this[s]=function(){}}return null},config:function(e,t,i){var n=this.internal,a=n.config,r=n.state,o=e?.replace(/\./g,"_"),s;return e&&o in a?ve(t)?(a[o]=t,s=t,i&&this.flush()):s=a[o]:(arguments.length===0||Ze(e))&&(s=r.orgConfig),s}},Fg={color:function(e){return this.internal.color(e)}},Ms=function(e){var t=this.internal.data.targets;if(!we(e)){var i=de(e)?e:[e];return t.filter(function(n){return i.some(function(a){return a===n.id})})}return t},Pe(Ms,{shown:function(e){return this.internal.filterTargetsToShow(this.data(e))},values:function(e,t){t===void 0&&(t=!0);var i=null;if(e){var n=this.data(e);de(n)&&(i=[],n.forEach(function(a){var r=a.values.map(function(o){return o.value});t?i=i.concat(r):i.push(r)}))}return i},names:function(e){return this.internal.updateDataAttributes("names",e)},colors:function(e){return this.internal.updateDataAttributes("colors",e)},axes:function(e){return this.internal.updateDataAttributes("axes",e)},min:function(){return this.internal.getMinMaxData().min},max:function(){return this.internal.getMinMaxData().max}}),zg={data:Ms},Ig=function(e){var t;return(t=ee.btoa)===null||t===void 0?void 0:t.call(ee,encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(i,n){return String.fromCharCode(Number("0x".concat(n)))}))},Og={export:function(e,t){var i=this,n=this.internal,a=n.state,r=n.$el,o=r.chart,s=r.svg,l=a.current,c=l.width,u=l.height,d=Bi(Object.create(null),{width:c,height:u,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},e),f=iA(o.node(),d,{width:c,height:u}),h=d.preserveFontStyle?aA(s.node()):[];if(t&&H(t)){var g=new Image;g.crossOrigin="Anonymous",g.onload=function(){var p=xe.createElement("canvas"),m=p.getContext("2d");p.width=d.width||c,p.height=d.height||u,m.drawImage(g,0,0),h.length&&(rA(m,h),h.length=0),t.bind(i)(p.toDataURL(d.mimeType))},g.src=f}return f}},Ng={focus:function(e){var t=this.internal,i=t.state,n=t.mapToTargetIds(e),a=t.$el.svg.selectAll(t.selectorTargets(n.filter(t.isTargetToShow,t)));this.revert(),this.defocus(),a.classed(pe.focused,!0).classed(pe.defocused,!1),t.hasArcType()&&!i.hasRadar&&(t.expandArc(n),t.hasType("gauge")&&t.markOverlapped(e,t,".".concat(We.gaugeValue))),t.toggleFocusLegend(n,!0),i.focusedTargetIds=n,i.defocusedTargetIds=i.defocusedTargetIds.filter(function(r){return n.indexOf(r)<0})},defocus:function(e){var t=this.internal,i=t.state,n=t.mapToTargetIds(e);t.$el.svg.selectAll(t.selectorTargets(n.filter(t.isTargetToShow,t))).classed(pe.focused,!1).classed(pe.defocused,!0),t.hasArcType(null,["polar"])&&(t.unexpandArc(n),t.hasType("gauge")&&t.undoMarkOverlapped(t,".".concat(We.gaugeValue))),t.toggleFocusLegend(n,!1),i.focusedTargetIds=i.focusedTargetIds.filter(function(a){return n.indexOf(a)<0}),i.defocusedTargetIds=n},revert:function(e){var t=this.internal,i=t.config,n=t.state,a=t.$el,r=t.mapToTargetIds(e);a.svg.selectAll(t.selectorTargets(r)).classed(pe.focused,!1).classed(pe.defocused,!1),t.hasArcType(null,["polar"])&&t.unexpandArc(r),i.legend_show&&(t.showLegend(r.filter(t.isLegendToShow.bind(t))),a.legend.selectAll(t.selectorLegends(r)).filter(function(){return B(this).classed(pe.legendItemFocused)}).classed(pe.legendItemFocused,!1)),n.focusedTargetIds=[],n.defocusedTargetIds=[]}},Bg={legend:{show:function(e){var t=this.internal;t.showLegend(t.mapToTargetIds(e)),t.updateAndRedraw({withLegend:!0})},hide:function(e){var t=this.internal;t.hideLegend(t.mapToTargetIds(e)),t.updateAndRedraw({withLegend:!0})}}},Xg={load:function(e){var t=this.internal,i=t.config;e.xs&&t.addXs(e.xs),"names"in e&&this.data.names(e.names),"classes"in e&&Object.keys(e.classes).forEach(function(n){i.data_classes[n]=e.classes[n]}),"categories"in e&&t.axis.isCategorized()&&(i.axis_x_categories=e.categories),"axes"in e&&Object.keys(e.axes).forEach(function(n){i.data_axes[n]=e.axes[n]}),"colors"in e&&Object.keys(e.colors).forEach(function(n){i.data_colors[n]=e.colors[n]}),"unload"in e&&e.unload!==!1?t.unload(t.mapToTargetIds(e.unload===!0?null:e.unload),function(){Ss(function(){return t.loadFromArgs(e)})}):t.loadFromArgs(e)},unload:function(e){var t=this.internal,i=e||{};Ze(i)&&this.tooltip.hide(),de(i)?i={ids:i}:le(i)&&(i={ids:[i]});var n=t.mapToTargetIds(i.ids);t.unload(n,function(){t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),t.cache.remove(n),xh.call(t,i.done,i.resizeAfter)})}},Vg={show:function(e,t){t===void 0&&(t={}),Ah.call(this,!0,e,t)},hide:function(e,t){t===void 0&&(t={}),Ah.call(this,!1,e,t)},toggle:function(e,t){var i=this;t===void 0&&(t={});var n=this.internal,a={show:[],hide:[]};n.mapToTargetIds(e).forEach(function(r){return a[n.isTargetToShow(r)?"hide":"show"].push(r)}),a.show.length&&this.show(a.show,t),a.hide.length&&setTimeout(function(){return i.hide(a.hide,t)},0)}},Gg={tooltip:{show:function(e){var t,i,n,a=this.internal,r=a.$el,o=a.config,s=a.state,l=s.eventReceiver,c=s.hasFunnel,u=s.hasTreemap,d=s.inputType,f,h;if(e.mouse&&(h=e.mouse),e.data){var g=e.data,p=(t=a.getYScaleById(g.id))===null||t===void 0?void 0:t(g.value);if((c||u)&&g.id){var m=a.selectorTarget(g.id,void 0,".".concat(be.shape));l.rect=r.main.select(m)}else a.isMultipleX()?h=[a.xx(g),p]:(o.tooltip_grouped||(h=[0,p]),f=(i=g.index)!==null&&i!==void 0?i:a.hasArcType()&&g.id?(n=a.getArcElementByIdOrIndex(g.id))===null||n===void 0?void 0:n.datum().index:a.getIndexByX(g.x))}else ve(e.x)?f=a.getIndexByX(e.x):ve(e.index)&&(f=e.index);(d==="mouse"?["mouseover","mousemove"]:["touchstart"]).forEach(function(v){a.dispatchEvent(v,f,h)})},hide:function(){var e,t,i,n=this.internal,a=n.state.inputType,r=n.$el.tooltip,o=r?.datum();if(o){var s=JSON.parse(o.current)[0].index;(a==="mouse"?["mouseout"]:["touchend"]).forEach(function(l){n.dispatchEvent(l,s)})}a==="touch"&&n.callOverOutForTouch(),n.hideTooltip(!0),(e=n.hideGridFocus)===null||e===void 0||e.call(n),(t=n.unexpandCircles)===null||t===void 0||t.call(n),(i=n.expandBarTypeShapes)===null||i===void 0||i.call(n,!1)}}},ui=(function(){function e(t){this.plugins=[];var i=new Vt(this);this.internal=i,(function n(a,r,o){Object.keys(a).forEach(function(s){var l=H(a[s]),c=r!==o,u=Se(a[s]),d=u&&Object.keys(a[s]).length>0;l&&(!c&&d||c)?r[s]=a[s].bind(o):u&&!l?r[s]={}:r[s]=a[s],d&&n(a[s],r[s],o)})})(e.prototype,this,this),tA.call(i,t),i.beforeInit(),i.init()}return e})(),Pe(ui.prototype,[Dg,Fg,zg,Og,Ng,Bg,Xg,Vg,Gg]),Ug={axis:{labels:function(e){var t=this.internal,i;return e&&(Object.keys(e).forEach(function(n){t.axis.setLabelText(n,e[n])}),t.axis.updateLabels()),["x","y","y2"].forEach(function(n){var a=t.axis.getLabelText(n);a&&(!i&&(i={}),i[n]=a)}),i},min:function(e){var t=this.internal;return te(e)||e===!1?Sh(t,"min",e):kh(t,"min")},max:function(e){var t=this.internal;return te(e)||e===!1?Sh(t,"max",e):kh(t,"max")},range:function(e){var t=this.axis;if(arguments.length){var i=e.min,n=e.max;ve(n)&&t.max(n),ve(i)&&t.min(i)}else return{max:t.max(),min:t.min()}}}},Hg={category:function(e,t){var i=this.internal,n=i.config;return arguments.length>1&&(n.axis_x_categories[e]=t,i.redraw()),n.axis_x_categories[e]},categories:function(e){var t=this.internal,i=t.config;if(!e||!Array.isArray(e)){var n=i.axis_x_categories;return Ze(n)?Object.values(t.data.xs)[0]:n}return i.axis_x_categories=e,t.redraw(),i.axis_x_categories}},Wg={flow:function(e){var t=this.internal,i;(e.json||e.rows||e.columns)&&t.convertData(e,function(a){i=a,n()});function n(){var a,r=0,o=0,s,l;if(!(t.state.redrawing||!i||!Sn())){var c=[],u=t.getMaxDataCount(),d=t.convertDataToTargets(i,!0),f=t.axis.isTimeSeries();t.data.targets.forEach(function(p){for(var m=!1,v=0;v<d.length;v++)if(p.id===d[v].id){m=!0,p.values[p.values.length-1]&&(o=p.values[p.values.length-1].index+1),r=d[v].values.length;for(var _=0;_<r;_++)d[v].values[_].index=o+_,f||(d[v].values[_].x=o+_);p.values=p.values.concat(d[v].values),d.splice(v,1);break}!m&&c.push(p.id)}),t.data.targets.forEach(function(p){for(var m=0;m<c.length;m++)if(p.id===c[m]){o=p.values[p.values.length-1].index+1;for(var v=0;v<r;v++)p.values.push({id:p.id,index:o+v,x:f?t.getOtherTargetX(o+v):o+v,value:null})}}),t.data.targets.length&&d.forEach(function(p){for(var m=[],v=t.data.targets[0].values[0].index;v<o;v++)m.push({id:p.id,index:v,x:f?t.getOtherTargetX(v):v,value:null});p.values.forEach(function(_){_.index+=o,f||(_.x+=o)}),p.values=m.concat(p.values)}),t.data.targets=t.data.targets.concat(d);var h=t.data.targets[0],g=h.values[0];ve(e.to)?(r=0,l=f?Je.call(t,e.to):e.to,h.values.forEach(function(p){p.x<l&&r++})):ve(e.length)&&(r=e.length),u?u===1&&f&&(s=(h.values[h.values.length-1].x-g.x)/2,a=[new Date(+g.x-s),new Date(+g.x+s)]):(f?s=h.values.length>1?h.values[h.values.length-1].x-g.x:g.x-t.getXDomain(t.data.targets)[0]:s=1,a=[g.x-s,g.x]),a&&t.updateXDomain(null,!0,!0,!1,a),t.updateTargets(t.data.targets),t.redraw({flow:{index:g.index,length:r,duration:te(e.duration)?e.duration:t.config.transition_duration,done:e.done,orgDataCount:u},withLegend:!0,withTransition:u>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}}},Ls=function(e){return xs.bind(this)(e,"x")},Pe(Ls,{add:function(e){return Eh.bind(this)(e,"x")},remove:function(e){return Ch.bind(this)(e,!0)}}),Ps=function(e){return xs.bind(this)(e,"y")},Pe(Ps,{add:function(e){return Eh.bind(this)(e,"y")},remove:function(e){return Ch.bind(this)(e,!1)}}),Yg={xgrids:Ls,ygrids:Ps},jg={groups:function(e){var t=this.internal,i=t.config;return we(e)||(i.data_groups=e,t.redraw()),i.data_groups}},Ds=function(e){return Rh.bind(this)(e)},Pe(Ds,{add:function(e){return Rh.bind(this)(e,!0)},remove:function(e){var t=this.internal,i=t.config,n=t.$T,a=e||{},r=zt(a,"classes",[Hi.region]),o=t.$el.main.select(".".concat(Hi.regions)).selectAll(r.map(function(s){return".".concat(s)}));return n(o).style("opacity","0").remove(),o=i.regions,Object.keys(a).length?(o=o.filter(function(s){var l=!1;return s.class?(s.class.split(" ").forEach(function(c){r.indexOf(c)>=0&&(l=!0)}),!l):!0}),i.regions=o):i.regions=[],o}}),Zg={regions:Ds},qg={x:function(e){var t=this.internal,i=t.axis,n=t.data,a=i.isCustomX()&&i.isCategorized();return de(e)&&(a?this.categories(e):(t.updateTargetX(n.targets,e),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),a?this.categories():n.xs},xs:function(e){var t=this.internal;return ce(e)&&(t.updateTargetXs(t.data.targets,e),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),t.data.xs}},Kg=(function(){function e(t){this.charSize={};var i=ci(),n=t.config,a=t.params;this.owner=t,this.config=n,this.scale=i,(n.noTransition||!a.config.transition_duration)&&(n.withoutTransition=!0),n.range=this.scaleExtent((a.orgXScale||i).range())}return e.prototype.getSizeFor1Char=function(t,i,n){n===void 0&&(n=!0);var a={w:5.5,h:11.5};return this.charSize[t]&&n?this.charSize[t]:(!i.empty()&&i.text("0").call(function(r){try{var o=It(r.node(),!0),s=o.width,l=o.height;s&&l&&(a.w=s,a.h=l)}finally{r.text("")}}),this.charSize[t]=a,a)},e.prototype.getTickTransformSetter=function(t){var i=this.config,n=t==="x"?function(a){return"translate(".concat(a+i.tickOffset,",0)")}:function(a){return"translate(0,".concat(a,")")};return function(a,r){a.attr("transform",function(o){var s=r(o);return te(o)?n(s):null})}},e.prototype.scaleExtent=function(t){var i=t[0],n=t[t.length-1];return i<n?[i,n]:[n,i]},e.prototype.generateTicks=function(t,i){var n=this.owner.params.tickStepSize,a=t.domain(),r=a[0],o=a[1],s=[];if(i&&n)for(var l=Math.round(r);l<=o;)s.push(l),l+=n;else if(t.ticks){var c=this.config.tickArguments;if(t.type==="log"&&!c){var u=ci("_log").domain([r>0?r:1,o]).range(t.range());s=u.ticks();for(var d=o.toFixed().length;s.length>15;d--)s=u.ticks(d);s.splice(0,1,r),s.splice(s.length-1,1,o)}else s=t.ticks.apply(t,this.config.tickArguments||[]);s=s.map(function(f){return le(f)&&q(f)&&!isNaN(f)&&Math.round(f*10)/10||f})}return s},e.prototype.copyScale=function(){var t=this.scale.copy();return t.domain().length||t.domain(this.scale.domain()),t.type=this.scale.type,t},e.prototype.textFormatted=function(t){var i=this.config.tickFormat,n=/\d+\.\d+0{5,}\d$/.test(t)?+String(t).replace(/0+\d$/,""):t,a=i?i(n):n;return ve(a)?a:""},e.prototype.transitionise=function(t){var i=this.config,n=t;if(i.withoutTransition)n=t.interrupt();else if(i.transition||!this.owner.params.noTransition)try{n=t.transition(i.transition)}catch{}return n},e})(),Qg=(function(){function e(t){t===void 0&&(t={});var i={innerTickSize:6,outerTickSize:t.outerTick?6:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:9,tickOffset:0,tickPadding:3,tickValues:null,transition:null,noTransition:t.noTransition};i.tickLength=Math.max(i.innerTickSize,0)+i.tickPadding,this.config=i,this.params=t,this.helper=new Kg(this)}return e.prototype.create=function(t){var i=this,n=i.config,a=i.helper,r=i.params,o=a.scale,s=n.orient,l=this.splitTickText.bind(i),c=/^(left|right)$/.test(s),u=/^(top|bottom)$/.test(s),d=a.getTickTransformSetter(u?"x":"y"),f=d===a.axisX?"y":"x",h=/^(top|left)$/.test(s)?-1:1,g=r.tickTextRotate;this.config.range=o.rangeExtent?o.rangeExtent():a.scaleExtent((r.orgXScale||o).range());var p=n.innerTickSize,m=n.tickLength,v=n.range,_=r.id,x=_&&/^(x|y|y2)$/.test(_)?r.config["axis_".concat(_,"_tick_text_position")]:{x:0,y:0},y=_==="subX"?"subchart_axis_x":"axis_".concat(_),$=r.config["".concat(y,"_show")],T={tick:$?r.config["".concat(y,"_tick_show")]:!1,text:$?r.config["".concat(y,"_tick_text_show")]:!1},A=r.config.axis_evalTextSize,S;t.each(function(){var R=B(this),C=this.__chart__||o,E=a.copyScale();S=R,this.__chart__=E,n.tickOffset=r.isCategory?(E(1)-E(0))/2:0;var k=R.selectAll(".domain").data([0]);if(k.enter().append("path").attr("class","domain").merge(k).attr("d",function(){var Y=n.outerTickSize*h;return u?"M".concat(v[0],",").concat(Y,"V0H").concat(v[1],"V").concat(Y):"M".concat(Y,",").concat(v[0],"H0V").concat(v[1],"H").concat(Y)}),T.tick||T.text){var P=n.tickValues||a.generateTicks(E,c||r.config.axis_rotated);i.generatedTicks=P;var w=R.selectAll(".tick").data(P,E),D=w.enter().insert("g",".domain").attr("class","tick"),L=w.exit().remove();w=D.merge(w),T.tick&&D.append("line"),T.text&&D.append("text");var M=w.select("text"),z=[],I={w:0,h:0};H(A)&&(I=A.bind(i.params.owner.api)(M.node(),_),this.classList.contains(Q.dummy)&&(this.sizeFor1Char=I)),(!I||I.w===0||I.h===0)&&(I=i.helper.getSizeFor1Char(s,M,!!A));var O=M.selectAll("tspan").data(function(Y,Z){var re=r.tickMultiline?l(Y,E,P,c,I.w):de(a.textFormatted(Y))?a.textFormatted(Y).concat():[a.textFormatted(Y)];return z[Z]=re.length,re.map(function(N){return{index:Z,splitted:N}})});O.exit().remove(),O=O.enter().append("tspan").merge(O).text(function(Y){return Y.splitted}),O.attr("x",u?0:m*h).attr("dx",(function(){var Y=0;return/(top|bottom)/.test(s)&&g&&(Y=8*Math.sin(Math.PI*(g/180))*(s==="top"?-1:1)),Y+(x.x||0)})()).attr("dy",function(Y,Z){var re=".71em",N=0;return s!=="top"&&(N=I.h,Z===0&&(N=c?-((z[Y.index]-1)*(I.h/2)-3):x.y===0?re:0)),q(N)&&x.y?N+x.y:N||re});var X=w.select("line"),V=w.select("text");if(D.select("line").attr("".concat(f,"2"),p*h),D.select("text").attr(f,m*h),i.setTickLineTextPosition(X,V,I),r.tickTitle){var fe=V.select("title");(fe.empty()?V.append("title"):fe).text(function(Y){return r.tickTitle[Y]})}if(E.bandwidth){var ie=E,U=ie.bandwidth()/2;C=function(Y){return ie(Y)+U},E=C}else C.bandwidth?C=E:d(L,E);w=r.owner.state.flowing?a.transitionise(w):r.owner.$T(w),d(D,C),d(w.style("opacity",null),E)}}),this.g=S},e.prototype.getGeneratedTicks=function(t){var i,n=((i=this.generatedTicks)===null||i===void 0?void 0:i.length)-1,a=this.generatedTicks;if(n>t){var r=Math.round(n/t+.1);a=this.generatedTicks.map(function(o,s){return s%r===0?o:null}).filter(function(o){return o!==null}).splice(0,t)}return a},e.prototype.getTickXY=function(){var t=this.config,i={x:0,y:0};return this.params.isCategory&&(i.x=t.tickCentered?0:t.tickOffset,i.y=t.tickCentered?t.tickOffset:0),i},e.prototype.getTickSize=function(t){var i=this.helper.scale,n=this.config,a=n.innerTickSize,r=n.range,o=i(t)+(n.tickCentered?0:n.tickOffset);return r[0]<o&&o<r[1]?a:0},e.prototype.setTickLineTextPosition=function(t,i,n){var a=this,r=this.getTickXY(),o=this.config,s=o.innerTickSize,l=o.orient,c=o.tickLength,u=o.tickOffset,d=this.params.id,f=this.params.tickTextRotate,h=6,g=n.h/2-h,p=function(T){var A=["start","end"];return l==="top"&&A.reverse(),T?A[T>0?0:1]:"middle"},m=function(T){return T?"rotate(".concat(T,")"):null},v=function(T){var A=T/(l==="bottom"?15:23);return T?11.5-2.5*A*(T>0?1:-1):c},_=this.params.owner.config,x=_.axis_rotated,y=_.axis_x_tick_text_inner,$=this.params.config["axis_".concat(d,"_tick_inner")];switch(l){case"bottom":t.attr("x1",r.x).attr("x2",r.x).attr("y2",function(T){return a.getTickSize.bind(a)(T)*($?-1:1)}),i.attr("x",0).attr("y",v(f)).style("text-anchor",p(f)).style("text-anchor",function(T,A,S){var R=S.length;return!x&&A===0&&(y===!0||y.first)?"start":!x&&A===R-1&&(y===!0||y.last)?"end":p(f)}).attr("transform",m(f));break;case"top":t.attr("x2",0).attr("y2",$?s:-s),i.attr("x",0).attr("y",-(v(f)+g+h)).style("text-anchor",p(f)).attr("transform",m(f));break;case"left":t.attr("x2",$?s:-s).attr("y1",r.y).attr("y2",r.y),i.attr("x",-c).attr("y",u+(x?g/4:g)).style("text-anchor","end");break;case"right":t.attr("x2",$?-s:s).attr("y2",0),i.attr("x",c).attr("y",g).style("text-anchor","start")}},e.prototype.splitTickText=function(t,i,n,a,r){var o=this.params,s=this.helper.textFormatted(t),l=le(s)&&s.indexOf(`
39
+ `)>-1?s.split(`
40
+ `):[];if(l.length)return l;if(de(s))return s;var c=o.tickWidth;(!c||c<=0)&&(c=a?95:o.isCategory?(o.isInverted?i(n[0])-i(n[1]):i(n[1])-i(n[0]))-12:110);function u(d,f){for(var h,g,p,m=1;m<f.length;m++)if(f.charAt(m)===" "&&(g=m),h=f.substr(0,m+1),p=r*h.length,c<p)return u(d.concat(f.substr(0,g||m)),f.slice(g?g+1:m));return d.concat(f)}return u(l,String(s))},e.prototype.scale=function(t){return arguments.length?(this.helper.scale=t,this):this.helper.scale},e.prototype.orient=function(t){return arguments.length?(this.config.orient=t in{top:1,right:1,bottom:1,left:1}?String(t):"bottom",this):this.config.orient},e.prototype.tickFormat=function(t){var i=this.config;return arguments.length?(i.tickFormat=t,this):i.tickFormat},e.prototype.tickCentered=function(t){var i=this.config;return arguments.length?(i.tickCentered=t,this):i.tickCentered},e.prototype.tickOffset=function(){return this.config.tickOffset},e.prototype.tickInterval=function(t){var i,n=this.config,a=n.outerTickSize,r=n.tickOffset,o=n.tickValues,s;if(this.params.isCategory)s=r*2;else{var l=(i=this.params.owner.scale.zoom)!==null&&i!==void 0?i:this.helper.scale;s=(this.g.select("path.domain").node().getTotalLength()-a*2)/(t||this.g.selectAll("line").size());var c=o?o.map(function(u,d,f){var h=d+1;return h<f.length?l(f[h])-l(u):null}).filter(Boolean):[];s=Math.min.apply(Math,Ae(Ae([],c,!1),[s],!1))}return s===1/0?0:s},e.prototype.ticks=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=this.config;return t.length?(n.tickArguments=Bt(t),this):n.tickArguments},e.prototype.tickCulling=function(t){var i=this.config;return arguments.length?(i.tickCulling=t,this):i.tickCulling},e.prototype.tickValues=function(t){var i=this,n=this.config;if(H(t))n.tickValues=function(){return t(i.helper.scale.domain())};else{if(!arguments.length)return n.tickValues;n.tickValues=t}return this},e.prototype.setTransition=function(t){return this.config.transition=t,this},e})(),Jg={getAxisInstance:function(){return this.axis||new ev(this)}},ev=(function(){function e(t){this.axesList={},this.tick={x:null,y:null,y2:null},this.xs=[],this.orient={x:"bottom",y:"left",y2:"right",subX:"bottom"},this.owner=t,this.setOrient()}return e.prototype.getAxisClassName=function(t){return"".concat(Ee.axis," ").concat(Ee["axis".concat(Ne(t))])},e.prototype.isHorizontal=function(t,i){var n=t.config.axis_rotated;return i?n:!n},e.prototype.isCategorized=function(){var t=this.owner,i=t.config,n=t.state;return i.axis_x_type.indexOf("category")>=0||n.hasRadar},e.prototype.isCustomX=function(){var t=this.owner.config;return!this.isTimeSeries()&&(t.data_x||Se(t.data_xs))},e.prototype.isTimeSeries=function(t){return t===void 0&&(t="x"),this.owner.config["axis_".concat(t,"_type")]==="timeseries"},e.prototype.isLog=function(t){return t===void 0&&(t="x"),this.owner.config["axis_".concat(t,"_type")]==="log"},e.prototype.isTimeSeriesY=function(){return this.isTimeSeries("y")},e.prototype.getAxisType=function(t){t===void 0&&(t="x");var i="linear";return this.isTimeSeries(t)?i=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(t)&&(i="log"),i},e.prototype.getExtent=function(){var t=this.owner,i=t.config,n=t.scale,a=i.axis_x_extent;if(a){if(H(a))a=a.bind(t.api)(t.getXDomain(t.data.targets),n.subX);else if(this.isTimeSeries()&&a.every(isNaN)){var r=Je.bind(t);a=a.map(function(o){return n.subX(r(o))})}}return a},e.prototype.init=function(){var t=this,i=this.owner,n=i.config,a=i.$el,r=a.main,o=a.axis,s=i.state.clip,l=["x","y"];n.axis_y2_show&&l.push("y2"),l.forEach(function(c){var u=t.getAxisClassName(c);o[c]=r.append("g").attr("class",u).attr("clip-path",function(){var d=null;return c==="x"?d=s.pathXAxis:c==="y"&&(d=s.pathYAxis),d}).attr("transform",i.getTranslate(c)).style("visibility",n["axis_".concat(c,"_show")]?null:"hidden"),t.generateAxes(c)})},e.prototype.setOrient=function(){var t=this.owner.config,i=t.axis_rotated,n=t.axis_y_inner,a=t.axis_y2_inner;this.orient={x:i?"left":"bottom",y:i?n?"top":"bottom":n?"right":"left",y2:i?a?"bottom":"top":a?"left":"right",subX:i?"left":"bottom"}},e.prototype.generateAxes=function(t){var i=this.owner,n=i.config,a=[],r=n["axis_".concat(t,"_axes")],o=n.axis_rotated,s;t==="x"?s=o?Wf:Hf:t==="y"?s=o?Hf:Wf:t==="y2"&&(s=o?m1:_1),r.length&&r.forEach(function(l){var c=l.tick||{},u=i.scale[t].copy();l.domain&&u.domain(l.domain),a.push(s(u).ticks(c.count).tickFormat(H(c.format)?c.format.bind(i.api):(function(d){return d})).tickValues(c.values).tickSizeOuter(c.outer===!1?0:6))}),this.axesList[t]=a},e.prototype.updateAxes=function(){var t=this,i=this.owner,n=i.config,a=i.$el.main,r=i.$T;Object.keys(this.axesList).forEach(function(o){var s=n["axis_".concat(o,"_axes")],l=i.scale[o].copy(),c=l.range();t.axesList[o].forEach(function(u,d){var f=u.scale().range();c.every(function(p,m){return p===f[m]})||u.scale().range(c);var h="".concat(t.getAxisClassName(o),"-").concat(d+1),g=a.select(".".concat(h.replace(/\s/,".")));g.empty()?g=a.append("g").attr("class",h).style("visibility",n["axis_".concat(o,"_show")]?null:"hidden").call(u):(s[d].domain&&l.domain(s[d].domain),r(g).call(u.scale(l))),g.attr("transform",i.getTranslate(o,d+1))})})},e.prototype.setAxis=function(t,i,n,a){var r=this.owner;t!=="subX"&&(this.tick[t]=this.getTickValues(t)),this[t]=this.getAxis(t,i,n,t==="x"&&(r.scale.zoom||r.config.subchart_show||r.state.resizing)?!0:a)},e.prototype.getAxis=function(t,i,n,a,r){var o=this.owner,s=o.config,l=/^(x|subX)$/.test(t),c=l?"x":t,u=l&&this.isCategorized(),d=this.orient[t],f=r?0:o.getAxisTickRotate(c),h;if(l)h=t==="subX"?o.format.subXAxisTick:o.format.xAxisTick;else{var g=s["axis_".concat(t,"_tick_format")];H(g)&&(h=g.bind(o.api))}var p=this.tick[c],m=Bi({outerTick:n,noTransition:a,config:s,id:t,tickTextRotate:f,owner:o},l&&{isCategory:u,isInverted:s.axis_x_inverted,tickMultiline:s.axis_x_tick_multiline,tickWidth:s.axis_x_tick_width,tickTitle:u&&s.axis_x_tick_tooltip&&o.api.categories(),orgXScale:o.scale.x});l||(m.tickStepSize=s["axis_".concat(c,"_tick_stepSize")]);var v=new Qg(m).scale(l&&o.scale.zoom||i).orient(d);if(l&&this.isTimeSeries()&&p&&!H(p)){var _=Je.bind(o);p=p.map(function(y){return _(y)})}else!l&&this.isTimeSeriesY()&&(v.ticks(s.axis_y_tick_time_value),p=null);p&&v.tickValues(p),v.tickFormat(h||!l&&o.isStackNormalized()&&o.hasAxisGroupedData(t)&&(function(y){return"".concat(y,"%")})),u&&(v.tickCentered(s.axis_x_tick_centered),Ze(s.axis_x_tick_culling)&&(s.axis_x_tick_culling=!1));var x=s["axis_".concat(c,"_tick_count")];return x&&v.ticks(x),v},e.prototype.updateXAxisTickValues=function(t,i){var n,a=this.owner,r=a.config,o=r.axis_x_tick_fit,s=r.axis_x_tick_count,l;return(o||s&&o)&&(l=a.mapTargetsToUniqueXs(t),this.isCategorized()&&s>l.length&&(s=l.length),l=this.generateTickValues(l,s,this.isTimeSeries())),i?i.tickValues(l):this.x&&(this.x.tickValues(l),(n=this.subX)===null||n===void 0||n.tickValues(l)),l},e.prototype.getId=function(t){var i=this.owner,n=i.config,a=i.scale,r=n.data_axes[t];return(!r||!a[r])&&(r="y"),r},e.prototype.getXAxisTickFormat=function(t){var i=this.owner,n=i.config,a=i.format,r=t&&n.subchart_axis_x_tick_format||n.axis_x_tick_format,o=this.isTimeSeries(),s=this.isCategorized(),l;return r?H(r)?l=r.bind(i.api):o&&(l=function(c){return c?a.axisTime(r)(c):""}):l=o?a.defaultAxisTime:s?i.categoryName:function(c){return c<0?c.toFixed(0):c},H(l)?function(c){return l.apply(i,s?[c,i.categoryName(c)]:[c])}:l},e.prototype.getTickValues=function(t){var i=this.owner,n=i.config["axis_".concat(t,"_tick_values")],a=i["".concat(t,"Axis")];return(H(n)?n.call(i.api):n)||(a?a.tickValues():void 0)},e.prototype.getLabelOptionByAxisId=function(t){return this.owner.config["axis_".concat(t,"_label")]},e.prototype.getLabelText=function(t){var i=this.getLabelOptionByAxisId(t);return le(i)?i:i?i.text:null},e.prototype.setLabelText=function(t,i){var n=this.owner.config,a=this.getLabelOptionByAxisId(t);le(a)?n["axis_".concat(t,"_label")]=i:a&&(a.text=i)},e.prototype.getLabelPosition=function(t,i){var n=this.owner.config.axis_rotated,a=this.getLabelOptionByAxisId(t),r=Ye(a)&&a.position?a.position:i[+!n],o=function(s){return!!~r.indexOf(s)};return{isInner:o("inner"),isOuter:o("outer"),isLeft:o("left"),isCenter:o("center"),isRight:o("right"),isTop:o("top"),isMiddle:o("middle"),isBottom:o("bottom")}},e.prototype.getAxisLabelPosition=function(t){return this.getLabelPosition(t,t==="x"?["inner-top","inner-right"]:["inner-right","inner-top"])},e.prototype.getLabelPositionById=function(t){return this.getAxisLabelPosition(t)},e.prototype.xForAxisLabel=function(t){var i=this.owner,n=i.state,a=n.width,r=n.height,o=this.getAxisLabelPosition(t),s=o.isMiddle?-r/2:0;return this.isHorizontal(i,t!=="x")?s=o.isLeft?0:o.isCenter?a/2:a:o.isBottom&&(s=-r),s},e.prototype.textAnchorForAxisLabel=function(t){var i=this.owner,n=this.getAxisLabelPosition(t),a=n.isMiddle?"middle":"end";return this.isHorizontal(i,t!=="x")?a=n.isLeft?"start":n.isCenter?"middle":"end":n.isBottom&&(a="start"),a},e.prototype.dxForAxisLabel=function(t){var i=this.owner,n=this.getAxisLabelPosition(t),a=n.isBottom?"0.5em":"0";return this.isHorizontal(i,t!=="x")?a=n.isLeft?"0.5em":n.isRight?"-0.5em":"0":n.isTop&&(a="-0.5em"),a},e.prototype.dyForAxisLabel=function(t){var i=this.owner,n=i.config,a=n.axis_rotated,r=this.getAxisLabelPosition(t).isInner,o=n["axis_".concat(t,"_tick_rotate")]?i.getHorizontalAxisHeight(t):0,s=this.getMaxTickSize(t).width,l;if(t==="x"){var c=n.axis_x_height;a?l=r?"1.2em":-25-s:r?l="-0.5em":c?l=c-10:o?l=o-10:l="3em"}else l={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[t],a?r?l=l[0]:o?l=o*(t==="y2"?-1:1)-l[1]:l=l[2]:l=r?l[3]:(l[4]+(n["axis_".concat(t,"_inner")]?0:s+l[4]))*(t==="y"?-1:1);return l},e.prototype.getMaxTickSize=function(t,i){var n=this.owner,a=n.config,r=n.state,o=r.current,s=r.resizing,l=n.$el,c=l.svg,u=l.chart,d=o.maxTickSize[t],f="axis_".concat(t),h={width:0,height:0};if(s||i||!a["".concat(f,"_show")]||d.width>0&&n.filterTargetsToShow().length===0)return d;if(c){var g=/^y2?$/.test(t),p=n.filterTargetsToShow(n.data.targets),m=n.scale[t].copy().domain(n["get".concat(g?"Y":"X","Domain")](p,t)),v=m.domain(),_=v[0]===v[1]&&v.every(function(C){return C>0}),x=de(d.domain)&&d.domain[0]===d.domain[1]&&d.domain.every(function(C){return C>0});if(_||x)return d.size;d.domain=v,g||d.ticks.splice(0);var y=this.getAxis(t,m,!1,!1,!0),$=a["".concat(f,"_tick_rotate")],T=a["".concat(f,"_tick_count")];!a["".concat(f,"_tick_values")]&&T&&y.tickValues(this.generateTickValues(v,T,g?this.isTimeSeriesY():this.isTimeSeries())),!g&&this.updateXAxisTickValues(p,y);var A=u.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0"),S=A.append("g").attr("class","".concat(Ee["axis".concat(Ne(t))]," ").concat(Q.dummy));y.create(S);var R=S.node().sizeFor1Char;A.selectAll("text").attr("transform",q($)?"rotate(".concat($,")"):null).each(function(C,E){var k=R?{width:this.textContent.length*R.w,height:R.h}:Le(this,!0),P=k.width,w=k.height;h.width=Math.max(h.width,P),h.height=Math.max(h.height,w),g||(d.ticks[E]=P)}),A.remove()}return Object.keys(h).forEach(function(C){h[C]>0&&(d[C]=h[C])}),d},e.prototype.getXAxisTickTextY2Overflow=function(t){var i=this.owner,n=i.axis,a=i.config,r=i.state,o=r.current,s=r.isLegendRight,l=r.legendItemWidth,c=i.getAxisTickRotate("x"),u=c>0&&c<90;if((n.isCategorized()||n.isTimeSeries())&&a.axis_x_tick_fit&&(!a.axis_x_tick_culling||Ze(a.axis_x_tick_culling))&&!a.axis_x_tick_multiline&&u){var d=a.axis_y2_show&&o.maxTickSize.y2.width||0,f=s&&l||0,h=o.width-i.getCurrentPaddingByDirection("left"),g=this.getXAxisTickMaxOverflow(c,h-t)-d-f,p=Math.max(0,g)+t;return Math.min(p,h/2)}return 0},e.prototype.getXAxisTickMaxOverflow=function(t,i){for(var n=this.owner,a=n.axis,r=n.config,o=n.state,s=a.isTimeSeries(),l=o.current.maxTickSize.x.ticks,c=l.length,u=o.axis.x.padding,d=u.left,f=u.right,h=0,g=c-(s&&r.axis_x_tick_fit?.5:0),p=0;p<c;p++){var m=p+1,v=Math.cos(Math.PI*t/180)*l[p],_=m-(s?1:.5)+d;if(!(_<=0)){var x=(i-v)/_,y=g-m,$=f*x,T=y*x+$,A=v-x/2-T;h=Math.max(h,A)}}var S=n.filterTargetsToShow(n.data.targets),R=0;if(!s&&r.axis_x_tick_count<=S.length&&S[0].values.length){var C=ci(n.axis.getAxisType("x"),0,i-h).domain([d*-1,n.getXDomainMax(n.data.targets)+1+f]);R=(C(1)-C(0))/2}return h+R},e.prototype.updateLabels=function(t){var i=this,n=this.owner,a=n.config,r=n.$el.main,o=n.$T,s=a.axis_rotated;["x","y","y2"].forEach(function(l){var c=i.getLabelText(l),u="axis".concat(Ne(l)),d=Ee["".concat(u,"Label")];if(c){var f=r.select("text.".concat(d));f.empty()&&(f=r.select("g.".concat(Ee[u])).insert("text",":first-child").attr("class",d).attr("transform",["rotate(-90)",null][l==="x"?+!s:+s]).style("text-anchor",function(){return i.textAnchorForAxisLabel(l)})),o(f,t).attr("x",function(){return i.xForAxisLabel(l)}).attr("dx",function(){return i.dxForAxisLabel(l)}).attr("dy",function(){return i.dyForAxisLabel(l)}).text(c)}})},e.prototype.getPadding=function(t,i,n,a){var r=q(t)?t:t[i];return te(r)?this.owner.convertPixelToScale(/(bottom|top)/.test(i)?"y":"x",r,a):n},e.prototype.generateTickValues=function(t,i,n){var a=t;if(i){var r=H(i)?i():i;if(r===1)a=[t[0]];else if(r===2)a=[t[0],t[t.length-1]];else if(r>2){var o=this.isCategorized(),s=r-2,l=t[0],c=t[t.length-1],u=(c-l)/(s+1),d=void 0;a=[l];for(var f=0;f<s;f++)d=+l+u*(f+1),a.push(n?new Date(d):o?Math.round(d):d);a.push(c)}}return n||(a=a.sort(function(h,g){return h-g})),a},e.prototype.generateTransitions=function(t){var i=this.owner,n=i.$el.axis,a=i.$T,r=["x","y","y2","subX"].map(function(o){return a(n[o],t)});return{axisX:r[0],axisY:r[1],axisY2:r[2],axisSubX:r[3]}},e.prototype.redraw=function(t,i,n){var a=this,r=this.owner,o=r.config,s=r.state,l=r.$el,c=i?"0":null;["x","y","y2","subX"].forEach(function(u){var d=a[u],f=l.axis[u];d&&f&&(!n&&!o.transition_duration&&(d.config.withoutTransition=!0),f.style("opacity",c),d.create(t["axis".concat(Ne(u))]))}),this.updateAxes(),!s.rendered&&o.axis_tooltip&&this.setAxisTooltip()},e.prototype.redrawAxis=function(t,i,n,a,r){var o=this,s,l,c,u=this.owner,d=u.config,f=u.scale,h=u.$el,g=!!f.zoom,p;!g&&this.isCategorized()&&t.length===0&&f.x.domain([0,h.axis.x.selectAll(".tick").size()]),f.x&&t.length?(!g&&u.updateXDomain(t,i.UpdateXDomain,i.UpdateOrgXDomain,i.TrimXDomain),d.axis_x_tick_values||this.updateXAxisTickValues(t)):this.x&&(this.x.tickValues([]),(s=this.subX)===null||s===void 0||s.tickValues([])),d.zoom_rescale&&!a&&(p=f.x.orgDomain()),["y","y2"].forEach(function(m){var v="axis_".concat(m,"_"),_=f[m];if(_){var x=d["".concat(v,"tick_values")],y=d["".concat(v,"tick_count")];if(_.domain(u.getYDomain(t,m,p)),!x&&y){var $=u.axis[m],T=_.domain();$.tickValues(o.generateTickValues(T,T.every(function(A){return A===0})?1:y,o.isTimeSeriesY()))}}}),this.redraw(n,u.hasArcType(),r),this.updateLabels(i.Transition),(i.UpdateXDomain||i.UpdateXAxis||i.Y)&&t.length&&this.setCulling(),i.Y&&((l=f.subY)===null||l===void 0||l.domain(u.getYDomain(t,"y")),(c=f.subY2)===null||c===void 0||c.domain(u.getYDomain(t,"y2")))},e.prototype.setCulling=function(){var t=this.owner,i=t.config,n=t.state,a=n.clip,r=n.current,o=t.$el;["subX","x","y","y2"].forEach(function(s){var l=o.axis[s],c=s==="subX"?"x":s,u="axis_".concat(c,"_tick_culling"),d=i[u];if(l&&d){var f=l.selectAll(".tick"),h=Xi(f.data(),!i["".concat(u,"_reverse")]),g=h.length,p=i["".concat(u,"_max")],m=i["".concat(u,"_lines")],v;if(g){for(var _=1;_<g;_++)if(g/_<p){v=_;break}f.each(function(y){var $=m?this.querySelector("text"):this;$&&($.style.display=h.indexOf(y)%v?"none":null)})}else f.style("display",null);if(s==="x"){var x=r.maxTickSize.x.clipPath?a.pathXAxisTickTexts:null;o.svg.selectAll(".".concat(Ee.axisX," .tick text")).attr("clip-path",x)}}})},e.prototype.setAxisTooltip=function(){var t,i=this.owner,n=i.config,a=n.axis_rotated,r=n.axis_tooltip,o=i.$el,s=o.axis,l=o.axisTooltip,c=(t=r.backgroundColor)!==null&&t!==void 0?t:"black";i.generateTextBGColorFilter(c,{x:-.15,y:-.2,width:1.3,height:1.3}),["x","y","y2"].forEach(function(u){var d,f,h;if(le(c)||c[u])if(l[u]=(d=s[u])===null||d===void 0?void 0:d.append("text").classed(Ee["axis".concat(u.toUpperCase(),"Tooltip")],!0).attr("filter",i.updateTextBGColor({id:u},c)),a){var g=u==="x"?"x":"y",p=u==="y"?"1.15em":u==="x"?"-0.3em":"-0.4em";(f=l[u])===null||f===void 0||f.attr(g,p).attr("d".concat(u==="x"?"y":"x"),u==="x"?"0.4em":"-1.3em").style("text-anchor",u==="x"?"end":null)}else{var g=u==="x"?"y":"x",p=u==="x"?"1.15em":"".concat(u==="y"?"-":"","0.4em");(h=l[u])===null||h===void 0||h.attr(g,p).attr("d".concat(u==="x"?"x":"y"),u==="x"?"-1em":"0.3em").style("text-anchor",u==="y"?"end":null)}})},e})(),tv={initEventRect:function(){this.$el.main.select(".".concat(Q.chart)).append("g").attr("class",et.eventRects).style("fill-opacity","0")},redrawEventRect:function(){var e,t=this,i=t.config,n=t.state,a=t.$el,r=t.isMultipleX(),o=i.axis_x_inverted;if(a.eventRect)t.updateEventRect(a.eventRect,!0);else if(t.data.targets.length){var s=t.$el.main.select(".".concat(et.eventRects)).style("cursor",i.zoom_enabled&&i.zoom_type!=="drag"?i.axis_rotated?"ns-resize":"ew-resize":null).classed(et.eventRectsMultiple,r).classed(et.eventRectsSingle,!r).selectAll(".".concat(et.eventRect)).data([0]).enter().append("rect");t.updateEventRect(s),t.updateEventType(s),s.call(t.getDraggableSelection()),a.eventRect=s,t.state.inputType==="touch"&&!a.svg.on("touchstart.eventRect")&&!t.hasArcType()&&t.bindTouchOnEventRect(),n.rendered&&t.updateEventRect(a.eventRect,!0)}if(!r){var l=t.getMaxDataCountTarget();(!i.data_xSort||o)&&l.sort(function(c,u){return o?u.x-c.x:c.x-u.x}),t.updateDataIndexByX(l),t.updateXs(l),(e=t.updatePointClass)===null||e===void 0||e.call(t,!0),n.eventReceiver.data=l}t.updateEventRectData()},bindTouchOnEventRect:function(){var e=this,t=e.config,i=e.state,n=e.$el,a=n.eventRect,r=n.svg,o=function(g){if(e.isMultipleX())e.selectRectForMultipleXs(g);else{var p=e.getDataIndexFromEvent(i.event);e.callOverOutForTouch(p),p===-1?e.unselectRect():e.selectRectForSingle(g,p)}},s=function(){e.unselectRect(),e.callOverOutForTouch()},l=t.interaction_inputType_touch.preventDefault,c=ur(l)&&l||!1,u=!isNaN(l)&&l||null,d,f=!c&&u===null,h=function(g){var p=g.type,m=g.changedTouches[0]["client".concat(t.axis_rotated?"Y":"X")];p==="touchstart"?c?g.preventDefault():u!==null&&(d=m):p==="touchmove"&&(c||d===!0||u!==null&&Math.abs(d-m)>=u)&&(d=!0,g.preventDefault())};a.on("touchstart",function(g){i.event=g,e.updateEventRect()},{passive:f}).on("touchstart.eventRect touchmove.eventRect",function(g){if(i.event=g,!a.empty()&&a.classed(et.eventRect)){if(i.dragging||i.flowing||e.hasArcType()||g.touches.length>1)return;h(g),o(a.node())}else s()},{passive:f}).on("touchend.eventRect",function(g){i.event=g,!a.empty()&&a.classed(et.eventRect)&&(e.hasArcType()||!e.toggleShape||i.cancelClick)&&i.cancelClick&&(i.cancelClick=!1)},{passive:f}),r.on("touchstart",function(g){i.event=g;var p=g.target;p&&p!==a.node()&&s()},{passive:f})},updateEventRect:function(e,t){t===void 0&&(t=!1);var i=this,n=i.state,a=i.$el,r=n.eventReceiver,o=n.width,s=n.height,l=n.rendered,c=n.resizing,u=e||a.eventRect,d=function(){if(r){var f=lh(a.chart.node());r.rect=Le(u.node(),!0).toJSON(),r.rect.top+=f.y,r.rect.left+=f.x}};(!l||c||t)&&(u.attr("x",0).attr("y",0).attr("width",o).attr("height",s),(!l||t)&&u.classed(et.eventRect,!0)),d()},updateEventType:function(e){var t=this,i=ur(e),n=i?t.$el.eventRect:e,a=i?e!==n?.datum().multipleX:!1;n&&(a&&n?.on("mouseover mousemove mouseout click",null),t.isMultipleX()?t.generateEventRectsForMultipleXs(n):t.generateEventRectsForSingleX(n))},updateEventRectData:function(){var e=this,t=e.config,i=e.scale,n=e.state,a=i.zoom||i.x,r=t.axis_rotated,o=e.isMultipleX(),s,l,c,u;if(e.updateEventType(o),o)s=0,l=0,c=n.width,u=n.height;else{var d,f=void 0;if(e.axis.isCategorized())d=e.getEventRectWidth(),f=function(m){return a(m.x)-d/2};else{var h=function(m){var v=m.index;return{prev:e.getPrevX(v),next:e.getNextX(v)}};d=function(m){var v=h(m),_=a.domain(),x;return v.prev===null&&v.next===null?x=r?n.height:n.width:v.prev===null?x=(a(v.next)+a(m.x))/2:v.next===null?x=a(_[1])-(a(v.prev)+a(m.x))/2:(Object.keys(v).forEach(function(y,$){var T;v[y]=(T=v[y])!==null&&T!==void 0?T:_[$]}),x=Math.max(0,(a(v.next)-a(v.prev))/2)),x},f=function(m){var v=h(m),_;return v.prev===null&&v.next===null?_=0:v.prev===null?_=a(a.domain()[0]):_=(a(m.x)+a(v.prev))/2,_}}s=r?0:f,l=r?f:0,c=r?n.width:d,u=r?d:n.height}var g=n.eventReceiver,p=function(m,v){return H(m)?m(v):m};g.coords.splice(g.data.length),g.data.forEach(function(m,v){g.coords[v]={x:p(s,m),y:p(l,m),w:p(c,m),h:p(u,m)}})},selectRectForSingle:function(e,t){var i,n,a=this,r=a.config,o=a.$el,s=o.main,l=o.circle,c=r.data_selection_enabled,u=r.data_selection_grouped,d=r.data_selection_isselectable,f=r.tooltip_grouped,h=a.getAllValuesOnIndex(t);if(!(f&&(a.showTooltip(h,e),(i=a.showGridFocus)===null||i===void 0||i.call(a,h),!c||u))){!l&&s.selectAll(".".concat(Q.EXPANDED,":not(.").concat(be.shape,"-").concat(t,")")).classed(Q.EXPANDED,!1);var g=s.selectAll(".".concat(be.shape,"-").concat(t)).classed(Q.EXPANDED,!0).style("cursor",d?"pointer":null).filter(function(p){return a.isWithinShape(this,p)});g.empty()&&!f&&r.interaction_onout&&((n=a.hideGridFocus)===null||n===void 0||n.call(a),a.hideTooltip(),!u&&a.setExpand(t)),g.call(function(p){var m,v,_=p.data();c&&(u||d?.bind(a.api)(_))&&(e.style.cursor="pointer"),f||(a.showTooltip(_,e),(m=a.showGridFocus)===null||m===void 0||m.call(a,_),(v=a.unexpandCircles)===null||v===void 0||v.call(a),p.each(function(x){return a.setExpand(t,x.id)}))})}},selectRectForMultipleXs:function(e,t){t===void 0&&(t=!0);var i=this,n=i.config,a=i.state,r=i.filterTargetsToShow(i.data.targets);if(!(a.dragging||i.hasArcType(r))){var o=Qe(a.event,e),s=i.findClosestFromTargets(r,o);if(t&&a.mouseover&&(!s||s.id!==a.mouseover.id)&&(n.data_onout.call(i.api,a.mouseover),a.mouseover=void 0),!s){i.unselectRect();return}var l=(i.isBubbleType(s)||i.isScatterType(s)||!n.tooltip_grouped?[s]:i.filterByX(r,s.x)).map(function(u){return i.addName(u)});i.showTooltip(l,e),i.setExpand(s.index,s.id,!0),i.showGridFocus(l);var c=i.dist(s,o);(i.isBarType(s.id)||c<i.getPointSensitivity(s))&&(i.$el.svg.select(".".concat(et.eventRect)).style("cursor","pointer"),t&&(!a.mouseover||a.mouseover.x!==s.x||a.mouseover.id!==s.id)&&(n.data_onover.call(i.api,s),a.mouseover=s))}},unselectRect:function(){var e=this,t=e.$el,i=t.circle,n=t.tooltip;e.$el.svg.select(".".concat(et.eventRect)).style("cursor",null),e.hideGridFocus(),n&&(e.hideTooltip(),e._handleLinkedCharts(!1)),i&&!e.isPointFocusOnly()&&e.unexpandCircles(),e.expandBarTypeShapes(!1)},generateEventRectsForSingleX:function(e){var t=this,i=t.config,n=t.state,a=n.eventReceiver,r=e.style("cursor",i.data_selection_enabled&&i.data_selection_grouped?"pointer":null).on("click",function(s){n.event=s;var l=a.currentIdx,c=a.data[l===-1?t.getDataIndexFromEvent(s):l];t.clickHandlerForSingleX.bind(this)(c,t)}).datum({multipleX:!1});if(n.inputType==="mouse"){var o=function(s){var l=s?t.getDataIndexFromEvent(s):a.currentIdx;return l>-1?a.data[l]:null};r.on("mouseover",function(s){n.event=s,t.updateEventRect(),Object.values(t.$el.axisTooltip).forEach(function(l){return l?.style("display",null)})}).on("mousemove",function(s){var l=o(s);if(n.event=s,!!l){var c=l.index,u=i.line_step_type;if(i.line_step_tooltipMatch&&t.hasType("step")&&/^step\-(before|after)$/.test(u)){var d=t.scale.zoom||t.scale.x,f=t.axis.xs[c],h=d.invert(Qe(s,this)[0]);u==="step-after"&&h<f?c-=1:u==="step-before"&&h>f&&(c+=1)}t.showAxisGridFocus();var g=i.tooltip_grouped&&c===a.currentIdx;if(n.dragging||n.flowing||t.hasArcType()||g){i.tooltip_show&&g&&t.setTooltipPosition();return}c!==a.currentIdx&&(t.setOverOut(!1,a.currentIdx),a.currentIdx=c),c===-1?t.unselectRect():t.selectRectForSingle(this,c),t.setOverOut(c!==-1,c)}}).on("mouseout",function(s){n.event=s,!(!i||t.hasArcType()||a.currentIdx===-1||!i.interaction_onout)&&(t.hideAxisGridFocus(),t.unselectRect(),t.setOverOut(!1,a.currentIdx),a.currentIdx=-1)})}return r},clickHandlerForSingleX:function(e,t){var i=t,n=i.config,a=i.state,r=i.$el.main;if(!e||i.hasArcType()||a.cancelClick){a.cancelClick&&(a.cancelClick=!1);return}var o=e.index;r.selectAll(".".concat(be.shape,"-").concat(o)).each(function(s){var l;(n.data_selection_grouped||i.isWithinShape(this,s))&&((l=i.toggleShape)===null||l===void 0||l.call(i,this,s,o),n.data_onclick.bind(i.api)(s,this))})},generateEventRectsForMultipleXs:function(e){var t=this,i=t.config,n=t.state;e.on("click",function(a){n.event=a,t.clickHandlerForMultipleXS.bind(this)(t)}).datum({multipleX:!0}),n.inputType==="mouse"&&e.on("mouseover mousemove",function(a){n.event=a,t.selectRectForMultipleXs(this)}).on("mouseout",function(a){n.event=a,!(!t.config||t.hasArcType()||!i.interaction_onout)&&t.unselectRect()})},clickHandlerForMultipleXS:function(e){var t=e,i=t.config,n=t.state,a=t.filterTargetsToShow(t.data.targets);if(!t.hasArcType(a)){var r=Qe(n.event,this),o=t.findClosestFromTargets(a,r),s=t.getPointSensitivity(o);o&&(t.isBarType(o.id)||t.dist(o,r)<s)&&t.$el.main.selectAll(".".concat(be.shapes).concat(t.getTargetSelectorSuffix(o.id))).selectAll(".".concat(be.shape,"-").concat(o.index)).each(function(){var l;(i.data_selection_grouped||t.isWithinShape(this,o))&&((l=t.toggleShape)===null||l===void 0||l.call(t,this,o,o.index),i.data_onclick.bind(t.api)(o,this))})}}},iv={generateFlow:function(e){var t=this,i=t.data,n=t.state,a=t.$el;return function(){var r=e.flow.length;n.flowing=!0,i.targets.forEach(function(s){s.values.splice(0,r)}),t.updateXGrid&&t.updateXGrid(!0);var o={};["axis.x","grid.x","gridLines.x","region.list","text","bar","line","area","circle"].forEach(function(s){var l=s.split("."),c=a[l[0]];c&&l.length>1&&(c=c[l[1]]),c?.size()&&(o[s]=c)}),t.hideGridFocus(),t.setFlowList(o,e)}},setFlowList:function(e,t){var i=this,n=t.flow,a=t.targets,r=n.duration,o=r===void 0?t.duration:r,s=n.index,l=n.length,c=n.orgDataCount,u=i.getFlowTransform(a,c,s,l),d=vh(),f;d.add(Object.keys(e).map(function(h){return f=e[h].transition().ease(Td).duration(o),h==="axis.x"?f=f.call(function(g){i.axis.x.setTransition(g).create(g)}):h==="region.list"?f=f.filter(i.isRegionOnX).attr("transform",u):f=f.attr("transform",u),f})),f.call(d,function(){i.cleanUpFlow(e,t)})},cleanUpFlow:function(e,t){var i=this,n=i.config,a=i.state,r=i.$el.svg,o=n.axis_rotated,s=t.flow,l=t.shape,c=t.xv,u=l.pos,d=u.cx,f=u.cy,h=u.xForText,g=u.yForText,p=s.done,m=p===void 0?function(){}:p,v=s.length;v&&(["circle","text","shape","eventRect"].forEach(function(_){for(var x=[],y=0;y<v;y++)x.push(".".concat(ue[_],"-").concat(y));r.selectAll(".".concat(ue["".concat(_,"s")])).selectAll(x).remove()}),r.select(".".concat(ue.xgrid)).remove()),Object.keys(e).forEach(function(_){var x=e[_];if(_!=="axis.x"&&x.attr("transform",null),_==="grid.x")x.attr(a.xgridAttr);else if(_==="gridLines.x")x.attr("x1",o?0:c).attr("x2",o?a.width:c),x.select("text").attr("x",o?a.width:0).attr("y",c);else if(/^(area|bar|line)$/.test(_))x.attr("d",l.type[_]);else if(_==="text")x.attr("x",h).attr("y",g).style("fill-opacity",i.opacityForText.bind(i));else if(_==="circle")if(i.isCirclePoint())x.attr("cx",d).attr("cy",f);else{var y=function(T){return d(T)-n.point_r},$=function(T){return f(T)-n.point_r};x.attr("x",y).attr("y",$)}else _==="region.list"&&x.select("rect").filter(i.isRegionOnX).attr("x",i.regionX.bind(i)).attr("width",i.regionWidth.bind(i))}),n.interaction_enabled&&i.redrawEventRect(),m.call(i.api),a.flowing=!1},getFlowTransform:function(e,t,i,n){var a=this,r=a.data,o=a.scale.x,s=r.targets[0].values,l=a.getValueOnIndex(s,i),c=a.getValueOnIndex(s,i+n),u,d=o.domain(),f=a.updateXDomain(e,!0,!0);t?t===1||l?.x===c?.x?u=o(d[0])-o(f[0]):u=a.axis.isTimeSeries()?o(d[0])-o(f[0]):o(l?.x||0)-o(c.x):s.length!==1?u=o(d[0])-o(f[0]):a.axis.isTimeSeries()?(l=a.getValueOnIndex(s,0),c=a.getValueOnIndex(s,s.length-1),u=o(l.x)-o(c.x)):u=Nt(f)/2;var h=Nt(d)/Nt(f);return"translate(".concat(u,",0) scale(").concat(h,",1)")}},nv={initClip:function(){var e=this,t=e.state,i=t.clip,n=t.datetimeId;i.id="".concat(n,"-clip"),i.idXAxis="".concat(i.id,"-xaxis"),i.idYAxis="".concat(i.id,"-yaxis"),i.idGrid="".concat(i.id,"-grid"),i.path=e.getClipPath(i.id),i.pathXAxis=e.getClipPath(i.idXAxis),i.pathYAxis=e.getClipPath(i.idYAxis),i.pathGrid=e.getClipPath(i.idGrid)},getClipPath:function(e){var t=this.config;return!t.clipPath&&/-clip$/.test(e)||!t.axis_x_clipPath&&/-clip-xaxis$/.test(e)||!t.axis_y_clipPath&&/-clip-yaxis$/.test(e)?null:"url(#".concat(e,")")},appendClip:function(e,t){t&&e.append("clipPath").attr("id",t).append("rect")},setXAxisClipPath:function(e){var t=this,i=t.config,n=t.state,a=n.margin,r=n.width,o=n.height,s=i.axis_rotated,l=Math.max(30,a.left)-(s?0:20),c=(s?a.top+o+10:a.bottom)+20,u=s?-(1+l):-(l-1),d=-15,f=s?a.left+20:r+10+l;e.attr("x",u).attr("y",d).attr("width",f).attr("height",c)},setYAxisClipPath:function(e){var t=this,i=t.config,n=t.state,a=n.margin,r=n.width,o=n.height,s=i.axis_rotated,l=Math.max(30,a.left)-(s?20:0),c=i.axis_y_inner,u=c&&!s?i.axis_y_label.text?-20:-1:s?-(1+l):-(l-1),d=-(s?20:a.top),f=(s?r+15+l:a.left+20)+(c?20:0),h=(s?a.bottom+10:a.top+o)+10;e.attr("x",u).attr("y",d).attr("width",f).attr("height",h)},updateXAxisTickClip:function(){var e=this,t=e.config,i=e.state,n=i.clip,a=i.xAxisHeight,r=e.$el.defs,o=e.getHorizontalAxisHeight("x");if(r&&!n.idXAxisTickTexts){var s="".concat(n.id,"-xaxisticktexts");e.appendClip(r,s),n.pathXAxisTickTexts=e.getClipPath(n.idXAxisTickTexts),n.idXAxisTickTexts=s}!t.axis_x_tick_multiline&&e.getAxisTickRotate("x")&&o!==a&&(e.setXAxisTickClipWidth(),e.setXAxisTickTextClipPathWidth()),e.state.xAxisHeight=o},setXAxisTickClipWidth:function(){var e=this,t=e.config,i=e.state.current.maxTickSize,n=e.getAxisTickRotate("x");if(!t.axis_x_tick_multiline&&n){var a=Math.sin(Math.PI/180*Math.abs(n));i.x.clipPath=(e.getHorizontalAxisHeight("x")-20)/a}else i.x.clipPath=null},setXAxisTickTextClipPathWidth:function(){var e=this,t=e.state,i=t.clip,n=t.current,a=e.$el.svg;a&&a.select("#".concat(i.idXAxisTickTexts," rect")).attr("width",n.maxTickSize.x.clipPath).attr("height",30)}},av=function(e){return te(e.position)||"end"},rv=function(e){return e.position==="start"?4:e.position==="middle"?0:-4},ov={hasGrid:function(){var e=this.config;return["x","y"].some(function(t){return e["grid_".concat(t,"_show")]||e["grid_".concat(t,"_lines")].length})},initGrid:function(){var e=this;e.hasGrid()&&e.initGridLines(),e.initFocusGrid()},initGridLines:function(){var e=this,t=e.config,i=e.state.clip,n=e.$el;(t.grid_x_lines.length||t.grid_y_lines.length)&&(n.gridLines.main=n.main.insert("g",".".concat(Q.chart).concat(t.grid_lines_front?" + *":"")).attr("clip-path",i.pathGrid).attr("class","".concat(ye.grid," ").concat(ye.gridLines)),n.gridLines.main.append("g").attr("class",ye.xgridLines),n.gridLines.main.append("g").attr("class",ye.ygridLines),n.gridLines.x=Ac([]))},updateXGrid:function(e){var t=this,i=t.config,n=t.scale,a=t.state,r=t.$el,o=r.main,s=r.grid,l=i.axis_rotated,c=t.generateGridData(i.grid_x_type,n.x),u=t.axis.isCategorized()?t.axis.x.tickOffset():0,d=function(f){return(n.zoom||n.x)(f)+u*(l?-1:1)};a.xgridAttr=l?{x1:0,x2:a.width,y1:d,y2:d}:{x1:d,x2:d,y1:0,y2:a.height},s.x=o.select(".".concat(ye.xgrids)).selectAll(".".concat(ye.xgrid)).data(c),s.x.exit().remove(),s.x=s.x.enter().append("line").attr("class",ye.xgrid).merge(s.x),e||s.x.each(function(){var f=B(this);Object.keys(a.xgridAttr).forEach(function(h){f.attr(h,a.xgridAttr[h]).style("opacity",function(){return f.attr(l?"y1":"x1")===(l?a.height:0)?"0":null})})})},updateYGrid:function(){var e=this,t=e.axis,i=e.config,n=e.scale,a=e.state,r=e.$el,o=r.grid,s=r.main,l=i.axis_rotated,c=function(d){return n.y(d)},u=t.y.getGeneratedTicks(i.grid_y_ticks)||e.scale.y.ticks(i.grid_y_ticks);o.y=s.select(".".concat(ye.ygrids)).selectAll(".".concat(ye.ygrid)).data(u),o.y.exit().remove(),o.y=o.y.enter().append("line").attr("class",ye.ygrid).merge(o.y),o.y.attr("x1",l?c:0).attr("x2",l?c:a.width).attr("y1",l?0:c).attr("y2",l?a.height:c),Lh(o.y)},updateGrid:function(){var e=this,t=e.$el,i=t.grid;!t.gridLines.main&&e.initGridLines(),i.main.style("visibility",e.hasArcType()?"hidden":null),e.hideGridFocus(),e.updateGridLines("x"),e.updateGridLines("y")},updateGridLines:function(e){var t=this,i=t.config,n=t.$el,a=n.gridLines,r=n.main,o=t.$T,s=i.axis_rotated,l=e==="x";i["grid_".concat(e,"_show")]&&t["update".concat(e.toUpperCase(),"Grid")]();var c=r.select(".".concat(ye["".concat(e,"gridLines")])).selectAll(".".concat(ye["".concat(e,"gridLine")])).data(i["grid_".concat(e,"_lines")]);o(c.exit()).style("opacity","0").remove();var u=c.enter().append("g");u.append("line").style("opacity","0"),c=u.merge(c),c.each(function(d){var f=B(this);f.select("text").empty()&&d.text&&f.append("text").style("opacity","0")}),o(c.attr("class",function(d){return"".concat(ye["".concat(e,"gridLine")]," ").concat(d.class||"").trim()}).select("text").attr("text-anchor",av).attr("transform",function(){return l?s?null:"rotate(-90)":s?"rotate(-90)":null}).attr("dx",rv).attr("dy",-5)).text(function(d){var f;return(f=d.text)!==null&&f!==void 0?f:this.remove()}),a[e]=c},redrawGrid:function(e){var t=this,i=t.config.axis_rotated,n=t.state,a=n.width,r=n.height,o=t.$el.gridLines,s=t.$T,l=t.xv.bind(t),c=t.yv.bind(t),u=o.x.select("line"),d=o.x.select("text"),f=o.y.select("line"),h=o.y.select("text");return u=s(u,e).attr("x1",i?0:l).attr("x2",i?a:l).attr("y1",i?l:0).attr("y2",i?l:r),d=s(d,e).attr("x",Mh(!i,a,r)).attr("y",l),f=s(f,e).attr("x1",i?c:0).attr("x2",i?c:a).attr("y1",i?0:c).attr("y2",i?r:c),h=s(h,e).attr("x",Mh(i,a,r)).attr("y",c),[u.style("opacity",null),d.style("opacity",null),f.style("opacity",null),h.style("opacity",null)]},initFocusGrid:function(){var e=this,t=e.config,i=e.state.clip,n=e.$el,a=t.grid_front,r=".".concat(a&&n.gridLines.main?ye.gridLines:Q.chart).concat(a?" + *":""),o=n.main.insert("g",r).attr("clip-path",i.pathGrid).attr("class",ye.grid);if(n.grid.main=o,t.grid_x_show&&o.append("g").attr("class",ye.xgrids),t.grid_y_show&&o.append("g").attr("class",ye.ygrids),t.axis_tooltip){var s=o.append("g").attr("class","bb-axis-tooltip");s.append("line").attr("class","bb-axis-tooltip-x"),s.append("line").attr("class","bb-axis-tooltip-y")}t.interaction_enabled&&t.grid_focus_show&&!t.axis_tooltip&&(o.append("g").attr("class",pe.xgridFocus).append("line").attr("class",pe.xgridFocus),t.grid_focus_y&&!t.tooltip_grouped&&o.append("g").attr("class",pe.ygridFocus).append("line").attr("class",pe.ygridFocus))},showAxisGridFocus:function(){for(var e,t,i=this,n=i.config,a=i.format,r=i.state,o=r.event,s=r.width,l=r.height,c=n.axis_rotated,u=Qe(o,(e=i.$el.eventRect)===null||e===void 0?void 0:e.node()),d=u[0],f=u[1],h={x:d,y:f},g=0,p=Object.entries(i.$el.axisTooltip);g<p.length;g++){var m=p[g],v=m[0],_=m[1],x=v==="x"&&!c||v!=="x"&&c?"x":"y",y=h[x],$=(t=i.scale[v])===null||t===void 0?void 0:t.invert(y);$&&($=v==="x"&&i.axis.isTimeSeries()?a.xAxisTick($):$?.toFixed(2),_?.attr(x,y).text($))}i.$el.main.selectAll("line.bb-axis-tooltip-x, line.bb-axis-tooltip-y").style("visibility",null).each(function(T,A){var S=B(this);A===0?S.attr("x1",d).attr("x2",d).attr("y1",A?0:l).attr("y2",A?l:0):S.attr("x1",A?0:s).attr("x2",A?s:0).attr("y1",f).attr("y2",f)})},hideAxisGridFocus:function(){var e=this;e.$el.main.selectAll("line.".concat(Ee.axisTooltipX,", line.").concat(Ee.axisTooltipY)).style("visibility","hidden"),Object.values(e.$el.axisTooltip).forEach(function(t){return t?.style("display","none")})},showGridFocus:function(e){var t,i=this,n=i.config,a=i.state,r=a.width,o=a.height,s=n.axis_rotated,l=i.$el.main.selectAll("line.".concat(pe.xgridFocus,", line.").concat(pe.ygridFocus)),c=(e||[l.datum()]).filter(function(f){return f&&te(i.getBaseValue(f))});if(!(!n.tooltip_show||c.length===0||!n.axis_x_forceAsSingle&&i.hasType("bubble")||i.hasArcType())){var u=n.grid_focus_edge&&!n.tooltip_grouped,d=i.xx.bind(i);l.style("visibility",null).data(c.concat(c)).each(function(f){var h=B(this),g={x:d(f),y:i.getYScaleById(f.id)(f.value)},p;if(h.classed(pe.xgridFocus))p=s?[null,g.x,u?g.y:r,g.x]:[g.x,u?g.y:null,g.x,o];else{var m=i.axis.getId(f.id)==="y2";p=s?[g.y,u&&!m?g.x:null,g.y,u&&m?g.x:o]:[u&&m?g.x:null,g.y,u&&!m?g.x:r,g.y]}["x1","y1","x2","y2"].forEach(function(v,_){return h.attr(v,p[_])})}),Lh(l),(t=i.showCircleFocus)===null||t===void 0||t.call(i,e)}},hideGridFocus:function(){var e,t=this,i=t.state,n=i.inputType,a=i.resizing,r=t.$el.main;(n==="mouse"||!a)&&(r.selectAll("line.".concat(pe.xgridFocus,", line.").concat(pe.ygridFocus)).style("visibility","hidden"),(e=t.hideCircleFocus)===null||e===void 0||e.call(t))},updateGridFocus:function(){var e,t=this,i=t.state,n=i.inputType,a=i.width,r=i.height,o=i.resizing,s=t.$el.grid.main.select("line.".concat(pe.xgridFocus));if(n==="touch")s.empty()?o&&((e=t.showCircleFocus)===null||e===void 0||e.call(t)):t.showGridFocus();else{var l=t.config.axis_rotated;s.attr("x1",l?0:-10).attr("x2",l?a:-10).attr("y1",l?-10:0).attr("y2",l?-10:r)}return!0},generateGridData:function(e,t){var i=this,n=i.$el.main.select(".".concat(Ee.axisX)).selectAll(".tick").size(),a=[];if(e==="year")for(var r=i.getXDomain().map(function(c){return c.getFullYear()}),o=r[0],s=r[1],l=o;l<=s;l++)a.push(new Date("".concat(l,"-01-01 00:00:00")));else a=t.ticks(10),a.length>n&&(a=a.filter(function(c){return String(c).indexOf(".")<0}));return a},getGridFilterToRemove:function(e){return e?function(t){var i=!1;return(de(e)?e.concat():[e]).forEach(function(n){("value"in n&&t.value===n.value||"class"in n&&t.class===n.class)&&(i=!0)}),i}:function(){return!0}},removeGridLines:function(e,t){var i=this,n=i.config,a=i.$T,r=i.getGridFilterToRemove(e),o=function(u){return!r(u)},s=t?ye.xgridLines:ye.ygridLines,l=t?ye.xgridLine:ye.ygridLine;a(i.$el.main.select(".".concat(s)).selectAll(".".concat(l)).filter(r)).style("opacity","0").remove();var c="grid_".concat(t?"x":"y","_lines");n[c]=n[c].filter(o)}},sv={initRegion:function(){var e=this,t=e.$el;t.region.main=t.main.insert("g",":first-child").attr("clip-path",e.state.clip.path).attr("class",Hi.regions)},updateRegion:function(){var e=this,t=e.config,i=e.$el.region,n=e.$T;i.main||e.initRegion(),i.main.style("visibility",e.hasArcType()?"hidden":null);var a=i.main.selectAll(".".concat(Hi.region)).data(t.regions);n(a.exit()).style("opacity","0").remove();var r=a.enter().append("g");r.append("rect").style("fill-opacity","0"),i.list=r.merge(a).attr("class",e.classRegion.bind(e)),i.list.each(function(o){var s;B(this).select("text").empty()&&(!((s=o.label)===null||s===void 0)&&s.text)&&B(this).append("text").style("opacity","0")})},redrawRegion:function(e){var t=this,i=t.$el.region,n=t.$T,a=t.regionX.bind(t),r=t.regionY.bind(t),o=["width","height"],s=i.list.select("rect"),l=i.list.selectAll("text");return s=n(s,e).attr("x",a).attr("y",r).attr("width",t.regionWidth.bind(t)).attr("height",t.regionHeight.bind(t)),l=n(l,e).text(function(c){var u;return(u=c.label)===null||u===void 0?void 0:u.text}).attr("transform",function(c){return c.label.rotated?" rotate(-90)":null}).attr("transform",function(c){var u=this,d,f=(d=c.label)!==null&&d!==void 0?d:{},h=f.x,g=h===void 0?0:h,p=f.y,m=p===void 0?0:p,v=f.center,_=v===void 0?!1:v,x=f.rotated,y=x===void 0?!1:x,$=this.previousElementSibling,T={x:0,y:0};return le(_)&&["x","y"].forEach(function(A,S){_.indexOf(A)>-1&&(T[A]=(+$.getAttribute(o[S])-Le(u)[o[S]])/2)}),"translate(".concat(a(c)+T.x+g,", ").concat(r(c)+T.y+m,")").concat(y?" rotate(-90)":"")}).attr("text-anchor",function(c){var u=c.label;return u?.rotated?"end":null}).attr("dy","1em").style("fill",function(c){var u,d=c.label;return(u=d?.color)!==null&&u!==void 0?u:null}),[s.style("fill-opacity",function(c){return te(c.opacity)?c.opacity:null}).on("end",function(){B(this.parentNode).selectAll("rect:not([x])").remove()}),l.style("opacity",null)]},regionX:function(e){return this.getRegionSize("x",e)},regionY:function(e){return this.getRegionSize("y",e)},regionWidth:function(e){return this.getRegionSize("width",e)},regionHeight:function(e){return this.getRegionSize("height",e)},getRegionSize:function(e,t){var i=this,n=i.config,a=i.scale,r=i.state,o=n.axis_rotated,s=/(x|y|y2)/.test(e),l=s?e==="x":e==="width",c=!s&&i[l?"regionX":"regionY"](t),u=s?"start":"end",d=s?0:r[e],f;if(t.axis==="y"||t.axis==="y2"?(!s&&!l?u="start":s&&!l&&(u="end"),(l?o:!o)&&u in t&&(f=a[t.axis])):(l?!o:o)&&u in t&&(f=a.zoom||a.x),f){var h=0;d=t[u],i.axis.isTimeSeries(t.axis)?d=Je.call(i,d):/(x|width)/.test(e)&&i.axis.isCategorized()&&isNaN(d)&&(d=n.axis_x_categories.indexOf(d),h=i.axis.x.tickOffset()*(u==="start"?-1:1)),d=f(d)+h}return s?d:d<c?0:d-c},isRegionOnX:function(e){return!e.axis||e.axis==="x"}},lv={getAxisSize:function(e){var t=this,i=t.config.axis_rotated;return i&&e==="x"||!i&&/y2?/.test(e)?t.getAxisWidthByAxisId(e,!0):t.getHorizontalAxisHeight(e)},getAxisWidthByAxisId:function(e,t){var i,n,a=this;if(a.axis){var r=(i=a.axis)===null||i===void 0?void 0:i.getLabelPositionById(e),o=a.axis.getMaxTickSize(e,t).width,s=o===0?.5:0;return o+(((n=a.config.padding)===null||n===void 0?void 0:n.mode)==="fit"?r.isInner?10+s:10:r.isInner?20+s:40)}else return 40},getHorizontalAxisHeight:function(e){var t,i,n=this,a=n.config,r=n.state,o=r.rotatedPadding,s=r.isLegendRight,l=r.isLegendInset,c=a.axis_rotated,u=((t=a.padding)===null||t===void 0?void 0:t.mode)==="fit",d=a["axis_".concat(e,"_inner")],f=a["axis_".concat(e,"_label")].text,h=13,g=((i=a.padding)===null||i===void 0?void 0:i.mode)==="fit"?d&&!f?e==="y"?1:0:20:30;if(e==="x"&&!a.axis_x_show)return 8;if(e==="x"&&q(a.axis_x_height))return a.axis_x_height;if(e==="y"&&!a.axis_y_show)return a.legend_show&&!s&&!l?10:1;if(e==="y2"&&!a.axis_y2_show)return u?0:o.top;var p=n.axis.getMaxTickSize(e),m=Math.abs(a.axis_x_tick_rotate)>0&&(!a.axis_x_tick_autorotate||n.needToRotateXAxisTickTexts());return(a.axis_x_tick_multiline||m)&&p.height>h&&(g+=p.height-h),g+(n.axis.getLabelPositionById(e).isInner?0:10)+(e==="y2"&&!c?-10:0)},getEventRectWidth:function(){var e=this,t=e.config,i=e.axis,n=t.axis_x_inverted,a=i.x.tickInterval();return Math.max(0,n?Math.abs(a):a)},getAxisTickRotate:function(e){var t=this,i=t.axis,n=t.config,a=t.state,r=t.$el,o=n["axis_".concat(e,"_tick_rotate")];if(e==="x"){var s=i.isCategorized()||i.isTimeSeries();if(n.axis_x_tick_fit&&s){var l=n.axis_x_tick_count,c=a.current.maxTickSize.x.ticks.length,u=0;if(l?u=l>c?c:l:c&&(u=c),u!==a.axis.x.tickCount){var d=t.data.targets;a.axis.x.padding=t.getXDomainPadding([t.getXDomainMinMax(d,"min"),t.getXDomainMinMax(d,"max")],u)}a.axis.x.tickCount=u}r.svg&&n.axis_x_tick_autorotate&&n.axis_x_tick_fit&&!n.axis_x_tick_multiline&&!n.axis_x_tick_culling&&s&&(o=t.needToRotateXAxisTickTexts()?n.axis_x_tick_rotate:0)}return o},needToRotateXAxisTickTexts:function(){var e=this,t=e.state,i=t.axis,n=t.current,a=t.isLegendRight,r=t.legendItemWidth,o=a&&r,s=n.width-o-e.getCurrentPaddingByDirection("left")-e.getCurrentPaddingByDirection("right"),l=i.x.tickCount+i.x.padding.left+i.x.padding.right;return e.axis.getMaxTickSize("x").width>(l?s/l:0)}},cv=J(J(J({axis_evalTextSize:!0,axis_rotated:!1,axis_tooltip:!1},{axis_x_clipPath:!0,axis_x_show:!0,axis_x_forceAsSingle:!1,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_culling_lines:!0,axis_x_tick_culling_reverse:!1,axis_x_tick_count:void 0,axis_x_tick_inner:!1,axis_x_tick_show:!0,axis_x_tick_text_show:!0,axis_x_tick_text_inner:!1,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_autorotate:!1,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:void 0,axis_x_min:void 0,axis_x_inverted:!1,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_axes:[]}),{axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_culling_reverse:!1,axis_y_tick_inner:!1,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]}),{axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_culling_reverse:!1,axis_y2_tick_inner:!1,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]}),uv={grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0},dv={data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1},fv=[Ug,Hg,Wg,Yg,jg,Zg,qg],Fs={axis:Jg,clip:nv,eventrect:tv,flow:iv,grid:ov,region:sv,sizeAxis:lv},zs={optDataAxis:dv,optAxis:cv,optGrid:uv},hv=15,Is=20,Os=.35,gv={initPie:function(){var e=this,t=e.config,i=t.data_type,n=t["".concat(i,"_padding")],a=t["".concat(i,"_startingAngle")]||0,r=(n?n*.01:t["".concat(i,"_padAngle")])||0;e.pie=VT().startAngle(a).endAngle(a+2*Math.PI).padAngle(r).value(function(o){var s,l;return(l=(s=o.values)===null||s===void 0?void 0:s.reduce(function(c,u){return c+u.value},0))!==null&&l!==void 0?l:o}).sort(e.getSortCompareFn.bind(e)(!0))},updateRadius:function(){var e=this,t=e.config,i=e.state,n=t.data_type,a=t["".concat(n,"_padding")],r=t.gauge_width||t.donut_width,o=e.filterTargetsToShow(e.data.targets).length*t.gauge_arcs_minWidth,s=.85,l=Dh.call(e)?s:1;i.radiusExpanded=Math.min(i.arcWidth,i.arcHeight)/2*(e.hasMultiArcGauge()&&t.gauge_label_show?s:l),i.radius=i.radiusExpanded*.95,i.innerRadiusRatio=r?(i.radius-r)/i.radius:.6,i.gaugeArcWidth=r||(o<=i.radius-i.innerRadius?i.radius-i.innerRadius:o<=i.radius?o:i.radius);var c=t.pie_innerRadius||(a?a*(i.innerRadiusRatio+.1):0);i.outerRadius=t.pie_outerRadius,i.innerRadius=e.hasType("donut")||e.hasType("gauge")?i.radius*i.innerRadiusRatio:c},getRadius:function(e){var t=this,i=e?.data,n=t.state,a=n.innerRadius,r=n.outerRadius;return!q(a)&&i&&(a=a[i.id]||0),ce(r)&&i&&i.id in r?r=r[i.id]:q(r)||(r=t.state.radius),{innerRadius:a,outerRadius:r}},updateArc:function(){var e=this;e.updateRadius(),e.svgArc=e.getSvgArc(),e.svgArcExpanded=e.getSvgArcExpanded()},getArcLength:function(){var e=this.config.gauge_arcLength*3.6,t=2*(e/360);return e<-360?t=-2:e>360&&(t=2),t*Math.PI},getStartingAngle:function(){var e=this,t=e.config,i=t.data_type,n=e.hasType("gauge")?t.gauge_fullCircle:!1,a=-1*Math.PI/2,r=Math.PI/2,o=t["".concat(i,"_startingAngle")]||0;return!n&&o<=a?o=a:!n&&o>=r?o=r:(o>Math.PI||o<-1*Math.PI)&&(o=Math.PI),o},updateAngle:function(e,t){var i;t===void 0&&(t=!1);var n=this,a=n.config,r=n.state,o=t&&n.hasType("gauge"),s=n.pie,l=e,c=!1;if(!a)return null;var u=n.getStartingAngle(),d=a.gauge_fullCircle||t&&!o?n.getArcLength():u*-2;if(l.data&&n.isGaugeType(l.data)&&!n.hasMultiArcGauge()){var f=a.gauge_min,h=a.gauge_max,g=d*((n.getTotalDataSum(r.rendered)-f)/(h-f));s=s.startAngle(u).endAngle(g+u)}if(t===!1&&s(n.filterTargetsToShow()).forEach(function(x,y){var $;!c&&x.data.id===(($=l.data)===null||$===void 0?void 0:$.id)&&(c=!0,l=x,l.index=y)}),isNaN(l.startAngle)&&(l.startAngle=0),isNaN(l.endAngle)&&(l.endAngle=l.startAngle),t||l.data&&(a.gauge_enforceMinMax||n.hasMultiArcGauge())){var f=a.gauge_min,h=a.gauge_max,p=t&&!o?n.getTotalDataSum(r.rendered):h,m=d/(p-f),v=(i=l.value)!==null&&i!==void 0?i:0,_=v<f?0:v<p?v-f:p-f;l.startAngle=u,l.endAngle=u+m*_}return c||t?l:null},getSvgArc:function(){var e=this,t=Fh.call(e),i=t.inner,n=t.outer,a=t.corner,r=pf().innerRadius(i).outerRadius(n),o=function(s,l){var c,u="M 0 0";if(s.value||s.data){var d=l?s:(c=e.updateAngle(s))!==null&&c!==void 0?c:null;d&&(u=r.cornerRadius(a(d,n(d)))(d))}return u};return o.centroid=r.centroid,o},getSvgArcExpanded:function(e){e===void 0&&(e=1);var t=this,i=Fh.call(t,e),n=i.inner,a=i.outer,r=i.corner,o=pf().innerRadius(n).outerRadius(a);return function(s){var l=t.updateAngle(s),c=a(l),u=0;return l&&(u=r(l,c)),l?o.cornerRadius(u)(l):"M 0 0"}},getArc:function(e,t,i){return i||this.isArcType(e.data)?this.svgArc(e,t):"M 0 0"},redrawArcRangeText:function(){var e=this,t=e.config,i=e.$el.arcs,n=e.state,a=e.$T,r=t.arc_rangeText_format,o=e.hasType("gauge")&&t.arc_rangeText_fixed,s=t.arc_rangeText_values;if(s?.length){var l=t.arc_rangeText_unit==="%",c=e.getTotalDataSum(n.rendered);l&&(s=s.map(function(f){return c/100*f}));var u=e.pie(s).map(function(f,h){return f.index=h,f}),d=i.selectAll(".".concat(ne.arcRange)).data(s);d.exit(),d=a(d.enter().append("text").attr("class",ne.arcRange).style("text-anchor","middle").style("pointer-events","none").style("opacity","0").text(function(f){var h=l?f/c*100:f;return H(r)?r(h):"".concat(h).concat(l?"%":"")}).merge(d)),(!n.rendered||n.rendered&&!o)&&c>0&&d.attr("transform",function(f,h){return e.transformForArcLabel(this,u[h],!0)}),d.style("opacity",function(f){return!o&&(f>c||c===0)?"0":null})}},transformForArcLabel:function(e,t,i){i===void 0&&(i=!1);var n=this,a=n.updateAngle(t,i);if(!a)return"";var r,o=1;if(i||n.hasMultiArcGauge())r=uA(n,t,a,i);else if(!n.hasType("gauge")||n.data.targets.length>1){var s=fA(n,t,a);r=s.pos,o=s.ratio}else return"";return Th.call(n,e,r),"translate(".concat(r.x*o,",").concat(r.y*o,")")},convertToArcData:function(e){return this.addName({id:"data"in e?e.data.id:e.id,value:e.value,ratio:this.getRatio("arc",e),index:e.index})},textForArcLabel:function(e){var t,i=this,n=i.hasType("gauge"),a=(t=["donut","gauge","pie","polar"].filter(i.hasType.bind(i)))===null||t===void 0?void 0:t[0];i.shouldShowArcLabel()&&e.style("fill",i.updateTextColor.bind(i)).attr("filter",function(r){return i.updateTextBGColor.bind(i)(r,i.config.data_labels_backgroundColors)}).each(function(r){var o=B(this),s=i.updateAngle(r),l=i.getRatio("arc",s),c=_s.call(i,l,a);if(r._cache={updated:s,ratio:l,meetsThreshold:c},c){var u=(s||r).value;Ni(o,(i.getArcLabelConfig("format")||i.defaultArcValueFormat)(u,l,r.data.id).toString(),[-1,1],n)}else o.text("")})},expandArc:function(e){var t=this,i=t.state.transiting,n=t.$el;if(i){var a=setInterval(function(){i||(clearInterval(a),n.legend.selectAll(".".concat(pe.legendItemFocused)).size()>0&&t.expandArc(e))},10);return}var r=t.mapToTargetIds(e);n.svg.selectAll(t.selectorTargets(r,".".concat(ne.chartArc))).each(function(o){if(t.shouldExpand(o.data.id)){var s=t.getExpandConfig(o.data.id,"duration"),l=t.getSvgArcExpanded(t.getExpandConfig(o.data.id,"rate"));B(this).selectAll("path").transition().duration(s).attrTween("d",ys(t.svgArcExpanded.bind(t))).transition().duration(s*2).attrTween("d",ys(l.bind(t)))}})},unexpandArc:function(e){var t=this,i=t.state.transiting,n=t.$el.svg;if(!i){var a=t.mapToTargetIds(e);n.selectAll(t.selectorTargets(a,".".concat(ne.chartArc))).selectAll("path").transition().duration(function(r){return t.getExpandConfig(r.data.id,"duration")}).attrTween("d",ys(t.svgArc.bind(t))),n.selectAll("".concat(ne.arc)).style("opacity",null)}},getExpandConfig:function(e,t){var i=this,n=i.config,a={duration:50,rate:.98},r;return i.isDonutType(e)?r="donut":i.isGaugeType(e)?r="gauge":i.isPieType(e)&&(r="pie"),r?n["".concat(r,"_expand_").concat(t)]:a[t]},shouldExpand:function(e){var t=this,i=t.config;return t.isDonutType(e)&&i.donut_expand||t.isGaugeType(e)&&i.gauge_expand||t.isPieType(e)&&i.pie_expand},shouldShowArcLabel:function(){var e=this,t=e.config;return["donut","gauge","pie","polar"].some(function(i){return e.hasType(i)&&t["".concat(i,"_label_show")]})},getArcLabelConfig:function(e){e===void 0&&(e="format");var t=this,i=t.config,n=function(a){return a};return["donut","gauge","pie","polar"].filter(t.hasType.bind(t)).forEach(function(a){n=i["".concat(a,"_label_").concat(e)]}),e==="format"&&H(n)?n.bind(t.api):n},updateTargetsForArc:function(e){var t=this,i=t.$el,n=t.hasType("gauge"),a=t.getChartClass("Arc"),r=t.getClass("arcs",!0),o=t.classFocus.bind(t),s=i.main.select(".".concat(ne.chartArcs)),l=s.selectAll(".".concat(ne.chartArc)).data(t.pie(e)).attr("class",function(u){return a(u)+o(u.data)}),c=l.enter().append("g").attr("class",a).call(this.setCssRule(!1,".".concat(ne.chartArcs," text"),["pointer-events:none","text-anchor:middle"]));c.append("g").attr("class",r).merge(l),c.append("text").attr("dy",n&&!t.hasMultiTargets()?"-.1em":null).style("opacity","0").style("text-anchor",t.getStylePropValue("middle")).style("pointer-events",t.getStylePropValue("none")),i.text=s.selectAll(".".concat(Q.target," text"))},initArc:function(){var e=this,t=e.$el;t.arcs=t.main.select(".".concat(Q.chart)).append("g").attr("class",ne.chartArcs).attr("transform",e.getTranslate("arc")),e.setArcTitle()},setArcTitle:function(e){var t=this,i=e||t.getArcTitle(),n=t.hasType("gauge");if(i){var a=n?We.chartArcsGaugeTitle:ne.chartArcsTitle,r=t.$el.arcs.select(".".concat(a));r.empty()&&(r=t.$el.arcs.append("text").attr("class",a).style("text-anchor","middle")),n&&r.attr("dy","-0.3em"),Ni(r,i,n?void 0:[-.6,1.35],!0)}},getArcTitle:function(){var e=this,t=e.hasType("donut")&&"donut"||e.hasType("gauge")&&"gauge";return t?e.config["".concat(t,"_title")]:""},getArcTitleWithNeedleValue:function(){var e=this,t=e.config,i=e.state,n=e.getArcTitle();if(n&&e.config.arc_needle_show&&/{=[A-Z_]+}/.test(n)){var a=i.current.needle;return q(a)||(a=t.arc_needle_value),An(n,{NEEDLE_VALUE:~~a})}return!1},redrawArc:function(e,t,i){var n=this,a=n.config,r=n.state,o=n.$el.main,s=a.interaction_enabled,l=s&&a.data_selection_isselectable,c=o.selectAll(".".concat(ne.arcs)).selectAll(".".concat(ne.arc)).data(n.arcData.bind(n));c.exit().transition().duration(t).style("opacity","0").remove(),c=c.enter().append("path").attr("class",n.getClass("arc",!0)).style("fill",function(u){return n.color(u.data)}).style("cursor",function(u){var d;return!((d=l?.bind)===null||d===void 0)&&d.call(l,n.api)(u)?"pointer":null}).style("opacity","0").each(function(u){n.isGaugeType(u.data)&&(u.startAngle=a.gauge_startingAngle,u.endAngle=a.gauge_startingAngle),this._current=u}).merge(c),n.hasType("gauge")&&(n.updateGaugeMax(),n.hasMultiArcGauge()&&n.redrawArcGaugeLine()),c.attr("transform",function(u){return!n.isGaugeType(u.data)&&i?"scale(0)":""}).style("opacity",function(u){return u===this._current?"0":null}).each(function(){r.transiting=!0}).transition().duration(e).attrTween("d",function(u){var d=n.updateAngle(u);if(!d)return function(){return"M 0 0"};isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);var f=Si(this._current,d);return this._current=f(0),function(h){var g=f(h);return g.data=u.data,n.getArc(g,!0)}}).attr("transform",i?"scale(1)":"").style("fill",function(u){var d;return n.levelColor?(d=n.levelColor(u.data.values[0].value),a.data_colors[u.data.id]=d):d=n.color(u.data),d}).style("opacity",null).call(ar,function(){if(n.levelColor){var u=B(this),d=u.datum(this._current);n.updateLegendItemColor(d.data.id,u.style("fill"))}r.transiting=!1,me(a.onrendered,n.api)}),s&&n.bindArcEvent(c),n.hasType("polar")&&n.redrawPolar(),n.hasType("gauge")&&n.redrawBackgroundArcs(),a.arc_needle_show&&n.redrawNeedle(),n.redrawArcText(e),n.redrawArcRangeText()},redrawNeedle:function(){var e=this,t=e.$el,i=e.config,n=e.state,a=n.hiddenTargetIds,r=(n.radius-1)/100*i.arc_needle_length,o=a.length!==e.data.targets.length,s=e.$el.arcs.select(".".concat(ne.needle)),l=i.arc_needle_path,c=i.arc_needle_bottom_width/2,u=i.arc_needle_top_width/2,d=i.arc_needle_top_rx,f=i.arc_needle_top_ry,h=i.arc_needle_bottom_len,g=i.arc_needle_bottom_rx,p=i.arc_needle_bottom_ry,m=e.getNeedleAngle(),v=function(){var x=e.getArcTitleWithNeedleValue();x&&e.setArcTitle(x)};if(v(),s.empty()&&(s=t.arcs.append("path").classed(ne.needle,!0),t.needle=s,t.needle.updateHelper=function(x,y){y===void 0&&(y=!1),t.needle.style("display")!=="none"&&e.$T(t.needle).style("transform","rotate(".concat(e.getNeedleAngle(x),"deg)")).call(ar,function(){y&&(i.arc_needle_value=x),v()})}),o){var _=H(l)?l.call(e,r):"M-".concat(c," ").concat(h," A").concat(g," ").concat(p," 0 0 0 ").concat(c," ").concat(h," L").concat(u," -").concat(r," A").concat(d," ").concat(f," 0 0 0 -").concat(u," -").concat(r," L-").concat(c," ").concat(h," Z");e.$T(s).attr("d",_).style("fill",i.arc_needle_color).style("display",null).style("transform","rotate(".concat(m,"deg)"))}else s.style("display","none")},getNeedleAngle:function(e){var t=this,i=t.config,n=t.state,a=t.getArcLength(),r=t.hasType("gauge"),o=t.getTotalDataSum(!0),s=ve(e)?e:i.arc_needle_value,l=i["".concat(i.data_type,"_startingAngle")]||0,c=0;if(q(s)||(s=r&&t.data.targets.length===1?o:0),n.current.needle=s,r){l=t.getStartingAngle();var u=i.gauge_fullCircle?a:l*-2,d=i.gauge_min,f=i.gauge_max;c=u*((s-d)/(f-d))}else c=a*(s/o);return(l+c)*(180/Math.PI)},redrawBackgroundArcs:function(){var e=this,t=e.config,i=e.state,n=e.hasMultiArcGauge(),a=t.gauge_fullCircle,r=e.filterTargetsToShow(e.data.targets).length===0&&!!t.data_empty_label_text,o=e.getStartingAngle(),s=a?o+e.getArcLength():o*-1,l=e.$el.arcs.select("".concat(n?"g":"",".").concat(ne.chartArcsBackground));if(n){var c=0;l=l.selectAll("path.".concat(ne.chartArcsBackground)).data(e.data.targets),l.enter().append("path").attr("class",function(u,d){return"".concat(ne.chartArcsBackground," ").concat(ne.chartArcsBackground,"-").concat(d)}).merge(l).style("fill",t.gauge_background||null).attr("d",function(u){var d=u.id;if(r||i.hiddenTargetIds.indexOf(d)>=0)return"M 0 0";var f={data:[{value:t.gauge_max}],startAngle:o,endAngle:s,index:c++};return e.getArc(f,!0,!0)}),l.exit().remove()}else l.attr("d",r?"M 0 0":function(){var u={data:[{value:t.gauge_max}],startAngle:o,endAngle:s};return e.getArc(u,!0,!0)})},bindArcEvent:function(e){var t=this,i=t.config,n=t.state,a=n.inputType==="touch",r=n.inputType==="mouse";function o(c,u,d){t.expandArc(d),t.api.focus(d),t.toggleFocusLegend(d,!0),t.showTooltip([u],c)}function s(c){t.unexpandArc(void 0),t.api.revert(),t.revertLegend(),t.hideTooltip()}if(e.on("click",function(c,u,d){var f,h=t.updateAngle(u),g;h&&(g=t.convertToArcData(h),(f=t.toggleShape)===null||f===void 0||f.call(t,this,g,d),i.data_onclick.bind(t.api)(g,this))}),r&&e.on("mouseover",function(c,u){if(!n.transiting){n.event=c;var d=t.updateAngle(u),f=d?t.convertToArcData(d):null,h=f?.id||void 0;o(this,f,h),t.setOverOut(!0,f)}}).on("mouseout",function(c,u){if(!(n.transiting||!i.interaction_onout)){n.event=c;var d=t.updateAngle(u),f=d?t.convertToArcData(d):null;s(),t.setOverOut(!1,f)}}).on("mousemove",function(c,u){var d=t.updateAngle(u),f=d?t.convertToArcData(d):null;n.event=c,t.showTooltip([f],this)}),a&&t.hasArcType()&&!t.radars){var l=function(c){var u,d,f=(d=(u=c.changedTouches)===null||u===void 0?void 0:u[0])!==null&&d!==void 0?d:{clientX:0,clientY:0},h=f.clientX,g=f.clientY;return B(xe.elementFromPoint(h,g))};t.$el.svg.on("touchstart touchmove",function(c){if(!n.transiting){n.event=c;var u=l(c).datum(),d=u?.data&&u.data.id?t.updateAngle(u):null,f=d?t.convertToArcData(d):null,h=f?.id||void 0;t.callOverOutForTouch(f),we(h)?s():o(this,f,h)}},{passive:!0})}},redrawArcText:function(e){var t=this,i=t.config,n=t.state,a=t.$el,r=a.main,o=a.arcs,s=t.hasType("gauge"),l=t.hasMultiArcGauge(),c;if(s&&t.data.targets.length===1&&i.gauge_title||(c=r.selectAll(".".concat(ne.chartArc)).select("text").style("opacity","0").attr("class",function(d){return t.isGaugeType(d.data)?We.gaugeValue:null}).call(t.textForArcLabel.bind(t)).style("font-size",function(d){return t.isGaugeType(d.data)&&t.data.targets.length===1&&!l?"".concat(Math.round(n.radius/5),"px"):null}),wh.call(t),c.attr("transform",function(d){return t.transformForArcLabel.bind(t)(this,d)}).transition().duration(e).style("opacity",function(d){return t.isTargetToShow(d.data.id)&&t.isArcType(d.data)?null:"0"}),l&&c.attr("dy","-.1em")),r.select(".".concat(ne.chartArcsTitle)).style("opacity",t.hasType("donut")||s?null:"0"),s){var u=i.gauge_fullCircle;u&&c?.attr("dy","".concat(l?0:Math.round(n.radius/14))),i.gauge_label_show&&(o.select(".".concat(We.chartArcsGaugeUnit)).attr("dy","".concat(u?1.5:.75,"em")).text(i.gauge_units),o.select(".".concat(We.chartArcsGaugeMin)).attr("dx","".concat(-1*(n.innerRadius+(n.radius-n.innerRadius)/(u?1:2)),"px")).attr("dy","1.2em").text(t.textForGaugeMinMax(i.gauge_min,!1)),!u&&o.select(".".concat(We.chartArcsGaugeMax)).attr("dx","".concat(n.innerRadius+(n.radius-n.innerRadius)/2,"px")).attr("dy","1.2em").text(t.textForGaugeMinMax(i.gauge_max,!0)))}Dh.call(t)&&lA.call(t,e)},getArcElementByIdOrIndex:function(e){var t=this.$el.arcs,i=q(e)?function(n){return n.index===e}:function(n){return n.data.id===e};return t?.selectAll(".".concat(Q.target," path")).filter(i)}},di={initArea:function(e){var t=this,i=t.config;e.insert("g",".".concat(i.area_front?Oe.circles:xt.lines)).attr("class",t.getClass("areas",!0))},updateAreaColor:function(e){var t=this;return t.config.area_linearGradient?t.getGradienColortUrl(e.id):t.color(e)},updateArea:function(e,t){t===void 0&&(t=!1);var i=this,n=i.config,a=i.state,r=i.$el,o=i.$T,s=t?r.subchart:r;n.area_linearGradient&&i.updateLinearGradient();var l=s.main.selectAll(".".concat(kn.areas)).selectAll(".".concat(kn.area)).data(i.lineData.bind(i));o(l.exit(),e).style("opacity","0").remove(),s.area=l.enter().append("path").attr("class",i.getClass("area",!0)).style("fill",i.updateAreaColor.bind(i)).style("opacity",function(){return a.orgAreaOpacity=B(this).style("opacity"),"0"}).merge(l),l.style("opacity",a.orgAreaOpacity),i.setRatioForGroupedData(s.area.data())},redrawArea:function(e,t,i){i===void 0&&(i=!1);var n=this,a=(i?this.$el.subchart:this.$el).area,r=n.state.orgAreaOpacity;return[n.$T(a,t,mt()).attr("d",e).style("fill",n.updateAreaColor.bind(n)).style("opacity",function(o){return String(n.isAreaRangeType(o)?r/1.75:r)})]},generateDrawArea:function(e,t){var i=this,n=i.config,a=n.line_connectNull,r=n.axis_rotated,o=i.generateGetAreaPoints(e,t),s=i.getYScaleById.bind(i),l=function(d){return(t?i.subxx:i.xx).call(i,d)},c=function(d,f){return i.isGrouped(d.id)?o(d,f)[0][1]:s(d.id,t)(i.isAreaRangeType(d)?i.getRangedData(d,"high"):i.getShapeYMin(d.id))},u=function(d,f){return i.isGrouped(d.id)?o(d,f)[1][1]:s(d.id,t)(i.isAreaRangeType(d)?i.getRangedData(d,"low"):d.value)};return function(d){var f=a?i.filterRemoveNull(d.values):d.values,h=0,g=0,p;if(i.isAreaType(d)){var m=zT();m=r?m.y(l).x0(c).x1(u):m.x(l).y0(n.area_above?0:n.area_below?i.state.height:c).y1(u),a||(m=m.defined(function(v){return i.getBaseValue(v)!==null})),i.isStepType(d)&&(f=i.convertValuesToStep(f)),p=m.curve(i.getCurve(d))(f)}else f[0]&&(h=i.scale.x(f[0].x),g=i.getYScaleById(d.id)(f[0].value)),p=r?"M ".concat(g," ").concat(h):"M ".concat(h," ").concat(g);return p||"M 0 0"}},generateGetAreaPoints:function(e,t){var i=this,n=i.config,a=i.getShapeX(0,e,t),r=i.getShapeY(!!t),o=i.getShapeOffset(i.isAreaType,e,t),s=i.getYScaleById.bind(i);return function(l,c){var u=s.call(i,l.id,t)(i.getShapeYMin(l.id)),d=o(l,c)||u,f=a(l),h=l.value,g=r(l);return n.axis_rotated&&(h>0&&g<u||h<0&&u<g)&&(g=u),[[f,d],[f,g-(u-d)],[f,g-(u-d)],[f,d]]}}},vv={initBar:function(){var e=this,t=e.$el,i=e.config,n=e.state.clip;t.bar=t.main.select(".".concat(Q.chart)),t.bar=i.bar_front?t.bar.append("g"):t.bar.insert("g",":first-child"),t.bar.attr("class",He.chartBars).call(this.setCssRule(!1,".".concat(He.chartBars),["pointer-events:none"])),i.clipPath===!1&&(i.bar_radius||i.bar_radius_ratio)&&t.bar.attr("clip-path",n.pathXAxis.replace(/#[^)]*/,"#".concat(n.id)))},updateTargetsForBar:function(e){var t=this,i=t.config,n=t.$el,a=t.getChartClass("Bar"),r=t.getClass("bars",!0),o=t.classFocus.bind(t),s=i.interaction_enabled&&i.data_selection_isselectable;n.bar||t.initBar(),n.main.select(".".concat(He.chartBars)).selectAll(".".concat(He.chartBar)).data(t.filterNullish(e)).attr("class",function(l){return a(l)+o(l)}).enter().append("g").attr("class",a).style("opacity","0").style("pointer-events",t.getStylePropValue("none")).append("g").attr("class",r).style("cursor",function(l){var c;return!((c=s?.bind)===null||c===void 0)&&c.call(s,t.api)(l)?"pointer":null}).call(function(l){t.setCssRule(!0," .".concat(He.bar),["fill"],t.color)(l),l.each(function(c){bs.call(t,c.id)&&B(this).append("path").attr("class",He.barConnectLine)})})},updateBar:function(e,t){t===void 0&&(t=!1);var i=this,n=i.config,a=i.$el,r=i.$T,o=t?a.subchart:a,s=i.getClass("bar",!0),l=i.initialOpacity.bind(i);n.bar_linearGradient&&i.updateLinearGradient();var c=o.main.selectAll(".".concat(He.bars)).selectAll(".".concat(He.bar)).data(i.labelishData.bind(i));r(c.exit(),e).style("opacity","0").remove(),o.bar=c.enter().append("path").attr("class",s).style("fill",i.updateBarColor.bind(i)).merge(c).style("opacity",l),i.setRatioForGroupedData(o.bar.data())},updateBarColor:function(e){var t=this,i=t.getStylePropValue(t.color);return t.config.bar_linearGradient?t.getGradienColortUrl(e.id):i?i(e):null},redrawBar:function(e,t,i){i===void 0&&(i=!1);var n=this,a=(i?n.$el.subchart:n.$el).bar,r=[];return[n.$T(a,t,mt()).attr("d",function(o,s,l){var c=(q(o.value)||n.isBarRangeType(o))&&e(o,s),u=bs.call(n,o.id);if(c.length>1&&(r.push(c[1]),s===l.length-1)){var d=n.$T(B(this.parentNode.querySelector(".".concat(He.barConnectLine))),t,mt());n.updateConnectLine(d,u,r),r.splice(0)}return c[0]}).style("fill",n.updateBarColor.bind(n)).style("clip-path",function(o){return o.clipPath}).style("opacity",null)]},generateDrawBar:function(e,t){var i=this,n=i.config,a=i.generateGetBarPoints(e,t),r=n.axis_rotated,o=n.bar_radius,s=n.bar_radius_ratio,l=q(o)&&o>0?function(){return o}:q(s)?function(c){return c*s}:null;return function(c,u){var d=a(c,u),f=+r,h=+!f,g=c.value<0,p=n["axis_".concat(i.axis.getId(c.id),"_inverted")],m=!p&&g||p&&!g,v=["",""],_=i.isGrouped(c.id),x=l&&_?i.isStackingRadiusData(c):!1,y=[d[0][f],d[0][h]],$=0;if(c.clipPath=null,l){var T=r?h:f,A=d[2][T]-d[0][T];$=!_||x?l(A):0;var S="a".concat($," ").concat($," ").concat(m?"1 0 0":"0 0 1"," ");v[+!r]="".concat(S).concat($,",").concat($),v[+r]="".concat(S).concat([-$,$][r?"sort":"reverse"]()),m&&v.reverse()}var R=r?d[1][f]+(m?$:-$):d[1][h]+(m?-$:$);if($){var C="";r?m&&y[0]<R?C="0 ".concat(R-y[0],"px 0 0"):!m&&y[0]>R&&(C="0 0 0 ".concat(y[0]-R,"px")):m&&y[1]>R?C="".concat(y[1]-R,"px 0 0 0"):!m&&y[1]<R&&(C="0 0 ".concat(R-y[1],"px 0")),C&&(c.clipPath="inset(".concat(C,")"))}var E=r?"H".concat(R," ").concat(v[0],"V").concat(d[2][h]-$," ").concat(v[1],"H").concat(d[3][f]):"V".concat(R," ").concat(v[0],"H").concat(d[2][f]-$," ").concat(v[1],"V").concat(d[3][h]),k=["M".concat(d[0][f],",").concat(d[0][h]).concat(E,"z")];return bs.call(i,c.id)&&k.push(r?{x:d[0][f],y:d[0][h],width:d[0][f]-R,height:d[2][h]-d[0][h]}:{x:d[0][f],y:R,width:d[2][f]-d[0][f],height:d[3][h]-R}),k}},isStackingRadiusData:function(e){var t=this,i=t.$el,n=t.config,a=t.data,r=t.state,o=e.id,s=e.index,l=e.value;if(r.hiddenTargetIds.indexOf(o)>-1){var c=i.bar.filter(function(f){return f.id===o&&f.value===l});return!c.empty()&&/a\d+/i.test(c.attr("d"))}var u=n.data_groups.find(function(f){return f.indexOf(o)>-1}),d=t.orderTargets(t.filterTargetsToShow(a.targets.filter(t.isBarType,t))).filter(function(f){return u.indexOf(f.id)>-1}).map(function(f){return f.values.filter(function(h){return h.index===s&&(q(l)&&l>0?h.value>0:h.value<0)})[0]}).filter(Boolean).map(function(f){return f.id});return l!==0&&d.indexOf(o)===d.length-1},generateGetBarPoints:function(e,t){var i=this,n=i.config,a=t?i.axis.subX:i.axis.x,r=i.getIndicesMax(e)+1,o=i.getBarW("bar",a,r),s=i.getShapeX(o,e,!!t),l=i.getShapeY(!!t),c=i.getShapeOffset(i.isBarType,e,!!t),u=i.getYScaleById.bind(i);return function(d,f){var h=d.id,g=u.call(i,h,t)(i.getShapeYMin(h)),p=c(d,f)||g,m=q(o)?o:o[d.id]||o._$width,v=n["axis_".concat(i.axis.getId(h),"_inverted")],_=d.value,x=s(d),y=l(d);n.axis_rotated&&!v&&(_>0&&y<g||_<0&&g<y)&&(y=g),i.isBarRangeType(d)||(y-=g-p);var $=x+m;return[[x,p],[x,y],[$,y],[$,p]]}},updateConnectLine:function(e,t,i){var n=this,a=i.map(function(r,o,s){var l=n.config.axis_rotated,c=/^start-(start|end)$/.test(t),u=/^end-(start|end)$/.test(t),d=[],f=l?u?r.x-r.width:r.x:r.x+r.width,h=l||c?r.y+r.height:r.y;return o===0?d.push("".concat(f,",").concat(h)):(d.push(l?"L".concat(r.x-(/\w+-end$/.test(t)?r.width:0),",").concat(r.y):"L".concat(r.x,",").concat(r.y+(/\w+-start$/.test(t)?r.height:0))),o<s.length-1&&d.push("M".concat(f,",").concat(h))),d.join(" ")});e.attr("d","M".concat(a.join(""),"z"))}},pv={initBubble:function(){var e=this,t=e.config;e.hasType("bubble")&&(t.point_show=!0,t.point_type="circle")},getBaseLength:function(){var e=this,t=e.state,i=t.width,n=t.height,a=Te.bubbleBaseLength,r=e.cache.get(a);return r||e.cache.add(a,r=lt("min",[i,n])),r},getBubbleR:function(e){var t=this,i=t.config.bubble_maxR;H(i)?i=i.bind(t.api)(e):q(i)||(i=t.getBaseLength()/(t.getMaxDataCount()*2)+12);var n=lt("max",t.getMinMaxData().max.map(function(o){return t.isBubbleZType(o)?t.getBubbleZData(o.value,"y"):ce(o.value)?o.value.mid:o.value})),a=i*i*Math.PI,r=(t.isBubbleZType(e)?t.getBubbleZData(e.value,"z"):e.value)*(a/n);return Math.sqrt(r/Math.PI)},getBubbleZData:function(e,t){return ce(e)?e[t]:e[t==="y"?0:1]}},mv={initCandlestick:function(){var e=this.$el;e.candlestick=e.main.select(".".concat(Q.chart)).append("g").attr("class",_t.chartCandlesticks)},updateTargetsForCandlestick:function(e){var t=this,i=t.$el,n=t.getChartClass("Candlestick");i.candlestick||t.initCandlestick(),t.$el.main.select(".".concat(_t.chartCandlesticks)).selectAll(".".concat(_t.chartCandlestick)).data(t.filterNullish(e)).enter().append("g").attr("class",n).style("pointer-events","none")},updateCandlestick:function(e,t){t===void 0&&(t=!1);var i=this,n=i.$el,a=i.$T,r=t?n.subchart:n,o=i.getClass("candlestick",!0),s=i.initialOpacity.bind(i),l=r.main.selectAll(".".concat(_t.chartCandlestick)).selectAll(".".concat(_t.candlestick)).data(i.labelishData.bind(i));a(l.exit(),e).style("opacity","0").remove();var c=l.enter().filter(function(u){return u.value}).append("g").attr("class",o);c.append("line"),c.append("path"),r.candlestick=l.merge(c).style("opacity",s)},generateDrawCandlestick:function(e,t){var i=this,n=i.config,a=i.generateGetCandlestickPoints(e,t),r=n.axis_rotated,o=n.candlestick_color_down;return function(s,l,c){var u=a(s,l),d=i.getCandlestickData(s),f=d?._isUp,h=+r,g=+!h;c.classed&&c.classed(_t[f?"valueUp":"valueDown"],!0);var p=r?"H".concat(u[1][1]," V").concat(u[1][0]," H").concat(u[0][1]):"V".concat(u[1][1]," H").concat(u[1][0]," V").concat(u[0][1]);c.select("path").attr("d","M".concat(u[0][h],",").concat(u[0][g]).concat(p,"z")).style("fill",function(x){return(f?i.color(x):ce(o)?o[x.id]:o)||i.color(x)});var m=c.select("line"),v=r?{x1:u[2][1],x2:u[2][2],y1:u[2][0],y2:u[2][0]}:{x1:u[2][0],x2:u[2][0],y1:u[2][1],y2:u[2][2]};for(var _ in v)m.attr(_,v[_])}},generateGetCandlestickPoints:function(e,t){t===void 0&&(t=!1);var i=this,n=t?i.axis.subX:i.axis.x,a=i.getIndicesMax(e)+1,r=i.getBarW("candlestick",n,a),o=i.getShapeX(r,e,!!t),s=i.getShapeY(!!t),l=i.getShapeOffset(i.isBarType,e,!!t),c=i.getYScaleById.bind(i);return function(u,d){var f=c.call(i,u.id,t)(i.getShapeYMin(u.id)),h=l(u,d)||f,g=q(r)?r:r[u.id]||r._$width,p=i.getCandlestickData(u),m;if(p&&q(p.open)&&q(p.close)){var v={start:o(u),end:0};v.end=v.start+g;var _={start:s(p.open),end:s(p.close)},x={x:v.start+g/2,high:s(p.high),low:s(p.low)};_.start-=f-h,m=[[v.start,_.start],[v.end,_.end],[x.x,x.low,x.high]]}else m=[[0,0],[0,0],[0,0,0]];return m}},redrawCandlestick:function(e,t,i){i===void 0&&(i=!1);var n=this,a=n.$el,r=n.$T,o=(i?a.subchart:a).candlestick,s=mt(!0);return[o.each(function(l,c){e(l,c,r(B(this),t,s))}).style("opacity",null)]},getCandlestickData:function(e){var t=e.value,i;if(de(t)){var n=t[0],a=t[1],r=t[2],o=t[3],s=t[4],l=s===void 0?!1:s;i={open:n,high:a,low:r,close:o},l!==!1&&(i.volume=l)}else ce(t)&&(i=J({},t));return i&&(i._isUp=i.close>=i.open),i||null}},_v={initFunnel:function(){var e=this,t=e.$el;t.funnel=t.main.select(".".concat(Q.chart)).append("g").classed(Ui.chartFunnels,!0),t.funnel.background=t.funnel.append("path").classed(Ui.funnelBackground,!0),e.bindFunnelEvent()},bindFunnelEvent:function(){var e=this,t=e.$el.funnel,i=e.config,n=e.state,a=function(o){var s,l=o.isTrusted?o.target:(s=n.eventReceiver.rect)===null||s===void 0?void 0:s.node(),c;return/^path$/i.test(l.tagName)&&(n.event=o,c=B(l).datum()),c};if(i.interaction_enabled){var r=n.inputType==="touch";t.on(r?"touchstart":"mouseover mousemove",function(o){var s=a(o);s&&(e.showTooltip([s],o.target),/^(touchstart|mouseover)$/.test(o.type)&&e.setOverOut(!0,s))},r?{passive:!0}:void 0).on(r?"touchend":"mouseout",function(o){var s=a(o);i.interaction_onout&&(e.hideTooltip(),e.setOverOut(!1,s))})}},updateTargetsForFunnel:function(e){var t=this,i=t.$el.funnel,n=t.getChartClass("Funnel"),a=t.getClass("funnel",!0);i||t.initFunnel();var r=gA.call(t,e.filter(t.isFunnelType.bind(t))),o=i.selectAll(".".concat(Ui.chartFunnel)).data(t.filterNullish(r));o.exit().remove();var s=o.enter().insert("g",".".concat(Ui.funnelBackground));s.append("path"),i.path=s.merge(o).attr("class",function(l){return n(l)}).select("path").attr("class",a).style("opacity","0").style("fill",t.color)},updateFunnel:function(e){var t=this.$el.funnel,i=e.map(function(n){return n.id});t.path=t.path.filter(function(n){return i.indexOf(n.id)>=0})},generateGetFunnelPoints:function(){var e=this,t=e.$el.funnel,i=e.filterTargetsToShow(t.path),n=sr.call(e),a=n.top,r=(n.left-n.right)/2,o={},s=a??0;return i.each(function(l,c){var u;o[l.id]=[[r,s],[r,s+=((u=i?.[c])!==null&&u!==void 0?u:l).ratio]]}),function(l){return o[l.id]}},redrawFunnel:function(){var e=this,t=e.$T,i=e.$el.funnel,n=e.filterTargetsToShow(i.path),a=hA.call(e,Oh.call(e,n.data()));i.attr("clip-path","path('".concat(Ih.bind(e)(),"')")),i.background.attr("d",Ih.call(e,!0)),t(n).attr("d",function(r,o){return"M".concat(a[o].join("L"),"z")}).style("opacity","1"),i.selectAll("g").style("opacity",null)}},xv={initGauge:function(){var e=this,t=e.config,i=e.$el.arcs,n=function(r,o){r===void 0&&(r=null),o===void 0&&(o=""),i.append("text").attr("class",r).style("text-anchor","middle").style("pointer-events","none").text(o)};if(e.hasType("gauge")){var a=e.hasMultiArcGauge();i.append(a?"g":"path").attr("class",ne.chartArcsBackground).style("fill",!a&&t.gauge_background||null),t.gauge_units&&n(We.chartArcsGaugeUnit),t.gauge_label_show&&(n(We.chartArcsGaugeMin),!t.gauge_fullCircle&&n(We.chartArcsGaugeMax))}},updateGaugeMax:function(){var e=this,t=e.config,i=e.state,n=e.hasMultiArcGauge()?e.getMinMaxData().max[0].value:e.getTotalDataSum(i.rendered);!t.gauge_enforceMinMax&&n+t.gauge_min*(t.gauge_min>0?-1:1)>t.gauge_max&&(t.gauge_max=n-t.gauge_min)},redrawArcGaugeLine:function(){var e=this,t=e.config,i=e.state,n=e.$el,a=e.state.hiddenTargetIds,r=n.main.selectAll(".".concat(ne.arcs)).selectAll(".".concat(ne.arcLabelLine)).data(e.arcData.bind(e));r.enter().append("rect").attr("class",function(o){return"".concat(ne.arcLabelLine," ").concat(Q.target," ").concat(Q.target,"-").concat(o.data.id)}).merge(r).style("fill",function(o){return e.levelColor?e.levelColor(o.data.values[0].value):e.color(o.data)}).style("display",t.gauge_label_show?null:"none").each(function(o){var s=0,l=2,c=0,u=0,d="";if(a.indexOf(o.data.id)<0){var f=e.updateAngle(o),h=i.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length*(f.index+1),g=f.endAngle-Math.PI/2,p=i.radius-h,m=g-(p===0?0:1/p);s=i.radiusExpanded-i.radius+h,c=Math.cos(m)*p,u=Math.sin(m)*p,d="rotate(".concat(g*180/Math.PI,", ").concat(c,", ").concat(u,")")}B(this).attr("x",c).attr("y",u).attr("width",s).attr("height",l).attr("transform",d).style("stroke-dasharray","0, ".concat(s+l,", 0"))})},textForGaugeMinMax:function(e,t){var i=this,n=i.config.gauge_label_extents;return H(n)?n.bind(i.api)(e,t):e},getGaugeLabelHeight:function(){var e=this.config;return this.config.gauge_label_show&&!e.gauge_fullCircle?20:0},getPaddingBottomForGauge:function(){var e=this;return e.getGaugeLabelHeight()*(e.config.gauge_label_show?2:2.5)}},yv={initLine:function(){var e=this.$el;e.line=e.main.select(".".concat(Q.chart)).append("g").attr("class",xt.chartLines).call(this.setCssRule(!1,".".concat(xt.chartLines),["pointer-events:none"]))},updateTargetsForLine:function(e){var t=this,i=t.$el,n=i.area,a=i.line,r=i.main,o=t.getChartClass("Line"),s=t.getClass("lines",!0),l=t.classFocus.bind(t);a||t.initLine();var c=e.filter(function(h){return!(t.isScatterType(h)||t.isBubbleType(h))}),u=r.select(".".concat(xt.chartLines)).selectAll(".".concat(xt.chartLine)).data(t.filterNullish(c)).attr("class",function(h){return o(h)+l(h)}),d=u.enter().append("g").attr("class",o).style("opacity","0").style("pointer-events",t.getStylePropValue("none"));if(d.append("g").attr("class",s),t.hasTypeOf("Area")){var f=(!n&&d.empty()?u:d).filter(t.isAreaType.bind(t));t.initArea(f)}t.updateTargetForCircle(c,d)},updateLine:function(e,t){t===void 0&&(t=!1);var i=this,n=i.format.extraLineClasses,a=i.$el,r=i.$T,o=t?a.subchart:a,s=o.main.selectAll(".".concat(xt.lines)).selectAll(".".concat(xt.line)).data(i.lineData.bind(i));r(s.exit(),e).style("opacity","0").remove(),o.line=s.enter().append("path").attr("class",function(l){return"".concat(i.getClass("line",!0)(l)," ").concat(n(l)||"")}).style("stroke",i.color).merge(s).style("opacity",i.initialOpacity.bind(i)).attr("transform",null)},redrawLine:function(e,t,i){i===void 0&&(i=!1);var n=this,a=n.$el,r=n.$T,o=(i?a.subchart:a).line;return[r(o,t,mt()).attr("d",e).style("stroke",this.color).style("opacity",null)]},getCurve:function(e){var t=this;return t.config.axis_rotated&&t.isStepType(e)?function(i){var n=t.getInterpolate(e)(i);return n.orgPoint=n.point,n.pointRotated=function(a,r){this._point===1&&(this._point=2);var o=this._y*(1-this._t)+r*this._t;this._context.lineTo(this._x,o),this._context.lineTo(a,o),this._x=a,this._y=r},n.point=function(a,r){this._point===0?this.orgPoint(a,r):this.pointRotated(a,r)},n}:t.getInterpolate(e)},generateDrawLine:function(e,t){var i=this,n=i.config,a=i.scale,r=n.line_connectNull,o=n.axis_rotated,s=i.generateGetLinePoints(e,t),l=i.getYScaleById.bind(i),c=function(h){return(t?i.subxx:i.xx).call(i,h)},u=function(h,g){return i.isGrouped(h.id)?s(h,g)[0][1]:l(h.id,t)(i.getBaseValue(h))},d=yf();d=o?d.x(u).y(c):d.x(c).y(u),r||(d=d.defined(function(h){return i.getBaseValue(h)!==null}));var f=t?a.subX:a.x;return function(h){var g=l(h.id,t),p=r?i.filterRemoveNull(h.values):h.values,m=0,v=0,_;if(i.isLineType(h)){var x=n.data_regions[h.id];x?(i.isAreaRangeType(h)&&(p=p.map(function(y){return J(J({},y),{value:i.getRangedData(y,"mid")})})),_=i.lineWithRegions(p,a.zoom||f,g,x)):(i.isStepType(h)&&(p=i.convertValuesToStep(p)),_=d.curve(i.getCurve(h))(p))}else p[0]&&(m=f(p[0].x),v=g(p[0].value)),_=o?"M ".concat(v," ").concat(m):"M ".concat(m," ").concat(v);return _||"M 0 0"}},lineWithRegions:function(e,t,i,n){for(var a=this,r=a.config.axis_rotated,o=a.axis.isTimeSeries(),s="2 2",l=pA.bind(a)(e,n,o),c=a.hasNullDataValue(e),u,d,f,h,g=r?function(U){return i(U.value)}:function(U){return t(U.x)},p=r?function(U){return t(U.x)}:function(U){return i(U.value)},m=function(U){return"M".concat(U[0][0],",").concat(U[0][1],"L").concat(U[1][0],",").concat(U[1][1])},v=o?function(U,Y,Z,re){var N=U.x.getTime(),W=Y.x-U.x,K=new Date(N+W*Z),F=new Date(N+W*(Z+re));return m(r?[[i(d(Z)),t(K)],[i(d(Z+f)),t(F)]]:[[t(K),i(d(Z))],[t(F),i(d(Z+f))]])}:function(U,Y,Z,re){var N=t(Y.x,!r),W=i(Y.value,r),K=Z+re,F=t(u(Z),!r),he=i(d(Z),r),oe=t(u(K),!r),$e=i(d(K),r);oe>N&&(oe=N),U.value>Y.value&&(r?$e<W:$e>W)&&($e=W);var De=[[F,he],[oe,$e]];return r&&De.forEach(function(j){return j.reverse()}),m(De)},_={x:a.axis.getAxisType("x"),y:a.axis.getAxisType("y")},x="",y=a.$el.line.filter(function(U){return U.id===e[0].id}),$=y.clone().style("display","none"),T=function(U,Y){return U.attr("d",Y).node().getTotalLength()},A={dash:[],lastLength:0},S=!1,R=0,C=void 0;C=e[R];R++){var E=e[R-1],k=E&&te(E.value),P=a.isWithinRegions(C.x,l);if(te(C.value)){if(we(l)||!P||!k)x+="".concat(R&&k?"L":"M").concat(g(C),",").concat(p(C));else if(k)if(P=(P?.dasharray||s).split(" ").map(Number),u=ci(_.x,E.x,C.x),d=ci(_.y,E.value,C.value),c){var w=t(C.x)-t(E.x),D=i(C.value)-i(E.value),L=Math.sqrt(Math.pow(w,2)+Math.pow(D,2));f=P[0]/L,h=f*P[1];for(var M=f;M<=1;M+=h)x+=v(E,C,M,f),M+h>=1&&(x+=v(E,C,1,0))}else{var z=[];if(S=C.x===e[e.length-1].x,o){var I=+E.x,O=new Date(I),X=new Date(I+(+C.x-I));z=[[t(O),i(d(0))],[t(X),i(d(1))]]}else z=[[t(u(0)),i(d(0))],[t(u(1)),i(d(1))]];r&&z.forEach(function(U){return U.reverse()});var V=T($,x),fe=T($,x+="L".concat(z[1].join(","))),ie=vA(V-A.lastLength,fe-A.lastLength,P,S);A.lastLength+=ie.length,A.dash.push(ie.dash)}}}return A.dash.length&&(!S&&A.dash.push(T($,x)),$.remove(),y.attr("stroke-dasharray",A.dash.join(" "))),x},isWithinRegions:function(e,t){for(var i=0,n=void 0;n=t[i];i++)if(n.start<e&&e<=n.end)return n.style;return!1},isWithinStep:function(e,t){return Math.abs(t-Qe(this.state.event,e)[1])<30},shouldDrawPointsForLine:function(e){var t=this.config.line_point;return t===!0||de(t)&&t.indexOf(e.id)!==-1}},fi=function(){return mt()},Mn={initialOpacityForCircle:function(e){var t=this,i=t.config,n=t.state.withoutFadeIn,a=i.point_opacity;return we(a)&&(a=this.getBaseValue(e)!==null&&n[e.id]?this.opacityForCircle(e):"0"),a},opacityForCircle:function(e){var t,i=this.config,n=i.point_opacity;return we(n)&&(n=i.point_show&&!(!((t=this.isPointFocusOnly)===null||t===void 0)&&t.call(this))?null:"0",n=te(this.getBaseValue(e))?this.isBubbleType(e)||this.isScatterType(e)?"0.5":n:"0"),n},initCircle:function(){var e=this,t=e.$el.main;!e.point&&(e.point=e.generatePoint()),(e.hasType("bubble")||e.hasType("scatter"))&&t.select(".".concat(Q.chart," > .").concat(Oe.chartCircles)).empty()&&t.select(".".concat(Q.chart)).append("g").attr("class",Oe.chartCircles)},updateTargetForCircle:function(e,t){var i=this,n=this,a=n.config,r=n.data,o=n.$el,s=a.interaction_enabled&&a.data_selection_enabled,l=s&&a.data_selection_isselectable,c=n.getClass("circles",!0);if(a.point_show){n.initCircle();var u=e,d=t;if(!u){u=n.filterNullish(r.targets).filter(function(h){return i.isScatterType(h)||i.isBubbleType(h)});var f=o.main.select(".".concat(Oe.chartCircles)).style("pointer-events","none").selectAll(".".concat(Oe.circles)).data(u);f.exit().remove(),d=f.enter()}s&&d.append("g").attr("class",function(h){return n.generateClass(_e.selectedCircles,h.id)}),d.append("g").attr("class",c).call(function(h){n.setCssRule(!0,".".concat(Oe.circles),["cursor:pointer"],l)(h),n.setCssRule(!0," .".concat(Oe.circle),["fill","stroke"],n.color)(h)}).style("opacity",function(){return B(this.parentNode).attr("class").indexOf(Oe.chartCircles)>-1?"0":null}),s&&u.forEach(function(h){o.main.selectAll(".".concat(_e.selectedCircles).concat(n.getTargetSelectorSuffix(h.id))).selectAll("".concat(_e.selectedCircle)).each(function(g){g.value=h.values[g.index].value})})}},updateCircle:function(e){e===void 0&&(e=!1);var t=this,i=t.config,n=t.state,a=t.$el,r=t.isPointFocusOnly(),o=e?a.subchart:a;if(i.point_show&&!n.toggling){i.point_radialGradient&&t.updateLinearGradient();var s=o.main.selectAll(".".concat(Oe.circles)).selectAll(".".concat(Oe.circle)).data(function(l){var c=t.isLineType(l)&&t.shouldDrawPointsForLine(l)||t.isBubbleType(l)||t.isRadarType(l)||t.isScatterType(l)?r?[l.values[0]]:l.values:[];return t.filterNullish(c)});s.exit().remove(),s.enter().filter(Boolean).append(t.point("create",this,t.pointR.bind(t),t.updateCircleColor.bind(t))),o.circle=o.main.selectAll(".".concat(Oe.circles," .").concat(Oe.circle)).style("stroke",t.getStylePropValue(t.color)).style("opacity",t.initialOpacityForCircle.bind(t))}},updateCircleColor:function(e){var t=this,i=t.getStylePropValue(t.color);return t.config.point_radialGradient?t.getGradienColortUrl(e.id):i?i(e):null},redrawCircle:function(e,t,i,n,a){a===void 0&&(a=!1);var r=this,o=r.state.rendered,s=r.$el,l=r.$T,c=a?s.subchart:s,u=c.main.selectAll(".".concat(_e.selectedCircle));if(!r.config.point_show)return[];var d=r.point("update",r,e,t,r.updateCircleColor.bind(r),i,n,u),f=r.isCirclePoint()?"c":"",h=mt(),g=r.opacityForCircle.bind(r),p=[];return c.circle.each(function(m){var v=d.bind(this)(m);v=l(v,i||!o,h).style("opacity",g),p.push(v)}),[p,l(u,i).attr("".concat(f,"x"),e).attr("".concat(f,"y"),t)]},showCircleFocus:function(e){var t=this,i=t.state,n=i.hasRadar,a=i.resizing,r=i.toggling,o=i.transiting,s=t.$el.circle;if(o===!1&&s&&t.isPointFocusOnly()){var l=(n?t.radarCircleX:t.circleX).bind(t),c=(n?t.radarCircleY:t.circleY).bind(t),u=r||we(e),d=t.point("update",t,l,c,t.getStylePropValue(t.color),a?!1:u);e&&(s=s.filter(function(f){var h,g=(h=e.filter)===null||h===void 0?void 0:h.call(e,function(p){return p.id===f.id});return g.length?B(this).datum(g[0]):!1})),s.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each(function(f){var h=f.id,g=f.index,p=f.value,m="hidden";te(p)&&(d.bind(this)(f),t.expandCircles(g,h),m=""),this.style.visibility=m})}},hideCircleFocus:function(){var e=this,t=e.$el.circle;e.isPointFocusOnly()&&t&&(e.unexpandCircles(),t.style("visibility","hidden"))},circleX:function(e){return this.xx(e)},updateCircleY:function(e){e===void 0&&(e=!1);var t=this,i=t.generateGetLinePoints(t.getShapeIndices(t.isLineType),e);return function(n,a){var r=n.id;return t.isGrouped(r)?i(n,a)[0][1]:t.getYScaleById(r,e)(t.getBaseValue(n))}},expandCircles:function(e,t,i){var n=this,a=n.pointExpandedR.bind(n);i&&n.unexpandCircles();var r=n.getShapeByIndex("circle",e,t).classed(Q.EXPANDED,!0),o=a(r)/n.config.point_r,s=1-o;n.isCirclePoint()?r.attr("r",a):r.each(function(){var l=B(this);if(this.tagName==="circle")l.attr("r",a);else{var c=It(this),u=c.width,d=c.height,f=s*(+l.attr("x")+u/2),h=s*(+l.attr("y")+d/2);l.attr("transform","translate(".concat(f," ").concat(h,") scale(").concat(o,")"))}})},unexpandCircles:function(e){var t=this,i=t.pointR.bind(t),n=t.getShapeByIndex("circle",e).filter(function(){return B(this).classed(Q.EXPANDED)}).classed(Q.EXPANDED,!1);if(n.attr("r",i),!t.isCirclePoint()){var a=i(n)/t.config.point_r;n.attr("transform",a!==1?"scale(".concat(a,")"):null)}},pointR:function(e){var t=this,i=t.config.point_r,n=i;return t.isBubbleType(e)?n=t.getBubbleR(e):H(i)&&(n=i.bind(t.api)(e)),e.r=n,n},pointExpandedR:function(e){var t=this,i=t.config,n=t.isBubbleType(e)?1.15:1.75;return i.point_focus_expand_enabled?i.point_focus_expand_r||t.pointR(e)*n:t.pointR(e)},pointSelectR:function(e){var t=this,i=t.config.point_select_r;return H(i)?i(e):i||t.pointR(e)*4},isPointFocusOnly:function(){var e=this;return e.config.point_focus_only&&!e.hasType("bubble")&&!e.hasType("scatter")&&!e.hasArcType(null,["radar"])},isWithinCircle:function(e,t){var i=this.state,n=Qe(i.event,e),a=B(e),r=this.isCirclePoint(e)?"c":"",o=this.getPointSensitivity(a?.datum()),s=+a.attr("".concat(r,"x")),l=+a.attr("".concat(r,"y"));if(!(s||l)&&e.nodeType===1){var c=Le(e),u=c.x,d=c.y;s=u,l=d}return Math.sqrt(Math.pow(s-n[0],2)+Math.pow(l-n[1],2))<(t||o)},getPointSensitivity:function(e){var t=this,i=t.config.point_sensitivity;if(e)H(i)?i=i.call(t.api,e):i==="radius"&&(i=e.r);else return i;return i},updatePointClass:function(e){var t=this,i=t.$el.circle,n=!1;return(ce(e)||i)&&(n=e===!0?i.each(function(a){var r=t.getClass("circle",!0)(a);this.getAttribute("class").indexOf(Q.EXPANDED)>-1&&(r+=" ".concat(Q.EXPANDED)),this.setAttribute("class",r)}):t.getClass("circle",!0)(e)),n},generateGetLinePoints:function(e,t){var i=this,n=i.config,a=i.getShapeX(0,e,t),r=i.getShapeY(t),o=i.getShapeOffset(i.isLineType,e,t),s=i.getYScaleById.bind(i);return function(l,c){var u=s.call(i,l.id,t)(i.getShapeYMin(l.id)),d=o(l,c)||u,f=a(l),h=r(l);n.axis_rotated&&(l.value>0&&h<u||l.value<0&&u<h)&&(h=u);var g=[f,h-(u-d)];return[g,g,g,g]}},custom:{create:function(e,t,i){return e.append("use").attr("xlink:href","#".concat(t)).attr("class",this.updatePointClass.bind(this)).style("fill",i).node()},update:function(e,t,i,n,a,r,o){var s=this,l=It(e.node()),c=l.width,u=l.height,d=function(g){return te(g.value)?t(g)-c/2:0},f=function(g){return te(g.value)?i(g)-u/2:0},h=e;return a&&(r&&h.attr("x",d),h=s.$T(h,a,fi()),o&&s.$T(o,a,fi())),h.attr("x",d).attr("y",f).style("fill",n)}},circle:{create:function(e,t,i){return e.append("circle").attr("class",this.updatePointClass.bind(this)).attr("r",t).style("fill",i).node()},update:function(e,t,i,n,a,r,o){var s=this,l=e;return s.hasType("bubble")&&l.attr("r",s.pointR.bind(s)),a&&(r&&l.attr("cx",t),l.attr("cx")&&(l=s.$T(l,a,fi())),o&&s.$T(l,a,fi())),l.attr("cx",t).attr("cy",i).style("fill",n)}},rectangle:{create:function(e,t,i){var n=function(a){return t(a)*2};return e.append("rect").attr("class",this.updatePointClass.bind(this)).attr("width",n).attr("height",n).style("fill",i).node()},update:function(e,t,i,n,a,r,o){var s=this,l=s.config.point_r,c=function(f){return t(f)-l},u=function(f){return i(f)-l},d=e;return a&&(r&&d.attr("x",c),d=s.$T(d,a,fi()),o&&s.$T(o,a,fi())),d.attr("x",c).attr("y",u).style("fill",n)}}},hi={hasValidPointType:function(e){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(e||this.config.point_type)},hasLegendDefsPoint:function(){var e,t=this.config;return t.legend_show&&((e=t.point_pattern)===null||e===void 0?void 0:e.length)&&t.legend_usePoint},getDefsPointId:function(e){var t=this.state.datetimeId;return"".concat(t,"-point").concat(e)},getValidPointPattern:function(){var e=this.config,t=/^(circle|rect(angle)?)$/i.test(e.point_type)?e.point_type:"circle";return Se(e.point_pattern)?e.point_pattern:[t]},generatePoint:function(){var e=this,t=e.$el,i=e.config,n=[],a=e.getValidPointPattern();return function(r,o){for(var s=[],l=2;l<arguments.length;l++)s[l-2]=arguments[l];return function(c){var u,d,f,h,g=e.getTargetSelectorSuffix(c.id||((u=c.data)===null||u===void 0?void 0:u.id)||c),p=B(this);n.indexOf(g)<0&&n.push(g);var m=a[n.indexOf(g)%a.length];if(e.hasValidPointType(m))m=e[m];else if(!mA(m||i.point_type)){var v=e.getDefsPointId(g);if(t.defs.select("#".concat(v)).size()<1&&_A.call(e,m,v),r==="create")return(d=e.custom)===null||d===void 0?void 0:d.create.bind(o).apply(void 0,Ae([p,v],s,!1));if(r==="update")return(f=e.custom)===null||f===void 0?void 0:f.update.bind(o).apply(void 0,Ae([p],s,!1))}return(h=m[r])===null||h===void 0?void 0:h.bind(o).apply(void 0,Ae([p],s,!1))}}}},bv={initPolar:function(){var e=this,t=e.$el.arcs,i=e.config,n=i.polar_level_text_show,a=i.polar_level_text_backgroundColor;t.levels=t.append("g").attr("class",At.levels),n&&a&&e.generateTextBGColorFilter(a)},getPolarOuterRadius:function(e,t){var i,n=Nh(this);return((i=e?.data.values[0].value)!==null&&i!==void 0?i:0)/n*t},updateTargetsForPolar:function(e){this.updateTargetsForArc(e)},redrawPolar:function(){var e=this;e.config.polar_level_show&&e.updatePolarLevel()},updatePolarLevel:function(){var e=this,t=e.config,i=e.state,n=e.$el.arcs.levels,a=t.polar_level_depth,r=Nh(e),o=Rn(0,a),s=i.radius,l=o.map(function(g){return s*((g+1)/a)}),c=(t.polar_level_text_format||function(){}).bind(e.api),u=n.selectAll(".".concat(At.level)).data(o);u.exit().remove();var d=u.enter().append("g").attr("class",function(g,p){return"".concat(At.level," ").concat(At.level,"-").concat(p)});if(d.append("circle"),d.merge(u).selectAll("circle").style("visibility",t.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",function(g){return l[g]}),t.polar_level_text_show){var f=t.polar_level_text_backgroundColor,h="#".concat(i.datetimeId,"-labels-bg").concat(e.getTargetSelectorSuffix(f));d.append("text").style("text-anchor","middle"),d.merge(u).selectAll("text").attr("dy",function(g){return-l[g]+5}).attr("filter",f?"url(".concat(h,")"):null).text(function(g){return c(r/o.length*(g+1))})}}},gi=Te.radarPoints,Ns=Te.radarTextWidth,wv={initRadar:function(){var e=this,t=e.config,i=e.state.current,n=e.$el;e.hasType("radar")&&(n.radar=n.main.select(".".concat(Q.chart)).append("g").attr("class",ws.chartRadars),n.radar.levels=n.radar.append("g").attr("class",At.levels),n.radar.axes=n.radar.append("g").attr("class",Ee.axis),n.radar.shapes=n.radar.append("g").attr("class",be.shapes),i.dataMax=t.radar_axis_max||e.getMinMaxData().max[0].value,t.radar_axis_text_show&&(t.interaction_enabled&&e.bindRadarEvent(),e.updateRadarLevel(),e.updateRadarAxes()))},getRadarSize:function(){var e=this,t=e.config,i=e.state,n=i.arcWidth,a=i.arcHeight,r=t.axis_x_categories.length<4?-20:10,o=(Math.min(n,a)-r)/2;return[o,o]},updateTargetsForRadar:function(e){var t=this,i=t.config;Ze(i.axis_x_categories)&&(i.axis_x_categories=Rn(0,lt("max",e.map(function(n){return n.values.length})))),t.generateRadarPoints()},getRadarPosition:function(e,t,i,n){var a=this,r=a.config,o=a.getRadarSize(),s=o[0],l=o[1],c=r.axis_x_categories.length,u=r.radar_direction_clockwise,d=Bt(e).map(function(f){return xA(u,f,c,t,ve(i)?i:e==="x"?s:l,q(n)?n:r.radar_size_ratio)});return d.length===1?d[0]:d},generateRadarPoints:function(){var e=this,t=e.data.targets,i=e.getRadarSize(),n=i[0],a=i[1],r=e.cache.get(gi)||{},o=r._size;(!o||o.width!==n&&o.height!==a)&&(t.forEach(function(s){r[s.id]=s.values.map(function(l,c){return e.getRadarPosition(["x","y"],c,void 0,e.getRatio("radar",l))})}),r._size={width:n,height:a},e.cache.add(gi,r))},redrawRadar:function(){var e=this,t=e.$el,i=t.radar,n=t.main,a=e.getTranslate("radar");a&&(i.attr("transform",a),n.select(".".concat(Ce.chartTexts)).attr("transform",a),e.generateRadarPoints(),e.updateRadarLevel(),e.updateRadarAxes(),e.updateRadarShape())},generateGetRadarPoints:function(){var e=this.cache.get(gi);return function(t,i){var n=e[t.id][i];return[n,n,n,n]}},updateRadarLevel:function(){var e=this,t=e.config,i=e.state,n=e.$el.radar,a=e.getRadarSize(),r=a[0],o=a[1],s=t.radar_level_depth,l=t.axis_x_categories.length,c=t.radar_level_text_show,u=n.levels,d=Rn(0,s),f=t.radar_size_ratio*Math.min(r,o),h=d.map(function(_){return f*((_+1)/s)}),g=(t.radar_level_text_format||function(){}).bind(e.api),p=d.map(function(_){var x=h[_];return Rn(0,l).map(function(y){return e.getRadarPosition(["x","y"],y,x,1).join(",")}).join(" ")}),m=u.selectAll(".".concat(At.level)).data(d);m.exit().remove();var v=m.enter().append("g").attr("class",function(_,x){return"".concat(At.level," ").concat(At.level,"-").concat(x)});v.append("polygon").style("visibility",t.radar_level_show?null:"hidden"),c&&(u.select("text").empty()&&u.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(function(){return g(0)}),v.append("text").attr("dx","-.5em").style("text-anchor","end").text(function(_){return g(i.current.dataMax/d.length*(_+1))})),v.merge(m).attr("transform",function(_){return"translate(".concat(r-h[_],", ").concat(o-h[_],")")}).selectAll("polygon").attr("points",function(_){return p[_]}),c&&u.selectAll("text").attr("x",function(_){return we(_)?r:p[_].split(",")[0]}).attr("y",function(_){return we(_)?o:0})},updateRadarAxes:function(){var e=this,t=e.config,i=e.$el.radar,n=e.getRadarSize(),a=n[0],r=n[1],o=t.axis_x_categories,s=i.axes.selectAll("g").data(o);s.exit().remove();var l=s.enter().append("g").attr("class",function(m,v){return"".concat(Ee.axis,"-").concat(v)});if(t.radar_axis_line_show&&l.append("line"),t.radar_axis_text_show&&l.append("text"),s=l.merge(s),t.radar_axis_line_show&&s.select("line").attr("x1",a).attr("y1",r).attr("x2",function(m,v){return e.getRadarPosition("x",v)}).attr("y2",function(m,v){return e.getRadarPosition("y",v)}),t.radar_axis_text_show){var c=t.radar_axis_text_position,u=c.x,d=u===void 0?0:u,f=c.y,h=f===void 0?0:f,g=e.cache.get(Ns)||0;if(s.select("text").style("text-anchor","middle").attr("dy",".5em").call(function(m){m.each(function(v){Ni(B(this),String(v),[-.6,1.2])})}).datum(function(m,v){return{index:v}}).attr("transform",function(m){we(this.width)&&(this.width=Le(this,!0).width/2);var v=e.getRadarPosition("x",m.index,void 0,1),_=Math.round(e.getRadarPosition("y",m.index,void 0,1));return v>a?v+=this.width+d:Math.round(v)<a&&(v-=this.width+d),_>r?(_/2===r&&this.firstChild.tagName==="tspan"&&this.firstChild.setAttribute("dy","0em"),_+=h):_<r&&(_-=h),"translate(".concat(v," ").concat(_,")")}),!g){var p=[i.axes,i.levels].map(function(m){return rh(m.node()).width});p.every(function(m){return m>0})&&e.cache.add(Ns,p[0]-p[1])}}},bindRadarEvent:function(){var e=this,t=e.config,i=e.state,n=e.$el,a=n.radar,r=n.svg,o=e.isPointFocusOnly(),s=i.inputType,l=i.transiting,c=s==="mouse",u=function(d){if(i.event=d,!!t.interaction_onout){var f=e.getDataIndexFromEvent(d),h=we(f);(c||h)&&(e.hideTooltip(),o?e.hideCircleFocus():e.unexpandCircles(),c?e.setOverOut(!1,f):h&&e.callOverOutForTouch())}};a.axes.on(c?"mouseover ":"touchstart",function(d){if(!l){i.event=d;var f=e.getDataIndexFromEvent(d);e.selectRectForSingle(r.node(),f),c?e.setOverOut(!0,f):e.callOverOutForTouch(f)}},c?void 0:{passive:!0}).on("mouseout",c?u:null),c||r.on("touchstart",u,{passive:!0})},updateRadarShape:function(){var e=this,t=e.data.targets.filter(function(r){return e.isRadarType(r)}),i=e.cache.get(gi),n=e.$el.radar.shapes.selectAll("polygon").data(e.filterNullish(t)),a=n.enter().append("g").attr("class",e.getChartClass("Radar"));e.$T(n.exit()).remove(),a.append("polygon").merge(n).style("fill",e.color).style("stroke",e.color).attr("points",function(r){return i[r.id].join(" ")}),e.updateTargetForCircle(t,a)},radarCircleX:function(e){return this.cache.get(gi)[e.id][e.index][0]},radarCircleY:function(e){return this.cache.get(gi)[e.id][e.index][1]}},Tv={initTreemap:function(){var e=this,t=e.$el,i=e.state,n=i.current,a=n.width,r=n.height,o=i.clip,s=i.datetimeId;o.id="".concat(s,"-clip"),e.treemap=n$().tile(e.getTreemapTile()),t.defs.append("clipPath").attr("id",o.id).append("rect").attr("width",a).attr("height",r),t.treemap=t.main.select(".".concat(Q.chart)).attr("clip-path","url(#".concat(o.id,")")).append("g").classed($s.chartTreemaps,!0),e.bindTreemapEvent()},bindTreemapEvent:function(){var e=this,t=e.$el,i=e.config,n=e.state,a=function(o){var s,l=o.isTrusted?o.target:(s=n.eventReceiver.rect)===null||s===void 0?void 0:s.node(),c;return/^rect$/i.test(l.tagName)&&(n.event=o,c=B(l).datum()),c?.data};if(i.interaction_enabled){var r=n.inputType==="touch";t.treemap.on(r?"touchstart":"mouseover mousemove",function(o){var s=a(o);s&&(e.showTooltip([s],o.currentTarget),/^(touchstart|mouseover)$/.test(o.type)&&e.setOverOut(!0,s))},r?{passive:!0}:void 0).on(r?"touchend":"mouseout",function(o){var s=a(o);i.interaction_onout&&(e.hideTooltip(),e.setOverOut(!1,s))})}},getTreemapTile:function(){var e,t,i=this,n=i.config,a=i.state.current,r=a.width,o=a.height,s=(t={binary:Kf,dice:er,slice:ir,sliceDice:o$,squarify:rs,resquarify:Qf}[(e=n.treemap_tile)!==null&&e!==void 0?e:"binary"])!==null&&t!==void 0?t:Kf;return function(l,c,u,d,f){s(l,0,0,r,o);for(var h=0,g=l.children;h<g.length;h++){var p=g[h];p.x0=c+p.x0/r*(d-c),p.x1=c+p.x1/r*(d-c),p.y0=u+p.y0/o*(f-u),p.y1=u+p.y1/o*(f-u)}}},getTreemapData:function(e){var t=this;return{name:"root",children:bA.bind(t)(t.filterTargetsToShow(e.filter(t.isTreemapType,t)))}},updateTargetsForTreemap:function(e){var t=this,i=t.$el.treemap,n=wA.call(t,t.getTreemapData(e??t.data.targets));i.data(t.filterNullish(n))},updateTreemap:function(e){var t=this,i=t.$el,n=t.$T,a=i.treemap.datum(),r=t.getChartClass("Treemap"),o=t.getClass("treemap",!0),s=i.treemap.selectAll("g").data(a.children);n(s.exit(),e).style("opacity","0").remove(),s.enter().append("g").append("rect"),i.treemap.selectAll("g").attr("class",r).select("rect").attr("class",o).attr("fill",function(l){return t.color(l.data.name)})},generateGetTreemapPoints:function(){var e=this,t=e.$el,i=e.scale,n=i.x,a=i.y,r={};return t.treemap.selectAll("g").each(function(o){r[o.data.name]=[[n(o.x0),a(o.y0)],[n(o.x1),a(o.y1)]]}),function(o){return r[o.id]}},redrawTreemap:function(e){var t=this,i=t.$el,n=t.state.current,a=n.width,r=n.height;return i.defs.select("rect").attr("width",a).attr("height",r),[t.$T(i.treemap,e,mt()).call(yA.bind(t),i.treemap.datum())]},treemapDataLabelFormat:function(e){var t=this,i=t.$el.treemap,n=t.config,a=t.scale,r=a.x,o=a.y,s=e.id,l=e.value,c=n.treemap_label_format,u=t.getRatio("treemap",e),d=(u*100).toFixed(2),f=n.treemap_label_show&&_s.call(t,u,"treemap")?null:"0",h=i.selectAll("g").filter(function(y){return y.data.id===s}).datum(),g=0,p=0;if(h){var m=h.x0,v=h.x1,_=h.y0,x=h.y1;g=r(v)-r(m),p=o(x)-o(_)}return function(y){return y.style("opacity",f),H(c)?c.bind(t.api)(l,u,s,{width:g,height:p}):"".concat(s,`
41
+ `).concat(d,"%")}}},Gt={point_show:!0,point_r:2.5,point_radialGradient:!1,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_focus_only:!1,point_opacity:void 0,point_pattern:[],point_select_r:void 0,point_type:"circle"},vi={area_above:!1,area_below:!1,area_front:!0,area_linearGradient:!1,area_zerobased:!0},$v={bar_connectLine:!1,bar_front:!1,bar_indices_removeNull:!1,bar_label_threshold:0,bar_linearGradient:!1,bar_overlap:!1,bar_padding:0,bar_radius:void 0,bar_radius_ratio:void 0,bar_sensitivity:2,bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0},Av={bubble_maxR:35,bubble_zerobased:!1},Sv={candlestick_width:void 0,candlestick_width_ratio:.6,candlestick_width_max:void 0,candlestick_color_down:"red"},kv={line_connectNull:!1,line_step_type:"step",line_step_tooltipMatch:!1,line_zerobased:!1,line_classes:void 0,line_point:!0},Ev={scatter_zerobased:!1},hr={spline_interpolation_type:"cardinal"},Ln={arc_cornerRadius:0,arc_cornerRadius_ratio:0,arc_needle_show:!1,arc_needle_color:void 0,arc_needle_value:void 0,arc_needle_path:void 0,arc_needle_length:100,arc_needle_top_rx:0,arc_needle_top_ry:0,arc_needle_top_width:0,arc_needle_bottom_rx:1,arc_needle_bottom_ry:1,arc_needle_bottom_width:15,arc_needle_bottom_len:0,arc_rangeText_values:void 0,arc_rangeText_unit:"absolute",arc_rangeText_fixed:!1,arc_rangeText_format:void 0,arc_rangeText_position:void 0},Cv={donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_line:!1,donut_label_image:void 0,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_rate:.98,donut_expand_duration:50,donut_padAngle:0,donut_startingAngle:0},Rv={funnel_neck_width:0,funnel_neck_height:0},Mv={gauge_background:"",gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_extents:void 0,gauge_label_format:void 0,gauge_label_ratio:void 0,gauge_label_threshold:0,gauge_label_line:!1,gauge_label_image:void 0,gauge_enforceMinMax:!1,gauge_min:0,gauge_max:100,gauge_type:"single",gauge_startingAngle:-1*Math.PI/2,gauge_arcLength:100,gauge_title:"",gauge_units:void 0,gauge_width:void 0,gauge_arcs_minWidth:5,gauge_expand:{},gauge_expand_rate:.98,gauge_expand_duration:50},Lv={pie_label_show:!0,pie_label_format:void 0,pie_label_ratio:void 0,pie_label_threshold:.05,pie_label_line:!1,pie_label_image:void 0,pie_expand:{},pie_expand_rate:.98,pie_expand_duration:50,pie_innerRadius:0,pie_outerRadius:void 0,pie_padAngle:0,pie_padding:0,pie_startingAngle:0},Pv={polar_label_show:!0,polar_label_format:void 0,polar_label_threshold:.05,polar_label_line:!1,polar_label_image:void 0,polar_label_ratio:void 0,polar_level_depth:3,polar_level_max:void 0,polar_level_show:!0,polar_level_text_backgroundColor:"#fff",polar_level_text_format:function(e){return e%1===0?e:e.toFixed(2)},polar_level_text_show:!0,polar_padAngle:0,polar_padding:0,polar_startingAngle:0},Dv={radar_axis_max:void 0,radar_axis_line_show:!0,radar_axis_text_show:!0,radar_axis_text_position:{},radar_level_depth:3,radar_level_show:!0,radar_level_text_format:function(e){return e%1===0?e:e.toFixed(2)},radar_level_text_show:!0,radar_size_ratio:.87,radar_direction_clockwise:!1},Fv={treemap_tile:"binary",treemap_label_format:void 0,treemap_label_threshold:.05,treemap_label_show:!0},Bs=function(){return $t(di,[vi]),(Bs=function(){return G.AREA})()},Xs=function(){return $t(di,[vi]),(Xs=function(){return G.AREA_LINE_RANGE})()},Vs=function(){return $t(di,[vi]),(Vs=function(){return G.AREA_STEP_RANGE})()},Gs=function(){return $t(di,[vi,hr]),(Gs=function(){return G.AREA_SPLINE})()},Us=function(){return $t(di,[vi,hr]),(Us=function(){return G.AREA_SPLINE_RANGE})()},Hs=function(){return $t(di,[vi]),(Hs=function(){return G.AREA_STEP})()},Ws=function(){return $t(),(Ws=function(){return G.LINE})()},Ys=function(){return $t(void 0,[hr]),(Ys=function(){return G.SPLINE})()},js=function(){return $t(),(js=function(){return G.STEP})()},Zs=function(){return Gi(void 0,[Ln,Cv]),(Zs=function(){return G.DONUT})()},qs=function(){return Gi([xv],[Ln,Mv]),(qs=function(){return G.GAUGE})()},Ks=function(){return Gi(void 0,[Ln,Lv]),(Ks=function(){return G.PIE})()},Qs=function(){return Gi([bv],[Ln,Pv]),(Qs=function(){return G.POLAR})()},Js=function(){return Gi([Fs.eventrect,Mn,wv],[Gt,Dv,{axis_x_categories:zs.optAxis.axis_x_categories}]),(Js=function(){return G.RADAR})()},el=function(){return Vi([vv,hi],[$v,Gt]),(el=function(){return G.BAR})()},tl=function(){return Vi([hi,Mn,pv],[Av,Gt]),(tl=function(){return G.BUBBLE})()},il=function(){return Vi([mv,hi],[Sv,Gt]),(il=function(){return G.CANDLESTICK})()},nl=function(){return Vi([hi,Mn],[Gt,Ev]),(nl=function(){return G.SCATTER})()},al=function(){return Gi([_v],[Rv]),(al=function(){return G.FUNNEL})()},rl=function(){return Vi([Tv],[Fv]),(rl=function(){return G.TREEMAP})()},zv={selected:function(e){var t=this.internal,i=[];return t.$el.main.selectAll(".".concat(be.shapes+t.getTargetSelectorSuffix(e))).selectAll(".".concat(be.shape)).filter(function(){return B(this).classed(_e.SELECTED)}).each(function(n){return i.push(n)}),i},select:function(e,t,i){var n=this.internal;Bh.bind(n)(!0,e,t,i)},unselect:function(e,t){var i=this.internal;Bh.bind(i)(!1,e,t)}},ol=function(e){var t,i=this.internal,n=i.axis,a=i.brush,r=i.config,o=i.scale,s=o.x,l=o.subX,c=i.state,u;return r.subchart_show&&(u=e,Array.isArray(u)?(n.isTimeSeries()&&(u=u.map(function(d){return Je.bind(i)(d)})),i.withinRange(u,i.getZoomDomain("subX",!0),i.getZoomDomain("subX"))&&(c.domain=u,a.move(a.getSelection(),u.map(l)))):u=(t=c.domain)!==null&&t!==void 0?t:s.orgDomain()),u},Pe(ol,{show:function(){var e,t,i=this.internal,n=i.$el.subchart,a=i.config,r=a.subchart_show;if(!r){i.unbindZoomEvent(),a.subchart_show=!r,!n.main&&i.initSubchart();var o=n.main.selectAll(".".concat(Q.target));i.data.targets.length!==o.size()&&(i.updateSizes(),i.updateTargetsForSubchart(i.data.targets),o=(e=n.main)===null||e===void 0?void 0:e.selectAll(".".concat(Q.target))),o?.style("opacity",null),(t=n.main)===null||t===void 0||t.style("display",null),this.resize()}},hide:function(){var e=this.internal,t=e.$el.subchart.main,i=e.config;i.subchart_show&&t?.style("display")!=="none"&&(i.subchart_show=!1,t.style("display","none"),this.resize())},toggle:function(){var e=this.internal.config;this.subchart[e.subchart_show?"hide":"show"]()},reset:function(){var e=this.internal.brush;e.clear(e.getSelection())}}),Iv={subchart:ol},sl=function(e){var t,i=this.internal,n=i.axis,a=i.config,r=i.org,o=i.scale,s=i.state,l=n.isCategorized(),c;if(a.zoom_enabled)if(c=e,Array.isArray(c)){if(n.isTimeSeries()&&(c=c.map(function(d){return Je.bind(i)(d)})),i.withinRange(c,i.getZoomDomain("zoom",!0),i.getZoomDomain("zoom"))){if(s.domain=c,c=i.getZoomDomainValue(c),i.api.tooltip.hide(),a.subchart_show){var u=o.zoom||o.x;i.brush.getSelection().call(i.brush.move,c.map(u))}else{var u=l?o.x.orgScale():r.xScale||o.x;i.updateCurrentZoomTransform(u,c)}i.setZoomResetButton()}}else c=i.zoom.getDomain();return(t=s.domain)!==null&&t!==void 0?t:c},Pe(sl,{enable:function(e){var t=this.internal,i=t.config;/^(drag|wheel)$/.test(e)&&(i.zoom_type=e),i.zoom_enabled=!!e,t.zoom?e===!1&&t.bindZoomEvent(!1):(t.initZoom(),t.bindZoomEvent()),t.updateAndRedraw()},max:function(e){var t=this.internal,i=t.config,n=t.org.xDomain;return(e===0||e)&&(i.zoom_x_max=lt("max",[n[1],e])),i.zoom_x_max},min:function(e){var t=this.internal,i=t.config,n=t.org.xDomain;return(e===0||e)&&(i.zoom_x_min=lt("min",[n[0],e])),i.zoom_x_min},range:function(e){var t=this.zoom;if(ce(e)){var i=e.min,n=e.max;ve(i)&&t.min(i),ve(n)&&t.max(n)}return{min:t.min(),max:t.max()}}}),Ov={zoom:sl,unzoom:function(){var e=this.internal,t=e.config,i=e.$el,n=i.eventRect,a=i.zoomResetBtn,r=e.scale.zoom,o=e.state;r&&(t.subchart_show?e.brush.getSelection().call(e.brush.move,null):e.zoom.updateTransformScale(st),e.updateZoom(!0),a?.style("display","none"),ss(n.node())!==st&&e.zoom.transform(n,st),o.domain=void 0)}},Nv={initBrush:function(){var e=this,t=e.config,i=e.scale,n=e.$el.subchart,a=e.state,r=t.axis_rotated,o=t.subchart_size_height,s,l,c;e.brush=(r?mw():pw()).handleSize(5),e.brush.on("start brush end",function(u){var d=u.selection,f=u.sourceEvent,h=u.target,g=u.type;g==="start"&&(e.state.inputType==="touch"&&e.hideTooltip(),l=f?d:null),/(start|brush)/.test(g)&&(g==="brush"&&f&&a.domain&&l?.forEach(function(p,m){p!==d[m]&&(a.domain[m]=i.x.orgDomain()[m])}),e.redrawForBrush(g!=="start")),g==="end"&&(s=i.x.orgDomain()),h?.handle&&(d===null?e.brush.handle.attr("display","none"):e.brush.handle.attr("display",null).attr("transform",function(p,m){var v=[d[m],o/2];return"translate(".concat(r?v.reverse():v,")")}))}),e.brush.updateResize=function(){var u=this;c&&clearTimeout(c),c=setTimeout(function(){var d=u.getSelection();s&&kd(d.node())&&u.move(d,s.map(i.subX.orgScale()))},0)},e.brush.update=function(){var u;return this.extent()()[1].filter(function(d){return isNaN(d)}).length===0&&((u=n.main)===null||u===void 0||u.select(".".concat(ue.brush)).call(this)),this},e.brush.scale=function(u){var d=t.subchart_size_height,f=e.axis.getExtent();!f&&u.range?f=[[0,0],[u.range()[1],d]]:de(f)&&(f=f.map(function(h,g){return[h,g>0?d:g]})),r&&f[1].reverse(),this.extent(f),this.update()},e.brush.getSelection=function(){return n.main?n.main.select(".".concat(ue.brush)):B([])}},initSubchart:function(){var e=this,t=e.config,i=e.state,n=i.clip,a=i.hasAxis,r=e.$el,o=r.defs,s=r.svg,l=r.subchart,c=r.axis;if(a){var u=t.subchart_show?null:"hidden",d="".concat(n.id,"-subchart"),f=e.getClipPath(d);n.idSubchart=d,e.appendClip(o,d),e.initBrush(),l.main=s.append("g").classed(ue.subchart,!0).attr("transform",e.getTranslate("context"));var h=l.main;h.style("visibility",u),h.append("g").attr("clip-path",f).attr("class",ue.chart),["bar","line","bubble","candlestick","scatter"].forEach(function(p){var m=Ne(/^(bubble|scatter)$/.test(p)?"circle":p);if(e.hasType(p)||e.hasTypeOf(m)){var v=h.select(".".concat(ue.chart)),_=ue["chart".concat(m,"s")];v.select(".".concat(_)).empty()&&v.append("g").attr("class",_)}});var g=h.append("g").attr("clip-path",f).attr("class",ue.brush).call(e.brush);t.subchart_showHandle&&e.addBrushHandle(g),c.subX=h.append("g").attr("class",ue.axisX).attr("transform",e.getTranslate("subX")).attr("clip-path",t.axis_rotated?"":n.pathXAxis).style("visibility",t.subchart_axis_x_show?u:"hidden")}},addBrushHandle:function(e){var t=this,i=t.config,n=i.axis_rotated,a=i.subchart_init_range,r="handle--custom",o=n?["M8.5 0 a6 6 0 0 0 -6 -6.5 H-2.5 a 6 6 0 0 0 -6 6.5 z m-5 -2 H-3.5 m7 -2 H-3.5z","M8.5 0 a6 -6 0 0 1 -6 6.5 H-2.5 a 6 -6 0 0 1 -6 -6.5z m-5 2 H-3.5 m7 2 H-3.5z"]:["M0 -8.5 A6 6 0 0 0 -6.5 -3.5 V2.5 A6 6 0 0 0 0 8.5 Z M-2 -3.5 V3.5 M-4 -3.5 V3.5z","M0 -8.5 A6 6 0 0 1 6.5 -3.5 V2.5 A6 6 0 0 1 0 8.5 Z M2 -3.5 V3.5 M4 -3.5 V3.5z"];t.brush.handle=e.selectAll(".".concat(r)).data(n?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class",r).attr("cursor","".concat(n?"ns":"ew","-resize")).attr("d",function(s){return o[+/[se]/.test(s.type)]}).attr("display",a?null:"none")},updateTargetsForSubchart:function(e){var t=this,i=t.config,n=t.state,a=t.$el.subchart.main;i.subchart_show&&(["bar","line","bubble","candlestick","scatter"].filter(function(r){return t.hasType(r)||t.hasTypeOf(Ne(r))}).forEach(function(r){var o=/^(bubble|scatter)$/.test(r),s=Ne(o?"circle":r),l=t.getChartClass(s,!0),c=t.getClass(o?"circles":"".concat(r,"s"),!0),u=a.select(".".concat(ue["chart".concat("".concat(s,"s"))]));if(o){var d=u.selectAll(".".concat(ue.circles)).data(e.filter(t["is".concat(Ne(r),"Type")].bind(t))).attr("class",c);d.exit().remove(),d.enter().append("g").attr("class",c)}else{var f=u.selectAll(".".concat(ue["chart".concat(s)])).attr("class",l).data(e.filter(t["is".concat(s,"Type")].bind(t))),h=f.enter().append("g").style("opacity","0").attr("class",l).append("g").attr("class",c);f.exit().remove(),r==="line"&&t.hasTypeOf("Area")&&h.append("g").attr("class",t.getClass("areas",!0))}}),a.selectAll(".".concat(ue.brush," rect")).attr(i.axis_rotated?"width":"height",i.axis_rotated?n.width2:n.height2))},redrawSubchart:function(e,t,i){var n,a=this,r=a.config,o=a.$el.subchart.main,s=a.state,l=!!t;if(o.style("visibility",r.subchart_show?null:"hidden"),r.subchart_show&&(((n=s.event)===null||n===void 0?void 0:n.type)==="zoom"&&a.brush.update(),e)){var c=r.subchart_init_range;if(!sh(a)&&a.brush.update(),Object.keys(i.type).forEach(function(f){var h=Ne(f),g=a["generateDraw".concat(h)](i.indices[f],!0);a["update".concat(h)](l,!0),a["redraw".concat(h)](g,l,!0)}),a.hasType("bubble")||a.hasType("scatter")){var u=i.pos.cx,d=a.updateCircleY(!0);a.updateCircle(!0),a.redrawCircle(u,d,l,void 0,!0)}!s.rendered&&c&&(s.domain=c,a.brush.move(a.brush.getSelection(),c.map(a.scale.x)))}},redrawForBrush:function(e){var t;e===void 0&&(e=!0);var i=this,n=i.config,a=n.subchart_onbrush,r=n.zoom_rescale,o=i.scale,s=i.state;i.redraw({withTransition:!1,withY:r,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),e&&s.rendered&&a.bind(i.api)((t=s.domain)!==null&&t!==void 0?t:o.x.orgDomain())},transformContext:function(e,t){var i=this,n=i.$el.subchart,a=i.$T,r=t?.axisSubX?t.axisSubX:a(n.main.select(".".concat(ue.axisX)),e);n.main.attr("transform",i.getTranslate("context")),r.attr("transform",i.getTranslate("subX"))}},Bv={initZoom:function(){var e=this;e.scale.zoom=null,e.generateZoom(),e.config.zoom_type==="drag"&&e.initZoomBehaviour()},bindZoomEvent:function(e){e===void 0&&(e=!0);var t=this,i=t.config;i.zoom_enabled&&e?!i.subchart_show&&t.bindZoomOnEventRect():e===!1&&(t.api.unzoom(),t.unbindZoomEvent())},generateZoom:function(){var e=this,t=e.config,i=e.org,n=e.scale,a=x$().duration(0).on("start",e.onZoomStart.bind(e)).on("zoom",e.onZoom.bind(e)).on("end",e.onZoomEnd.bind(e));a.orgScaleExtent=function(){var r=t.zoom_extent||[1,10];return[r[0],Math.max(e.getMaxDataCount()/r[1],r[1])]},a.updateScaleExtent=function(){var r=Nt(e.scale.x.orgDomain())/Nt(e.getZoomDomain()),o=this.orgScaleExtent();return this.scaleExtent([o[0]*r,o[1]*r]),this},a.updateTransformScale=function(r,o){var s,l=t.axis_rotated;(s=i.xScale)===null||s===void 0||s.range(n.x.range());var c=r[l?"rescaleY":"rescaleX"](i.xScale||n.x);if(!c.domain().some(function(p){return/(Invalid Date|NaN)/.test(p.toString())})){var u=e.trimXDomain(c.domain()),d=t.zoom_rescale;if(c.domain(u,i.xDomain),o){var f=c(n.x.domain()[0]),h=l?r.x:f,g=l?f:r.y;e.$el.eventRect.property("__zoom",st.translate(h,g).scale(r.k))}n.zoom=e.getCustomizedXScale(c),e.axis.x.scale(n.zoom),d?(!i.xScale&&(i.xScale=n.x.copy()),n.x.domain(u)):i.xScale&&(n.x.domain(i.xScale.domain()),i.xScale=null)}},a.getDomain=function(){var r=n[n.zoom?"zoom":"subX"].domain();return e.axis.isCategorized()&&(r[1]-=2),r},e.zoom=a},onZoomStart:function(e){var t=this,i=e.sourceEvent;i&&(t.zoom.startEvent=i,t.state.zooming=!0,me(t.config.zoom_onzoomstart,t.api,e))},onZoom:function(e){var t=this,i=t.config,n=t.scale,a=t.state,r=t.org,o=e.sourceEvent,s=e?.transform===st;if(!(!i.zoom_enabled||t.filterTargetsToShow(t.data.targets).length===0||!n.zoom&&o?.type.indexOf("touch")>-1&&o?.touches.length===1)){e.sourceEvent&&(a.zooming=!0,a.domain=void 0);var l=o?.type==="mousemove",c=o?.wheelDelta<0,u=e.transform;!l&&c&&n.x.domain().every(function(g,p){return g!==r.xDomain[p]})&&n.x.domain(r.xDomain),t.zoom.updateTransformScale(u,i.zoom_type==="wheel"&&o);var d=i.transition_duration>0&&!i.subchart_show&&(a.dragging||s||!e.sourceEvent),f=o&&l&&i.zoom_type!=="wheel",h=function(){var g;t.redraw({withTransition:d,withY:i.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),t.state.cancelClick=l,!s&&me(i.zoom_onzoom,t.api,(g=t.state.domain)!==null&&g!==void 0?g:t.zoom.getDomain())};f?fh(t.state,h):h()}},onZoomEnd:function(e){var t,i,n=this,a=n.config,r=n.state,o=n.zoom.startEvent,s=e?.sourceEvent,l=e?.transform===st;o?.type.indexOf("touch")>-1&&(o=o.changedTouches[0],s=(t=s?.changedTouches)===null||t===void 0?void 0:t[0]),!(a.zoom_type==="drag"&&s&&o.clientX===s.clientX&&o.clientY===s.clientY)&&(r.zooming=!1,n.redrawEventRect(),n.updateZoom(),!l&&(s||r.dragging)&&me(a.zoom_onzoomend,n.api,(i=n.state.domain)!==null&&i!==void 0?i:n.zoom.getDomain()))},updateZoom:function(e){var t=this,i=t.scale,n=i.subX,a=i.x,r=i.zoom;if(r){var o=r.domain(),s=n.domain(),l=.015,c=t.config.axis_x_inverted?(o[0]>=s[0]||o[0]+l>=s[0])&&(s[1]>=o[1]||s[1]>=o[1]+l):(o[0]<=s[0]||o[0]-l<=s[0])&&(s[1]<=o[1]||s[1]<=o[1]-l);(e||c)&&(t.axis.x.scale(n),a.domain(n.orgDomain()),t.scale.zoom=null)}},updateCurrentZoomTransform:function(e,t){var i,n=this,a=n.$el.eventRect,r=n.config.axis_rotated,o=[-e(t[0]),0],s=(i=st.scale(e.range()[1]/(e(t[1])-e(t[0])))).translate.apply(i,r?o.reverse():o);a.call(n.zoom.transform,s)},bindZoomOnEventRect:function(){var e,t=this,i=t.config,n=t.$el,a=n.eventRect,r=n.svg,o=i.zoom_type==="drag"?t.zoomBehaviour:t.zoom;ee.GestureEvent&&/^((?!chrome|android|mobile).)*safari/i.test((e=ee.navigator)===null||e===void 0?void 0:e.userAgent)&&r.on("wheel",function(){}),a?.call(o).on("dblclick.zoom",null)},initZoomBehaviour:function(){var e=this,t=e.config,i=e.state,n=t.axis_rotated,a=0,r=0,o,s,l={axis:n?"y":"x",attr:n?"height":"width",index:n?1:0};e.zoomBehaviour=$u().clickDistance(4).on("start",function(c){s=e.scale.zoom?null:e.axis.getExtent(),i.event=c,e.setDragStatus(!0),e.unselectRect(),o||(o=e.$el.main.append("rect").attr("clip-path",i.clip.path).attr("class",cr.zoomBrush).attr("width",n?i.width:0).attr("height",n?0:i.height)),a=Qe(c,this)[l.index],s&&(a<s[0]?a=s[0]:a>s[1]&&(a=s[1])),r=a,o.attr(l.axis,a).attr(l.attr,0),e.onZoomStart(c)}).on("drag",function(c){r=Qe(c,this)[l.index],s&&(r>s[1]?r=s[1]:r<s[0]&&(r=s[0])),o.attr(l.axis,Math.min(a,r)).attr(l.attr,Math.abs(r-a))}).on("end",function(c){var u,d=e.scale.zoom||e.scale.x;i.event=c,o.attr(l.axis,0).attr(l.attr,0),a>r&&(u=[r,a],a=u[0],r=u[1]),a<0&&(r+=Math.abs(a),a=0),a!==r&&e.api.zoom([a,r].map(function(f){return d.invert(f)})),e.setDragStatus(!1)})},setZoomResetButton:function(){var e=this,t=e.config,i=e.$el,n=t.zoom_resetButton;n&&t.zoom_type==="drag"&&(i.zoomResetBtn?i.zoomResetBtn.style("display",null):i.zoomResetBtn=e.$el.chart.append("div").classed(Q.button,!0).append("span").on("click",function(){H(n.onclick)&&n.onclick.bind(e.api)(this),e.api.unzoom()}).classed(cr.buttonZoomReset,!0).text(n.text||"Reset Zoom"))},getZoomTransform:function(){var e=this.$el.eventRect;return e?.node()?ss(e.node()):{k:1}}},Xv=J(J({},{drag:function(e){var t=this,i=t.config,n=t.state,a=t.$el.main,r=i.data_selection_grouped,o=i.interaction_enabled&&i.data_selection_isselectable;if(!(t.hasArcType()||!i.data_selection_enabled||i.zoom_enabled&&!t.zoom.altDomain||!i.data_selection_multiple)){var s=n.dragStart||[0,0],l=s[0],c=s[1],u=e[0],d=e[1],f=Math.min(l,u),h=Math.max(l,u),g=r?n.margin.top:Math.min(c,d),p=r?n.height:Math.max(c,d),m=function(){!t||!t.$el||!t.$el.main||(a.select(".".concat(Ot.dragarea)).attr("x",f).attr("y",g).attr("width",h-f).attr("height",p-g),a.selectAll(".".concat(be.shapes)).selectAll(".".concat(be.shape)).filter(function(v){return o?.bind(t.api)(v)}).each(function(v,_){var x=B(this),y=x.classed(_e.SELECTED),$=x.classed(Ot.INCLUDED),T=!1,A;if(x.classed(Oe.circle)){var S=+x.attr("cx")*1,R=+x.attr("cy")*1;A=t.togglePoint,T=f<S&&S<h&&g<R&&R<p}else if(x.classed(He.bar)){var C=rh(this),S=C.x,R=C.y,E=C.width,k=C.height;A=t.togglePath,T=!(h<S||S+E<f)&&!(p<R||R+k<g)}else return;T^$&&(x.classed(Ot.INCLUDED,!$),x.classed(_e.SELECTED,!y),A.call(t,!y,x,v,_))}))};fh(t.state,m)}},dragstart:function(e){var t=this,i=t.config,n=t.state,a=t.$el.main;t.hasArcType()||!i.data_selection_enabled||(n.dragStart=e,a.select(".".concat(Q.chart)).append("rect").attr("class",Ot.dragarea).style("opacity","0.1"),t.setDragStatus(!0))},dragend:function(){var e=this,t=e.config,i=e.$el.main,n=e.$T;e.hasArcType()||!t.data_selection_enabled||(n(i.select(".".concat(Ot.dragarea))).style("opacity","0").remove(),i.selectAll(".".concat(be.shape)).classed(Ot.INCLUDED,!1),e.setDragStatus(!1))}}),{selectPoint:function(e,t,i){var n=this,a=n.config,r=n.$el.main,o=n.$T,s=a.axis_rotated,l=(s?n.circleY:n.circleX).bind(n),c=(s?n.circleX:n.circleY).bind(n),u=n.pointSelectR.bind(n);me(a.data_onselected,n.api,t,e.node()),o(r.select(".".concat(_e.selectedCircles).concat(n.getTargetSelectorSuffix(t.id))).selectAll(".".concat(_e.selectedCircle,"-").concat(i)).data([t]).enter().append("circle").attr("class",function(){return n.generateClass(_e.selectedCircle,i)}).attr("cx",l).attr("cy",c).attr("stroke",n.color).attr("r",function(d){return n.pointSelectR(d)*1.4})).attr("r",u)},unselectPoint:function(e,t,i){var n=this,a=n.config,r=n.$el.main,o=n.$T;me(a.data_onunselected,n.api,t,e?.node()),o(r.select(".".concat(_e.selectedCircles).concat(n.getTargetSelectorSuffix(t.id))).selectAll(".".concat(_e.selectedCircle,"-").concat(i))).attr("r",0).remove()},togglePoint:function(e,t,i,n){var a="".concat(e?"":"un","selectPoint");this[a](t,i,n)},selectPath:function(e,t){var i=this,n=i.config;me(n.data_onselected,i.api,t,e.node()),n.interaction_brighten&&e.style("filter","brightness(1.25)")},unselectPath:function(e,t){var i=this,n=i.config;me(n.data_onunselected,i.api,t,e.node()),n.interaction_brighten&&e.style("filter",null)},togglePath:function(e,t,i,n){this["".concat(e?"":"un","selectPath")](t,i,n)},getToggle:function(e,t){var i=this;return e.nodeName==="path"?i.togglePath:i.isStepType(t)?function(){}:i.togglePoint},toggleShape:function(e,t,i){var n,a=this,r=a.config,o=a.$el.main;if(r.data_selection_enabled&&r.data_selection_isselectable.bind(a.api)(t)){var s=B(e),l=s.classed(_e.SELECTED),c=a.getToggle(e,t).bind(a),u;if(!r.data_selection_multiple){var d=(n=a.isPointFocusOnly)===null||n===void 0?void 0:n.call(a),f=".".concat(d?_e.selectedCircles:be.shapes);r.data_selection_grouped&&(f+=a.getTargetSelectorSuffix(t.id)),o.selectAll(f).selectAll(d?".".concat(_e.selectedCircle):".".concat(be.shape,".").concat(_e.SELECTED)).classed(_e.SELECTED,!1).each(function(h){var g=B(this);u=g,c(!1,g,h,h.index)})}(!u||u.node()!==s.node())&&(s.classed(_e.SELECTED,!l),c(!l,s,t,i))}}}),Vv={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return!0},data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:function(){},data_onunselected:function(){}},Gv={subchart_show:!1,subchart_showHandle:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:function(){}},Uv={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0},ll=function(){return Pe(Vt.prototype,Xv),Pe(ui.prototype,zv),Xt.setOptions([Vv]),(ll=function(){return!0})()},cl=function(){return Pe(Vt.prototype,Nv),Pe(ui.prototype,Iv),Xt.setOptions([Gv]),(cl=function(){return!0})()},ul=function(){return Pe(Vt.prototype,Bv),Pe(ui.prototype,Ov),Xt.setOptions([Uv]),(ul=function(){return!0})()},gr=Object.create(null),dl={version:"3.18.0",generate:function(e){var t=new ui(Bi(Object.create(null),gr,e));return t.internal.charts=this.instance,this.instance.push(t),t},defaults:function(e){return ce(e)&&(gr=e),gr},instance:[],plugin:{}}})),Hv,Wv,Yv,jv,Zv,$A=b((()=>{Hv=e=>Array.isArray(e?.MsgQueue)?e.MsgQueue:[],Wv=(e,t)=>{switch(e){case"arabicPeriod":return`${t}. `;case"arabicParenR":return`${t}) `;case"alphaLcParenR":return`${String.fromCharCode(t+96)}) `;case"alphaLcPeriod":return`${String.fromCharCode(t+96)}. `;case"alphaUcParenR":return`${String.fromCharCode(t+64)}) `;case"alphaUcPeriod":return`${String.fromCharCode(t+64)}. `;default:return String(t)}},Yv=e=>{const t=[...Array.from(e.querySelectorAll(".block")),...Array.from(e.querySelectorAll("table td"))];for(const i of t){const n=Array.from(i.querySelectorAll(".numeric-bullet-style")),a=new Map;for(const r of n){const o=String(r.dataset.bulltname||"arabicPeriod"),s=`${String(r.dataset.bulltlvl||"0")}:${o}`,l=(a.get(s)||0)+1;a.set(s,l),r.textContent=Wv(o,l)}}},jv=async e=>{var t;const i=e.data;if(!i?.chartID||!i.chartType||!i.chartData)return;const n=await Promise.resolve().then(()=>(TA(),w$)),a=await Promise.resolve().then(()=>(Vo(),rT)),r=n.default||n,{area:o,bar:s,line:l,pie:c,scatter:u}=n,d={bindto:`#${i.chartID}`},f=i.chartData,h={x:{tick:{format(g){var p,m;return((m=(p=f[0])===null||p===void 0?void 0:p.xlabels)===null||m===void 0?void 0:m[g])||g}}}};switch(i.chartType){case"lineChart":Object.assign(d,{data:{columns:f.map(g=>[g.key,...g.values.map(({y:p})=>p)]),type:l()},axis:h,interaction:{enabled:!0}});break;case"barChart":Object.assign(d,{data:{columns:f.map(g=>[g.key,...g.values.map(({y:p})=>p)]),type:s()},axis:{x:{tick:{multiline:!0,format(g){var p,m;return((m=(p=f[0])===null||p===void 0?void 0:p.xlabels)===null||m===void 0?void 0:m[g])||g}}}}});break;case"pieChart":case"pie3DChart":Object.assign(d,{data:{columns:Object.values(((t=f[0])===null||t===void 0?void 0:t.xlabels)||{}).map((g,p)=>{var m,v,_;return[g,(_=(v=(m=f[0])===null||m===void 0?void 0:m.values)===null||v===void 0?void 0:v[p])===null||_===void 0?void 0:_.y]}),type:c()}});break;case"areaChart":Object.assign(d,{data:{columns:f.map(g=>[g.key,...g.values.map(({y:p})=>p)]),type:o()},axis:h,interaction:{enabled:!0}});break;case"scatterChart":Object.assign(d,{data:{xs:{y:"x"},columns:f.map((g,p)=>[p?"y":"x",...g]),type:u()},axis:{x:{label:"X",showDist:!0,tick:{format:a.format(".02f")}},y:{label:"Y",showDist:!0,tick:{format:a.format(".02f")}}}});break;default:return}d.data&&r.generate(d)},Zv=async(e,t)=>{Yv(t);const i=Hv(e);if(i.length)try{await Promise.all(i.map(jv))}catch(n){console.warn("PPTX chart rendering skipped:",n)}}})),fl,qv,Kv,Qv=b((()=>{fl={maxFileBytes:160*1024*1024},qv=()=>({slidesScale:"",slideMode:!1,slideType:"divs2slidesjs",revealjsPath:"",keyBoardShortCut:!1,mediaProcess:!0,jsZipV2:!1,themeProcess:!0,incSlide:{width:0,height:0},slideModeConfig:{first:1,nav:!0,navTxtColor:"black",keyBoardShortCut:!0,showSlideNum:!0,showTotalSlideNum:!0,autoSlide:!0,randomAutoSlide:!1,loop:!1,background:!1,transition:"default",transitionTime:1},revealjsConfig:{}}),Kv=e=>{var t,i,n,a,r,o,s,l;const c=qv();return{...c,...e,incSlide:{width:(a=(i=(t=e?.incSlide)===null||t===void 0?void 0:t.width)!==null&&i!==void 0?i:(n=c.incSlide)===null||n===void 0?void 0:n.width)!==null&&a!==void 0?a:0,height:(l=(o=(r=e?.incSlide)===null||r===void 0?void 0:r.height)!==null&&o!==void 0?o:(s=c.incSlide)===null||s===void 0?void 0:s.height)!==null&&l!==void 0?l:0},slideModeConfig:{...c.slideModeConfig,...e?.slideModeConfig},revealjsConfig:{...c.revealjsConfig,...e?.revealjsConfig}}}})),Jv,ep,hl,tp,AA=b((()=>{Jv=`
42
+ .slide{position:relative;border:1px solid #333;border-radius:10px;overflow:hidden;margin-bottom:50px;margin-left:auto;margin-right:auto;z-index:100}
43
+ .slide div.block{position:absolute;top:0;left:0;width:100%;line-height:1}
44
+ .slide div.content{display:flex;flex-direction:column}
45
+ .slide div.diagram-content{display:flex;flex-direction:column}
46
+ .slide div.content-rtl{display:flex;flex-direction:column;direction:rtl}
47
+ .slide .pregraph-rtl{direction:rtl}
48
+ .slide .pregraph-ltr{direction:ltr}
49
+ .slide .pregraph-inherit{direction:inherit}
50
+ .slide .slide-prgrph{width:100%}
51
+ .slide .line-break-br::before{content:"\\A";white-space:pre}
52
+ .slide div.v-up{justify-content:flex-start}
53
+ .slide div.v-mid{justify-content:center}
54
+ .slide div.v-down{justify-content:flex-end}
55
+ .slide div.h-left{justify-content:flex-start;align-items:flex-start;text-align:left}
56
+ .slide div.h-left-rtl{justify-content:flex-end;align-items:flex-end;text-align:left}
57
+ .slide div.h-mid{justify-content:center;align-items:center;text-align:center}
58
+ .slide div.h-right{justify-content:flex-end;align-items:flex-end;text-align:right}
59
+ .slide div.h-right-rtl{justify-content:flex-start;align-items:flex-start;text-align:right}
60
+ .slide div.h-just,.slide div.h-dist{text-align:justify}
61
+ .slide div.up-left{justify-content:flex-start;align-items:flex-start;text-align:left}
62
+ .slide div.up-center{justify-content:flex-start;align-items:center}
63
+ .slide div.up-right{justify-content:flex-start;align-items:flex-end}
64
+ .slide div.center-left{justify-content:center;align-items:flex-start;text-align:left}
65
+ .slide div.center-center{justify-content:center;align-items:center}
66
+ .slide div.center-right{justify-content:center;align-items:flex-end}
67
+ .slide div.down-left{justify-content:flex-end;align-items:flex-start;text-align:left}
68
+ .slide div.down-center{justify-content:flex-end;align-items:center}
69
+ .slide div.down-right{justify-content:flex-end;align-items:flex-end}
70
+ .slide li.slide{margin:10px 0;font-size:18px}
71
+ .slide table{position:absolute}
72
+ .slide svg.drawing{position:absolute;overflow:visible}
73
+ `,ep=`
74
+ .flyfish-pptx-scale-box{box-sizing:border-box;max-width:100%;margin:0 auto;min-width:0}
75
+ .flyfish-pptx-content{position:relative;box-sizing:border-box;max-width:none;min-width:0;transform-origin:top left;will-change:transform}
76
+ .flyfish-pptx-content[data-render-state="loading"]{opacity:.82}
77
+ .flyfish-pptx-content .slide{background:#fff;box-shadow:0 18px 36px rgba(18,35,52,.12)}
78
+ .flyfish-pptx-thumbnail{display:block;box-sizing:border-box;width:min(960px,100%);height:auto;margin:0 auto 28px;border-radius:12px;background:#fff;box-shadow:0 18px 36px rgba(18,35,52,.14)}
79
+ ${Jv}
80
+ `,hl="flyfish-pptx-native-style",tp=e=>{if(e.getElementById(hl))return;const t=e.createElement("style");t.id=hl,t.textContent=ep,(e.head||e.documentElement).appendChild(t)}})),ip,np=b((()=>{ip=(e={})=>{var t;return e.workerFactory?e.workerFactory():e.workerUrl?new Worker(e.workerUrl,{type:(t=e.workerType)!==null&&t!==void 0?t:"module"}):new Worker(new URL("/assets/pptx.worker-sq6zcLi8.js",""+(document.currentScript?.src||location.href)),{type:"module"})}})),vr,gl,ap,rp,op,SA=b((()=>{$A(),Qv(),AA(),np(),vr=(e,t,i)=>Math.min(i,Math.max(t,e)),gl=e=>vr(typeof e=="number"&&Number.isFinite(e)?e:100,25,300),ap=(e,t)=>{const i={...fl,...t.zipLimits};if(i.maxFileBytes&&e.byteLength>i.maxFileBytes)throw new Error(`PPTX file is too large to preview safely (${e.byteLength} bytes).`)},rp=(e,t)=>{const i=e.ownerDocument.createElement("template");i.innerHTML=t;const n=Array.from(i.content.children);return e.append(i.content),n[0]||null},op=class vp{static async open(t,i,n={}){const a=new vp(t,i,n);return await a.open(),a}constructor(t,i,n){this.worker=null,this.resizeObserver=null,this.resizeFrame=0,this.fitScale=1,this.userZoomPercent=100,this.currentZoomPercent=100,this.thumbnailElement=null,this.disposed=!1,this.completed=!1,this.buffer=t,this.target=i,this.options=n,this.userZoomPercent=gl(n.zoomPercent),this.currentZoomPercent=this.userZoomPercent;const a=i.ownerDocument||document;this.scaleBox=a.createElement("div"),this.scaleBox.className="flyfish-pptx-scale-box",this.content=a.createElement("div"),this.content.className="flyfish-pptx-content",this.content.dataset.renderState="loading",this.scaleBox.append(this.content)}get zoomPercent(){return Math.round(this.currentZoomPercent)}async open(){ap(this.buffer,this.options),tp(this.target.ownerDocument||document),this.target.replaceChildren(this.scaleBox),this.attachResizeObserver(),this.startWorker()}async setZoom(t){const i=gl(t);this.userZoomPercent=vr(i/Math.max(this.fitScale,.01),25,600),this.scheduleResize()}destroy(){var t,i,n;this.disposed=!0,(t=this.worker)===null||t===void 0||t.terminate(),this.worker=null,(i=this.resizeObserver)===null||i===void 0||i.disconnect(),this.resizeObserver=null,this.resizeFrame&&((n=this.target.ownerDocument.defaultView)===null||n===void 0||n.cancelAnimationFrame(this.resizeFrame)),this.target.replaceChildren()}startWorker(){var t;(t=this.worker)===null||t===void 0||t.terminate(),this.completed=!1,this.content.dataset.renderState="loading",this.worker=ip(this.options),this.worker.addEventListener("message",i=>this.processMessage(i.data)),this.worker.addEventListener("error",i=>this.fail(i.error||i.message)),this.worker.postMessage({type:"processPPTX",data:this.buffer,IE11:!1,options:Kv(this.options.engineOptions)})}processMessage(t){var i,n,a,r,o,s,l,c,u,d;if(!(this.disposed||this.completed))switch(t.type){case"slide":{this.clearThumbnail();const f=rp(this.content,String(t.data||""));this.scheduleResize(),(n=(i=this.options).onSlideRendered)===null||n===void 0||n.call(i,Number(t.slide_num||0),f);break}case"pptx-thumb":this.showThumbnail(String(t.data||"")),(r=(a=this.options).onThumbnail)===null||r===void 0||r.call(a,String(t.data||""));break;case"slideSize":(s=(o=this.options).onSlideSize)===null||s===void 0||s.call(o,t.data||{});break;case"globalCSS":this.appendGlobalCss(String(t.data||""));break;case"progress-update":(c=(l=this.options).onProgress)===null||c===void 0||c.call(l,Number(t.data||0),t);break;case"ExecutionTime":case"Done":this.complete(t.charts);break;case"WARN":(d=(u=this.options).onWarning)===null||d===void 0||d.call(u,t.data);break;case"ERROR":this.fail(t.data);break;default:break}}appendGlobalCss(t){if(!t)return;const i=this.target.ownerDocument.createElement("style");i.textContent=t,this.content.append(i)}showThumbnail(t){if(!t||this.content.children.length>0)return;const i=this.target.ownerDocument.createElement("img");i.className="flyfish-pptx-thumbnail",i.alt="PPTX preview thumbnail",i.src=`data:image/jpeg;base64,${t}`,this.thumbnailElement=i,this.scaleBox.insertBefore(i,this.content)}clearThumbnail(){var t;(t=this.thumbnailElement)===null||t===void 0||t.remove(),this.thumbnailElement=null}async complete(t){var i,n,a;this.disposed||this.completed||(this.completed=!0,this.content.dataset.renderState="ready",(i=this.worker)===null||i===void 0||i.terminate(),this.worker=null,this.scheduleResize(),await Zv(t,this.content),this.scheduleResize(),(a=(n=this.options).onRenderComplete)===null||a===void 0||a.call(n))}fail(t){var i,n,a;this.disposed||(this.completed=!0,(i=this.worker)===null||i===void 0||i.terminate(),this.worker=null,this.content.dataset.renderState="error",(a=(n=this.options).onError)===null||a===void 0||a.call(n,t))}attachResizeObserver(){typeof ResizeObserver>"u"||(this.resizeObserver=new ResizeObserver(()=>this.scheduleResize()),this.resizeObserver.observe(this.target),this.target.parentElement&&this.resizeObserver.observe(this.target.parentElement))}scheduleResize(){const t=this.target.ownerDocument.defaultView||window;this.resizeFrame&&t.cancelAnimationFrame(this.resizeFrame),this.resizeFrame=t.requestAnimationFrame(()=>this.resize())}resize(){var t,i;const n=((t=this.target.ownerDocument.defaultView)===null||t===void 0?void 0:t.HTMLElement)||HTMLElement,a=Array.from(this.content.children).filter(l=>l instanceof n&&(l.classList.contains("slide")||l.tagName==="SECTION"));if(!a.length)return;const r=Math.max(...a.map(l=>l.offsetWidth),0);if(!r)return;const o=this.target.clientWidth||((i=this.target.parentElement)===null||i===void 0?void 0:i.clientWidth)||r;this.fitScale=this.options.fitMode==="none"?1:Math.min(1,o/r);const s=vr(this.fitScale*(this.userZoomPercent/100),.25,3);this.currentZoomPercent=s*100,this.content.style.width=`${r}px`,this.content.style.transform=`scale(${s})`,this.scaleBox.style.width=`${Math.ceil(r*s)}px`,this.scaleBox.style.minHeight=`${Math.ceil(this.content.scrollHeight*s)}px`}}})),kA=b((()=>{SA(),np(),Qv()})),EA=Dn({default:()=>CA});async function CA(e,t,i,n){const a=t.ownerDocument||document,r=a.defaultView||(typeof window<"u"?window:null),o=Tr();let s=null,l="loading",c="",u=100,d=!1,f=!1;const h=cp(a),g=kt(a,"div","pptx-viewer-shell");g.dataset.viewerZoomProvider="pptx";const p=kt(a,"div","pptx-loading");p.setAttribute("aria-live","polite"),p.append(kt(a,"span","pptx-loading-dot"),kt(a,"span",void 0,"正在解析 PPTX..."));const m=kt(a,"div","pptx-error"),v=kt(a,"strong",void 0,"PPTX 预览失败"),_=kt(a,"p");m.append(v,_);const x=kt(a,"div","pptx-render-surface");g.append(p,m,x),t.replaceChildren(h,g);const y=()=>{var E;return vl((E=s?.zoomPercent)!==null&&E!==void 0?E:u)},$=()=>{const E=y();return{scale:E/100,label:`${E}%`,canZoomIn:E<300,canZoomOut:E>25,canReset:E!==100,minScale:.25,maxScale:3}},T=async E=>{const k=vl(E);return u=k,s&&(await s.setZoom(k),u=y()),o.emit(),$()},A=()=>{var E;d||(d=!0,(E=n?.onProgressiveRender)===null||E===void 0||E.call(n))},S=()=>{p.hidden=!(l==="loading"&&!c),m.hidden=l!=="error",_.textContent=c,x.classList.toggle("is-loading",l==="loading")},R=()=>{var E;(E=n?.registerExportAdapter)===null||E===void 0||E.call(n,up(r))};return br(g,{zoomIn:()=>T(y()+15),zoomOut:()=>T(y()-15),resetZoom:()=>T(100),setZoom:E=>T(E*100),getState:$,subscribe:o.subscribe}),(async()=>{var E;l="loading",c="",d=!1,S();try{const k=await op.open(e,x,{fitMode:"contain",zoomPercent:u,zipLimits:fl,lazySlides:!0,lazyMedia:!0,listOptions:{windowed:!0,initialSlides:3,batchSize:4,overscanViewport:1.5},onSlideRendered:()=>A(),onRenderComplete:()=>{f||(l="ready",A(),u=y(),S(),o.emit())},onSlideError:(P,w)=>{console.warn("PPTX slide render warning:",w)},onError:P=>{var w;f||(l="error",c=pl(P),(w=n?.registerExportAdapter)===null||w===void 0||w.call(n,null),S())}});if(f){k.destroy();return}s=k,l="ready",A(),u=y(),R(),S(),o.emit()}catch(k){if(f)return;l="error",c=pl(k),(E=n?.registerExportAdapter)===null||E===void 0||E.call(n,null),S()}})(),{$el:g,unmount(){var E;f=!0,(E=n?.registerExportAdapter)===null||E===void 0||E.call(n,null),wr(g),s?.destroy(),s=null,t.replaceChildren()}}}var sp,lp,cp,kt,vl,pl,up,RA=b((()=>{kA(),nc(),sp=`
81
+ .pptx-viewer-shell{position:relative;box-sizing:border-box;min-height:100%;padding:24px 20px;background:#eef3f8;color:#1f2d3b;font-family:Aptos,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif}
82
+ .pptx-render-surface{min-height:240px}
83
+ .pptx-render-surface.is-loading{opacity:.72}
84
+ .pptx-loading{position:sticky;top:12px;z-index:3;box-sizing:border-box;display:inline-flex;align-items:center;gap:10px;margin:0 0 16px 50%;padding:10px 14px;border:1px solid rgba(42,94,144,.14);border-radius:999px;background:rgba(255,255,255,.92);color:#41556b;box-shadow:0 12px 32px rgba(24,44,64,.12);transform:translateX(-50%)}
85
+ .pptx-loading[hidden],.pptx-error[hidden]{display:none!important}
86
+ .pptx-loading-dot{width:9px;height:9px;border-radius:999px;background:#1f9d67;box-shadow:0 0 0 6px rgba(31,157,103,.13)}
87
+ .pptx-error{box-sizing:border-box;width:min(680px,calc(100% - 32px));margin:48px auto;padding:24px;border:1px solid rgba(28,43,58,.12);border-radius:14px;background:#fff;color:#1f2d3b;box-shadow:0 16px 42px rgba(25,42,54,.08)}
88
+ .pptx-error strong{display:block;margin-bottom:10px;font-size:18px}
89
+ .pptx-error p{margin:0;color:#607282;line-height:1.7}
90
+ `,lp=`
91
+ .pptx-viewer-shell {
92
+ background: #fff !important;
93
+ padding: 0 !important;
94
+ }
95
+ .pptx-render-surface {
96
+ display: block !important;
97
+ overflow: visible !important;
98
+ }
99
+ .pptx-render-surface [data-slide-index] {
100
+ break-after: page;
101
+ page-break-after: always;
102
+ margin: 0 auto !important;
103
+ }
104
+ .pptx-render-surface [data-slide-index]:last-child {
105
+ break-after: auto;
106
+ page-break-after: auto;
107
+ }
108
+ `,cp=e=>{const t=e.createElement("style");return t.textContent=sp,t},kt=(e,t,i,n)=>{const a=e.createElement(t);return i&&(a.className=i),n!==void 0&&(a.textContent=n),a},vl=e=>Math.min(300,Math.max(25,Math.round(e))),pl=e=>e instanceof Error?e.message:String(e||"PPTX 解析失败"),up=e=>({print:!0,exportHtml:!0,includeDocumentStyles:!0,beforeSnapshot:()=>bl(e||void 0),printStyle:lp})}));nc();var dp=yt.find(e=>e.id==="office-presentation");if(!dp)throw new Error("@file-viewer/renderer-presentation could not locate the core presentation renderer definition.");var fp=dp,MA=(e,t,i,n)=>Promise.resolve().then(()=>(RA(),EA)).then(({default:a})=>a(e,t,i,n)),ml={id:"file-viewer-renderer-presentation",label:"Flyfish File Viewer presentation renderer",definitions:[fp],handlers:[{rendererId:fp.id,handler:MA}]},hp=globalThis,gp=hp.FlyfishFileViewerWebFullRenderers||(hp.FlyfishFileViewerWebFullRenderers={});gp.presentation=ml,gp[ml.id]=ml})();